Class NetworkPathRegistryImpl
- java.lang.Object
-
- org.cyclos.impl.utils.persistence.NetworkPathRegistryImpl
-
- All Implemented Interfaces:
NetworkPathRegistry
@Component public class NetworkPathRegistryImpl extends Object implements NetworkPathRegistry
Keeps a registry of all paths from any entity path to it's corresponding network
-
-
Constructor Summary
Constructors Constructor Description NetworkPathRegistryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyNetworkFilter(com.querydsl.core.FilteredClause<?> clause, com.querydsl.core.types.EntityPath<?> entity, Network network)Applies the network filter for a given DML clausevoidapplyNetworkFilter(DBQuery<?> query, com.querydsl.core.types.EntityPath<?> entityPath, Network network)Applies a condition to the query, regarding the given network and entityStringgetNetworkPath(Class<? extends NetworkedEntity> entityType)It returns the path to the network for the specified entity class.voidregister(QNetwork path)Registers a path to get the for the network, using a network-only visibilityvoidregister(QNetwork path, boolean showGlobals)Registers a path to get the for the network, optionally allowing global (true) or network-only (false) data to be visibleQNetworkresolve(com.querydsl.core.types.EntityPath<?> entityPath)Resolves the network path for the given entity pathbooleanshowGlobals(Class<? extends NetworkedEntity> entityType)Returns whether the global entities of the given type should be visible when in a network (true) or only network-specific data (false)
-
-
-
Method Detail
-
applyNetworkFilter
public void applyNetworkFilter(DBQuery<?> query, com.querydsl.core.types.EntityPath<?> entityPath, Network network)
Description copied from interface:NetworkPathRegistryApplies a condition to the query, regarding the given network and entity- Specified by:
applyNetworkFilterin interfaceNetworkPathRegistry
-
applyNetworkFilter
public void applyNetworkFilter(com.querydsl.core.FilteredClause<?> clause, com.querydsl.core.types.EntityPath<?> entity, Network network)Description copied from interface:NetworkPathRegistryApplies the network filter for a given DML clause- Specified by:
applyNetworkFilterin interfaceNetworkPathRegistry
-
getNetworkPath
public String getNetworkPath(Class<? extends NetworkedEntity> entityType)
Description copied from interface:NetworkPathRegistryIt returns the path to the network for the specified entity class.- Specified by:
getNetworkPathin interfaceNetworkPathRegistry
-
register
public void register(QNetwork path)
Description copied from interface:NetworkPathRegistryRegisters a path to get the for the network, using a network-only visibility- Specified by:
registerin interfaceNetworkPathRegistry
-
register
public void register(QNetwork path, boolean showGlobals)
Description copied from interface:NetworkPathRegistryRegisters a path to get the for the network, optionally allowing global (true) or network-only (false) data to be visible- Specified by:
registerin interfaceNetworkPathRegistry
-
resolve
public QNetwork resolve(com.querydsl.core.types.EntityPath<?> entityPath)
Description copied from interface:NetworkPathRegistryResolves the network path for the given entity path- Specified by:
resolvein interfaceNetworkPathRegistry
-
showGlobals
public boolean showGlobals(Class<? extends NetworkedEntity> entityType)
Description copied from interface:NetworkPathRegistryReturns whether the global entities of the given type should be visible when in a network (true) or only network-specific data (false)- Specified by:
showGlobalsin interfaceNetworkPathRegistry
-
-