
org.tinygroup.database.config.table.Table Maven / Gradle / Ivy
The newest version!
/**
* Copyright (c) 2012-2016, www.tinygroup.org ([email protected]).
*
* Licensed under the GPL, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.gnu.org/licenses/gpl.html
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.tinygroup.database.config.table;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import org.tinygroup.metadata.config.BaseObject;
import org.tinygroup.metadata.config.ExtendProperties;
import java.util.ArrayList;
import java.util.List;
@XStreamAlias("table")
public class Table extends BaseObject {
@XStreamAsAttribute
private String schema;
@XStreamImplicit
private List fieldList;
@XStreamImplicit
private List indexList;
@XStreamAsAttribute
@XStreamAlias("package-name")
private String packageName;
@XStreamImplicit
private List foreignReferences;
@XStreamAlias("extend-properties")
private ExtendProperties extendProperties;
@XStreamAsAttribute
@XStreamAlias("table-space")
private String tableSpace;
public String getNameWithOutSchema() {
return super.getName();
}
public String getName() {
if (getSchema() == null || "".equals(getSchema())) {
return super.getName();
}
return String.format("%s.%s", getSchema(), super.getName());
}
public String getPackageName() {
return packageName;
}
public void setPackageName(String packageName) {
this.packageName = packageName;
}
public String getSchema() {
return schema;
}
public void setSchema(String schema) {
this.schema = schema;
}
public List getFieldList() {
if (fieldList == null) {
fieldList = new ArrayList();
}
return fieldList;
}
public void setFieldList(List fieldList) {
this.fieldList = fieldList;
}
public List getIndexList() {
if (indexList == null) {
indexList = new ArrayList();
}
return indexList;
}
public void setIndexList(List indexList) {
this.indexList = indexList;
}
public List getForeignReferences() {
if (foreignReferences == null) {
foreignReferences = new ArrayList();
}
return foreignReferences;
}
public void setForeignReferences(List foreignReferences) {
this.foreignReferences = foreignReferences;
}
public ExtendProperties getExtendProperties() {
return extendProperties;
}
public void setExtendProperties(ExtendProperties extendProperties) {
this.extendProperties = extendProperties;
}
public String getTableSpace() {
return tableSpace;
}
public void setTableSpace(String tableSpace) {
this.tableSpace = tableSpace;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy