org.apache.portals.graffito.jcr.persistence.collectionconverter.impl
Class NTCollectionConverterImpl
java.lang.Object
org.apache.portals.graffito.jcr.persistence.collectionconverter.impl.AbstractCollectionConverterImpl
org.apache.portals.graffito.jcr.persistence.collectionconverter.impl.NTCollectionConverterImpl
- All Implemented Interfaces:
- CollectionConverter
public class NTCollectionConverterImpl
- extends AbstractCollectionConverterImpl
Collection Mapping/convertion based on node type.
This collection mapping strategy maps a collection into several nodes based on specific node type.
If the collection element class contains an id (see the FieldDescriptor definition), this id value is used to build the collection element node.
Otherwise, the element node name is a simple constant (collection-element)
Example - without an id attribute:
/test (Main object containing the collection field )
/collection-element (node used to store the first collection element)
/item-prop
....
/collection-element (node used to store the second collection element)
...
Example - with an id attribute:
/test (Main object containing the collection field )
/aValue (id value assigned to the first element)
/item-prop
....
/anotherValue (id value assigned to the first element)
...
- Author:
- Christophe Lombart
Method Summary |
protected ManageableCollection |
doGetCollection(javax.jcr.Session session,
javax.jcr.Node parentNode,
CollectionDescriptor collectionDescriptor,
java.lang.Class collectionFieldClass)
|
protected void |
doInsertCollection(javax.jcr.Session session,
javax.jcr.Node parentNode,
CollectionDescriptor collectionDescriptor,
ManageableCollection collection)
|
protected boolean |
doIsNull(javax.jcr.Session session,
javax.jcr.Node parentNode,
CollectionDescriptor collectionDescriptor,
java.lang.Class collectionFieldClass)
|
protected void |
doUpdateCollection(javax.jcr.Session session,
javax.jcr.Node parentNode,
CollectionDescriptor collectionDescriptor,
ManageableCollection collection)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NTCollectionConverterImpl
public NTCollectionConverterImpl(java.util.Map atomicTypeConverters,
ObjectConverter objectConverter,
Mapper mapper)
- Constructor
- Parameters:
atomicTypeConverters
- objectConverter
- mapper
-
doInsertCollection
protected void doInsertCollection(javax.jcr.Session session,
javax.jcr.Node parentNode,
CollectionDescriptor collectionDescriptor,
ManageableCollection collection)
- Specified by:
doInsertCollection
in class AbstractCollectionConverterImpl
- See Also:
AbstractCollectionConverterImpl.doInsertCollection(Session, Node, CollectionDescriptor, ManageableCollection)
doUpdateCollection
protected void doUpdateCollection(javax.jcr.Session session,
javax.jcr.Node parentNode,
CollectionDescriptor collectionDescriptor,
ManageableCollection collection)
throws javax.jcr.RepositoryException
- Specified by:
doUpdateCollection
in class AbstractCollectionConverterImpl
- Throws:
javax.jcr.RepositoryException
- See Also:
CollectionConverter.updateCollection(javax.jcr.Session, javax.jcr.Node, org.apache.portals.graffito.jcr.mapper.model.CollectionDescriptor, org.apache.portals.graffito.jcr.persistence.collectionconverter.ManageableCollection)
doGetCollection
protected ManageableCollection doGetCollection(javax.jcr.Session session,
javax.jcr.Node parentNode,
CollectionDescriptor collectionDescriptor,
java.lang.Class collectionFieldClass)
throws javax.jcr.RepositoryException
- Specified by:
doGetCollection
in class AbstractCollectionConverterImpl
- Throws:
javax.jcr.RepositoryException
- See Also:
CollectionConverter.getCollection(javax.jcr.Session, javax.jcr.Node, org.apache.portals.graffito.jcr.mapper.model.CollectionDescriptor, java.lang.Class)
doIsNull
protected boolean doIsNull(javax.jcr.Session session,
javax.jcr.Node parentNode,
CollectionDescriptor collectionDescriptor,
java.lang.Class collectionFieldClass)
throws javax.jcr.RepositoryException
- Specified by:
doIsNull
in class AbstractCollectionConverterImpl
- Throws:
javax.jcr.RepositoryException
- See Also:
AbstractCollectionConverterImpl.doIsNull(Session, Node, CollectionDescriptor, Class)
Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.