Package jodd.db.oom

Examples of jodd.db.oom.DbEntityColumnDescriptor


          appendAlias(out, ded, dec.getColumnName());
        }
        count++;
      }
    } else {
      DbEntityColumnDescriptor dec = ded.findByPropertyName(columnRef);
      templateData.lastColumnDec = dec;
      String columnName = dec == null ? null : dec.getColumnName();
      //String columnName = ded.getColumnName(columnRef);
      if (columnName == null) {
        throw new DbSqlBuilderException("Invalid column reference: " + tableRef + '.' + columnRef);
      }
      if (useTableReference) {
View Full Code Here


      if (tableRef != null) {
        out.append('.');
      }
      out.append(ded.getIdColumnName());
    } else if (columnRef != null) {
      DbEntityColumnDescriptor dec = ded.findByPropertyName(columnRef);

      templateData.lastColumnDec = dec;

      String column = dec == null ? null : dec.getColumnName();
      //String column = ded.getColumnName(columnRef);
      if (column == null) {
        throw new DbSqlBuilderException("Invalid column reference: " + tableRef + '.' + columnRef);
      }
View Full Code Here

      if (tableMatched) {
        if (resultColumns.contains(columnName) == false) {
          //DbEntityDescriptor ded = dbOomManager.lookupType(currentType);
          DbEntityDescriptor ded = dbEntityDescriptors[currentResult];

          DbEntityColumnDescriptor dec = ded.findByColumnName(columnName);
          String propertyName = (dec == null ? null : dec.getPropertyName());

          // check if a property that matches column name exist
          if (propertyName != null) {

            // if current entity instance does not exist (i.e. we are at the first column
            // of some entity), create the instance and store it
            if (result[currentResult] == null) {
              result[currentResult] = dbOomManager.createEntityInstance(currentType);
            }
/*
            boolean success = value != null ?
                    BeanUtil.setDeclaredPropertySilent(result[currentResult], propertyName, value) :
                    BeanUtil.hasDeclaredProperty(result[currentResult], propertyName);
*/
            Class type = BeanUtil.getDeclaredPropertyType(result[currentResult], propertyName);
            if (type != null) {
              // match: entity
              dec.updateDbSqlType(columnDbSqlType)// updates column db sql type information for the entity!!!
              Class<? extends SqlType> sqlTypeClass = dec.getSqlTypeClass();
              Object value = readColumnValue(colNdx, type, sqlTypeClass, columnDbSqlType);

              if (value != null) {
                // inject column value into existing entity
                BeanUtil.setDeclaredProperty(result[currentResult], propertyName, value);
View Full Code Here

TOP

Related Classes of jodd.db.oom.DbEntityColumnDescriptor

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.