public class Util extends Object
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static String |
checkSQLName(String string,
int maxStringLength)
Checks for any illegal characters in a SQL name.
|
static String |
enquoteColumnName(Connection conn,
String columnName)
Enquotes a column name.
|
static String |
enquoteNameSQLName(Connection conn,
String name)
Returns the ENQUOTE_NAME formatted String for the SQL name
If the Oracle JDBC is present, use the new OracleStatement.enquoteIdentifier
API in the JDK8 JDBC.
|
static String |
enquoteTableName(Connection conn,
String tableName)
Enquotes a table name with or without schema name which is separated by ".".
|
static int |
getMaxLengthAllowed() |
static String |
myCheckName(String string)
Checks for any illegal characters in a SQL name.
|
static String |
qualifiedSQLName(Connection conn,
String name)
Checks if the specified name is a qualified SQL name.
|
public static String checkSQLName(String string, int maxStringLength) throws SQLException
string
- input stringmaxStringLength
- maximum length for input stringSQLException
- An exception is thrown if the input string contains any
illegal characters or exceeds the maximum lengthpublic static String enquoteColumnName(Connection conn, String columnName) throws SQLException
conn
- columnName
- SQLException
public static String enquoteNameSQLName(Connection conn, String name) throws SQLException
conn
- the database connectionname
- the input nameSQLException
public static String enquoteTableName(Connection conn, String tableName) throws SQLException
conn
- tableName
- SQLException
public static int getMaxLengthAllowed()
public static String myCheckName(String string) throws SQLException
string
- input stringmaxStringLength
- maximum length for input stringSQLException
- An exception is thrown if the input string contains any
illegal characters or exceeds the maximum lengthpublic static String qualifiedSQLName(Connection conn, String name) throws SQLException
conn
- the database connectionname
- the input nameSQLException
- A SQLexception is thrown if the dbms_assert.qualified_sql_name failedCopyright © 2016 Oracle and/or its affiliates. All Rights Reserved.