@Override public EdmType getType() { if (type == null) { if (cast.getType() == null) { throw new EdmException("Must specify a type for a Cast expression."); } final EdmTypeInfo typeInfo = new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(cast.getType()).build(); type = typeInfo.getType(); } return type; }
@Override public EdmType getType() { if (type == null) { if (cast.getType() == null) { throw new EdmException("Must specify a type for a Cast expression."); } final EdmTypeInfo typeInfo = new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(cast.getType()).build(); type = typeInfo.getType(); } return type; }
@Override public boolean equals (Object obj) { if (obj == null) { return false; } if (!(obj instanceof CsdlCast)) { return false; } CsdlCast csdlCast = (CsdlCast) obj; return (this.getValue() == null ? csdlCast.getValue() == null : this.getValue().equals(csdlCast.getValue())) && (this.getType() == null ? csdlCast.getType() == null : this.getType().equals(csdlCast.getType())) && (this.getMaxLength() == null ? csdlCast.getMaxLength() == null : this.getMaxLength().equals(csdlCast.getMaxLength())) && (this.getPrecision() == null ? csdlCast.getPrecision() == null : this.getPrecision().equals(csdlCast.getPrecision())) && (this.getScale() == null ? csdlCast.getScale() == null : this.getScale().equals(csdlCast.getScale())) && (this.getSrid() == null ? csdlCast.getSrid() == null : String.valueOf(this.getSrid()).equals(String.valueOf(csdlCast.getSrid()))) && (this.getAnnotations() == null ? csdlCast.getAnnotations() == null : checkAnnotations(csdlCast.getAnnotations())); }