1 package org.apache.torque.templates.transformer.sql; 2 3 /* 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 */ 21 22 import org.apache.torque.generator.source.SourceAttributeName; 23 24 /** 25 * Contains the attributes created by the SQLTransformer. 26 */ 27 public enum SqlAttributeName implements SourceAttributeName 28 { 29 /** 30 * The attribute contains all primary key columns 31 * in a comma-separated String. 32 */ 33 PRIMARY_KEY_COLUMN_NAMES("primaryKeyColumnNames"), 34 35 /** 36 * The attribute contains all unique columns in a comma-separated String. 37 */ 38 UNIQUE_COLUMN_NAMES("uniqueColumnNames"), 39 40 INDEX_COLUMN_NAMES("indexColumnNames"), 41 42 LOCAL_COLUMN_NAMES("localColumnNames"), 43 44 FOREIGN_COLUMN_NAMES("foreignColumnNames"), 45 46 PRIMARY_KEY_CONSTRAINT_NAME("primaryKeyConstraintName"), 47 48 SEQUENCE_NAME("sequenceName"), 49 50 DDL_SQL("ddlSql"); 51 52 /** The name of the source element attribute, not null. */ 53 private String name; 54 55 /** 56 * Constructor. 57 * 58 * @param name the name of the source element attribute, not null. 59 */ 60 private SqlAttributeName(String name) 61 { 62 this.name = name; 63 } 64 65 /** 66 * Returns the name of the referenced source element attribute. 67 * 68 * @return the name of the referenced source element attribute. 69 */ 70 public String getName() 71 { 72 return name; 73 } 74 75 @Override 76 public String toString() 77 { 78 return name; 79 } 80 }