Search in sources :

Example 1 with StoreEntity

use of org.alfresco.repo.domain.node.StoreEntity in project alfresco-repository by Alfresco.

the class NodeDAOImpl method selectStore.

@Override
protected StoreEntity selectStore(StoreRef storeRef) {
    StoreEntity store = new StoreEntity();
    store.setProtocol(storeRef.getProtocol());
    store.setIdentifier(storeRef.getIdentifier());
    return template.selectOne(SELECT_STORE_BY_REF, store);
}
Also used : StoreEntity(org.alfresco.repo.domain.node.StoreEntity)

Example 2 with StoreEntity

use of org.alfresco.repo.domain.node.StoreEntity in project alfresco-repository by Alfresco.

the class NodeDAOImpl method selectStoreRootNode.

@Override
protected NodeEntity selectStoreRootNode(StoreRef storeRef) {
    StoreEntity store = new StoreEntity();
    store.setProtocol(storeRef.getProtocol());
    store.setIdentifier(storeRef.getIdentifier());
    return template.selectOne(SELECT_STORE_ROOT_NODE_BY_REF, store);
}
Also used : StoreEntity(org.alfresco.repo.domain.node.StoreEntity)

Example 3 with StoreEntity

use of org.alfresco.repo.domain.node.StoreEntity in project alfresco-repository by Alfresco.

the class NodeDAOImpl method selectNodeByNodeRef.

@Override
protected NodeEntity selectNodeByNodeRef(NodeRef nodeRef) {
    StoreEntity store = new StoreEntity();
    StoreRef storeRef = nodeRef.getStoreRef();
    store.setProtocol(storeRef.getProtocol());
    store.setIdentifier(storeRef.getIdentifier());
    NodeEntity node = new NodeEntity();
    // Store
    node.setStore(store);
    // UUID
    String uuid = nodeRef.getId();
    if (uuid.length() > 36) {
        // Avoid query failure if someone passes in a made-up UUID.
        return null;
    // Originally for DB2 which has been EOLed, but might now be used by other databases.
    }
    node.setUuid(uuid);
    return template.selectOne(SELECT_NODE_BY_NODEREF, node);
}
Also used : StoreRef(org.alfresco.service.cmr.repository.StoreRef) StoreEntity(org.alfresco.repo.domain.node.StoreEntity) NodeEntity(org.alfresco.repo.domain.node.NodeEntity)

Aggregations

StoreEntity (org.alfresco.repo.domain.node.StoreEntity)3 NodeEntity (org.alfresco.repo.domain.node.NodeEntity)1 StoreRef (org.alfresco.service.cmr.repository.StoreRef)1