} catch (InstantiationException e) {
throw new UnsupportedOperationException("There is some problem in creating the proxy");
} catch (IllegalAccessException e) {
throw new UnsupportedOperationException("There is some problem in creating the proxy");
}
DboColumnMeta colMeta = this.getMetaDbo();
if (classMeta.getIdField() != null && (rowKey!=null)) {
// first fill the id
DboColumnEmbedMeta embedMeta = (DboColumnEmbedMeta) colMeta;
Object idValue = null;
MetaField<PROXY> metaFieldId = classMeta.getIdField();
NoSqlConverter customConvId = metaFieldId.getField().getAnnotation(NoSqlConverter.class);
byte[] idBytes = null;
if (customConvId != null) {
idValue = getValue(rowKey, customConvId);
idBytes = getBytesValue(idValue, customConvId);
} else {
idValue = embedMeta.getFkToColumnFamily().getIdColumnMeta().getStorageType().convertFromNoSql(rowKey);
idBytes = StandardConverters.convertToBytes(idValue);
}
if (metaFieldId != null)
ReflectionUtil.putFieldValue(newproxy, metaFieldId.getField(),idValue);
// Now extract other columns
byte[] prefix = StandardConverters.convertToBytes(getColumnName());
byte[] embedColumn = new byte[prefix.length + idBytes.length];
System.arraycopy(prefix,0,embedColumn,0 ,prefix.length);
System.arraycopy(idBytes,0,embedColumn,prefix.length,idBytes.length);
Collection<Column> columnsInRow = row.columnByPrefix(embedColumn);
for (Column colInRow : columnsInRow) {
byte[] fullNameCol = colInRow.getName();
int colLen = fullNameCol.length - embedColumn.length;
byte[] fk = new byte[colLen];
for (int i = embedColumn.length; i < fullNameCol.length; i++) {
fk[i - embedColumn.length] = fullNameCol[i];
}
Object colVal = colMeta.convertFromStorage2(fk);
String colName = colMeta.convertTypeToString(colVal);
Object columnValue = null;
MetaField<PROXY> metaField = classMeta.getMetaFieldByCol(null, colName);
if(metaField == null)
continue; //skip this field sice we don't know this column