Package com.googlecode.objectify.impl
Interface Property
- All Known Implementing Classes:
AbstractProperty
,FieldProperty
,MethodProperty
public interface Property
Basic interface so we can wrap fields and methods so they look more or less the same.
This makes @AlsoLoad methods look just like fields.
-
Method Summary
Modifier and TypeMethodDescriptionGet the value of the property (field) if possible, or null if not possible (method)<A extends Annotation>
AgetAnnotation(Class<A> annoType)
Get an annotation on this type, or null if there is no annotation of that typeEnumerate the annotationsgetIndexInstruction(Object onPojo)
Gets the index instruction for this property, if there is one.String[]
Get all the names associated with this property (ie, due to @AlsoLoad).getName()
Get the primary name associated with this propertygetType()
Get the real generic type of the fieldboolean
void
Actually set the property (field or method) on an object
-
Method Details
-
getName
String getName()Get the primary name associated with this property -
getLoadNames
String[] getLoadNames()Get all the names associated with this property (ie, due to @AlsoLoad). Includes the primary name unless it is @IgnoreLoad. -
getAnnotation
Get an annotation on this type, or null if there is no annotation of that type -
getAnnotations
Annotation[] getAnnotations()Enumerate the annotations -
getType
Type getType()Get the real generic type of the field -
set
Actually set the property (field or method) on an object -
get
Get the value of the property (field) if possible, or null if not possible (method) -
isSaved
- Returns:
- true if this field should be saved, false if not
-
getIndexInstruction
Gets the index instruction for this property, if there is one. Properties do not necessarily have a specific index or unindex instruction, and even if they do, the instruction might be conditional. Also factors in any index instruction on the class as a default. However, explicit index instruction on the field overrides the class.- Returns:
- true if this field should be indexed, false if it should be unindexed, null is "no information, continue with defaults".
-