Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.javatools.db.property
Class PropertyInfo

java.lang.Object
  extended by oracle.javatools.db.property.PropertyInfo
All Implemented Interfaces:
java.lang.Comparable

public abstract class PropertyInfo
extends java.lang.Object
implements java.lang.Comparable

Wrapper for the PropertyDescriptor beans class that includes some db api specific accessors for the annotation information.

Since:
11.0

Field Summary
static java.lang.String ID
           
static java.lang.String NAME
           
 
Constructor Summary
PropertyInfo()
           
 
Method Summary
 int compareTo(java.lang.Object o)
          The implementation of this method allows a collection of PropertyInfo objects to be sorted lexicographically by the property name.
 boolean equals(java.lang.Object o)
           
protected abstract  boolean equalsImpl(PropertyInfo info)
           
abstract  java.lang.Class getPropertyClass()
          Returns the class expected for values of this property.
abstract  java.lang.String getPropertyName()
          Returns the name of the property.
 java.lang.String getPropertyPath()
          Deprecated. since DBObject.getProperty() now works for all bean and property map properties this is no longer required.
 java.lang.Object getPropertyValue(java.lang.Object bean)
          Invokes the getter method using owningObject as the object on which the getter is called.
 java.lang.Class getReferencedClass()
          If this property is a reference property (i.e.
protected  boolean isAfter()
          Returns true if the get OR set method for this property has the After annotation.
 boolean isDeprecated()
          Returns true if the get OR set method for this property is deprecated.
 boolean isGetTransient()
          Returns true if the get method for this property has the Transient annotation.
 boolean isInternalReference()
          If this class is a reference property (i.e.
 boolean isSetTransient()
          Returns true if the set method for this property has the Transient annotation.
 boolean isStaticReference()
          Only valid for properties with a return type of DBObjectID.
 boolean isSupported(java.lang.Class<? extends DBObjectProvider> proClz, java.lang.Class<? extends DBObject> objClz)
          Tests whether this property is supported in the given provider for the given object type.
 boolean isTransient()
          Returns true if the get OR set method for this property has the Transient annotation.
 void setPropertyValue(java.lang.Object bean, java.lang.Object value)
          Invokes the setter method using owningObject as the object on which the setter is called, and value as the value passed to the setter.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final java.lang.String ID
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values
Constructor Detail

PropertyInfo

public PropertyInfo()
Method Detail

getPropertyName

public abstract java.lang.String getPropertyName()
Returns the name of the property.


getPropertyPath

@Deprecated
public java.lang.String getPropertyPath()
Deprecated. since DBObject.getProperty() now works for all bean and property map properties this is no longer required.


getPropertyClass

public abstract java.lang.Class getPropertyClass()
Returns the class expected for values of this property.


getPropertyValue

public java.lang.Object getPropertyValue(java.lang.Object bean)
Invokes the getter method using owningObject as the object on which the getter is called. This method will return null if any exception occurs while invoking the getter method.


setPropertyValue

public void setPropertyValue(java.lang.Object bean,
                             java.lang.Object value)
                      throws java.lang.Exception
Invokes the setter method using owningObject as the object on which the setter is called, and value as the value passed to the setter. If any Exception is encountered invoking the setter it is passed on to the caller.

Throws:
java.lang.Exception

getReferencedClass

public java.lang.Class getReferencedClass()
If this property is a reference property (i.e. property class is DBObjectID) this returns the expected class of object that the property references. By default this is DBObject.class. For non-reference properties this method will return null.

Returns:
the expected class of object referenced, or null if this property isn't a reference property.

isInternalReference

public boolean isInternalReference()
If this class is a reference property (i.e. property class is DBObjectID) then this returns true if the referenced object is owned by the same SchemaObject as the object this property is on.

Returns:
true if this property is a reference property and the object it references is under the same owning SchemaObject as the object this property is on.

isGetTransient

public boolean isGetTransient()
Returns true if the get method for this property has the Transient annotation.

Returns:
true if the get method for this property is "transient"
See Also:
Transient

isSetTransient

public boolean isSetTransient()
Returns true if the set method for this property has the Transient annotation.

Returns:
true if the set method for this property is "transient"
See Also:
Transient

isTransient

public boolean isTransient()
Returns true if the get OR set method for this property has the Transient annotation.

See Also:
Transient

isDeprecated

public boolean isDeprecated()
Returns true if the get OR set method for this property is deprecated.


isAfter

protected boolean isAfter()
Returns true if the get OR set method for this property has the After annotation.

Returns:
true if this property is "after" the others on the bean
See Also:
After

isSupported

public boolean isSupported(java.lang.Class<? extends DBObjectProvider> proClz,
                           java.lang.Class<? extends DBObject> objClz)
Tests whether this property is supported in the given provider for the given object type.

Parameters:
proClz - the desired provider type, if null all provider types are matched.
objClz - the desired object type.
Returns:
true if this property is supported

compareTo

public int compareTo(java.lang.Object o)
The implementation of this method allows a collection of PropertyInfo objects to be sorted lexicographically by the property name.

Specified by:
compareTo in interface java.lang.Comparable

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

equalsImpl

protected abstract boolean equalsImpl(PropertyInfo info)

isStaticReference

public boolean isStaticReference()
Only valid for properties with a return type of DBObjectID. If true it means that the property is static and shouldn't be replaced by any call to replaceReferenceIDs.

Returns:
false by default, or true to omit the property value from and replaceReferenceIDs logic on DBObject.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

Copyright © 1997, 2011, Oracle. All rights reserved.