org.springframework.roo.classpath.persistence
Class PersistenceMemberLocatorImpl

java.lang.Object
  extended by org.springframework.roo.classpath.persistence.PersistenceMemberLocatorImpl
All Implemented Interfaces:
PersistenceMemberLocator

@Service
public class PersistenceMemberLocatorImpl
extends Object
implements PersistenceMemberLocator

This implementation of PersistenceMemberLocator scans for the presence of persistence ID tags for MemberDetails for a given domain type.

Since:
1.2.0
Author:
Stefan Schmidt

Constructor Summary
PersistenceMemberLocatorImpl()
           
 
Method Summary
 List<FieldMetadata> getEmbeddedIdentifierFields(org.springframework.roo.model.JavaType domainType)
          Locates embedded identifier types for a given domain type.
 MethodMetadata getIdentifierAccessor(org.springframework.roo.model.JavaType domainType)
          Returns the ID accessor for the given domain type
 List<FieldMetadata> getIdentifierFields(org.springframework.roo.model.JavaType domainType)
          Returns the identifier fields of the given domain type.
 org.springframework.roo.model.JavaType getIdentifierType(org.springframework.roo.model.JavaType domainType)
          Returns the identifier type of the given domain type.
 MethodMetadata getVersionAccessor(org.springframework.roo.model.JavaType domainType)
          Returns the version accessor for the given domain type.
 FieldMetadata getVersionField(org.springframework.roo.model.JavaType domainType)
          Locates the version field for a given domain type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceMemberLocatorImpl

public PersistenceMemberLocatorImpl()
Method Detail

getEmbeddedIdentifierFields

public List<FieldMetadata> getEmbeddedIdentifierFields(org.springframework.roo.model.JavaType domainType)
Description copied from interface: PersistenceMemberLocator
Locates embedded identifier types for a given domain type.

Specified by:
getEmbeddedIdentifierFields in interface PersistenceMemberLocator
Parameters:
domainType - The domain type (needs to be part of the project)
Returns:
a list of identifier fields (not null, may be empty)

getIdentifierAccessor

public MethodMetadata getIdentifierAccessor(org.springframework.roo.model.JavaType domainType)
Description copied from interface: PersistenceMemberLocator
Returns the ID accessor for the given domain type

Specified by:
getIdentifierAccessor in interface PersistenceMemberLocator
Parameters:
domainType - the domain type (can be null)
Returns:
null if the given type is null or does not have an ID accessor

getIdentifierFields

public List<FieldMetadata> getIdentifierFields(org.springframework.roo.model.JavaType domainType)
Description copied from interface: PersistenceMemberLocator
Returns the identifier fields of the given domain type.

Specified by:
getIdentifierFields in interface PersistenceMemberLocator
Parameters:
domainType - The domain type (can be null)
Returns:
a list of identifier fields (not null, may be empty)

getIdentifierType

public org.springframework.roo.model.JavaType getIdentifierType(org.springframework.roo.model.JavaType domainType)
Description copied from interface: PersistenceMemberLocator
Returns the identifier type of the given domain type.

Specified by:
getIdentifierType in interface PersistenceMemberLocator
Parameters:
domainType - The domain type (can be null)
Returns:
the identifier type (may be null)

getVersionAccessor

public MethodMetadata getVersionAccessor(org.springframework.roo.model.JavaType domainType)
Description copied from interface: PersistenceMemberLocator
Returns the version accessor for the given domain type.

Specified by:
getVersionAccessor in interface PersistenceMemberLocator
Parameters:
domainType - the domain type (can be null)
Returns:
null if the given type is null or does not have a version accessor

getVersionField

public FieldMetadata getVersionField(org.springframework.roo.model.JavaType domainType)
Description copied from interface: PersistenceMemberLocator
Locates the version field for a given domain type.

Specified by:
getVersionField in interface PersistenceMemberLocator
Parameters:
domainType - The domain type (needs to be part of the project)
Returns:
a version field (may be null)


Copyright © 2009–2015. All rights reserved.