com.rapidtransform.core.service.impl
Class MetaCRUDServiceImpl<Type extends Model>
java.lang.Object
com.rapidtransform.core.service.impl.ServiceImpl
com.rapidtransform.core.service.impl.CRUDServiceImpl<Type>
com.rapidtransform.core.service.impl.MetaCRUDServiceImpl<Type>
- All Implemented Interfaces:
- CRUDService<Type>, MetaCRUDService<Type>, Service
- Direct Known Subclasses:
- DocumentServiceImpl, ItemServiceImpl, ProductServiceImpl, SpecServiceImpl
public abstract class MetaCRUDServiceImpl<Type extends Model>
- extends CRUDServiceImpl<Type>
- implements MetaCRUDService<Type>
Service abstraction for M1 classes that implement the Model interface - ie. those containing meta information.
- Author:
- Steve Werner
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MetaCRUDServiceImpl
public MetaCRUDServiceImpl()
MetaCRUDServiceImpl
public MetaCRUDServiceImpl(java.lang.Class<Type> persistentClass)
getMetaService
public MetaService getMetaService()
- Returns:
- Returns the metaService.
setMetaService
public void setMetaService(MetaService metaService)
- Parameters:
metaService
- The metaService to set.
getRelationDao
public RelationDAO getRelationDao()
- Returns:
- Returns the relationDao.
setRelationDao
public void setRelationDao(RelationDAO relationDao)
- Parameters:
relationDao
- The relationDao to set.
create
public Type create(QName qname)
throws MetaException
- Description copied from interface:
MetaCRUDService
- Creates an M1 object with the given Meta type specified by the QName.
- Specified by:
create
in interface MetaCRUDService<Type extends Model>
- Returns:
- Model entity with it's meta attributes initialized
- Throws:
MetaException
createRelation
@Transactional
public 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.
- Specified by:
createRelation
in interface MetaCRUDService<Type extends Model>
- Parameters:
source
- target
- relationType
-
- Returns:
-
- Throws:
ConveloException
InvalidMetaRelationException
findByMetaType
public java.util.List<Type> findByMetaType(java.lang.String metaTypeQName)
- Description copied from interface:
MetaCRUDService
- Returns all instances with the given metaType.
- Specified by:
findByMetaType
in interface MetaCRUDService<Type extends Model>
- Returns: