switch (condition)
{
// EQUAL Operator
case EQ:
SuperColumn thriftSuperColumn = getSuperColumnForRow(consistencyLevel, columnFamilyName, rowKey,
superColumnName, persistenceUnit);
if (thriftSuperColumn != null)
thriftSuperColumns.add(thriftSuperColumn);
break;
// LIKE operation not available
// Greater than operator
case GT:
searchSuperColumnsInRange(columnFamilyName, consistencyLevel, persistenceUnit, rowKey, superColumnName,
thriftSuperColumns, superColumnName, new byte[0]);
break;
// Less than Operator
case LT:
searchSuperColumnsInRange(columnFamilyName, consistencyLevel, persistenceUnit, rowKey, superColumnName,
thriftSuperColumns, new byte[0], superColumnName);
break;
// Greater than-equals to operator
case GTE:
searchSuperColumnsInRange(columnFamilyName, consistencyLevel, persistenceUnit, rowKey, superColumnName,
thriftSuperColumns, superColumnName, new byte[0]);
break;
// Less than equal to operator
case LTE:
searchSuperColumnsInRange(columnFamilyName, consistencyLevel, persistenceUnit, rowKey, superColumnName,
thriftSuperColumns, new byte[0], superColumnName);
break;
default:
throw new QueryHandlerException(condition
+ " comparison operator not supported currently for Cassandra Inverted Index.");
}
// Construct search results out of these thrift columns
for (SuperColumn thriftSuperColumn : thriftSuperColumns)
{
for (Column column : thriftSuperColumn.getColumns())
{
byte[] columnName = column.getName();
searchResult.setPrimaryKey(PropertyAccessorHelper.getObject(m.getIdAttribute().getJavaType(),
columnName));
byte[] columnValue = column.getValue();