|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.map.Attribute
org.apache.cayenne.map.ObjAttribute
public class ObjAttribute
An ObjAttribute is a mapping descriptor of a Java class property.
| 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 the name of the mapped DbAttribute. |
String |
getDbAttributePath()
Returns a dot-separated path that starts in the root DbEntity that maps to this attribute's ObjEntity and spans zero or more relationships, always ending in a DbAttribute name. |
Iterator<CayenneMapEntry> |
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()
Deprecated. since 3.0 use 'isFlattened'. |
boolean |
isFlattened()
Returns whether this attribute is "flattened", meaning that it points to a column from an entity other than the DbEntity mapped to the parent ObjEntity. |
boolean |
isUsedForLocking()
Returns whether this attribute should be used for locking. |
void |
setDbAttribute(DbAttribute dbAttribute)
Deprecated. since 3.0 - this method only works for non-flattened attributes. 'setDbAttributePath' should be used instead. |
void |
setDbAttributeName(String name)
Deprecated. since 3.0 use setDbAttributePath(String). |
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 |
|---|
protected String type
protected boolean usedForLocking
protected String dbAttributePath
| Constructor Detail |
|---|
public ObjAttribute()
public ObjAttribute(String name)
public ObjAttribute(String name,
String type,
ObjEntity entity)
| Method Detail |
|---|
public Class<?> getJavaClass()
public void encodeAsXML(XMLEncoder encoder)
encodeAsXML in interface XMLSerializableencodeAsXML in class Attributepublic String getType()
public void setType(String type)
public boolean isUsedForLocking()
public void setUsedForLocking(boolean usedForLocking)
public DbAttribute getDbAttribute()
public Iterator<CayenneMapEntry> getDbPathIterator()
public void setDbAttribute(DbAttribute dbAttribute)
public String getDbAttributeName()
public void setDbAttributeName(String name)
setDbAttributePath(String).
public void setDbAttributePath(String dbAttributePath)
public String getDbAttributePath()
public boolean isCompound()
public boolean isFlattened()
public ObjAttribute getClientAttribute()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||