本文整理了Java中org.eclipse.persistence.internal.helper.Helper.concatenateUniqueVectors()
方法的一些代码示例,展示了Helper.concatenateUniqueVectors()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Helper.concatenateUniqueVectors()
方法的具体详情如下:
包路径:org.eclipse.persistence.internal.helper.Helper
类名称:Helper
方法名:concatenateUniqueVectors
[英]Return a new vector with no duplicated values.
[中]返回没有重复值的新向量。
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* Override to control order of uniqueTables, child tablenames should be first since
* getDefaultRootElement on an XMLDescriptor will return the first table.
*/
protected void updateTables(){
// Unique is required because the builder can add the same table many times.
Vector<DatabaseTable> childTables = getDescriptor().getTables();
Vector<DatabaseTable> parentTables = getParentDescriptor().getTables();
Vector<DatabaseTable> uniqueTables = Helper.concatenateUniqueVectors(childTables, parentTables);
getDescriptor().setTables(uniqueTables);
// After filtering out any duplicate tables, set the default table
// if one is not already set. This must be done now before any other
// initialization occurs. In a joined strategy case, the default
// table will be at an index greater than 0. Which is where
// setDefaultTable() assumes it is. Therefore, we need to send the
// actual default table instead.
if (childTables.isEmpty()) {
getDescriptor().setInternalDefaultTable();
} else {
getDescriptor().setInternalDefaultTable(uniqueTables.get(uniqueTables.indexOf(childTables.get(0))));
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* set the tables on the child descriptor
* overridden in org.eclipse.persistence.internal.oxm.QNameInheritancePolicy
*/
protected void updateTables(){
// Unique is required because the builder can add the same table many times.
Vector<DatabaseTable> childTables = getDescriptor().getTables();
Vector<DatabaseTable> parentTables = getParentDescriptor().getTables();
Vector<DatabaseTable> uniqueTables = Helper.concatenateUniqueVectors(parentTables, childTables);
getDescriptor().setTables(uniqueTables);
// After filtering out any duplicate tables, set the default table
// if one is not already set. This must be done now before any other
// initialization occurs. In a joined strategy case, the default
// table will be at an index greater than 0. Which is where
// setDefaultTable() assumes it is. Therefore, we need to send the
// actual default table instead.
if (childTables.isEmpty()) {
getDescriptor().setInternalDefaultTable();
} else {
getDescriptor().setInternalDefaultTable(uniqueTables.get(uniqueTables.indexOf(childTables.get(0))));
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
* set the tables on the child descriptor
* overridden in org.eclipse.persistence.internal.oxm.QNameInheritancePolicy
*/
protected void updateTables(){
// Unique is required because the builder can add the same table many times.
Vector<DatabaseTable> childTables = getDescriptor().getTables();
Vector<DatabaseTable> parentTables = getParentDescriptor().getTables();
Vector<DatabaseTable> uniqueTables = Helper.concatenateUniqueVectors(parentTables, childTables);
getDescriptor().setTables(uniqueTables);
// After filtering out any duplicate tables, set the default table
// if one is not already set. This must be done now before any other
// initialization occurs. In a joined strategy case, the default
// table will be at an index greater than 0. Which is where
// setDefaultTable() assumes it is. Therefore, we need to send the
// actual default table instead.
if (childTables.isEmpty()) {
getDescriptor().setInternalDefaultTable();
} else {
getDescriptor().setInternalDefaultTable(uniqueTables.get(uniqueTables.indexOf(childTables.get(0))));
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* set the tables on the child descriptor
* overridden in org.eclipse.persistence.internal.oxm.QNameInheritancePolicy
*/
protected void updateTables(){
// Unique is required because the builder can add the same table many times.
Vector<DatabaseTable> childTables = getDescriptor().getTables();
Vector<DatabaseTable> parentTables = getParentDescriptor().getTables();
Vector<DatabaseTable> uniqueTables = Helper.concatenateUniqueVectors(parentTables, childTables);
getDescriptor().setTables(uniqueTables);
// After filtering out any duplicate tables, set the default table
// if one is not already set. This must be done now before any other
// initialization occurs. In a joined strategy case, the default
// table will be at an index greater than 0. Which is where
// setDefaultTable() assumes it is. Therefore, we need to send the
// actual default table instead.
if (childTables.isEmpty()) {
getDescriptor().setInternalDefaultTable();
} else {
getDescriptor().setInternalDefaultTable(uniqueTables.get(uniqueTables.indexOf(childTables.get(0))));
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Override to control order of uniqueTables, child tablenames should be first since
* getDefaultRootElement on an XMLDescriptor will return the first table.
*/
protected void updateTables(){
// Unique is required because the builder can add the same table many times.
Vector<DatabaseTable> childTables = getDescriptor().getTables();
Vector<DatabaseTable> parentTables = getParentDescriptor().getTables();
Vector<DatabaseTable> uniqueTables = Helper.concatenateUniqueVectors(childTables, parentTables);
getDescriptor().setTables(uniqueTables);
if(getDescriptor().isXMLDescriptor() && getParentDescriptor().isXMLDescriptor()){
if(((XMLDescriptor)getDescriptor()).getDefaultRootElementField() == null){
((XMLDescriptor)getDescriptor()).setDefaultRootElementField(((XMLDescriptor)getParentDescriptor()).getDefaultRootElementField());
}
}
// After filtering out any duplicate tables, set the default table
// if one is not already set. This must be done now before any other
// initialization occurs. In a joined strategy case, the default
// table will be at an index greater than 0. Which is where
// setDefaultTable() assumes it is. Therefore, we need to send the
// actual default table instead.
if (childTables.isEmpty()) {
getDescriptor().setInternalDefaultTable();
} else {
getDescriptor().setInternalDefaultTable(uniqueTables.get(uniqueTables.indexOf(childTables.get(0))));
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Override to control order of uniqueTables, child tablenames should be first since
* getDefaultRootElement on an XMLDescriptor will return the first table.
*/
protected void updateTables(){
// Unique is required because the builder can add the same table many times.
Vector<DatabaseTable> childTables = getDescriptor().getTables();
Vector<DatabaseTable> parentTables = getParentDescriptor().getTables();
Vector<DatabaseTable> uniqueTables = Helper.concatenateUniqueVectors(childTables, parentTables);
getDescriptor().setTables(uniqueTables);
if(getDescriptor().isXMLDescriptor() && getParentDescriptor().isXMLDescriptor()){
if(((XMLDescriptor)getDescriptor()).getDefaultRootElementField() == null){
((XMLDescriptor)getDescriptor()).setDefaultRootElementField(((XMLDescriptor)getParentDescriptor()).getDefaultRootElementField());
}
}
// After filtering out any duplicate tables, set the default table
// if one is not already set. This must be done now before any other
// initialization occurs. In a joined strategy case, the default
// table will be at an index greater than 0. Which is where
// setDefaultTable() assumes it is. Therefore, we need to send the
// actual default table instead.
if (childTables.isEmpty()) {
getDescriptor().setInternalDefaultTable();
} else {
getDescriptor().setInternalDefaultTable(uniqueTables.get(uniqueTables.indexOf(childTables.get(0))));
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
setHistoricalTables(Helper.concatenateUniqueVectors(parentDescriptor.getHistoryPolicy().getHistoricalTables(), getHistoricalTables()));
setStartFields(Helper.concatenateUniqueVectors(parentDescriptor.getHistoryPolicy().getStartFields(), getStartFields()));
setEndFields(Helper.concatenateUniqueVectors(parentDescriptor.getHistoryPolicy().getEndFields(), getEndFields()));
内容来源于网络,如有侵权,请联系作者删除!