Package org.dmlite.model

Examples of org.dmlite.model.IDomainModel


  public void close() {
    domainContext.close();
  }

  public IDomainModel getDomainModel() {
    IDomainModel domainModel = domainContext.getPersistentModel()
        .getDomainModel();
    return domainModel;
  }
View Full Code Here


    List<IEntities> entries = new ArrayList<IEntities>();
    List actionsList = actions.getCopyOfActions();
    for (Object action : actionsList) {
      EntitiesAction entitiesAction = (EntitiesAction) action;
      IEntities entities = entitiesAction.getEntities();
      IDomainModel domainModel = session.getDomainModel();
      IEntities entry = domainModel.getModelMeta().getEntry(entities);
      if (entry != null && !entries.contains(entry)) {
        entries.add(entry);
      }
    }
    return entries;
View Full Code Here

          Label neighborNameLabel = new Label("neighborName",
              neighborName);
          neighborNameLabelLinkPair
              .setNeighborNameLabel(neighborNameLabel);
          Link neighborLink = null;
          IDomainModel domainModel = app.getDomainModel();
          final IOrderedEntities neighborEntities = (IOrderedEntities) domainModel
              .getModelMeta().getNeighborEntities(entity,
                  neighborConfig.getCode());

          final ModelContext neighborModelContext = new ModelContext(
              modelContext);
View Full Code Here

  public IOrderedEntities<T> getEntities(OrderCriteria orderCriteria)
      throws OrderException {
    OrderedEntities<T> destinationEntities = null;
    String entitiesClass = getConceptConfig().getEntitiesClass();
    try {
      IDomainModel domainModel = getDomainModel();
      if (domainModel != null) {
        Collection<T> collection = getCollection(orderCriteria);
        ModelMeta modelMeta = domainModel.getModelMeta();
        destinationEntities = (OrderedEntities<T>) modelMeta
            .createEntities(entitiesClass);
        destinationEntities.add(collection);
        modelMeta.setParents(destinationEntities, this);
        destinationEntities.setSourceEntities(this);
View Full Code Here

   * @param entity
   *            an entity
   * @return <code>true</code> if the add precondition is satisfied
   */
  protected boolean preAdd(T entity) {
    IDomainModel model = this.getDomainModel();
    if (model != null) {
      if (model.isInitialized()) {
        ConceptConfig conceptConfig = entity.getConceptConfig();
        if (conceptConfig != null) {
          PropertiesConfig propertiesConfig = conceptConfig
              .getPropertiesConfig();
          for (IEntity config : propertiesConfig) {
View Full Code Here

          .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);

          ModelContext neighborModelContext = new ModelContext(
              modelContext);
View Full Code Here

  }

  public static void main(String[] args) {
    try {
      ModelContext modelContext = new ModelContext("dmLite");
      IDomainModel model = modelContext.getDomainModel();
      ModelConfig modelConfig = model.getModelConfig();
      modelConfig.output("Model Config");

      // DmConfig dmConfig = modelConfig.getDmConfig();

      // ModelConfig dmLiteModelConfig =
View Full Code Here

    super(modelContext, viewContext);
    try {
      final App app = viewContext.getApp();
     
      final IEntity entity = modelContext.getEntity();
      final IDomainModel domainModel = modelContext.getDomainModel();

      ConceptConfig conceptConfig = entity.getConceptConfig();
      String conceptKey = conceptConfig.getCode();
      String conceptName = getLocalizer().getString(conceptKey, this);
      add(new Label("conceptName", conceptName));
View Full Code Here

      String propertyCode = propertyConfig.getCode();
      Class propertyClass = propertyConfig.getPropertyClassObject();
      String validationType = propertyConfig.getValidationType();
      if (propertyConfig.isValidateType() && validationType != null) {
        IDomainModel domainModel = modelContext.getDomainModel();
        if (propertyConfig.isValidatationTypeEntities(domainModel)) {
          IEntities validationTypeEntities = domainModel
              .getEntry(validationType);
          List validationTypeList;
          if (validationTypeEntities instanceof IOrderedEntities) {
            IOrderedEntities orderedValidationTypeEntities = (IOrderedEntities) validationTypeEntities;
            IOrderedEntities validationTypeEntitiesOrderedByCode = orderedValidationTypeEntities
View Full Code Here

TOP

Related Classes of org.dmlite.model.IDomainModel

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.