コード例 #1
0
  @Override
  public int compareTo(KaleoDraftDefinition kaleoDraftDefinition) {
    int value = 0;

    if (getDraftVersion() < kaleoDraftDefinition.getDraftVersion()) {
      value = -1;
    } else if (getDraftVersion() > kaleoDraftDefinition.getDraftVersion()) {
      value = 1;
    } else {
      value = 0;
    }

    value = value * -1;

    if (value != 0) {
      return value;
    }

    return 0;
  }
コード例 #2
0
  @Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }

    if (!(obj instanceof KaleoDraftDefinition)) {
      return false;
    }

    KaleoDraftDefinition kaleoDraftDefinition = (KaleoDraftDefinition) obj;

    long primaryKey = kaleoDraftDefinition.getPrimaryKey();

    if (getPrimaryKey() == primaryKey) {
      return true;
    } else {
      return false;
    }
  }
コード例 #3
0
  /**
   * Converts the soap model instance into a normal model instance.
   *
   * @param soapModel the soap model instance to convert
   * @return the normal model instance
   */
  public static KaleoDraftDefinition toModel(KaleoDraftDefinitionSoap soapModel) {
    if (soapModel == null) {
      return null;
    }

    KaleoDraftDefinition model = new KaleoDraftDefinitionImpl();

    model.setKaleoDraftDefinitionId(soapModel.getKaleoDraftDefinitionId());
    model.setGroupId(soapModel.getGroupId());
    model.setCompanyId(soapModel.getCompanyId());
    model.setUserId(soapModel.getUserId());
    model.setUserName(soapModel.getUserName());
    model.setCreateDate(soapModel.getCreateDate());
    model.setModifiedDate(soapModel.getModifiedDate());
    model.setName(soapModel.getName());
    model.setTitle(soapModel.getTitle());
    model.setContent(soapModel.getContent());
    model.setVersion(soapModel.getVersion());
    model.setDraftVersion(soapModel.getDraftVersion());

    return model;
  }