@Override public EntityRef getApplicationRef() { return new SimpleEntityRef( TYPE_APPLICATION, applicationId ); }
public EntityRef getApplicationRef() { return ref( Application.ENTITY_TYPE, applicationId ); }
CounterUtils.AggregateCounterSelection selection = new CounterUtils.AggregateCounterSelection( filter.getName(), getUuid( getUserByIdentifier( filter.getUser() ) ), getUuid( getGroupByIdentifier( filter.getGroup() ) ), org.apache.usergrid.mq.Queue.getQueueId( filter.getQueue() ), filter.getCategory() ); selections.put( selection.getRow( resolution ), selection );
@Override public EntityRef getGroupRef() { return new SimpleEntityRef( Group.ENTITY_TYPE, groupId ); }
/** * */ public ConnectionRefImpl() { connectingEntity = SimpleEntityRef.ref(); pairedConnections = Collections.emptyList(); connectedEntity = new ConnectedEntityRefImpl(); }
public static EntityRef ref() { return new SimpleEntityRef( null, null ); }
/** Create a connection from the source to the target entity */ public ConnectionRefImpl( EntityRef source, String connectionType, EntityRef target ) { this.connectingEntity = ref( source ); pairedConnections = Collections.emptyList(); this.connectedEntity = new ConnectedEntityRefImpl( connectionType, target ); }
public static EntityRef ref( EntityRef ref ) { return new SimpleEntityRef( ref ); }
public ConnectionRefImpl( EntityRef connectingEntity, ConnectedEntityRef... connections ) { this.connectingEntity = ref( connectingEntity ); ConnectedEntityRef ce = new ConnectedEntityRefImpl(); List<ConnectedEntityRef> pc = Collections.emptyList(); if ( connections.length > 0 ) { ce = connections[connections.length - 1]; if ( connections.length > 1 ) { pc = Arrays.asList( Arrays.copyOfRange( connections, 0, connections.length - 2 ) ); } } pairedConnections = pc; connectedEntity = ce; }
private EntityRef userRef( UUID userId ) { return new SimpleEntityRef( User.ENTITY_TYPE, userId ); }
/** * @param connectingEntityType * @param connectingEntityId * @param connectionType * @param connectedEntityType * @param connectedEntityId */ public ConnectionRefImpl( String connectingEntityType, UUID connectingEntityId, String connectionType, String connectedEntityType, UUID connectedEntityId ) { connectingEntity = ref( connectingEntityType, connectingEntityId ); pairedConnections = Collections.emptyList(); connectedEntity = new ConnectedEntityRefImpl( connectionType, connectedEntityType, connectedEntityId ); }
private EntityRef groupRef( UUID groupId ) { return new SimpleEntityRef( Group.ENTITY_TYPE, groupId ); }
public static Results fromIdList( List<UUID> l, String type ) { if ( type == null ) { return fromIdList( l ); } List<EntityRef> refs = new ArrayList<EntityRef>(); for ( UUID u : l ) { refs.add( ref( type, u ) ); } Results r = new Results(); r.setRefs(refs); return r; }
public static EntityRef ref( String entityType, UUID entityId ) { return new SimpleEntityRef( entityType, entityId ); }
@JsonSerialize(include = Inclusion.NON_NULL) public EntityRef getRef() { if ( ref != null ) { return ref; } ref = getEntity(); if ( ref != null ) { return ref; } UUID u = getId(); if ( u != null ) { String type= null; if(refs!=null && refs.size()>0){ type = refs.get(0).getType(); } return ref( type,u ); } return null; }