|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.edu.agh.cast.model.mapper.AbstractMappable
@Mapping public abstract class AbstractMappable
Default implementation of the Mappable interface. The implementation should be exactly same in all implementing classes. Custom implementation is needed only if class implementing Mappable cannot extend AbstractMappable.
Field Summary | |
---|---|
protected String |
id
The general id of the mappable - this value is viewable by users and is designed for the data identification. |
Constructor Summary | |
---|---|
AbstractMappable()
|
Method Summary | |
---|---|
AbstractMappable |
clone()
This method makes a shallow copy of the object. |
Object |
getAttribute(String name)
Get value of attribute with given name. |
String[] |
getAttributeNames()
Return all mapped attributes names. |
Class |
getAttributeType(String name)
Returns the type of the attribute with given name. |
String |
getId()
Domain specific id of the object. |
long |
getMid()
The base model id of the object. |
String |
getType()
The mapped type of the object. |
void |
setAttribute(String name,
Object value)
Sets the value of the attribute with given name. |
void |
setId(String id)
Domain specific id setter. |
void |
setMid(long mid)
Base model id setter. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String id
Constructor Detail |
---|
public AbstractMappable()
Method Detail |
---|
@MapAttribute(typeName="mappableId") public String getId()
getId
in interface Mappable
Mappable.getId()
public void setId(String id)
setId
in interface Mappable
id
- The id to set.Mappable.setId(java.lang.String)
public final long getMid()
getMid
in interface Mappable
Mappable.getMid()
public final void setMid(long mid)
setMid
in interface Mappable
mid
- to set.Mappable.setMid(long)
public final Object getAttribute(String name)
getAttribute
in interface Mappable
name
- the name of the attribute
public final void setAttribute(String name, Object value)
setAttribute
in interface Mappable
name
- The name of the attribute.value
- The value of the attribute.Mappable.setAttribute(java.lang.String, java.lang.Object)
public final Class getAttributeType(String name)
getAttributeType
in interface Mappable
name
- The name of the attribute.
Mappable.getAttributeType(java.lang.String)
public final String[] getAttributeNames()
getAttributeNames
in interface Mappable
public String getType()
getType
in interface Mappable
Mappable.getType()
public String toString()
toString
in class Object
Object.toString()
public AbstractMappable clone()
clone
in interface Mappable
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |