Examples of NeighborConfig


Examples of org.dmlite.model.config.NeighborConfig

   * @param neighborValue
   *            neighbor value
   */
  private void executeSetNeighborMethod(IEntity entity, String neighborCode,
      Object neighborValue) {
    NeighborConfig neighborConfig = entity.getConceptConfig()
        .getNeighborConfig(neighborCode);
    executeSetNeighborMethod(entity, neighborConfig, neighborValue);
  }
View Full Code Here

Examples of org.dmlite.model.config.NeighborConfig

   * @param childEntities
   *            child entities
   */
  private void executeSetChildEntitiesMethod(IEntity entity,
      String neighborCode, IEntities childEntities) {
    NeighborConfig neighborConfig = entity.getConceptConfig()
        .getNeighborConfig(neighborCode);
    executeSetChildEntitiesMethod(entity, neighborConfig, childEntities);
  }
View Full Code Here

Examples of org.dmlite.model.config.NeighborConfig

   *            neighbor code
   * @return child entities
   */
  private IEntities executeGetChildEntitiesMethod(IEntity entity,
      String neighborCode) {
    NeighborConfig neighborConfig = entity.getConceptConfig()
        .getNeighborConfig(neighborCode);
    return executeGetChildEntitiesMethod(entity, neighborConfig);
  }
View Full Code Here

Examples of org.dmlite.model.config.NeighborConfig

   *            neighbor configuration
   * @return parent entity
   */
  private void executeSetParentEntityMethod(IEntity entity,
      String neighborCode, IEntity parentEntity) {
    NeighborConfig neighborConfig = entity.getConceptConfig()
        .getNeighborConfig(neighborCode);
    executeSetParentEntityMethod(entity, neighborConfig, parentEntity);
  }
View Full Code Here

Examples of org.dmlite.model.config.NeighborConfig

   *            neighbor code
   * @return parent entity
   */
  private IEntity executeGetParentEntityMethod(IEntity entity,
      String neighborCode) {
    NeighborConfig neighborConfig = entity.getConceptConfig()
        .getNeighborConfig(neighborCode);
    return executeGetParentEntityMethod(entity, neighborConfig);
  }
View Full Code Here

Examples of org.dmlite.model.config.NeighborConfig

    }

    NeighborsConfig neighborsConfig = entity.getConceptConfig()
        .getNeighborsConfig();
    for (IEntity config : neighborsConfig) {
      NeighborConfig neighborConfig = (NeighborConfig) config;
      if (neighborConfig.getType().equals("child")
          && neighborConfig.isInternal()) {
        String neigborProperty = neighborConfig.getSmallCode();
        ConceptConfig neighborChildConceptConfig = (ConceptConfig) domainModel
            .getModelConfig().getConceptsConfig().getConceptConfig(
                neighborConfig.getDestination());
        if (neighborChildConceptConfig != null) {
          if (neighborConfig.getMax().equals("1")) {
            IEntity property = (IEntity) Reflector.getField(entity,
                neigborProperty);
            if (property != null) {
              output(property, property.getClass()
                  .getSimpleName());
View Full Code Here

Examples of org.dmlite.model.config.NeighborConfig

      // Neighbor display links
      List<NeighborNameLabelLinkPair> neighborNameLabelLinkPairs = new ArrayList<NeighborNameLabelLinkPair>();
      NeighborsConfig neighborsConfig = conceptConfig
          .getNeighborsConfig();
      for (IEntity neighborConfigEntity : neighborsConfig) {
        NeighborConfig neighborConfig = (NeighborConfig) neighborConfigEntity;
        if (neighborConfig.getType().equals("child")) {
          String neighborConcept = neighborConfig.getDestination();
          ConceptConfig neighborConceptConfig = neighborConfig
              .getContextConceptConfig().getContextModelConfig()
              .getConceptConfig(neighborConcept);

          final String neighborDisplayType = neighborConceptConfig
              .getDisplayType();
          NeighborNameLabelLinkPair neighborNameLabelLinkPair = new NeighborNameLabelLinkPair();
          String neighborKey = conceptCode + "."
              + neighborConfig.getCode();
          String neighborName = getLocalizer().getString(neighborKey,
              this);
          Label neighborNameLabel = new Label("neighborName",
              neighborName);
          neighborNameLabelLinkPair
              .setNeighborNameLabel(neighborNameLabel);
          Link neighborLink;
          IDomainModel domainModel = app.getDomainModel();
          IOrderedEntities neighborEntities = (IOrderedEntities) domainModel
              .getModelMeta().getNeighborEntities(entity,
                  neighborConfig.getCode());

          final ModelContext neighborModelContext = new ModelContext(
              modelContext);
          neighborModelContext.setContextEntities(entities);
          neighborModelContext.setContextEntity(entity);
View Full Code Here

Examples of org.dmlite.model.config.NeighborConfig

      // Properties absorbed from parents.
      NeighborsConfig neighborsConfig = conceptConfig
          .getNeighborsConfig();
      for (IEntity neighborConfigEntity : neighborsConfig) {
        NeighborConfig neighborConfig = (NeighborConfig) neighborConfigEntity;
        if (neighborConfig.getType().equals("parent")
            && neighborConfig.getMax().equals("1")
            && neighborConfig.isAbsorb()) {
          ConceptConfig parentConceptConfig = neighborConfig
              .getNeighborDestinationConceptConfig();
          if (parentConceptConfig != null) {
            PropertiesConfig parentConceptPropertiesConfig = parentConceptConfig
                .getPropertiesConfig();
            for (IEntity parentPropertyConfigEntity : parentConceptPropertiesConfig) {
              PropertyConfig parentConceptPropertyConfig = (PropertyConfig) parentPropertyConfigEntity;
              if (parentConceptPropertyConfig.isEssential()) {
                IEntity parentEntity = entity
                    .getNeighborEntity(neighborConfig
                        .getCode());
                Panel parentPropertyPanel;
                if (parentEntity != null) {
                  parentModelContext.setEntity(parentEntity);
                  parentModelContext
View Full Code Here

Examples of org.dmlite.model.config.NeighborConfig

      String propertyCode = propertyConfig.getCode();
      Class propertyClass = propertyConfig.getPropertyClassObject();
      if (propertyConfig.isReference()) {
        String neighborCode = propertyConfig.getReferenceNeighbor();
        NeighborConfig neighborConfig = entity.getConceptConfig()
            .getNeighborsConfig().getNeighborConfig(neighborCode);
        String neighborConceptCode = neighborConfig.getDestination();
        App app = (App) getApplication();
        IPersistentEntities persistentEntities = app.getDbContext()
            .getPersistentModel().getPersistentEntry(
                neighborConceptCode);
        IOrderedEntities neighborEntities = null;
View Full Code Here

Examples of org.dmlite.model.config.NeighborConfig

      List<Panel> neighborList = new ArrayList<Panel>();
      NeighborsConfig neighborsConfig = conceptConfig
          .getNeighborsConfig();
      for (IEntity neighborConfigEntity : neighborsConfig) {
        NeighborConfig neighborConfig = (NeighborConfig) neighborConfigEntity;
        if (neighborConfig.getType().equals("child")) {
          String neighborCode = neighborConfig.getCode();
          IDomainModel domainModel = app.getDomainModel();
          IOrderedEntities childEntities = (IOrderedEntities) domainModel
              .getModelMeta().getNeighborEntities(entity,
                  neighborCode);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.