Class LayoutStorage
java.lang.Object
net.sf.jailer.util.LayoutStorage
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanIf storage is disabled, no persistent layout is available. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckSignificance(String rootTable) Removes layout if it is not significant.double[]getPosition(String rootTable, String table) Gets position.getPositions(String root) Gets positions of all tables for a given root-table.voidRemoves all position information.voidRemoves all position information for a given root table.voidRestores a layout from a file.voidsetPosition(String rootTable, String table, double[] position) Sets position.voidsetTempStorage(Map<String, double[]> tmp) Sets temporary storage for positions (used for undo/redo).voidstore(PrintWriter out) Stores the layout into a stream.voidStores the given layout positions into a stream.
-
Field Details
-
enabled
public volatile boolean enabledIf storage is disabled, no persistent layout is available.
-
-
Constructor Details
-
LayoutStorage
public LayoutStorage()
-
-
Method Details
-
setPosition
-
checkSignificance
Removes layout if it is not significant.- Parameters:
rootTable- root table for which the layout is
-
getPosition
-
getPositions
-
removeAll
Removes all position information for a given root table.- Parameters:
root- the root table
-
removeAll
public void removeAll()Removes all position information. -
store
Stores the layout into a stream.- Parameters:
out- the stream to write to
-
store
Stores the given layout positions into a stream.- Parameters:
out- the stream to write topositions- the positions to store, keyed by root table and then table name
-
restore
Restores a layout from a file.- Parameters:
file- the file path to restore from
-
setTempStorage
Sets temporary storage for positions (used for undo/redo). When set to a non-null value, all position reads and writes use this map instead of the persistent storage.- Parameters:
tmp- the temporary position map, ornullto disable temporary storage
-