public PreparedStatement prepareSelectSliceQuery(Session session, SliceQueryProperties<?> sliceQueryProperties) {
log.trace("Generate SELECT statement for slice query");
EntityMeta entityMeta = sliceQueryProperties.getEntityMeta();
final EntityMetaConfig metaConfig = entityMeta.config();
Selection select = select();
for (PropertyMeta pm : entityMeta.forOperations().getColumnsMetaToLoad()) {
select = pm.forStatementGeneration().prepareSelectField(select);
}
Select from = select.from(metaConfig.getKeyspaceName(), metaConfig.getTableName());
final RegularStatement whereClause = sliceQueryProperties.generateWhereClauseForSelect(from);
return session.prepare(whereClause.getQueryString());
}