public class TableReference extends AbstractReference implements Cloneable
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() |
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,
SQLSession session) |
void |
addLinks(String sourceId,
List<String> targetIds) |
void |
addLinks(String sourceId,
List<String> targetIds,
SQLSession session) |
TableReference |
clone()
Returns a clone, added for hot reload support.
|
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() |
Table |
getTable() |
String |
getTableName() |
String |
getTargetColumn() |
String |
getTargetDirectoryName() |
List<String> |
getTargetIdsForSource(String sourceId) |
protected void |
maybeInitialize(SQLSession sqlSession)
Initialize if needed, using an existing session.
|
void |
removeLinksFor(String column,
String entryId,
SQLSession session) |
void |
removeLinksForSource(String sourceId) |
void |
removeLinksForSource(String sourceId,
SQLSession session) |
void |
removeLinksForTarget(String targetId) |
void |
removeLinksForTarget(String targetId,
SQLSession session) |
void |
setFieldName(String fieldName) |
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,
SQLSession session) |
void |
setTargetDirectoryName(String targetDirectoryName) |
void |
setTargetIdsForSource(String sourceId,
List<String> targetIds) |
void |
setTargetIdsForSource(String sourceId,
List<String> targetIds,
SQLSession session) |
getFieldName, getSourceDirectory, getTargetDirectory, setSourceDirectoryName
protected String sourceColumn
protected String targetColumn
protected String dataFileName
public TableReference()
public void setFieldName(String fieldName)
public void setTargetDirectoryName(String targetDirectoryName)
setTargetDirectoryName
in interface Reference
setTargetDirectoryName
in class AbstractReference
public void addLinks(String sourceId, List<String> targetIds) throws DirectoryException
addLinks
in interface Reference
DirectoryException
public void addLinks(List<String> sourceIds, String targetId) throws DirectoryException
addLinks
in interface Reference
DirectoryException
public void addLinks(String sourceId, List<String> targetIds, SQLSession session) throws DirectoryException
DirectoryException
public void addLinks(List<String> sourceIds, String targetId, SQLSession session) throws DirectoryException
DirectoryException
public boolean exists(String sourceId, String targetId, SQLSession session) throws DirectoryException
DirectoryException
public void addLink(String sourceId, String targetId, SQLSession session, boolean checkExisting) throws DirectoryException
DirectoryException
protected List<String> getIdsFor(String valueColumn, String filterColumn, String filterValue) throws DirectoryException
DirectoryException
public List<String> getSourceIdsForTarget(String targetId) throws DirectoryException
getSourceIdsForTarget
in interface Reference
DirectoryException
public List<String> getTargetIdsForSource(String sourceId) throws DirectoryException
getTargetIdsForSource
in interface Reference
DirectoryException
public void removeLinksFor(String column, String entryId, SQLSession session) throws DirectoryException
DirectoryException
public void removeLinksForSource(String sourceId, SQLSession session) throws DirectoryException
DirectoryException
public void removeLinksForTarget(String targetId, SQLSession session) throws DirectoryException
DirectoryException
public void removeLinksForSource(String sourceId) throws DirectoryException
removeLinksForSource
in interface Reference
DirectoryException
public void removeLinksForTarget(String targetId) throws DirectoryException
removeLinksForTarget
in interface Reference
DirectoryException
public void setIdsFor(String idsColumn, List<String> ids, String filterColumn, String filterValue, SQLSession session) throws DirectoryException
DirectoryException
public void setSourceIdsForTarget(String targetId, List<String> sourceIds, SQLSession session) throws DirectoryException
DirectoryException
public void setTargetIdsForSource(String sourceId, List<String> targetIds, SQLSession session) throws DirectoryException
DirectoryException
public void setSourceIdsForTarget(String targetId, List<String> sourceIds) throws DirectoryException
setSourceIdsForTarget
in interface Reference
DirectoryException
public void setTargetIdsForSource(String sourceId, List<String> targetIds) throws DirectoryException
setTargetIdsForSource
in interface Reference
DirectoryException
protected SQLSession getSQLSession() throws DirectoryException
DirectoryException
protected void maybeInitialize(SQLSession sqlSession) throws DirectoryException
sqlSession
- DirectoryException
public Table getTable() throws DirectoryException
DirectoryException
public String getSourceColumn()
public String getTargetColumn()
public String getTargetDirectoryName()
public String getTableName()
public String getDataFileName()
public TableReference clone()
Reference
clone
in interface Reference
clone
in class AbstractReference
Copyright © 2016 Nuxeo SA. All rights reserved.