public boolean handle( Pair<Long, ChildAssociationRef> childAssocPair, Pair<Long, NodeRef> parentNodePair, Pair<Long, NodeRef> childNodePair) { results.add(childAssocPair.getSecond()); // More results return true; }
public boolean handle( Pair<Long, ChildAssociationRef> childAssocPair, Pair<Long, NodeRef> parentNodePair, Pair<Long, NodeRef> childNodePair) { results.add(childAssocPair.getSecond()); return true; }
public boolean handle( Pair<Long, ChildAssociationRef> childAssocPair, Pair<Long, NodeRef> parentNodePair, Pair<Long, NodeRef> childNodePair) { results.add(childAssocPair.getSecond()); // More results return true; }
@Override public float getScore(int n) { return page.get(n).getSecond(); }
@Override public boolean handle(Pair<Long, ChildAssociationRef> childAssocPair, Pair<Long, NodeRef> parentNodePair, Pair<Long, NodeRef> childNodePair) { parentAssocs.add(tenantService.getBaseName(childAssocPair.getSecond(), true)); return true; }
@SuppressWarnings("rawtypes") private Pair decide(Authentication authentication, Object object, ConfigAttributeDefinition config, Pair returnedObject) throws AccessDeniedException { NodeRef nodeRef = (NodeRef) returnedObject.getSecond(); decide(authentication, object, config, nodeRef); // the noderef was allowed return returnedObject; }
@Override public boolean handle(Pair<Long, ChildAssociationRef> childAssocPair, Pair<Long, NodeRef> parentNodePair, Pair<Long, NodeRef> childNodePair) { parentAssocs.add(tenantService.getBaseName(childAssocPair.getSecond(), true)); return true; }
@SuppressWarnings({ "unchecked"}) protected List<AuthorityInfo> applyPostQuerySorting(List<AuthorityInfo> results, CannedQuerySortDetails sortDetails) { @SuppressWarnings("rawtypes") final List<Pair<Object, SortOrder>> sortPairs = (List)sortDetails.getSortPairs(); if (sortPairs.size() > 0) { // single sort option - authority display name (else authority name if former is null) Collections.sort(results, new AuthComparator((String) sortPairs.get(0).getFirst(), sortPairs.get(0).getSecond())); } return results; }
public void setJavaClass(Class<?> javaClass) { this.javaClass = javaClass; this.javaClassName = javaClass.getName(); Pair<String, Long> crcPair = CrcHelper.getStringCrcPair(javaClassName, 32, true, true); this.javaClassNameShort = crcPair.getFirst(); this.javaClassNameCrc = crcPair.getSecond(); }
/** * Adds all {@link ContentModel#ASPECT_LOCALIZED localized} properties. */ public static void addLocalizedProperties(LocaleDAO localeDAO, Node node, Map<QName, Serializable> properties) { Long localeId = node.getLocaleId(); Locale locale = localeDAO.getLocalePair(localeId).getSecond(); properties.put(ContentModel.PROP_LOCALE, locale); }
@Override @Extend(traitAPI=NodeServiceTrait.class,extensionAPI=NodeServiceExtension.class) public NodeRef getNodeRef(Long nodeId) { Pair<Long, NodeRef> nodePair = nodeDAO.getNodePair(nodeId); return nodePair == null ? null : nodePair.getSecond(); }
public boolean exists(Long nodeId) { Pair<Long, Node> pair = nodesCache.getByKey(nodeId); return pair != null && !pair.getSecond().getDeleted(qnameDAO); }
public PropertyStringQueryEntity(Short persistedType, Long actualTypeId, String value) { this.persistedType = persistedType; this.actualTypeId = actualTypeId; stringValue = value; // Calculate the crc value from the original value Pair<String, Long> crcPair = CrcHelper.getStringCrcPair(value, 16, false, true); stringEndLower = crcPair.getFirst(); stringCrc = crcPair.getSecond(); }
@Override public ContentUrlEntity getContentUrl(String contentUrl) { if (contentUrl == null) { throw new IllegalArgumentException("Cannot look up ContentData by null ID."); } ContentUrlEntity entity = new ContentUrlEntity(); entity.setContentUrl(contentUrl); Pair<Long, ContentUrlEntity> pair = contentUrlCache.getByValue(entity); return (pair == null ? null : pair.getSecond()); }
public boolean exists(NodeRef nodeRef) { NodeEntity node = new NodeEntity(nodeRef); Pair<Long, Node> pair = nodesCache.getByValue(node); return pair != null && !pair.getSecond().getDeleted(qnameDAO); }
@Override public QName getNodeType(Long nodeId) { Node node = getNodeNotNull(nodeId, false); Long nodeTypeQNameId = node.getTypeQNameId(); return qnameDAO.getQName(nodeTypeQNameId).getSecond(); }
public Authority createAuthority(String authorityName) { ParameterCheck.mandatory("authorityName", authorityName); AuthorityEntity entity = new AuthorityEntity(); entity.setAuthority(authorityName); entity.setCrc(CrcHelper.getStringCrcPair(authorityName, 32, true, true).getSecond()); entity.setVersion(0L); Pair<Long, AuthorityEntity> entityPair = authorityEntityCache.getOrCreateByValue(entity); return entityPair.getSecond(); }
private AuthorityEntity getAuthorityImpl(String authorityName) { ParameterCheck.mandatory("authorityName", authorityName); AuthorityEntity authority = new AuthorityEntity(); authority.setAuthority(authorityName); Pair<Long, AuthorityEntity> entityPair = authorityEntityCache.getByValue(authority); if (entityPair == null) { return null; } return entityPair.getSecond(); }
@Override public CustomModelDefinition getCustomModel(String modelName) { ParameterCheck.mandatoryString("modelName", modelName); Pair<CompiledModel, Boolean> compiledModelPair = getCustomCompiledModel(modelName); CustomModelDefinition result = (compiledModelPair == null) ? null : new CustomModelDefinitionImpl( compiledModelPair.getFirst(), compiledModelPair.getSecond(), dictionaryService); return result; }
@Override public boolean handle(Pair<Long, ChildAssociationRef> childAssocPair, Pair<Long, NodeRef> parentNodePair, Pair<Long, NodeRef> childNodePair) { bindFixAssocAndCollectLostAndFound(childNodePair, "childNodeWithDeletedParent", childAssocPair.getFirst(), childAssocPair.getSecond().isPrimary() && exists(childAssocPair.getFirst())); return true; }