use of org.alfresco.repo.domain.node.NodePropertyEntity in project alfresco-repository by Alfresco.
the class NodeDAOImpl method selectNodePropertiesByDataType.
@SuppressWarnings("rawtypes")
@Override
public List<NodePropertyEntity> selectNodePropertiesByDataType(QName dataType, long minNodeId, long maxNodeId) {
int typeOrdinal = NodePropertyValue.convertToTypeOrdinal(dataType);
IdsEntity ids = new IdsEntity();
ids.setIdOne((long) typeOrdinal);
ids.setIdTwo(minNodeId);
ids.setIdThree(maxNodeId);
final List<NodePropertyEntity> properties = new ArrayList<NodePropertyEntity>();
template.select(SELECT_PROPERTIES_BY_ACTUAL_TYPE, ids, new ResultHandler() {
@Override
public void handleResult(ResultContext context) {
properties.add((NodePropertyEntity) context.getResultObject());
}
});
return properties;
}
use of org.alfresco.repo.domain.node.NodePropertyEntity in project alfresco-repository by Alfresco.
the class NodeDAOImpl method deleteNodeProperties.
@Override
protected int deleteNodeProperties(Long nodeId, Set<Long> qnameIds) {
NodePropertyEntity prop = new NodePropertyEntity();
// Node
prop.setNodeId(nodeId);
// QNames
if (qnameIds != null) {
if (qnameIds.isEmpty()) {
// Nothing to do
return 0;
}
prop.setQnameIds(new ArrayList<Long>(qnameIds));
}
return template.delete(DELETE_NODE_PROPERTIES, prop);
}
Aggregations