[New] Added StrolchTransaction.getResourceBy() and .getOrderBy()
This commit is contained in:
parent
00ea65ece2
commit
ae5a0b0a14
|
@ -341,11 +341,21 @@ public abstract class AbstractTransaction implements StrolchTransaction {
|
|||
return getOrderMap().getBy(this, refP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Order getOrderBy(String type, String id) {
|
||||
return getOrderMap().getBy(this, type, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resource getResourceBy(StringParameter refP) throws StrolchException {
|
||||
return getResourceMap().getBy(this, refP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resource getResourceBy(String type, String id) {
|
||||
return getResourceMap().getBy(this, type, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void autoCloseableCommit() {
|
||||
long start = System.nanoTime();
|
||||
|
|
|
@ -117,6 +117,18 @@ public interface StrolchTransaction extends AutoCloseable {
|
|||
*/
|
||||
public <T extends StrolchElement> T findElement(Locator locator) throws StrolchException, ClassCastException;
|
||||
|
||||
/**
|
||||
* Returns the {@link Resource} with the given type and id, or null if it does not exist
|
||||
*
|
||||
* @param type
|
||||
* the type of the {@link Resource}
|
||||
* @param id
|
||||
* the id of the {@link Resource}
|
||||
*
|
||||
* @return the {@link Resource} with the given type and id, or null if it does not exist
|
||||
*/
|
||||
public Resource getResourceBy(String type, String id);
|
||||
|
||||
/**
|
||||
* Returns the {@link Resource} which is referenced by the given {@link StringParameter}. A reference
|
||||
* {@link Parameter} must have its interpretation set to {@link StrolchConstants#INTERPRETATION_RESOURCE_REF} and
|
||||
|
@ -131,6 +143,18 @@ public interface StrolchTransaction extends AutoCloseable {
|
|||
*/
|
||||
public Resource getResourceBy(StringParameter refP) throws StrolchException;
|
||||
|
||||
/**
|
||||
* Returns the {@link Order} with the given type and id, or null if it does not exist
|
||||
*
|
||||
* @param type
|
||||
* the type of the {@link Order}
|
||||
* @param id
|
||||
* the id of the {@link Order}
|
||||
*
|
||||
* @return the {@link Order} with the given type and id, or null if it does not exist
|
||||
*/
|
||||
public Order getOrderBy(String type, String id);
|
||||
|
||||
/**
|
||||
* Returns the {@link Order} which is referenced by the given {@link StringParameter}. A reference {@link Parameter}
|
||||
* must have its interpretation set to {@link StrolchConstants#INTERPRETATION_ORDER_REF} and the UOM must be set to
|
||||
|
|
Loading…
Reference in New Issue