Package org.idempiere.db.util
Record Class SQLFragment
java.lang.Object
java.lang.Record
org.idempiere.db.util.SQLFragment
SQL fragment with SQL clause and parameters
- Author:
- hengsin
-
Constructor Summary
ConstructorsConstructorDescriptionSQLFragment(String sqlClause) SQLFragment(String sqlClause, List<Object> parameters) Creates an instance of aSQLFragmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.Returns the value of theparametersrecord component.Returns the value of thesqlClauserecord component.Convert to SQL clause with embedded parameters fromparameters(replacing ?final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SQLFragment
Creates an instance of aSQLFragmentrecord class.- Parameters:
sqlClause- the value for thesqlClauserecord componentparameters- the value for theparametersrecord component
-
SQLFragment
- Parameters:
sqlClause-
-
-
Method Details
-
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
toSQLWithParameters
Convert to SQL clause with embedded parameters fromparameters(replacing ? with parameter value).
Warning: This is subject to SQL injection attack, use with care.- Returns:
- SQL clause with embedded parameters
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
sqlClause
Returns the value of thesqlClauserecord component.- Returns:
- the value of the
sqlClauserecord component
-
parameters
Returns the value of theparametersrecord component.- Returns:
- the value of the
parametersrecord component
-