public class TableReference extends AbstractReference
Modifier and Type | Field and Description |
---|---|
protected String |
dataFileName |
protected String |
sourceColumn |
protected String |
tableName |
protected String |
targetColumn |
fieldName, sourceDirectory, sourceDirectoryName, targetDirectory, targetDirectoryName
Constructor and Description |
---|
TableReference(ReferenceDescriptor descriptor) |
TableReference(String fieldName,
String directory,
String tableName,
String sourceColumn,
String targetColumn,
String dataFileName) |
TableReference(TableReferenceDescriptor descriptor) |
Modifier and Type | Method and Description |
---|---|
void |
addLink(String sourceId,
String targetId,
SQLSession session,
boolean checkExisting) |
void |
addLinks(List<String> sourceIds,
String targetId) |
void |
addLinks(List<String> sourceIds,
String targetId,
Session session)
Adds the links between the source ids and the target id
|
void |
addLinks(String sourceId,
List<String> targetIds) |
void |
addLinks(String sourceId,
List<String> targetIds,
Session session)
Adds the links between the source id and the target ids
|
boolean |
exists(String sourceId,
String targetId,
SQLSession session) |
String |
getDataFileName() |
protected List<String> |
getIdsFor(String valueColumn,
String filterColumn,
String filterValue) |
String |
getSourceColumn() |
List<String> |
getSourceIdsForTarget(String targetId) |
protected SQLSession |
getSQLSession() |
String |
getTableName() |
String |
getTargetColumn() |
String |
getTargetDirectoryName() |
List<String> |
getTargetIdsForSource(String sourceId) |
protected void |
initialize(Connection connection) |
void |
removeLinksFor(String column,
String entryId,
SQLSession session) |
void |
removeLinksForSource(String sourceId) |
void |
removeLinksForSource(String sourceId,
Session session)
Removes all the links for a given source id
|
void |
removeLinksForTarget(String targetId) |
void |
removeLinksForTarget(String targetId,
Session session)
Removes all the links for a given target id
|
void |
setIdsFor(String idsColumn,
List<String> ids,
String filterColumn,
String filterValue,
SQLSession session) |
void |
setSourceIdsForTarget(String targetId,
List<String> sourceIds) |
void |
setSourceIdsForTarget(String targetId,
List<String> sourceIds,
Session session)
Sets all source ids to be associated to the given target id
|
void |
setSourceIdsForTarget(String targetId,
List<String> sourceIds,
SQLSession session) |
void |
setTargetIdsForSource(String sourceId,
List<String> targetIds) |
void |
setTargetIdsForSource(String sourceId,
List<String> targetIds,
Session session)
Sets all target ids to be associated to the given source id
|
void |
setTargetIdsForSource(String sourceId,
List<String> targetIds,
SQLSession session) |
getFieldName, getSourceDirectory, getTargetDirectory, setSourceDirectoryName, setTargetDirectoryName
protected String sourceColumn
protected String targetColumn
protected String dataFileName
public TableReference(String fieldName, String directory, String tableName, String sourceColumn, String targetColumn, String dataFileName)
public TableReference(TableReferenceDescriptor descriptor)
public TableReference(ReferenceDescriptor descriptor)
protected void initialize(Connection connection)
public void addLinks(String sourceId, List<String> targetIds, Session session)
Reference
sourceId
- the source idtargetIds
- the target idssession
- the sessionpublic void addLinks(List<String> sourceIds, String targetId, Session session)
Reference
sourceIds
- the source idstargetId
- the target idsession
- the sessionpublic boolean exists(String sourceId, String targetId, SQLSession session)
public void addLink(String sourceId, String targetId, SQLSession session, boolean checkExisting)
protected List<String> getIdsFor(String valueColumn, String filterColumn, String filterValue)
public List<String> getSourceIdsForTarget(String targetId)
public List<String> getTargetIdsForSource(String sourceId)
public void removeLinksFor(String column, String entryId, SQLSession session)
public void removeLinksForSource(String sourceId, Session session)
Reference
sourceId
- the source idsession
- the sessionpublic void removeLinksForTarget(String targetId, Session session)
Reference
targetId
- the target idsession
- the sessionpublic void removeLinksForSource(String sourceId)
public void removeLinksForTarget(String targetId)
public void setIdsFor(String idsColumn, List<String> ids, String filterColumn, String filterValue, SQLSession session)
public void setSourceIdsForTarget(String targetId, List<String> sourceIds, SQLSession session)
public void setTargetIdsForSource(String sourceId, List<String> targetIds, SQLSession session)
public void setSourceIdsForTarget(String targetId, List<String> sourceIds)
public void setSourceIdsForTarget(String targetId, List<String> sourceIds, Session session)
Reference
targetId
- the target idsourceIds
- the source idssession
- the sessionpublic void setTargetIdsForSource(String sourceId, List<String> targetIds)
public void setTargetIdsForSource(String sourceId, List<String> targetIds, Session session)
Reference
sourceId
- the source idtargetIds
- the target idssession
- the sessionprotected SQLSession getSQLSession()
public String getSourceColumn()
public String getTargetColumn()
public String getTargetDirectoryName()
public String getTableName()
public String getDataFileName()
Copyright © 2019 Nuxeo. All rights reserved.