public static class Model.Attribute
extends Object
implements Serializable
Constructor and Description |
---|
Attribute()
Instantiates a new Attribute.
|
Attribute(Class<?> elementClass,
String getter,
String setter)
Instantiates a new Attribute.
|
Attribute(Class<?> elementClass,
String getter,
String setter,
Object params)
Instantiates a new Attribute.
|
Attribute(Class<?> elementClass,
String getter,
String setter,
Object params,
String reader,
String writer)
Instantiates a new Attribute.
|
Modifier and Type | Method and Description |
---|---|
Class<?> |
getAttributeClass()
Gets the attribute class.
|
String |
getGetter()
Gets the name of the getter method.
|
Object |
getParams()
Gets the parameters.
|
String |
getReader()
Gets the name of the reader method.
|
String |
getSetter()
Gets the name of the setter method
|
Object |
getValue()
Gets the value of the attribute.
|
String |
getWriter()
Gets the name of the writer method.
|
boolean |
isCData()
Checks if attribute should be stored as cdata when using xml.
|
boolean |
isPersistable()
Checks if attribute is persistable - cab be save to the storage such as xml, database, etc.
|
void |
setAttributeClass(Class<?> value)
Sets the attribute class.
|
void |
setGetter(String value)
Sets the name of the getter method.
|
void |
setIsCdata(boolean value)
Sets the value of the "is cdata" flag.
|
void |
setParams(Object value)
Sets the parameters.
|
void |
setPersistable(boolean value)
Sets the persistable flag.
|
void |
setReader(String value)
Sets the name of the reader method
|
void |
setSetter(String value)
Sets the name of the setter method
|
void |
setValue(Object value)
Sets the value of the attribute.
|
void |
setWriter(String value)
Sets the name of the writer method.
|
public Attribute()
public Attribute(Class<?> elementClass, String getter, String setter)
elementClass
- the element classgetter
- the name of the getter methodsetter
- the name of the setter methodpublic Attribute(Class<?> elementClass, String getter, String setter, Object params)
elementClass
- the element classgetter
- the name of the getter methodsetter
- the name of the setter methodparams
- the parameterspublic Attribute(Class<?> elementClass, String getter, String setter, Object params, String reader, String writer)
elementClass
- the element classgetter
- the name of the getter methodsetter
- the name of the setter methodparams
- the parametersreader
- the name of the reader method. Reader method is used to read attribute from the storage (xml, database, etc)writer
- the name of the writer method. Writer method is used to save attribute to the storage (xml, database, etc)public Class<?> getAttributeClass()
public String getGetter()
public Object getParams()
public String getReader()
public String getSetter()
public Object getValue()
public String getWriter()
public boolean isCData()
public boolean isPersistable()
public void setAttributeClass(Class<?> value)
value
- the new attribute classpublic void setGetter(String value)
value
- the new name of the getter methodpublic void setIsCdata(boolean value)
value
- the new of the "is cdata" flagpublic void setParams(Object value)
value
- the new parameterspublic void setPersistable(boolean value)
value
- the new persistable flagpublic void setReader(String value)
value
- the new name of the reader methodpublic void setSetter(String value)
value
- the new name of the setter methodpublic void setValue(Object value)
value
- the new valuepublic void setWriter(String value)
value
- the new name of the writer methodCopyright © 2010-2020 Toolsverse. All Rights Reserved.