All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.smyld.db.schema.PrimaryKey Maven / Gradle / Ivy

There is a newer version: 1.0.9
Show newest version
package org.smyld.db.schema;

import org.smyld.text.TextUtil;

public class PrimaryKey extends SchemaObject {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	String columnName;
	int sequence;

	public PrimaryKey() {
		setSchemaType(TAG_NAME_P_KEY);
	}

	public String getColumnName() {
		return columnName;
	}

	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}

	public int getSequence() {
		return sequence;
	}

	public void setSequence(int sequence) {
		this.sequence = sequence;
	}

	@Override
	public boolean equals(Object compare) {
		if (compare instanceof PrimaryKey) {
			PrimaryKey comp = (PrimaryKey) compare;
			if (TextUtil.compare(name, comp.getName()))
				if (TextUtil.compare(columnName, comp.getColumnName()))
					return (sequence == comp.getSequence());
		}
		return false;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy