public static Factory newFactory(final UserType type, final int field, final Selector.Factory factory) { return new Factory() { protected String getColumnName() { return String.format("%s.%s", factory.getColumnName(), type.fieldName(field)); } protected AbstractType<?> getReturnType() { return type.fieldType(field); } protected void addColumnMapping(SelectionColumnMapping mapping, ColumnSpecification resultsColumn) { factory.addColumnMapping(mapping, resultsColumn); } public Selector newInstance(QueryOptions options) throws InvalidRequestException { return new FieldSelector(type, field, factory.newInstance(options)); } public boolean isAggregateSelectorFactory() { return factory.isAggregateSelectorFactory(); } }; }
public Selector.Factory newSelectorFactory(CFMetaData cfm, AbstractType<?> expectedType, List<ColumnDefinition> defs, VariableSpecifications boundNames) { Selector.Factory factory = selected.newSelectorFactory(cfm, null, defs, boundNames); AbstractType<?> type = factory.getColumnSpecification(cfm).type; if (!type.isUDT()) { throw new InvalidRequestException( String.format("Invalid field selection: %s of type %s is not a user type", selected, type.asCQL3Type())); } UserType ut = (UserType) type; int fieldIndex = ut.fieldPosition(field); if (fieldIndex == -1) { throw new InvalidRequestException(String.format("%s of type %s has no field %s", selected, type.asCQL3Type(), field)); } return FieldSelector.newFactory(ut, fieldIndex, factory); }
public Selector.Factory newSelectorFactory(CFMetaData cfm, AbstractType<?> expectedType, List<ColumnDefinition> defs, VariableSpecifications boundNames) { Selector.Factory factory = selected.newSelectorFactory(cfm, null, defs, boundNames); AbstractType<?> type = factory.getColumnSpecification(cfm).type; if (!type.isUDT()) { throw new InvalidRequestException( String.format("Invalid field selection: %s of type %s is not a user type", selected, type.asCQL3Type())); } UserType ut = (UserType) type; int fieldIndex = ut.fieldPosition(field); if (fieldIndex == -1) { throw new InvalidRequestException(String.format("%s of type %s has no field %s", selected, type.asCQL3Type(), field)); } return FieldSelector.newFactory(ut, fieldIndex, factory); }
public static Factory newFactory(final UserType type, final int field, final Selector.Factory factory) { return new Factory() { protected String getColumnName() { return String.format("%s.%s", factory.getColumnName(), type.fieldName(field)); } protected AbstractType<?> getReturnType() { return type.fieldType(field); } protected void addColumnMapping(SelectionColumnMapping mapping, ColumnSpecification resultsColumn) { factory.addColumnMapping(mapping, resultsColumn); } public Selector newInstance(QueryOptions options) throws InvalidRequestException { return new FieldSelector(type, field, factory.newInstance(options)); } public boolean isAggregateSelectorFactory() { return factory.isAggregateSelectorFactory(); } }; }
public Selector.Factory newSelectorFactory(CFMetaData cfm, AbstractType<?> expectedType, List<ColumnDefinition> defs, VariableSpecifications boundNames) { Selector.Factory factory = selected.newSelectorFactory(cfm, null, defs, boundNames); AbstractType<?> type = factory.getColumnSpecification(cfm).type; if (!type.isUDT()) { throw new InvalidRequestException( String.format("Invalid field selection: %s of type %s is not a user type", selected, type.asCQL3Type())); } UserType ut = (UserType) type; int fieldIndex = ut.fieldPosition(field); if (fieldIndex == -1) { throw new InvalidRequestException(String.format("%s of type %s has no field %s", selected, type.asCQL3Type(), field)); } return FieldSelector.newFactory(ut, fieldIndex, factory); }
public static Factory newFactory(final UserType type, final int field, final Selector.Factory factory) { return new Factory() { protected String getColumnName() { return String.format("%s.%s", factory.getColumnName(), type.fieldName(field)); } protected AbstractType<?> getReturnType() { return type.fieldType(field); } protected void addColumnMapping(SelectionColumnMapping mapping, ColumnSpecification resultsColumn) { factory.addColumnMapping(mapping, resultsColumn); } public Selector newInstance(QueryOptions options) throws InvalidRequestException { return new FieldSelector(type, field, factory.newInstance(options)); } public boolean isAggregateSelectorFactory() { return factory.isAggregateSelectorFactory(); } }; }
public Selector newInstance(QueryOptions options) throws InvalidRequestException { return new FieldSelector(type, field, factory.newInstance(options)); }
public Selector newInstance(QueryOptions options) throws InvalidRequestException { return new FieldSelector(type, field, factory.newInstance(options)); }
public Selector newInstance(QueryOptions options) throws InvalidRequestException { return new FieldSelector(type, field, factory.newInstance(options)); }