Esempio n. 1
0
 public Object getObjectColumnByName(IMetaField columnName) {
   try {
     return _grset.getObject(columnName.getAlias());
   } catch (SQLException e) {
     logger.error(e.getMessage(), e);
     throw new GhostRuntimeException(e);
   }
 }
Esempio n. 2
0
 public IGDate getDateColumnByName(IMetaField columnName) {
   try {
     return new GDate(_grset.getTimestamp(columnName.getAlias()));
   } catch (SQLException e) {
     logger.error(e.getMessage(), e);
     throw new GhostRuntimeException(e);
   }
 }
Esempio n. 3
0
 public BigDecimal getNumberColumnByName(IMetaField columnName) {
   try {
     return getGrset().getBigDecimal(columnName.getAlias());
   } catch (SQLException e) {
     logger.error(e.getMessage(), e);
     throw new GhostRuntimeException(e);
   }
 }
Esempio n. 4
0
 public String getStringColumnByName(IMetaField columnName) {
   try {
     return getGrset().getString(columnName.getAlias());
   } catch (SQLException e) {
     logger.error(e.getMessage(), e);
     throw new GhostRuntimeException(e);
   }
 }
Esempio n. 5
0
  private String constructFullyQuaifiedTableAliasColumnNameUsingFields() {
    StringBuilder result = new StringBuilder();
    String seperatorString = GhostDBStaticVariables.EMPTY_STR;
    int substringLength = STRING_CONCAT_LENGTH;

    if (isPrefixAndSeperatorSet()) {
      result.append(getPrefix());
      seperatorString = GhostDBStaticVariables.STRINGCONCAT + getSeperator();
      substringLength = 0;
    }
    for (IMetaField imf : getFieldsThatConstructField()) {
      result.append(seperatorString);
      result.append(GhostDBStaticVariables.STRINGCONCAT);
      result.append(imf.getFullyQualifiedTableAliaisWithColumnName());
    }
    return result.substring(substringLength);
  }