Package ch.ralscha.extdirectspring.generator

Examples of ch.ralscha.extdirectspring.generator.Model


  public String getModel() {
    return model;
  }

  protected static String getModelName(Class<?> model) {
    Model modelAnnotation = model.getAnnotation(Model.class);

    if (modelAnnotation != null && StringUtils.hasText(modelAnnotation.value())) {
      return modelAnnotation.value();
    }
    return model.getName();
  }
View Full Code Here


      association.setPrimaryKey(associationAnnotation.primaryKey());
    } else if (type == ModelAssociationType.HAS_MANY && StringUtils.hasText(model.getIdProperty())
        && !model.getIdProperty().equals("id")) {
      association.setPrimaryKey(model.getIdProperty());
    } else if (type == ModelAssociationType.BELONGS_TO || type == ModelAssociationType.HAS_ONE) {
      Model associationModelAnnotation = associationClass.getAnnotation(Model.class);
      if (associationModelAnnotation != null && StringUtils.hasText(associationModelAnnotation.idProperty())
          && !associationModelAnnotation.idProperty().equals("id")) {
        association.setPrimaryKey(associationModelAnnotation.idProperty());
      }
    }

    if (type == ModelAssociationType.HAS_MANY) {
      HasManyAssociation hasManyAssociation = (HasManyAssociation) association;
View Full Code Here

      association.setPrimaryKey(associationAnnotation.primaryKey());
    } else if (type == ModelAssociationType.HAS_MANY && StringUtils.hasText(model.getIdProperty())
        && !model.getIdProperty().equals("id")) {
      association.setPrimaryKey(model.getIdProperty());
    } else if (type == ModelAssociationType.BELONGS_TO || type == ModelAssociationType.HAS_ONE) {
      Model associationModelAnnotation = associationClass.getAnnotation(Model.class);
      if (associationModelAnnotation != null && StringUtils.hasText(associationModelAnnotation.idProperty())
          && !associationModelAnnotation.idProperty().equals("id")) {
        association.setPrimaryKey(associationModelAnnotation.idProperty());
      }
    }

    if (type == ModelAssociationType.HAS_MANY) {
      HasManyAssociation hasManyAssociation = (HasManyAssociation) association;
View Full Code Here

  public String getModel() {
    return model;
  }

  protected static String getModelName(Class<?> model) {
    Model modelAnnotation = model.getAnnotation(Model.class);

    if (modelAnnotation != null && StringUtils.hasText(modelAnnotation.value())) {
      return modelAnnotation.value();
    }
    return model.getName();
  }
View Full Code Here

      association.setPrimaryKey(associationAnnotation.primaryKey());
    } else if (type == ModelAssociationType.HAS_MANY && StringUtils.hasText(model.getIdProperty())
        && !model.getIdProperty().equals("id")) {
      association.setPrimaryKey(model.getIdProperty());
    } else if (type == ModelAssociationType.BELONGS_TO || type == ModelAssociationType.HAS_ONE) {
      Model associationModelAnnotation = associationClass.getAnnotation(Model.class);
      if (associationModelAnnotation != null && StringUtils.hasText(associationModelAnnotation.idProperty())
          && !associationModelAnnotation.idProperty().equals("id")) {
        association.setPrimaryKey(associationModelAnnotation.idProperty());
      }
    }

    if (type == ModelAssociationType.HAS_MANY) {
      HasManyAssociation hasManyAssociation = (HasManyAssociation) association;
View Full Code Here

  public void setInstanceName(String instanceName) {
    this.instanceName = instanceName;
  }

  protected static String getModelName(Class<?> model) {
    Model modelAnnotation = model.getAnnotation(Model.class);

    if (modelAnnotation != null && StringUtils.hasText(modelAnnotation.value())) {
      return modelAnnotation.value();
    }
    return model.getName();
  }
View Full Code Here

TOP

Related Classes of ch.ralscha.extdirectspring.generator.Model

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.