This class now includes the HsqlName class introduced in 1.7.1 and improves auto-naming with multiple databases in the engine.
Methods check user defined names and issue system generated names for SQL objects.
This class does not deal with the type of the SQL object for which it is used.
Some names beginning with SYS_ are reserved for system generated names. These are defined in isReserveName(String name) and created by the makeAutoName(String type) factory method
sysNumber is used to generate system-generated names. It is set to the largest integer encountered in names that use the SYS_xxxxxxx_INTEGER format. As the DDL is processed before any ALTER command, any new system generated name will have a larger integer suffix than all the existing names.
| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final HsqlNameManager. | |
| private static final String[] | |
| private HsqlNameManager. | |
| private AtomicLong | |
| private boolean | |
| private static final HsqlNameManager | |
| pack-priv HsqlNameManager. | |
| private AtomicLong |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| autoColumnNames | back to summary |
|---|---|
| private static final HsqlNameManager. | |
| autoNoNameColumnNames | back to summary |
|---|---|
| private static final String[] autoNoNameColumnNames | |
| catalogName | back to summary |
|---|---|
| private HsqlNameManager. | |
| serialNumber | back to summary |
|---|---|
| private AtomicLong serialNumber | |
| sqlRegularNames | back to summary |
|---|---|
| private boolean sqlRegularNames | |
| staticManager | back to summary |
|---|---|
| private static final HsqlNameManager staticManager | |
| subqueryTableName | back to summary |
|---|---|
| pack-priv HsqlNameManager. | |
| sysNumber | back to summary |
|---|---|
| private AtomicLong sysNumber | |
| HsqlNameManager | back to summary |
|---|---|
| public HsqlNameManager() | |
| HsqlNameManager | back to summary |
|---|---|
| public HsqlNameManager(Database database) | |
| getAutoColumnName | back to summary |
|---|---|
| public static HsqlNameManager. Column index i is 0 based, returns 1 based numbered column. | |
| getAutoNoNameColumnString | back to summary |
|---|---|
| public static String getAutoNoNameColumnString(int i) | |
| getAutoSavepointNameString | back to summary |
|---|---|
| public static String getAutoSavepointNameString(long i, int j) | |
| getCatalogName | back to summary |
|---|---|
| public HsqlNameManager. | |
| getSimpleName | back to summary |
|---|---|
| public static HsqlNameManager. | |
| getSubqueryTableName | back to summary |
|---|---|
| public HsqlNameManager. Same name string but different objects and serial number | |
| newAutoName | back to summary |
|---|---|
| public HsqlNameManager. Auto names are used for autogenerated indexes or anonymous constraints. | |
| newAutoName | back to summary |
|---|---|
| public HsqlNameManager. Auto names are used for autogenerated indexes or anonymous constraints. | |
| newColumnHsqlName | back to summary |
|---|---|
| public HsqlNameManager. | |
| newColumnSchemaHsqlName | back to summary |
|---|---|
| public HsqlNameManager. | |
| newConstraintIndexName | back to summary |
|---|---|
| public HsqlNameManager. | |
| newHsqlName | back to summary |
|---|---|
| public HsqlNameManager. | |
| newHsqlName | back to summary |
|---|---|
| public HsqlNameManager. | |
| newHsqlName | back to summary |
|---|---|
| public HsqlNameManager. | |
| newHsqlName | back to summary |
|---|---|
| public HsqlNameManager. | |
| newInfoSchemaColumnName | back to summary |
|---|---|
| public static HsqlNameManager. | |
| newInfoSchemaObjectName | back to summary |
|---|---|
| public static HsqlNameManager. | |
| newInfoSchemaTableName | back to summary |
|---|---|
| public static HsqlNameManager. | |
| newSpecificRoutineName | back to summary |
|---|---|
| public HsqlNameManager. | |
| newSystemObjectName | back to summary |
|---|---|
| public static HsqlNameManager. | |
| setSqlRegularNames | back to summary |
|---|---|
| public void setSqlRegularNames(boolean value) | |
| Modifier and Type | Field and Description |
|---|---|
| public String | |
| pack-priv static HsqlNameManager. | |
| pack-priv HsqlNameManager | |
| public Grantee | |
| public HsqlNameManager. | |
| public HsqlNameManager. | |
| private final long | |
| public String | |
| pack-priv static final String[] | sysPrefixes
"SYS_IDX_" is used for auto-indexes on referring FK columns or unique constraints. |
| public final int |
| Access | Constructor and Description |
|---|---|
| private | |
| private | |
| private | HsqlName(HsqlNameManager man, String name, int type, boolean isQuoted)
for auto names and system-defined names |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object other)
Overrides org. Indicates whether some other object is "equal to" this one. |
| pack-priv String | |
| public String | |
| public long | |
| public String | |
| public int | hashCode()
Overrides org. hash code for this object is based on its unique serial number. |
| pack-priv static boolean | isRegularIdentifier(String name)
Returns true if the identifier consists of all uppercase letters digits and underscore, beginning with a letter and is not in the keyword list. |
| pack-priv static boolean | |
| pack-priv boolean | |
| public void | |
| public void | |
| public void | |
| pack-priv static int | |
| public String |
| comment | back to summary |
|---|---|
| public String comment | |
| emptyArray | back to summary |
|---|---|
| pack-priv static HsqlNameManager. | |
| manager | back to summary |
|---|---|
| pack-priv HsqlNameManager manager | |
| owner | back to summary |
|---|---|
| public Grantee owner | |
| parent | back to summary |
|---|---|
| public HsqlNameManager. | |
| schema | back to summary |
|---|---|
| public HsqlNameManager. | |
| serialNumber | back to summary |
|---|---|
| private final long serialNumber | |
| statementName | back to summary |
|---|---|
| public String statementName | |
| sysPrefixes | back to summary |
|---|---|
| pack-priv static final String[] sysPrefixes "SYS_IDX_" is used for auto-indexes on referring FK columns or unique constraints. "SYS_PK_" is for the primary key constraints "SYS_CT_" is for unique and check constraints "SYS_REF_" is for FK constraints in referenced tables "SYS_FK_" is for FK constraints in referencing tables | |
| type | back to summary |
|---|---|
| public final int type | |
| HsqlName | back to summary |
|---|---|
| private HsqlName(HsqlNameManager man, int type) | |
| HsqlName | back to summary |
|---|---|
| private HsqlName(HsqlNameManager man, String name, boolean isquoted, int type) | |
| HsqlName | back to summary |
|---|---|
| private HsqlName(HsqlNameManager man, String name, int type, boolean isQuoted) for auto names and system-defined names | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides org. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getCommentSQL | back to summary |
|---|---|
| pack-priv String getCommentSQL(String typeName) | |
| getSchemaQualifiedStatementName | back to summary |
|---|---|
| public String getSchemaQualifiedStatementName() | |
| getSerialNumber | back to summary |
|---|---|
| public long getSerialNumber() | |
| getStatementName | back to summary |
|---|---|
| public String getStatementName() Overrides org. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides org. hash code for this object is based on its unique serial number. | |
| isRegularIdentifier | back to summary |
|---|---|
| pack-priv static boolean isRegularIdentifier(String name) Returns true if the identifier consists of all uppercase letters digits and underscore, beginning with a letter and is not in the keyword list. | |
| isReservedName | back to summary |
|---|---|
| pack-priv static boolean isReservedName(String name) | |
| isReservedName | back to summary |
|---|---|
| pack-priv boolean isReservedName() | |
| rename | back to summary |
|---|---|
| public void rename(HsqlNameManager. | |
| rename | back to summary |
|---|---|
| public void rename(String name, boolean isquoted) | |
| setSchemaIfNull | back to summary |
|---|---|
| public void setSchemaIfNull(HsqlNameManager. | |
| sysPrefixLength | back to summary |
|---|---|
| pack-priv static int sysPrefixLength(String name) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| public boolean | |
| public String |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object other)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public String | |
| public String | |
| public int |
| isNameQuoted | back to summary |
|---|---|
| public boolean isNameQuoted | |
| name | back to summary |
|---|---|
| public String name | |
| SimpleName | back to summary |
|---|---|
| private SimpleName() | |
| SimpleName | back to summary |
|---|---|
| private SimpleName(String name, boolean isNameQuoted) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getNameString | back to summary |
|---|---|
| public String getNameString() | |
| getStatementName | back to summary |
|---|---|
| public String getStatementName() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |