com.rapidtransform.core.service
Interface MetaCRUDService<Type extends Model>

All Superinterfaces:
CRUDService<Type>, Service
All Known Subinterfaces:
DocumentService, ItemService, ProductService, SpecService
All Known Implementing Classes:
DocumentServiceImpl, ItemServiceImpl, MetaCRUDServiceImpl, ProductServiceImpl, SpecServiceImpl

public interface MetaCRUDService<Type extends Model>
extends CRUDService<Type>

Author:
Steve Werner

Method Summary
 Type create(QName qname)
          Creates an M1 object with the given Meta type specified by the QName.
 Relation createRelation(Type source, Model target, QName relationType)
          Creates a relation with the given type between the source and target models.
 java.util.List<Type> findByMetaType(java.lang.String metaTypeQName)
          Returns all instances with the given metaType.
 
Methods inherited from interface com.rapidtransform.core.service.CRUDService
create, find, findAll, save
 

Method Detail

create

Type create(QName qname)
                          throws MetaException
Creates an M1 object with the given Meta type specified by the QName.

Parameters:
qname -
Returns:
Model entity with it's meta attributes initialized
Throws:
MetaException

createRelation

Relation createRelation(Type source,
                        Model target,
                        QName relationType)
                        throws ConveloException,
                               InvalidMetaRelationException
Creates a relation with the given type between the source and target models. If the relation is not defined in the Meta mapping for the source, then an InvalidMetaRelationException is thrown. After the relation is created it is saved to the database and returned.

Parameters:
source -
target -
relationType -
Returns:
Throws:
ConveloException
InvalidMetaRelationException

findByMetaType

java.util.List<Type> findByMetaType(java.lang.String metaTypeQName)
Returns all instances with the given metaType.

Parameters:
metaType -
Returns: