KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > triactive > jdo > store > TableIdentifier


1 /*
2  * Copyright 2002 (C) TJDO.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the TJDO License version 1.0.
6  * See the terms of the TJDO License in the documentation provided with this software.
7  *
8  * $Id: TableIdentifier.java,v 1.3 2003/01/19 02:42:10 jackknifebarber Exp $
9  */

10
11 package com.triactive.jdo.store;
12
13
14 class TableIdentifier extends SQLIdentifier
15 {
16     /**
17      * The maximum length in characters reserved at the end of table names
18      * for suffixes used to construct related names (such as _PK for a table's
19      * primary key).
20      */

21
22     public static int MAX_TABLE_NAME_SUFFIX = 4;
23
24
25     public TableIdentifier(DatabaseAdapter dba, String JavaDoc javaName)
26     {
27         super(dba);
28
29         setJavaName(javaName);
30     }
31
32
33     protected int getMaxLength()
34     {
35         return dba.getMaxTableNameLength() - MAX_TABLE_NAME_SUFFIX;
36     }
37 }
38
Popular Tags