org.springframework.roo.addon.web.mvc.controller.details
Class JavaTypePersistenceMetadataDetails

java.lang.Object
  extended by org.springframework.roo.addon.web.mvc.controller.details.JavaTypePersistenceMetadataDetails

public class JavaTypePersistenceMetadataDetails
extends Object

Aggregates persistence metadata for a given JavaType which is needed by Web scaffolding add-ons.

Since:
1.1.2
Author:
Stefan Schmidt

Constructor Summary
JavaTypePersistenceMetadataDetails(org.springframework.roo.model.JavaType identifierType, org.springframework.roo.classpath.details.FieldMetadata identifierField, org.springframework.roo.classpath.details.MethodMetadata identifierAccessorMethod, org.springframework.roo.classpath.details.MethodMetadata versionAccessorMethod, org.springframework.roo.classpath.layers.MemberTypeAdditions persistMethod, org.springframework.roo.classpath.layers.MemberTypeAdditions mergeMethod, org.springframework.roo.classpath.layers.MemberTypeAdditions removeMethod, org.springframework.roo.classpath.layers.MemberTypeAdditions findAllMethod, org.springframework.roo.classpath.layers.MemberTypeAdditions findAllSortedMethod, org.springframework.roo.classpath.layers.MemberTypeAdditions findMethod, org.springframework.roo.classpath.layers.MemberTypeAdditions countMethod, org.springframework.roo.classpath.layers.MemberTypeAdditions findEntriesMethod, org.springframework.roo.classpath.layers.MemberTypeAdditions findEntriesSortedMethod, List<String> finderNames, boolean isRooIdentifier, List<org.springframework.roo.classpath.details.FieldMetadata> rooIdentifierFields)
          Constructor for JavaTypePersistenceMetadataDetails
 
Method Summary
 org.springframework.roo.classpath.layers.MemberTypeAdditions getCountMethod()
          Accessor for persistence count method
 org.springframework.roo.classpath.layers.MemberTypeAdditions getFindAllMethod()
          Accessor for persistence findAll method
 org.springframework.roo.classpath.layers.MemberTypeAdditions getFindAllSortedMethod()
          Accessor for persistence findAll method
 org.springframework.roo.classpath.layers.MemberTypeAdditions getFindEntriesMethod()
          Accessor for persistence findEntries method
 org.springframework.roo.classpath.layers.MemberTypeAdditions getFindEntriesSortedMethod()
          Accessor for persistence findEntries method
 List<String> getFinderNames()
          Accessor for finder names
 org.springframework.roo.classpath.layers.MemberTypeAdditions getFindMethod()
          Accessor for persistence find method
 org.springframework.roo.classpath.details.MethodMetadata getIdentifierAccessorMethod()
          Accessor for persistence identifier
 org.springframework.roo.classpath.details.FieldMetadata getIdentifierField()
          Field metadata for identifier
 org.springframework.roo.model.JavaType getIdentifierType()
          Identifier Type
 org.springframework.roo.classpath.layers.MemberTypeAdditions getMergeMethod()
          Accessor for persistence merge method
 org.springframework.roo.classpath.layers.MemberTypeAdditions getPersistMethod()
          Accessor for persistence persist method
 org.springframework.roo.classpath.layers.MemberTypeAdditions getRemoveMethod()
          Accessor for persistence remove method
 List<org.springframework.roo.classpath.details.FieldMetadata> getRooIdentifierFields()
          Accessor for identifier field collection in cases where the identifier type is annotated with @RooIdentifier.
 org.springframework.roo.classpath.details.MethodMetadata getVersionAccessorMethod()
          Accessor for persistence version
 boolean isRooIdentifier()
          Indicate if this type is annotated with @RooIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaTypePersistenceMetadataDetails

public JavaTypePersistenceMetadataDetails(org.springframework.roo.model.JavaType identifierType,
                                          org.springframework.roo.classpath.details.FieldMetadata identifierField,
                                          org.springframework.roo.classpath.details.MethodMetadata identifierAccessorMethod,
                                          org.springframework.roo.classpath.details.MethodMetadata versionAccessorMethod,
                                          org.springframework.roo.classpath.layers.MemberTypeAdditions persistMethod,
                                          org.springframework.roo.classpath.layers.MemberTypeAdditions mergeMethod,
                                          org.springframework.roo.classpath.layers.MemberTypeAdditions removeMethod,
                                          org.springframework.roo.classpath.layers.MemberTypeAdditions findAllMethod,
                                          org.springframework.roo.classpath.layers.MemberTypeAdditions findAllSortedMethod,
                                          org.springframework.roo.classpath.layers.MemberTypeAdditions findMethod,
                                          org.springframework.roo.classpath.layers.MemberTypeAdditions countMethod,
                                          org.springframework.roo.classpath.layers.MemberTypeAdditions findEntriesMethod,
                                          org.springframework.roo.classpath.layers.MemberTypeAdditions findEntriesSortedMethod,
                                          List<String> finderNames,
                                          boolean isRooIdentifier,
                                          List<org.springframework.roo.classpath.details.FieldMetadata> rooIdentifierFields)
Constructor for JavaTypePersistenceMetadataDetails

Parameters:
identifierType - (must not be null)
identifierField - (must not be null)
identifierAccessorMethod - (must not be null)
versionAccessorMethod - (may be null if no version accessor is present)
persistMethod - (may be null if no persist method is present)
mergeMethod - (may be null if no merge method is present)
removeMethod - (may be null if no remove method is present)
findAllSortedMethod - (may be null if no findAll method is present)
findMethod - (may be null if no find method is present)
countMethod - (may be null if no count method is present)
finderNames - (must not be null, but may be empty of no finders are defined)
isRooIdentifier -
rooIdentifierFields - (must not be null, but may be empty of no finders are defined)
Method Detail

getCountMethod

public org.springframework.roo.classpath.layers.MemberTypeAdditions getCountMethod()
Accessor for persistence count method

Returns:
the MemberTypeAdditions for the count method presented by the persistence MD (null if not defined)

getFindAllMethod

public org.springframework.roo.classpath.layers.MemberTypeAdditions getFindAllMethod()
Accessor for persistence findAll method

Returns:
the MemberTypeAdditions for the findAll method presented by the persistence MD (null if not defined)

getFindEntriesMethod

public org.springframework.roo.classpath.layers.MemberTypeAdditions getFindEntriesMethod()
Accessor for persistence findEntries method

Returns:
the MemberTypeAdditions for the findEntries method presented by the persistence MD (null if not defined)

getFindAllSortedMethod

public org.springframework.roo.classpath.layers.MemberTypeAdditions getFindAllSortedMethod()
Accessor for persistence findAll method

Returns:
the MemberTypeAdditions for the findAll method presented by the persistence MD (null if not defined)

getFindEntriesSortedMethod

public org.springframework.roo.classpath.layers.MemberTypeAdditions getFindEntriesSortedMethod()
Accessor for persistence findEntries method

Returns:
the MemberTypeAdditions for the findEntries method presented by the persistence MD (null if not defined)

getFinderNames

public List<String> getFinderNames()
Accessor for finder names

Returns:
list of finder names (may be empty)

getFindMethod

public org.springframework.roo.classpath.layers.MemberTypeAdditions getFindMethod()
Accessor for persistence find method

Returns:
the MemberTypeAdditions for the find method presented by the persistence MD (null if not defined)

getIdentifierAccessorMethod

public org.springframework.roo.classpath.details.MethodMetadata getIdentifierAccessorMethod()
Accessor for persistence identifier

Returns:
the MethodMetadata for the identifier accessor method presented by the persistence MD (never null)

getIdentifierField

public org.springframework.roo.classpath.details.FieldMetadata getIdentifierField()
Field metadata for identifier

Returns:
the FieldMetadata for the identifier field presented by the persistence MD (never null)

getIdentifierType

public org.springframework.roo.model.JavaType getIdentifierType()
Identifier Type

Returns:
JavaType for id field

getMergeMethod

public org.springframework.roo.classpath.layers.MemberTypeAdditions getMergeMethod()
Accessor for persistence merge method

Returns:
the MemberTypeAdditions for the merge method presented by the persistence MD (null if not defined)

getPersistMethod

public org.springframework.roo.classpath.layers.MemberTypeAdditions getPersistMethod()
Accessor for persistence persist method

Returns:
the MemberTypeAdditions for the persist method presented by the persistence MD (null if not defined)

getRemoveMethod

public org.springframework.roo.classpath.layers.MemberTypeAdditions getRemoveMethod()
Accessor for persistence remove method

Returns:
the MemberTypeAdditions for the remove method presented by the persistence MD (null if not defined)

getRooIdentifierFields

public List<org.springframework.roo.classpath.details.FieldMetadata> getRooIdentifierFields()
Accessor for identifier field collection in cases where the identifier type is annotated with @RooIdentifier.

Returns:
list of Field metadata for fields defined in the type annotated with @RooIdentifier

getVersionAccessorMethod

public org.springframework.roo.classpath.details.MethodMetadata getVersionAccessorMethod()
Accessor for persistence version

Returns:
the MethodMetadata for the version accessor method presented by the persistence MD (null if not defined)

isRooIdentifier

public boolean isRooIdentifier()
Indicate if this type is annotated with @RooIdentifier

Returns:
true if annotation is present


Copyright © 2009–2015. All rights reserved.