Package org.hpccsystems.commons.filter
Class SQLFragment
- java.lang.Object
-
- org.hpccsystems.commons.filter.SQLFragment
-
public class SQLFragment extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSQLFragment.FragmentType
-
Constructor Summary
Constructors Constructor Description SQLFragment()Instantiates a new SQL fragment.SQLFragment(String framentStr)Instantiates a new SQL fragment.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SQLFragmentcreateExpressionFragment(String fragment)Creates the expression fragment.static SQLFragment.FragmentTypedetermineFragmentType(String fragStr)Determine fragment type.StringgetFnname()Gets the fnname.StringgetFullColumnName()Gets the full column name.StringgetParent()Gets the parent.SQLFragment.FragmentTypegetType()Gets the type.StringgetValue()Gets the value.booleanisParameterized()Checks if is parameterized.voidparseExpressionFragment(String fragment)Parses the expression fragment.voidsetFnname(String fnname)Sets the fnname.voidsetParent(String parent)Sets the parent.voidsetType(SQLFragment.FragmentType type)Sets the type.voidsetValue(String value)Sets the value.voidupdateFragmentColumParent(List<SQLTable> sqlTables)Update fragment colum parent.
-
-
-
Constructor Detail
-
SQLFragment
public SQLFragment()
Instantiates a new SQL fragment.
-
SQLFragment
public SQLFragment(String framentStr)
Instantiates a new SQL fragment.- Parameters:
framentStr- the frament str
-
-
Method Detail
-
isParameterized
public boolean isParameterized()
Checks if is parameterized.- Returns:
- true, if is parameterized
-
getParent
public String getParent()
Gets the parent.- Returns:
- the parent
-
setParent
public void setParent(String parent)
Sets the parent.- Parameters:
parent- the new parent
-
getValue
public String getValue()
Gets the value.- Returns:
- the value
-
setValue
public void setValue(String value)
Sets the value.- Parameters:
value- the new value
-
getType
public SQLFragment.FragmentType getType()
Gets the type.- Returns:
- the type
-
setType
public void setType(SQLFragment.FragmentType type)
Sets the type.- Parameters:
type- the new type
-
parseExpressionFragment
public void parseExpressionFragment(String fragment)
Parses the expression fragment.- Parameters:
fragment- the fragment
-
createExpressionFragment
public static SQLFragment createExpressionFragment(String fragment)
Creates the expression fragment.- Parameters:
fragment- the fragment- Returns:
- the SQL fragment
-
determineFragmentType
public static SQLFragment.FragmentType determineFragmentType(String fragStr)
Determine fragment type.- Parameters:
fragStr- the frag str- Returns:
- the fragment type
-
getFullColumnName
public String getFullColumnName()
Gets the full column name.- Returns:
- the full column name
-
updateFragmentColumParent
public void updateFragmentColumParent(List<SQLTable> sqlTables) throws Exception
Update fragment colum parent.- Parameters:
sqlTables- the sql tables- Throws:
Exception- the exception
-
getFnname
public String getFnname()
Gets the fnname.- Returns:
- the fnname
-
setFnname
public void setFnname(String fnname)
Sets the fnname.- Parameters:
fnname- the new fnname
-
-