@Override public Identifier getIdentifier() { return Identifier.from( entityId ); } }
Identifier identifier = Identifier.from( identifierString );
Identifier identifier = Identifier.from( param.getKey() ); if ( identifier != null ) { if ( identifiers == null ) {
query.addIdentifier( Identifier.from( name ) );
@Override public Identifier getIdentifier() { return Identifier.from( name ); } }
public static List<Identifier> fromList( List<String> l ) { List<Identifier> identifiers = null; if ( ( l != null ) && ( l.size() > 0 ) ) { for ( String s : l ) { Identifier identifier = Identifier.from( s ); if ( identifier != null ) { if ( identifiers == null ) { identifiers = new ArrayList<Identifier>(); } identifiers.add( identifier ); } } } return identifiers; }
public static Query fromIdentifier( Object id ) { if (id == null) { throw new IllegalArgumentException("null identifier passed in"); } Identifier objectIdentifier = Identifier.from(id); if (objectIdentifier == null) { throw new IllegalArgumentException("Supplied id results in null Identifier"); } Query q = new Query(); q.addIdentifier( Identifier.from(id) ); return q; }
public static Query fromIdentifier( Object id ) { Query q = new Query(); q.addIdentifier( Identifier.from( id ) ); return q; }
protected Map<Object, Notifier> getNotifierMap(Map payloads) throws Exception { Map<Object, Notifier> notifiers = new HashMap<Object, Notifier>( payloads.size() * 2); for (Object id : payloads.keySet()) { Identifier identifier = Identifier.from(id); Notifier notifier; if (identifier.isUUID()) { notifier = em.get(identifier.getUUID(), Notifier.class); } else { EntityRef ref = em.getAlias("notifier", identifier.getName()); notifier = em.get(ref, Notifier.class); } if (notifier != null) { notifiers.put(notifier.getUuid(), notifier); notifiers.put(notifier.getUuid().toString(), notifier); if (notifier.getName() != null) { notifiers.put(notifier.getName(), notifier); } } } return notifiers; }
Identifier identifier = Identifier.from( param.getKey() ); if ( ( param.getValue() == null ) || ( param.getValue().size() == 0 ) || identifier.isUUID() ) { if ( identifier != null ) {
@Override public ServiceResults getItemByName( ServiceContext context, String name ) throws Exception { EntityRef entity = null; Identifier id = Identifier.from( name ); if ( id != null ) { // get the entityRef from the unique value index entity = em.getUserByIdentifier( id ); } if ( entity == null ) { throw new ServiceResourceNotFoundException( context ); } if ( !context.moreParameters() ) { // full load the entity from the database based on the UUID from the unique value index entity = em.get( entity ); if ( entity == null ) { throw new ServiceResourceNotFoundException( context ); } entity = importEntity( context, ( Entity ) entity ); } checkPermissionsForEntity( context, entity ); List<ServiceRequest> nextRequests = context.getNextServiceRequests( entity ); return new ServiceResults( this, context, ServiceResults.Type.COLLECTION, Results.fromRef( entity ), null, nextRequests ); }