From 195774c489a1a671aca514b0afa88332bf9c6ee3 Mon Sep 17 00:00:00 2001 From: lresende Date: Tue, 10 Nov 2009 19:20:12 +0000 Subject: Moving SDO tags git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@834617 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/commonj/sdo/Property.java | 115 +++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 sdo-java/tags/1.0-incubating/sdo-api/src/main/java/commonj/sdo/Property.java (limited to 'sdo-java/tags/1.0-incubating/sdo-api/src/main/java/commonj/sdo/Property.java') diff --git a/sdo-java/tags/1.0-incubating/sdo-api/src/main/java/commonj/sdo/Property.java b/sdo-java/tags/1.0-incubating/sdo-api/src/main/java/commonj/sdo/Property.java new file mode 100644 index 0000000000..89a3857a75 --- /dev/null +++ b/sdo-java/tags/1.0-incubating/sdo-api/src/main/java/commonj/sdo/Property.java @@ -0,0 +1,115 @@ +/** + * + * + * Service Data Objects + * Version 2.1.0 + * Licensed Materials + * + * (c) Copyright BEA Systems, Inc., International Business Machines Corporation, + * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG., + * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies, + * 2005, 2006. All rights reserved. + * + * + * + */ + +package commonj.sdo; + +import java.util.List; + +/** + * A representation of a Property in the {@link Type type} of a {@link DataObject data object}. + */ +public interface Property +{ + /** + * Returns the name of the Property. + * @return the Property name. + */ + String getName(); + + /** + * Returns the type of the Property. + * @return the Property type. + */ + Type getType(); + + /** + * Returns whether the Property is many-valued. + * @return true if the Property is many-valued. + */ + boolean isMany(); + + /** + * Returns whether the Property is containment, i.e., whether it represents by-value composition. + * @return true if the Property is containment. + */ + boolean isContainment(); + + /** + * Returns the containing type of this Property. + * @return the Property's containing type. + * @see Type#getProperties() + */ + Type getContainingType(); + + /** + * Returns the default value this Property will have in a {@link DataObject data object} where the Property hasn't been set. + * @return the default value. + */ + Object getDefault(); + + /** + * Returns true if values for this Property cannot be modified using the SDO APIs. + * When true, DataObject.set(Property property, Object value) throws an exception. + * Values may change due to other factors, such as services operating on DataObjects. + * @return true if values for this Property cannot be modified. + */ + boolean isReadOnly(); + + /** + * Returns the opposite Property if the Property is bi-directional or null otherwise. + * @return the opposite Property if the Property is bi-directional or null + */ + Property getOpposite(); + + /** + * Returns a list of alias names for this Property. + * @return a list of alias names for this Property. + */ + List /*String*/ getAliasNames(); + + /** + * Returns whether or not instances of this property can be set to null. The effect of calling set(null) on a non-nullable + * property is not specified by SDO. + * @return true if this property is nullable. + */ + boolean isNullable(); + + /** + * Returns whether or not this is an open content Property. + * @return true if this property is an open content Property. + */ + boolean isOpenContent(); + + /** + * Returns a read-only List of instance Properties available on this Property. + *

+ * This list includes, at a minimum, any open content properties (extensions) added to + * the object before {@link commonj.sdo.helper.TypeHelper#define(DataObject) defining + * the Property's Type}. Implementations may, but are not required to in the 2.1 version + * of SDO, provide additional instance properties. + * @return the List of instance Properties on this Property. + */ + List /*Property*/ getInstanceProperties(); + + /** + * Returns the value of the specified instance property of this Property. + * @param property one of the properties returned by {@link #getInstanceProperties()}. + * @return the value of the specified property. + * @see DataObject#get(Property) + */ + Object get(Property property); + +} -- cgit v1.2.3