本文整理汇总了Java中org.databene.commons.ArrayUtil.append方法的典型用法代码示例。如果您正苦于以下问题:Java ArrayUtil.append方法的具体用法?Java ArrayUtil.append怎么用?Java ArrayUtil.append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.databene.commons.ArrayUtil
的用法示例。
在下文中一共展示了ArrayUtil.append方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addColumn
import org.databene.commons.ArrayUtil; //导入方法依赖的package包/类
public void addColumn(short ordinalPosition, String columnName) {
int expectedPosition = columnNames.length + 1;
if (ordinalPosition == expectedPosition)
columnNames = ArrayUtil.append(columnName, columnNames);
else {
if (ordinalPosition > expectedPosition || !columnNames[ordinalPosition - 1].equals(columnName))
throw new IllegalArgumentException("ordinalPosition is expected to be " + expectedPosition + ", " +
"found: " + ordinalPosition);
}
}
示例2: parseFK
import org.databene.commons.ArrayUtil; //导入方法依赖的package包/类
private static DBForeignKeyConstraint parseFK(Element e, DBTable owner, DBSchema schema) {
String name = e.getAttribute("name");
String refereeTableName = e.getAttribute("refereeTable");
DBTable refereeTable = schema.getTable(refereeTableName);
Assert.notNull(refereeTable, "refereeTable");
String colAttr = e.getAttribute("column");
String[] columnNames = null;
String[] refereeColumnNames = null;
if (!StringUtil.isEmpty(colAttr)) {
columnNames = new String[] { colAttr };
refereeColumnNames = new String[] { e.getAttribute("refereeColumn") };
} else {
Element colsElement = XMLUtil.getChildElement(e, false, true, "columns");
Element[] colElements = XMLUtil.getChildElements(colsElement, false, "column");
for (Element colElement : colElements) {
columnNames = ArrayUtil.append(colElement.getAttribute("name"), columnNames);
refereeColumnNames = ArrayUtil.append(colElement.getAttribute("refereeColumn"), refereeColumnNames);
}
}
boolean autoNamed = false;
if (e.getAttribute("autoNamed") != null)
autoNamed = Boolean.valueOf(e.getAttribute("autoNamed"));
DBForeignKeyConstraint fk = new DBForeignKeyConstraint(name, autoNamed, owner, columnNames, refereeTable, refereeColumnNames);
// parse rules
String updateRule = XMLUtil.getAttribute(e, "updateRule", false);
if (!StringUtil.isEmpty(updateRule))
fk.setUpdateRule(FKChangeRule.valueOf(updateRule));
String deleteRule = XMLUtil.getAttribute(e, "deleteRule", false);
if (!StringUtil.isEmpty(deleteRule))
fk.setDeleteRule(FKChangeRule.valueOf(deleteRule));
return fk;
}
示例3: parseColumnNames
import org.databene.commons.ArrayUtil; //导入方法依赖的package包/类
public String[] parseColumnNames(Element e) {
String colAttr = e.getAttribute("column");
String[] columnNames = null;
if (!StringUtil.isEmpty(colAttr))
columnNames = new String[] { colAttr };
else {
Element colsElement = XMLUtil.getChildElement(e, false, true, "columns");
Element[] colElements = XMLUtil.getChildElements(colsElement, false, "column");
for (Element colElement : colElements)
columnNames = ArrayUtil.append(colElement.getAttribute("name"), columnNames);
}
return columnNames;
}
示例4: addColumnName
import org.databene.commons.ArrayUtil; //导入方法依赖的package包/类
@Override
public void addColumnName(String columnName) {
this.columnNames = ArrayUtil.append(columnName, columnNames);
}
示例5: addColumnName
import org.databene.commons.ArrayUtil; //导入方法依赖的package包/类
public void addColumnName(String columnName) {
if (!ArrayUtil.contains(columnName, columnNames))
columnNames = ArrayUtil.append(columnName, columnNames);
}
示例6: addColumn
import org.databene.commons.ArrayUtil; //导入方法依赖的package包/类
public void addColumn(String column) {
this.columnNames = ArrayUtil.append(column, this.columnNames);
}
示例7: addPostalCode
import org.databene.commons.ArrayUtil; //导入方法依赖的package包/类
public void addPostalCode(String postalCode) {
postalCodes = ArrayUtil.append(postalCode, postalCodes);
}
示例8: addZipCode
import org.databene.commons.ArrayUtil; //导入方法依赖的package包/类
/** @deprecated use property postalCodes */
@Deprecated
public void addZipCode(String zipCode) {
escalator.escalate("property City.zipCode is deprecated, use City.postalCode instead", City.class, "Invoked addZipCode()");
postalCodes = ArrayUtil.append(zipCode, postalCodes);
}