Class ClassResolutionByCDR
java.lang.Object
org.castor.cpa.util.classresolution.command.BaseResolutionCommand
org.castor.cpa.util.classresolution.command.ClassResolutionByCDR
- All Implemented Interfaces:
NatureExtendable
,PropertyHolder
,ClassDescriptorResolutionCommand
This class tries to resolve a
ClassDescriptor
from a package that
contains a JDOConstants.PKG_CDR_LIST_FILE
file. This file defines the
mapping between a domain class and its corresponding
ClassDescriptor
.- Version:
- 1.2.1
- Author:
- Sebastian Gabmeyer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDescriptors
(String packageName) Get all descriptors from the package defined by thepackageName
that contains theJDOConstants.PKG_CDR_LIST_FILE
file.Resolves atype
to aClassDescriptor
by looking for aJDOConstants.PKG_CDR_LIST_FILE
file in the root directory.Methods inherited from class org.castor.cpa.util.classresolution.command.BaseResolutionCommand
addNature, getClassDescriptorResolver, getProperty, hasNature, setClassDescriptorResolver, setProperty
-
Constructor Details
-
ClassResolutionByCDR
public ClassResolutionByCDR()Constructor.
-
-
Method Details
-
resolve
Resolves atype
to aClassDescriptor
by looking for aJDOConstants.PKG_CDR_LIST_FILE
file in the root directory.- Parameters:
type
- theclass
to obtain theClassDescriptor
for.- Returns:
- the
ClassDescriptor
if found,null
otherwise.
-
getDescriptors
Get all descriptors from the package defined by thepackageName
that contains theJDOConstants.PKG_CDR_LIST_FILE
file.- Parameters:
packageName
- the package to search descriptors for.- Returns:
- a
List
of descriptors contained in the package.
-