org.compass.core.mapping.osem
Class ClassPropertyMapping

java.lang.Object
  extended by org.compass.core.mapping.support.AbstractMapping
      extended by org.compass.core.mapping.support.AbstractMultipleMapping
          extended by org.compass.core.mapping.osem.AbstractAccessorMultipleMapping
              extended by org.compass.core.mapping.osem.ClassPropertyMapping
All Implemented Interfaces:
InternalMapping, InternalMultipleMapping, InternalOverrideByNameMapping, Mapping, MultipleMapping, InternalObjectMapping, InternalOsemMapping, ObjectMapping, OsemMapping, OverrideByNameMapping
Direct Known Subclasses:
ClassBoostPropertyMapping, ClassIdPropertyMapping, ClassPropertyAnalyzerController

public class ClassPropertyMapping
extends AbstractAccessorMultipleMapping
implements InternalOverrideByNameMapping

Author:
kimchy

Field Summary
 
Fields inherited from class org.compass.core.mapping.support.AbstractMultipleMapping
mappings, mappingsByNameMap
 
Constructor Summary
ClassPropertyMapping()
           
 
Method Summary
 boolean canBeCollectionWrapped()
          Returns true if this object mapping can be wrapped with a Collection or an Array.
 Mapping copy()
          Copies over the mapping definition into a newly instanciated Mapping object.
protected  void copy(ClassPropertyMapping mapping)
           
 String getAccessor()
          Returns the accessor type for this mapping.
 String getAnalyzer()
           
 float getBoost()
           
 String getClassName()
           
 String getDefinedInAlias()
          Returns which alias (or if not present, the FQN of the class name) this object property is defined at.
 ExcludeFromAll getExcludeFromAll()
           
 ClassPropertyMetaDataMapping getIdMapping()
           
 int getIdPropertyIndex()
           
 ManagedId getManagedId()
           
 Converter getManagedIdConverter()
           
 String getManagedIdConverterName()
           
 Property.Index getManagedIdIndex()
           
 String getPropertyName()
          Returns the class property name of the object mapping.
 boolean isIdPropertySet()
           
 boolean isOverrideByName()
          Returns true to control of this mapping overrides by name anotehr mapping within the same multiple mapping container.
 boolean requiresIdProcessing()
          Returns if the mapping must have id processing performed on it (even, for example, when support unmarshall is set to false).
 void setAccessor(String accessor)
          Sets the accessor type for this mapping.
 void setAnalyzer(String analyzer)
           
 void setBoost(float boost)
           
 void setClassName(String className)
           
 void setDefinedInAlias(String definedInAlias)
          Sets which alias (or if not present, the FQN of the class name) this object property is defined at.
 void setExcludeFromAll(ExcludeFromAll excludeFromAll)
           
 void setIdPropertyIndex(int idPropertyIndex)
           
 void setManagedId(ManagedId managedId)
           
 void setManagedIdConverter(Converter managedIdConverter)
           
 void setManagedIdConverterName(String managedIdConverterName)
           
 void setManagedIdIndex(Property.Index managedIdIndex)
           
 void setOverrideByName(boolean overrideByName)
           
 void setPropertyName(String propertyName)
          Sets the class property name of the object mapping.
 
Methods inherited from class org.compass.core.mapping.osem.AbstractAccessorMultipleMapping
copy, getGetter, getSetter, hasAccessors, setGetter, setSetter
 
Methods inherited from class org.compass.core.mapping.support.AbstractMultipleMapping
addMapping, addMappings, clearMappings, copy, getMapping, getMapping, mappingsIt, mappingsSize, removeExistingByName, replaceMappings, shallowCopy
 
Methods inherited from class org.compass.core.mapping.support.AbstractMapping
controlsObjectNullability, copy, getConverter, getConverterName, getName, getPath, setConverter, setConverterName, setName, setPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.compass.core.mapping.Mapping
controlsObjectNullability, getConverter, getConverterName, getName, getPath
 
Methods inherited from interface org.compass.core.mapping.internal.InternalMapping
setConverter, setConverterName, setName, setPath
 
Methods inherited from interface org.compass.core.mapping.Mapping
controlsObjectNullability, getConverter, getConverterName, getName, getPath
 

Constructor Detail

ClassPropertyMapping

public ClassPropertyMapping()
Method Detail

copy

protected void copy(ClassPropertyMapping mapping)

copy

public Mapping copy()
Description copied from interface: Mapping
Copies over the mapping definition into a newly instanciated Mapping object.

Specified by:
copy in interface Mapping

canBeCollectionWrapped

public boolean canBeCollectionWrapped()
Description copied from interface: ObjectMapping
Returns true if this object mapping can be wrapped with a Collection or an Array.

Specified by:
canBeCollectionWrapped in interface ObjectMapping

getIdMapping

public ClassPropertyMetaDataMapping getIdMapping()

getBoost

public float getBoost()

setBoost

public void setBoost(float boost)

getManagedId

public ManagedId getManagedId()

setManagedId

public void setManagedId(ManagedId managedId)

getClassName

public String getClassName()

setClassName

public void setClassName(String className)

getIdPropertyIndex

public int getIdPropertyIndex()

setIdPropertyIndex

public void setIdPropertyIndex(int idPropertyIndex)

isIdPropertySet

public boolean isIdPropertySet()

getExcludeFromAll

public ExcludeFromAll getExcludeFromAll()

setExcludeFromAll

public void setExcludeFromAll(ExcludeFromAll excludeFromAll)

getAnalyzer

public String getAnalyzer()

setAnalyzer

public void setAnalyzer(String analyzer)

isOverrideByName

public boolean isOverrideByName()
Description copied from interface: OverrideByNameMapping
Returns true to control of this mapping overrides by name anotehr mapping within the same multiple mapping container.

Specified by:
isOverrideByName in interface OverrideByNameMapping

setOverrideByName

public void setOverrideByName(boolean overrideByName)
Specified by:
setOverrideByName in interface InternalOverrideByNameMapping

getManagedIdIndex

public Property.Index getManagedIdIndex()

setManagedIdIndex

public void setManagedIdIndex(Property.Index managedIdIndex)

getAccessor

public String getAccessor()
Description copied from interface: ObjectMapping
Returns the accessor type for this mapping. The accessor type can be field, property or a custom implementation of PropertyAccessor (this can be either the FQN of the class name or a regsitered type in the configuration, see PropertyAccessorFactory.

Specified by:
getAccessor in interface ObjectMapping

setAccessor

public void setAccessor(String accessor)
Description copied from interface: InternalObjectMapping
Sets the accessor type for this mapping. The accessor type can be field, property or a custom implementation of PropertyAccessor (this can be either the FQN of the class name or a regsitered type in the configuration, see PropertyAccessorFactory.

Specified by:
setAccessor in interface InternalObjectMapping

getPropertyName

public String getPropertyName()
Description copied from interface: ObjectMapping
Returns the class property name of the object mapping.

Specified by:
getPropertyName in interface ObjectMapping

setPropertyName

public void setPropertyName(String propertyName)
Description copied from interface: InternalObjectMapping
Sets the class property name of the object mapping.

Specified by:
setPropertyName in interface InternalObjectMapping

getManagedIdConverter

public Converter getManagedIdConverter()

setManagedIdConverter

public void setManagedIdConverter(Converter managedIdConverter)

getManagedIdConverterName

public String getManagedIdConverterName()

setManagedIdConverterName

public void setManagedIdConverterName(String managedIdConverterName)

getDefinedInAlias

public String getDefinedInAlias()
Description copied from interface: ObjectMapping
Returns which alias (or if not present, the FQN of the class name) this object property is defined at.

Specified by:
getDefinedInAlias in interface ObjectMapping

setDefinedInAlias

public void setDefinedInAlias(String definedInAlias)
Description copied from interface: InternalObjectMapping
Sets which alias (or if not present, the FQN of the class name) this object property is defined at.

Specified by:
setDefinedInAlias in interface InternalObjectMapping

requiresIdProcessing

public boolean requiresIdProcessing()
Returns if the mapping must have id processing performed on it (even, for example, when support unmarshall is set to false).



Copyright (c) 2004-2009 The Compass Project.