Module org.eclipse.persistence.jpa
Class MetadataMethod
java.lang.Object
org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAccessibleObject
org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement
org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataMethod
INTERNAL:
An object to hold onto a valid JPA decorated method.
- Since:
- TopLink 10.1.3/EJB 3.0 Preview
-
Field Summary
Modifier and TypeFieldDescriptionprotected MetadataClass
Class that the method is defined in.protected MetadataMethod
Used to store multiple methods with the same name in a class.List of class names of method parameters.protected String
Class name of method return type.protected MetadataMethod
Corresponding set method, if the method is an accessor get method.Fields inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement
DEFAULT_RAW_CLASS
Fields inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAccessibleObject
m_factory
-
Constructor Summary
ConstructorDescriptionMetadataMethod
(MetadataFactory factory, MetadataClass metadataClass) Create the method from the class metadata. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addParameter
(String parameter) INTERNAL:INTERNAL:getNext()
INTERNAL:INTERNAL:INTERNAL:INTERNAL: Method to convert a getMethod into a setMethod.INTERNAL: Method to convert a getMethod into a setMethod.INTERNAL:boolean
INTERNAL:boolean
INTERNAL:boolean
INTERNAL:boolean
INTERNAL: Return true if it has a valid name (starts with get or is) and has a property name (getXyz or isXyz) and does not have parameters and has an associated set method.protected boolean
INTERNAL: Return true if it has a valid name (starts with 'get' or 'is') and has a property name (get'Xyz' or is'Xyz') and does not have parameters and has an associated set method.boolean
isValidPersistenceMethod
(boolean mustBeExplicit, ClassAccessor classAccessor) INTERNAL: Return true is this method is a valid persistence method.boolean
isValidPersistenceMethod
(ClassAccessor classAccessor, boolean userDecorated) INTERNAL: Return true is this method is a valid persistence method.boolean
INTERNAL:void
setMetadataClass
(MetadataClass metadataClass) INTERNAL:void
setNext
(MetadataMethod next) INTERNAL:void
setParameters
(List<String> parameters) INTERNAL:void
setReturnType
(String returnType) INTERNAL:void
setSetMethod
(MetadataMethod method) INTERNAL: Method to convert a getMethod into a setMethod.Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement
addAnnotation, addGenericType, addMetaAnnotation, areAnnotationsCompatibleWithTransient, equals, getAnnotation, getAnnotation, getAnnotation, getAnnotation, getAnnotations, getAttributeName, getDeclaredAnnotationsCount, getGenericType, getMapKeyClass, getModifiers, getName, getPrimitiveType, getRawClass, getRawClassWithGenerics, getReferenceClassFromGeneric, getType, hasDeclaredAnnotations, hashCode, isAnnotationNotPresent, isAnnotationNotPresent, isAnnotationPresent, isAnnotationPresent, isAnnotationPresent, isArray, isBasic, isBasicCollection, isBasicMap, isDerivedId, isDerivedIdClass, isElementCollection, isEmbedded, isEmbeddedId, isGenericCollectionType, isGenericType, isId, isManyToMany, isManyToOne, isOneToMany, isOneToOne, isStructure, isSupportedCollectionClass, isSupportedMapClass, isSupportedToManyCollectionClass, isTransformation, isValidPersistenceElement, isValidPersistenceElement, isVariableOneToOne, isVersion, setAnnotations, setAttributeName, setGenericType, setModifiers, setName, setPrimitiveType, setType, toString
Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAccessibleObject
getLogger, getMetadataClass, getMetadataFactory, setMetadataFactory
-
Field Details
-
m_metadataClass
Class that the method is defined in. -
m_returnType
Class name of method return type. -
m_parameters
List of class names of method parameters. -
m_setMethod
Corresponding set method, if the method is an accessor get method. -
m_next
Used to store multiple methods with the same name in a class.
-
-
Constructor Details
-
MetadataMethod
Create the method from the class metadata.
-
-
Method Details
-
addParameter
INTERNAL: -
getMetadataClass
INTERNAL: -
getNext
INTERNAL: -
getParameters
INTERNAL: -
getReturnType
INTERNAL: -
getSetMethod
INTERNAL: Method to convert a getMethod into a setMethod. This method could return null if the corresponding set method is not found. -
setSetMethod
INTERNAL: Method to convert a getMethod into a setMethod. -
getSetMethod
INTERNAL: Method to convert a getMethod into a setMethod. This method could return null if the corresponding set method is not found. -
getSetMethodName
INTERNAL: -
hasAttributeName
public boolean hasAttributeName()INTERNAL: -
hasParameters
public boolean hasParameters()INTERNAL: -
hasSetMethod
public boolean hasSetMethod()INTERNAL: -
isALifeCycleCallbackMethod
public boolean isALifeCycleCallbackMethod()INTERNAL: Return true if it has a valid name (starts with get or is) and has a property name (getXyz or isXyz) and does not have parameters and has an associated set method. -
isValidPersistenceMethod
protected boolean isValidPersistenceMethod()INTERNAL: Return true if it has a valid name (starts with 'get' or 'is') and has a property name (get'Xyz' or is'Xyz') and does not have parameters and has an associated set method. -
isValidPersistenceMethod
INTERNAL: Return true is this method is a valid persistence method. This method will validate against any declared annotations on the method. If the mustBeExplicit flag is true, then we are processing the inverse of an explicit access setting and the property must have an Access(PROPERTY) setting to be processed. Otherwise, it is ignored. -
isValidPersistenceMethod
INTERNAL: Return true is this method is a valid persistence method. User decorated is used to indicate that the method either had persistence annotations defined on it or that it was specified in XML. -
isValidPersistenceMethodName
public boolean isValidPersistenceMethodName()INTERNAL: -
setMetadataClass
INTERNAL: -
setNext
INTERNAL: -
setParameters
INTERNAL: -
setReturnType
INTERNAL:
-