From 195774c489a1a671aca514b0afa88332bf9c6ee3 Mon Sep 17 00:00:00 2001
From: lresende
+ * The expression
+ *true
if the object is an instance.
+ * @see Class#isInstance
+ */
+ boolean isInstance(Object object);
+
+ /**
+ * Returns the List of the {@link Property Properties} of this type.
+ *
+ * type.getProperties().indexOf(property)
+ *
+ * yields the property's index relative to this type.
+ * As such, these expressions are equivalent:
+ *
+ * dataObject.{@link DataObject#get(int) get}(i)
+ * dataObject.{@link DataObject#get(Property) get}((Property)dataObject.getType().getProperties().get(i));
+ *
+ *
+ * dataObject.{@link DataObject#get(String) get}("name") + * dataObject.{@link DataObject#get(Property) get}(dataObject.getType().getProperty("name")) + *+ * + * @return the Property with the specified name. + * @see #getProperties + */ + Property getProperty(String propertyName); + + /** + * Indicates if this Type specifies DataTypes (true) or DataObjects (false). + * When false, any object that is an instance of this type + * also implements the DataObject interface. + * True for simple types such as Strings and numbers. + * For any object: + *
+ * isInstance(object) && !isDataType() implies + * DataObject.class.isInstance(object) returns true. + *+ * @return true if Type specifies DataTypes, false for DataObjects. + */ + boolean isDataType(); + + /** + * Indicates if this Type allows any form of open content. If false, + * dataObject.getInstanceProperties() must be the same as + * dataObject.getType().getProperties() for any DataObject dataObject of this Type. + * @return true if this Type allows open content. + */ + boolean isOpen(); + + /** + * Indicates if this Type specifies Sequenced DataObjects. + * Sequenced DataObjects are used when the order of values + * between Properties must be preserved. + * When true, a DataObject will return a Sequence. For example, + *
+ * Sequence elements = dataObject.{@link DataObject#getSequence() getSequence}(); + *+ * @return true if this Type specifies Sequenced DataObjects. + */ + boolean isSequenced(); + + /** + * Indicates if this Type is abstract. If true, this Type cannot be + * instantiated. Abstract types cannot be used in DataObject or + * DataFactory create methods. + * @return true if this Type is abstract. + */ + boolean isAbstract(); + + /** + * Returns the List of base Types for this Type. The List is empty + * if there are no base Types. XSD
+ * 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 Type'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 Type. + */ + List /*Property*/ getInstanceProperties(); + + /** + * Returns the value of the specified instance property of this Type. + * @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