Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.property
Interface ClassDescriptor

All Known Implementing Classes:
  BaseClassDescriptor, EntityDescriptor

    public interface ClassDescriptor

Provides access to a set of persistent properties of a Java Bean and methods for manipulating such bean.

Since:
  1.2
Author:
  Andrus Adamchik

Method Summary
`java.lang.Object` | `createObject()` Creates a new instance of a class described by this object.
`Property` | `getDeclaredProperty(java.lang.String propertyName)` Returns a Java Bean property descriptor matching property name or null if no such property is found.
`java.lang.Class` | `getObjectClass()` Returns a bean class mapped by this descriptor.
`java.util.Iterator` | `getProperties()` Returns an Iterator over descriptor properties.
`Property` | `getProperty(java.lang.String propertyName)` Returns a Java Bean property descriptor matching property name or null if no such property is found.
`ClassDescriptor` | `getSubclassDescriptor(java.lang.Class objectClass)` Returns the most "specialized" descriptor for a given class.
`ClassDescriptor` | `getSuperclassDescriptor()` Returns a descriptor of the mapped superclass or null if the descriptor's entity sits at the top of inheritance hierarchy or no inheritance is mapped.
`void` | `injectValueHolders(java.lang.Object object)` Prepares object properties for access.
`boolean` | `isFault(java.lang.Object object)` Returns true if an object is not fully resolved.
`void` | `shallowMerge(java.lang.Object from, java.lang.Object to)` Merges object properties from one object to another, avoiding traversal of the ArcProperties.
`boolean` | `visitProperties(PropertyVisitor visitor)` Passes the visitor to all properties "visit" method, terminating properties walk through in case one of the properties returns false.

Method Detail

### getObjectClass

    java.lang.Class getObjectClass()

  Returns a bean class mapped by this descriptor.

### getSuperclassDescriptor

    ClassDescriptor getSuperclassDescriptor()

  Returns a descriptor of the mapped superclass or null if the descriptor's entity sits at the top of inheritance hierarchy or no inheritance is mapped.

### getSubclassDescriptor

    ClassDescriptor getSubclassDescriptor(java.lang.Class objectClass)

  Returns the most "specialized" descriptor for a given class. This method assumes that the following is true:

       this.getObjectClass().isAssignableFrom(objectClass)

### createObject

    java.lang.Object createObject()

  Creates a new instance of a class described by this object.

### injectValueHolders

    void injectValueHolders(java.lang.Object object)
                            throws PropertyAccessException

  Prepares object properties for access. This may include injection of value holders into the object and such.

  Throws:
    `PropertyAccessException`

### shallowMerge

    void shallowMerge(java.lang.Object from,
                      java.lang.Object to)
                      throws PropertyAccessException

  Merges object properties from one object to another, avoiding traversal of the ArcProperties.

  Throws:
    `PropertyAccessException`

### getProperty

    Property getProperty(java.lang.String propertyName)

  Returns a Java Bean property descriptor matching property name or null if no such property is found. Lookup includes properties from this descriptor and all its superclass decsriptors. Returned property maybe any one of simple, value holder or collection properties.

### getDeclaredProperty

    Property getDeclaredProperty(java.lang.String propertyName)

  Returns a Java Bean property descriptor matching property name or null if no such property is found. Lookup DOES NOT including properties from the superclass decsriptors. Returned property maybe any one of simple, value holder or collection properties.

### getProperties

    java.util.Iterator getProperties()

  Returns an Iterator over descriptor properties.

### visitProperties

    boolean visitProperties(PropertyVisitor visitor)

  Passes the visitor to all properties "visit" method, terminating properties walk through in case one of the properties returns false. Returns true if all visited properties returned true, false - if one property returned false.

### isFault

    boolean isFault(java.lang.Object object)

  Returns true if an object is not fully resolved.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2006 Apache.org All Rights Reserved.