|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.amazon.carbonado.synthetic.SyntheticProperty
public class SyntheticProperty
Minimal specification of a storable property for use with a SyntheticStorableBuilder.
Synthetic storables can be used to generate user storables.
| Constructor Summary | |
|---|---|
SyntheticProperty(String name,
Class type)
Every property requires minimally a name and a type |
|
SyntheticProperty(String name,
Class type,
boolean isNullable,
boolean isVersion)
|
|
| Method Summary | |
|---|---|
void |
addAccessorAnnotationDescriptor(String annotationDesc)
Add an arbitrary annotation to the property accessor method, as specified by a descriptor. |
int |
compareTo(SyntheticProperty otherProp)
Comparable implementation. |
boolean |
equals(Object o)
|
List<String> |
getAccessorAnnotationDescriptors()
Returns all the added accessor annotation descriptors in an unmodifiable list. |
StorablePropertyAdapter |
getAdapter()
|
String |
getName()
|
String |
getReadMethodName()
Returns the name of the read method. |
Class |
getType()
|
String |
getWriteMethodName()
Returns the name of the write method. |
int |
hashCode()
|
boolean |
isNullable()
|
boolean |
isVersion()
|
static String |
makeReadMethodName(String name,
Class type)
Generate a name for a bean "get" method ("is" method, for booleans). |
static String |
makeWriteMethodName(String name)
Generate a name for a bean "set" method |
void |
setAdapter(StorablePropertyAdapter adapter)
Storables cannot currently have more than one adapter per property. |
void |
setIsNullable(boolean isNullable)
|
void |
setIsVersion(boolean isVersion)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SyntheticProperty(String name,
Class type)
name - for the propertytype - of the data it contains
public SyntheticProperty(String name,
Class type,
boolean isNullable,
boolean isVersion)
name - property nametype - property typeisNullable - true if this property can be null (default false)isVersion - true if this property is a version number (default false)| Method Detail |
|---|
public static String makeReadMethodName(String name,
Class type)
name - of the propertytype - return type of the propertygetReadMethodName()public static String makeWriteMethodName(String name)
name - of the propertygetWriteMethodName()public String getName()
public Class getType()
public boolean isNullable()
public void setIsNullable(boolean isNullable)
isNullable - true if the property can be nullpublic boolean isVersion()
public void setIsVersion(boolean isVersion)
isVersion - true if the property should contain the versioning information for the
storablepublic String getReadMethodName()
public String getWriteMethodName()
public StorablePropertyAdapter getAdapter()
public void setAdapter(StorablePropertyAdapter adapter)
adapter - The adapter to set.public void addAccessorAnnotationDescriptor(String annotationDesc)
AnnotationDescPrinterpublic List<String> getAccessorAnnotationDescriptors()
public int compareTo(SyntheticProperty otherProp)
Comparable implementation.
compareTo in interface Comparable<SyntheticProperty>otherProp - public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||