org.compass.core.mapping.osem
Class ClassPropertyMapping

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

public class ClassPropertyMapping
extends AbstractAccessorMultipleMapping
implements OverrideByNameMapping

Author:
kimchy

Nested Class Summary
static class ClassPropertyMapping.ManagedId
           
 
Field Summary
 
Fields inherited from class org.compass.core.mapping.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 getColClassName()
           
 String getDefinedInAlias()
          Returns which alias (or if not present, the FQN of the class name) this object property is defined at.
 ResourcePropertyMapping.ExcludeFromAllType getExcludeFromAll()
           
 ClassPropertyMetaDataMapping getIdMapping()
           
 int getIdPropertyIndex()
           
 ClassPropertyMapping.ManagedId getManagedId()
           
 Converter getManagedIdConverter()
           
 String getManagedIdConverterName()
           
 Property.Index getManagedIdIndex()
           
 String getPropertyName()
          Returns the class property name of the object mapping.
 boolean isIdPropertySet()
           
 boolean isOverrideByName()
           
 void setAccessor(String accessor)
          Sets the accessor type for this mapping.
 void setAnalyzer(String analyzer)
           
 void setBoost(float boost)
           
 void setClassName(String className)
           
 void setColClassName(String colClassName)
           
 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(ResourcePropertyMapping.ExcludeFromAllType excludeFromAll)
           
 void setIdPropertyIndex(int idPropertyIndex)
           
 void setManagedId(ClassPropertyMapping.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.AbstractMultipleMapping
addMapping, addMappings, clearMappings, copy, getMapping, getMapping, mappingsIt, mappingsSize, removeExistingByName, replaceMappings, shallowCopy
 
Methods inherited from class org.compass.core.mapping.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, setConverter, setConverterName, setName, setPath
 

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 ClassPropertyMapping.ManagedId getManagedId()

setManagedId

public void setManagedId(ClassPropertyMapping.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 ResourcePropertyMapping.ExcludeFromAllType getExcludeFromAll()

setExcludeFromAll

public void setExcludeFromAll(ResourcePropertyMapping.ExcludeFromAllType excludeFromAll)

getAnalyzer

public String getAnalyzer()

setAnalyzer

public void setAnalyzer(String analyzer)

isOverrideByName

public boolean isOverrideByName()
Specified by:
isOverrideByName in interface OverrideByNameMapping

setOverrideByName

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

getManagedIdIndex

public Property.Index getManagedIdIndex()

setManagedIdIndex

public void setManagedIdIndex(Property.Index managedIdIndex)

getColClassName

public String getColClassName()

setColClassName

public void setColClassName(String colClassName)

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: ObjectMapping
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 ObjectMapping

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: ObjectMapping
Sets the class property name of the object mapping.

Specified by:
setPropertyName in interface ObjectMapping

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: ObjectMapping
Sets which alias (or if not present, the FQN of the class name) this object property is defined at.

Specified by:
setDefinedInAlias in interface ObjectMapping


Copyright (c) 2004-2008 The Compass Project.