/** * getOrderByColumn method return order by value of the column * * @param String * [] orderByColumns * * @param Attribute * column * * @return orderColumnValue. */ private String getOrderByColumn(String[] orderByColumns, Attribute column) { if (orderByColumns != null) { for (String orderColumn : orderByColumns) { String[] orderValue = orderColumn.split("\\s"); String orderColumnName = orderValue[0].substring(orderValue[0].lastIndexOf('.') + 1); String orderColumnValue = orderValue[1]; if (orderColumnName.equals(((AbstractAttribute) column).getName()) || orderColumnName.equals(((AbstractAttribute) column).getJPAColumnName())) { return orderColumnValue; } } } return null; }
return name == null ? getName() : name;
if (idCol.getName().equals(jpaFieldName))
item.put("localField", getActualColumnName(localAttribute)); item.put("foreignField", foreignField); item.put("as", attribute.getName()); lookup.add(new BasicDBObject("$lookup", item)); unwind.append("path", "$" + attribute.getName()); unwind.append("preserveNullAndEmptyArrays", optional); lookup.add(new BasicDBObject("$unwind", unwind));
if (embeddedeFieldName.equals(((AbstractAttribute) m.getIdAttribute()).getName()))
String idColumnName = ((AbstractAttribute) entityMetadata.getIdAttribute()).getName();
EntityType entityType = metaModel.entity(entityMetadata.getEntityClazz()); String idColumnName = ((AbstractAttribute) entityMetadata.getIdAttribute()).getName();
Object value = PropertyAccessorHelper.getObject(entity, (Field) attribute.getJavaMember()); HBaseCell hbaseCell = new HBaseCell(columnFamily, columnName, value); if (!idCol.getName().equals(attribute.getName()) && value != null)
if (idCol.getName().equals(jpaFieldName))
item.put("localField", getActualColumnName(localAttribute)); item.put("foreignField", foreignField); item.put("as", attribute.getName()); lookup.add(new BasicDBObject("$lookup", item)); unwind.append("path", "$" + attribute.getName()); unwind.append("preserveNullAndEmptyArrays", optional); lookup.add(new BasicDBObject("$unwind", unwind));
if (embeddedeFieldName.equals(((AbstractAttribute) m.getIdAttribute()).getName()))