Package org.sonatype.nexus.component.model

Examples of org.sonatype.nexus.component.model.EntityId


    Set<EntityId> assetIds = Sets.newHashSet();
    final String query = String.format("SELECT FROM %s WHERE %s = ?", AssetAdapter.BASE_CLASS_NAME, P_COMPONENT);
    ORID componentRid = componentDocument.getIdentity();
    List<ODocument> results = db.command(new OSQLSynchQuery<>(query)).execute(componentRid);
    for (ODocument assetDocument: results) {
      assetIds.add(new EntityId((String) assetDocument.field(EntityAdapter.P_ID)));
    }

    return componentFrom(componentAdapter, componentDocument, assetIds);
  }
View Full Code Here


    try {
      C entity = componentEntityAdapter.getEntityClass().newInstance();
      // set type-specific, then base/system-controlled properties
      componentEntityAdapter.populateEntity(componentDocument, entity);
      Component component = (Component) entity;
      component.setId(new EntityId((String) componentDocument.field(P_ID)));
      component.setAssetIds(assetIds);
      return entity;
    }
    catch (Throwable t) {
      throw Throwables.propagate(t);
View Full Code Here

    return "Test Content " + n;
  }

  protected static TestComponent createTestComponent(final String id, String stringValue, boolean populateOptionalProperties) {
    TestComponent component = testComponent(stringValue, populateOptionalProperties);
    component.setId(new EntityId(id));
    return component;
  }
View Full Code Here

    String uniqueString = document.field(propertyName);
    if (uniqueString == null) {
      return null;
    }
    else {
      return new EntityId(uniqueString);
    }
  }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.component.model.EntityId

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.