public class SyntheticProperty extends java.lang.Object implements java.lang.Comparable<SyntheticProperty>
SyntheticStorableBuilder
.
Synthetic storables can be used to generate user storables.Constructor and Description |
---|
SyntheticProperty(java.lang.String name,
java.lang.Class type)
Every property requires minimally a name and a type
|
SyntheticProperty(java.lang.String name,
java.lang.Class type,
boolean isNullable,
boolean isVersion) |
Modifier and Type | Method and Description |
---|---|
void |
addAccessorAnnotationDescriptor(java.lang.String annotationDesc)
Add an arbitrary annotation to the property accessor method, as
specified by a descriptor.
|
int |
compareTo(SyntheticProperty otherProp)
Comparable implementation. |
boolean |
equals(java.lang.Object o) |
java.util.List<java.lang.String> |
getAccessorAnnotationDescriptors()
Returns all the added accessor annotation descriptors in an unmodifiable list.
|
StorablePropertyAdapter |
getAdapter() |
java.lang.String |
getName() |
java.lang.String |
getReadMethodName()
Returns the name of the read method.
|
java.lang.Class |
getType() |
java.lang.String |
getWriteMethodName()
Returns the name of the write method.
|
int |
hashCode() |
boolean |
isNullable() |
boolean |
isVersion() |
static java.lang.String |
makeReadMethodName(java.lang.String name,
java.lang.Class type)
Generate a name for a bean "get" method ("is" method, for booleans).
|
static java.lang.String |
makeWriteMethodName(java.lang.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) |
java.lang.String |
toString() |
public SyntheticProperty(java.lang.String name, java.lang.Class type)
name
- for the propertytype
- of the data it containspublic SyntheticProperty(java.lang.String name, java.lang.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)public static java.lang.String makeReadMethodName(java.lang.String name, java.lang.Class type)
name
- of the propertytype
- return type of the propertygetReadMethodName()
public static java.lang.String makeWriteMethodName(java.lang.String name)
name
- of the propertygetWriteMethodName()
public java.lang.String getName()
public java.lang.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 java.lang.String getReadMethodName()
public java.lang.String getWriteMethodName()
public StorablePropertyAdapter getAdapter()
public void setAdapter(StorablePropertyAdapter adapter)
adapter
- The adapter to set.public void addAccessorAnnotationDescriptor(java.lang.String annotationDesc)
AnnotationDescPrinter
public java.util.List<java.lang.String> getAccessorAnnotationDescriptors()
public int compareTo(SyntheticProperty otherProp)
Comparable
implementation.compareTo
in interface java.lang.Comparable<SyntheticProperty>
otherProp
- public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.