/** * Clone this property with the given alias. For example, when called on a property represented by * "table.property as property", returns a property represented by "table.property as newAlias". */ @Override public Property<TYPE> as(String newAlias) { return (Property<TYPE>) super.as(newAlias); }
/** * Add a {@link Field} to the map. If the name of the Field being added does not match the name, it will be aliased * to that name before being added to the map. * * @param name the key to use * @param column the Field to add * @return the value of any previous mapping with the specified key, or null if there was no mapping */ public Field<?> put(String name, Field<?> column) { if (column == null) { throw new IllegalArgumentException("Cannot use null column in ProjectionMap"); } if (SqlUtils.isEmpty(name)) { throw new IllegalArgumentException("Cannot use empty string as a key"); } if (!SqlUtils.equals(name, column.getName())) { column = column.as(name); } return map.put(name, column); }
/** * Clone this property with the given alias. For example, when called on a property represented by * "table.property as property", returns a property represented by "table.property as newAlias". */ @Override public Property<TYPE> as(String newAlias) { return (Property<TYPE>) super.as(newAlias); }
/** * Add a {@link Field} to the map. If the name of the Field being added does not match the name, it will be aliased * to that name before being added to the map. * * @param name the key to use * @param column the Field to add * @return the value of any previous mapping with the specified key, or null if there was no mapping */ public Field<?> put(String name, Field<?> column) { if (column == null) { throw new IllegalArgumentException("Cannot use null column in ProjectionMap"); } if (SqlUtils.isEmpty(name)) { throw new IllegalArgumentException("Cannot use empty string as a key"); } if (!SqlUtils.equals(name, column.getName())) { column = column.as(name); } return map.put(name, column); }