Search in sources :

Example 1 with ContainmentPrefixConstraint

use of com.emc.storageos.db.client.constraint.ContainmentPrefixConstraint in project coprhd-controller by CoprHD.

the class ModelClientImpl method findByContainmentAndPrefix.

@Override
public <T extends DataObject> List<NamedElement> findByContainmentAndPrefix(Class<T> clazz, String columnField, URI id, String labelPrefix) throws DatabaseException {
    LOG.debug("findByContainmentAndPrefix({}, {}, {}, {})", new Object[] { clazz, columnField, id, labelPrefix });
    DataObjectType doType = TypeMap.getDoType(clazz);
    ContainmentPrefixConstraint constraint = new ContainmentPrefixConstraintImpl(id, labelPrefix, doType.getColumnField(columnField));
    return queryNamedElementsByConstraint(constraint);
}
Also used : ContainmentPrefixConstraint(com.emc.storageos.db.client.constraint.ContainmentPrefixConstraint) ContainmentPrefixConstraintImpl(com.emc.storageos.db.client.constraint.impl.ContainmentPrefixConstraintImpl)

Example 2 with ContainmentPrefixConstraint

use of com.emc.storageos.db.client.constraint.ContainmentPrefixConstraint in project coprhd-controller by CoprHD.

the class BourneDbClient method findByContainmentAndPrefix.

public <T extends DataObject> List<NamedElement> findByContainmentAndPrefix(Class<T> clazz, String columnField, URI id, String labelPrefix) throws DataAccessException {
    LOG.debug("findByContainmentAndPrefix({}, {}, {}, {})", new Object[] { clazz, columnField, id, labelPrefix });
    DataObjectType doType = TypeMap.getDoType(clazz);
    ContainmentPrefixConstraint constraint = new ContainmentPrefixConstraintImpl(id, labelPrefix, doType.getColumnField(columnField));
    return queryNamedElementsByConstraint(constraint);
}
Also used : ContainmentPrefixConstraint(com.emc.storageos.db.client.constraint.ContainmentPrefixConstraint) DataObjectType(com.emc.storageos.db.client.impl.DataObjectType)

Aggregations

ContainmentPrefixConstraint (com.emc.storageos.db.client.constraint.ContainmentPrefixConstraint)2 ContainmentPrefixConstraintImpl (com.emc.storageos.db.client.constraint.impl.ContainmentPrefixConstraintImpl)1 DataObjectType (com.emc.storageos.db.client.impl.DataObjectType)1