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

## org.apache.cayenne.map
Class ObjAttribute

    java.lang.Object
      org.apache.cayenne.map.Attribute
          org.apache.cayenne.map.ObjAttribute

All Implemented Interfaces:
  Serializable, CayenneMapEntry, XMLSerializable

Direct Known Subclasses:
  ClientObjAttribute, EOObjAttribute

    public class ObjAttribute

extends Attribute

An ObjAttribute is a mapping descriptor of a Java class property.

Author:
  Misha Shengaout, Andrus Adamchik
See Also:
  Serialized Form

Field Summary
`protected String` | `dbAttributePath`
`protected String` | `type`
`protected boolean` | `usedForLocking`

Fields inherited from class org.apache.cayenne.map.Attribute
`entity, name`

Constructor Summary
`ObjAttribute()`
`ObjAttribute(String name)`
`ObjAttribute(String name, String type, ObjEntity entity)`

Method Summary
`void` | `encodeAsXML(XMLEncoder encoder)` Prints itself as XML to the provided XMLEncoder.
`ObjAttribute` | `getClientAttribute()` Returns an ObjAttribute stripped of any server-side information, such as DbAttribute mapping.
`DbAttribute` | `getDbAttribute()` Returns a DbAttribute mapped by this ObjAttribute.
`String` | `getDbAttributeName()` Returns the dbAttributeName.
`String` | `getDbAttributePath()`
`Iterator` | `getDbPathIterator()`
`Class` | `getJavaClass()` Returns Java class of an object property described by this attribute.
`String` | `getType()` Returns fully qualified Java class name of the object property represented by this attribute.
`boolean` | `isCompound()`
`boolean` | `isUsedForLocking()` Returns whether this attribute should be used for locking.
`void` | `setDbAttribute(DbAttribute dbAttribute)` Set mapped DbAttribute.
`void` | `setDbAttributeName(String dbAttributeName)` Sets the dbAttributeName.
`void` | `setDbAttributePath(String dbAttributePath)`
`void` | `setType(String type)` Sets the type of the data object property.
`void` | `setUsedForLocking(boolean usedForLocking)` Sets whether this attribute should be used for locking.

Methods inherited from class org.apache.cayenne.map.Attribute
`getEntity, getName, getParent, setEntity, setName, setParent, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### type

    protected String type

### usedForLocking

    protected boolean usedForLocking

### dbAttributePath

    protected String dbAttributePath

Constructor Detail

### ObjAttribute

    public ObjAttribute()

### ObjAttribute

    public ObjAttribute(String name)

### ObjAttribute

    public ObjAttribute(String name,
                        String type,
                        ObjEntity entity)

Method Detail

### getJavaClass

    public Class getJavaClass()

  Returns Java class of an object property described by this attribute. Wraps any thrown exceptions into CayenneRuntimeException.

### encodeAsXML

    public void encodeAsXML(XMLEncoder encoder)

  Prints itself as XML to the provided XMLEncoder.

  Specified by:
    `encodeAsXML` in interface `XMLSerializable`
  Specified by:
    `encodeAsXML` in class `Attribute`
  Since:
    1.1

### getType

    public String getType()

  Returns fully qualified Java class name of the object property represented by this attribute.

### setType

    public void setType(String type)

  Sets the type of the data object property. Type is expected to be a fully qualified Java class name.

### isUsedForLocking

    public boolean isUsedForLocking()

  Returns whether this attribute should be used for locking.

  Since:
    1.1

### setUsedForLocking

    public void setUsedForLocking(boolean usedForLocking)

  Sets whether this attribute should be used for locking.

  Since:
    1.1

### getDbAttribute

    public DbAttribute getDbAttribute()

  Returns a DbAttribute mapped by this ObjAttribute.

### getDbPathIterator

    public Iterator getDbPathIterator()

### setDbAttribute

    public void setDbAttribute(DbAttribute dbAttribute)

  Set mapped DbAttribute.

### getDbAttributeName

    public String getDbAttributeName()

  Returns the dbAttributeName.

  Returns:
    String

### setDbAttributeName

    public void setDbAttributeName(String dbAttributeName)

  Sets the dbAttributeName.

  Parameters:
    `dbAttributeName` - The dbAttributeName to set

### setDbAttributePath

    public void setDbAttributePath(String dbAttributePath)

### getDbAttributePath

    public String getDbAttributePath()

### isCompound

    public boolean isCompound()

### getClientAttribute

    public ObjAttribute getClientAttribute()

  Returns an ObjAttribute stripped of any server-side information, such as DbAttribute mapping.

  Since:
    1.2

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

Copyright © 2001-2007 Apache Cayenne. All Rights Reserved.