|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.map.Embeddable
public class Embeddable
A mapping descriptor of an embeddable class. Embeddable is a persistent class that doesn't have its own identity and is embedded in other persistent classes. It can be viewed as a custom type mapped to one or more database columns. Embeddable mapping can include optional default column names that can be overriden by the owning entity.
Field Summary | |
---|---|
protected SortedMap<String,EmbeddableAttribute> |
attributes
|
protected String |
className
|
protected DataMap |
dataMap
|
Constructor Summary | |
---|---|
Embeddable()
|
|
Embeddable(String className)
|
Method Summary | |
---|---|
void |
addAttribute(EmbeddableAttribute attribute)
Adds new embeddable attribute to the entity, setting its parent embeddable to be this object. |
void |
encodeAsXML(XMLEncoder encoder)
XMLSerializable implementation that generates XML for embeddable. |
EmbeddableAttribute |
getAttribute(String name)
|
EmbeddableAttribute |
getAttributeForDbPath(String dbPath)
Returns EmbeddableAttribute of this Embeddable that maps to dbAttribute parameter. |
SortedMap<String,EmbeddableAttribute> |
getAttributeMap()
Returns an unmodifiable sorted map of embeddable attributes. |
Collection<EmbeddableAttribute> |
getAttributes()
Returns an unmodifiable collection of embeddable attributes. |
String |
getClassName()
|
DataMap |
getDataMap()
|
Class<?> |
getJavaClass()
Returns Java class of the embeddable. |
void |
removeAttribute(String name)
|
void |
setClassName(String className)
|
void |
setDataMap(DataMap dataMap)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String className
protected SortedMap<String,EmbeddableAttribute> attributes
protected DataMap dataMap
Constructor Detail |
---|
public Embeddable()
public Embeddable(String className)
Method Detail |
---|
public DataMap getDataMap()
public void setDataMap(DataMap dataMap)
public Class<?> getJavaClass()
public EmbeddableAttribute getAttributeForDbPath(String dbPath)
dbAttribute
parameter. Returns null if no such attribute is found.
public SortedMap<String,EmbeddableAttribute> getAttributeMap()
public Collection<EmbeddableAttribute> getAttributes()
public void addAttribute(EmbeddableAttribute attribute)
public EmbeddableAttribute getAttribute(String name)
public void removeAttribute(String name)
public String getClassName()
public void setClassName(String className)
public void encodeAsXML(XMLEncoder encoder)
XMLSerializable
implementation that generates XML for embeddable.
encodeAsXML
in interface XMLSerializable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |