Package io.odysz.semantic
Class DASemantics.ShExtFilev2
java.lang.Object
io.odysz.semantic.DASemantics.SemanticHandler
io.odysz.semantic.DASemantics.ShExtFilev2
- All Implemented Interfaces:
XMLTable.IMapValue
- Enclosing class:
- DASemantics
Note
For large file, use stream asynchronous mode, otherwise it's a performance problem here.
Whether uses or not a stream mode file up/down loading is a business tier decision by semantic-jserv. See Anclient.jave/album test for example.
This semantics won't process reading events. To load the file content at the field,
use Funcall.extfile(String...)
.
- Since:
- 1.4.40
- Author:
- odys-z@github.com
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Saving root.
The path rooted from return ofISemantext.relativpath(String...)
. -
Constructor Summary
ConstructorDescriptionShExtFilev2
(io.odysz.transact.sql.Transcxt trxt, String tabl, String pk, String[] args) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
onDelete
(io.odysz.semantics.ISemantext stx, io.odysz.transact.sql.Delete stmt, io.odysz.transact.sql.parts.condition.Condit condt, io.odysz.semantics.IUser usr) Handle onDelete event.protected void
onInsert
(io.odysz.semantics.ISemantext stx, io.odysz.transact.sql.Insert insrt, ArrayList<Object[]> row, Map<String, Integer> cols, io.odysz.semantics.IUser usr) protected void
onUpdate
(io.odysz.semantics.ISemantext stx, io.odysz.transact.sql.Update updt, ArrayList<Object[]> row, Map<String, Integer> cols, io.odysz.semantics.IUser usr) On updating external files' handler.protected String
selectUri
(io.odysz.semantics.ISemantext stx, io.odysz.transact.sql.Statement<?> stmt, io.odysz.transact.sql.parts.condition.Condit pk, io.odysz.semantics.IUser usr) Methods inherited from class io.odysz.semantic.DASemantics.SemanticHandler
is, logi, mapKey, onPost
-
Field Details
-
ixExtRoot
public static final int ixExtRootSaving root.
The path rooted from return ofISemantext.relativpath(String...)
.- See Also:
-
-
Constructor Details
-
ShExtFilev2
public ShExtFilev2(io.odysz.transact.sql.Transcxt trxt, String tabl, String pk, String[] args) throws SemanticException - Throws:
SemanticException
-
-
Method Details
-
getFileRoot
-
onInsert
protected void onInsert(io.odysz.semantics.ISemantext stx, io.odysz.transact.sql.Insert insrt, ArrayList<Object[]> row, Map<String, Integer> cols, io.odysz.semantics.IUser usr) throws SemanticException- Overrides:
onInsert
in classDASemantics.SemanticHandler
- Throws:
SemanticException
-
onUpdate
protected void onUpdate(io.odysz.semantics.ISemantext stx, io.odysz.transact.sql.Update updt, ArrayList<Object[]> row, Map<String, Integer> cols, io.odysz.semantics.IUser usr) throws SemanticExceptionOn updating external files' handler.
This method only moves the file with new uri & client name, applying the semantics predefined as:
AS all files are treated as binary file, no file can be modified, only delete then create it makes sense.Client should avoid updating an external file while handling business logics.
NOTE:
This can be changed in the future.- Overrides:
onUpdate
in classDASemantics.SemanticHandler
- Throws:
SemanticException
- See Also:
-
selectUri
protected String selectUri(io.odysz.semantics.ISemantext stx, io.odysz.transact.sql.Statement<?> stmt, io.odysz.transact.sql.parts.condition.Condit pk, io.odysz.semantics.IUser usr) throws SemanticException - Throws:
SemanticException
-
onDelete
protected void onDelete(io.odysz.semantics.ISemantext stx, io.odysz.transact.sql.Delete stmt, io.odysz.transact.sql.parts.condition.Condit condt, io.odysz.semantics.IUser usr) throws SemanticException Description copied from class:DASemantics.SemanticHandler
Handle onDelete event.- Overrides:
onDelete
in classDASemantics.SemanticHandler
condt
- delete statement's condition.- Throws:
SemanticException
-