repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeDebug
private Status executeDebug(Stmt.Debug stmt, CallStack frame, EnclosingScope scope) { // // FIXME: need to do something with this RValue.Array arr = executeExpression(ARRAY_T, stmt.getOperand(), frame); for (RValue item : arr.getElements()) { RValue.Int i = (RValue.Int) item; char c = (char) i.intValue();...
java
private Status executeDebug(Stmt.Debug stmt, CallStack frame, EnclosingScope scope) { // // FIXME: need to do something with this RValue.Array arr = executeExpression(ARRAY_T, stmt.getOperand(), frame); for (RValue item : arr.getElements()) { RValue.Int i = (RValue.Int) item; char c = (char) i.intValue();...
[ "private", "Status", "executeDebug", "(", "Stmt", ".", "Debug", "stmt", ",", "CallStack", "frame", ",", "EnclosingScope", "scope", ")", "{", "//", "// FIXME: need to do something with this", "RValue", ".", "Array", "arr", "=", "executeExpression", "(", "ARRAY_T", ...
Execute a Debug statement at a given point in the function or method body. This will write the provided string out to the debug stream. @param stmt --- Debug statement to executed @param frame --- The current stack frame @return
[ "Execute", "a", "Debug", "statement", "at", "a", "given", "point", "in", "the", "function", "or", "method", "body", ".", "This", "will", "write", "the", "provided", "string", "out", "to", "the", "debug", "stream", "." ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L312-L323
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeFail
private Status executeFail(Stmt.Fail stmt, CallStack frame, EnclosingScope scope) { throw new AssertionError("Runtime fault occurred"); }
java
private Status executeFail(Stmt.Fail stmt, CallStack frame, EnclosingScope scope) { throw new AssertionError("Runtime fault occurred"); }
[ "private", "Status", "executeFail", "(", "Stmt", ".", "Fail", "stmt", ",", "CallStack", "frame", ",", "EnclosingScope", "scope", ")", "{", "throw", "new", "AssertionError", "(", "\"Runtime fault occurred\"", ")", ";", "}" ]
Execute a fail statement at a given point in the function or method body. This will generate a runtime fault. @param stmt --- The fail statement to execute @param frame --- The current stack frame @return
[ "Execute", "a", "fail", "statement", "at", "a", "given", "point", "in", "the", "function", "or", "method", "body", ".", "This", "will", "generate", "a", "runtime", "fault", "." ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L366-L368
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeIf
private Status executeIf(Stmt.IfElse stmt, CallStack frame, EnclosingScope scope) { RValue.Bool operand = executeExpression(BOOL_T, stmt.getCondition(), frame); if (operand == RValue.True) { // branch taken, so execute true branch return executeBlock(stmt.getTrueBranch(), frame, scope); } else if (stmt.hasF...
java
private Status executeIf(Stmt.IfElse stmt, CallStack frame, EnclosingScope scope) { RValue.Bool operand = executeExpression(BOOL_T, stmt.getCondition(), frame); if (operand == RValue.True) { // branch taken, so execute true branch return executeBlock(stmt.getTrueBranch(), frame, scope); } else if (stmt.hasF...
[ "private", "Status", "executeIf", "(", "Stmt", ".", "IfElse", "stmt", ",", "CallStack", "frame", ",", "EnclosingScope", "scope", ")", "{", "RValue", ".", "Bool", "operand", "=", "executeExpression", "(", "BOOL_T", ",", "stmt", ".", "getCondition", "(", ")", ...
Execute an if statement at a given point in the function or method body. This will proceed done either the true or false branch. @param stmt --- The if statement to execute @param frame --- The current stack frame @return
[ "Execute", "an", "if", "statement", "at", "a", "given", "point", "in", "the", "function", "or", "method", "body", ".", "This", "will", "proceed", "done", "either", "the", "true", "or", "false", "branch", "." ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L380-L391
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeNamedBlock
private Status executeNamedBlock(Stmt.NamedBlock stmt, CallStack frame, EnclosingScope scope) { return executeBlock(stmt.getBlock(),frame,scope); }
java
private Status executeNamedBlock(Stmt.NamedBlock stmt, CallStack frame, EnclosingScope scope) { return executeBlock(stmt.getBlock(),frame,scope); }
[ "private", "Status", "executeNamedBlock", "(", "Stmt", ".", "NamedBlock", "stmt", ",", "CallStack", "frame", ",", "EnclosingScope", "scope", ")", "{", "return", "executeBlock", "(", "stmt", ".", "getBlock", "(", ")", ",", "frame", ",", "scope", ")", ";", "...
Execute a named block which is simply a block of statements. @param stmt --- Block statement to executed @param frame --- The current stack frame @return
[ "Execute", "a", "named", "block", "which", "is", "simply", "a", "block", "of", "statements", "." ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L402-L404
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeWhile
private Status executeWhile(Stmt.While stmt, CallStack frame, EnclosingScope scope) { Status r; do { RValue.Bool operand = executeExpression(BOOL_T, stmt.getCondition(), frame); if (operand == RValue.False) { return Status.NEXT; } // Keep executing the loop body until we exit it somehow. r = exec...
java
private Status executeWhile(Stmt.While stmt, CallStack frame, EnclosingScope scope) { Status r; do { RValue.Bool operand = executeExpression(BOOL_T, stmt.getCondition(), frame); if (operand == RValue.False) { return Status.NEXT; } // Keep executing the loop body until we exit it somehow. r = exec...
[ "private", "Status", "executeWhile", "(", "Stmt", ".", "While", "stmt", ",", "CallStack", "frame", ",", "EnclosingScope", "scope", ")", "{", "Status", "r", ";", "do", "{", "RValue", ".", "Bool", "operand", "=", "executeExpression", "(", "BOOL_T", ",", "stm...
Execute a While statement at a given point in the function or method body. This will loop over the body zero or more times. @param stmt --- Loop statement to executed @param frame --- The current stack frame @return
[ "Execute", "a", "While", "statement", "at", "a", "given", "point", "in", "the", "function", "or", "method", "body", ".", "This", "will", "loop", "over", "the", "body", "zero", "or", "more", "times", "." ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L416-L433
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeReturn
private Status executeReturn(Stmt.Return stmt, CallStack frame, EnclosingScope scope) { // We know that a return statement can only appear in either a function // or method declaration. It cannot appear, for example, in a type // declaration. Therefore, the enclosing declaration is a function or // method. De...
java
private Status executeReturn(Stmt.Return stmt, CallStack frame, EnclosingScope scope) { // We know that a return statement can only appear in either a function // or method declaration. It cannot appear, for example, in a type // declaration. Therefore, the enclosing declaration is a function or // method. De...
[ "private", "Status", "executeReturn", "(", "Stmt", ".", "Return", "stmt", ",", "CallStack", "frame", ",", "EnclosingScope", "scope", ")", "{", "// We know that a return statement can only appear in either a function", "// or method declaration. It cannot appear, for example, in a t...
Execute a Return statement at a given point in the function or method body @param stmt --- The return statement to execute @param frame --- The current stack frame @return
[ "Execute", "a", "Return", "statement", "at", "a", "given", "point", "in", "the", "function", "or", "method", "body" ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L445-L457
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeSkip
private Status executeSkip(Stmt.Skip stmt, CallStack frame, EnclosingScope scope) { // skip ! return Status.NEXT; }
java
private Status executeSkip(Stmt.Skip stmt, CallStack frame, EnclosingScope scope) { // skip ! return Status.NEXT; }
[ "private", "Status", "executeSkip", "(", "Stmt", ".", "Skip", "stmt", ",", "CallStack", "frame", ",", "EnclosingScope", "scope", ")", "{", "// skip !", "return", "Status", ".", "NEXT", ";", "}" ]
Execute a skip statement at a given point in the function or method body @param stmt --- The skip statement to execute @param frame --- The current stack frame @return
[ "Execute", "a", "skip", "statement", "at", "a", "given", "point", "in", "the", "function", "or", "method", "body" ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L469-L472
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeSwitch
private Status executeSwitch(Stmt.Switch stmt, CallStack frame, EnclosingScope scope) { Tuple<Stmt.Case> cases = stmt.getCases(); // Object value = executeExpression(ANY_T, stmt.getCondition(), frame); for (int i = 0; i != cases.size(); ++i) { Stmt.Case c = cases.get(i); Stmt.Block body = c.getBlock(); ...
java
private Status executeSwitch(Stmt.Switch stmt, CallStack frame, EnclosingScope scope) { Tuple<Stmt.Case> cases = stmt.getCases(); // Object value = executeExpression(ANY_T, stmt.getCondition(), frame); for (int i = 0; i != cases.size(); ++i) { Stmt.Case c = cases.get(i); Stmt.Block body = c.getBlock(); ...
[ "private", "Status", "executeSwitch", "(", "Stmt", ".", "Switch", "stmt", ",", "CallStack", "frame", ",", "EnclosingScope", "scope", ")", "{", "Tuple", "<", "Stmt", ".", "Case", ">", "cases", "=", "stmt", ".", "getCases", "(", ")", ";", "//", "Object", ...
Execute a Switch statement at a given point in the function or method body @param stmt --- The swithc statement to execute @param frame --- The current stack frame @return
[ "Execute", "a", "Switch", "statement", "at", "a", "given", "point", "in", "the", "function", "or", "method", "body" ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L484-L505
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeVariableDeclaration
private Status executeVariableDeclaration(Decl.Variable stmt, CallStack frame) { // We only need to do something if this has an initialiser if(stmt.hasInitialiser()) { RValue value = executeExpression(ANY_T, stmt.getInitialiser(), frame); frame.putLocal(stmt.getName(),value); } return Status.NEXT; }
java
private Status executeVariableDeclaration(Decl.Variable stmt, CallStack frame) { // We only need to do something if this has an initialiser if(stmt.hasInitialiser()) { RValue value = executeExpression(ANY_T, stmt.getInitialiser(), frame); frame.putLocal(stmt.getName(),value); } return Status.NEXT; }
[ "private", "Status", "executeVariableDeclaration", "(", "Decl", ".", "Variable", "stmt", ",", "CallStack", "frame", ")", "{", "// We only need to do something if this has an initialiser", "if", "(", "stmt", ".", "hasInitialiser", "(", ")", ")", "{", "RValue", "value",...
Execute a variable declaration statement at a given point in the function or method body @param stmt --- The statement to execute @param frame --- The current stack frame @return
[ "Execute", "a", "variable", "declaration", "statement", "at", "a", "given", "point", "in", "the", "function", "or", "method", "body" ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L517-L524
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeConst
private RValue executeConst(Expr.Constant expr, CallStack frame) { Value v = expr.getValue(); switch (v.getOpcode()) { case ITEM_null: return RValue.Null; case ITEM_bool: { Value.Bool b = (Value.Bool) v; if (b.get()) { return RValue.True; } else { return RValue.False; } } case ITEM_by...
java
private RValue executeConst(Expr.Constant expr, CallStack frame) { Value v = expr.getValue(); switch (v.getOpcode()) { case ITEM_null: return RValue.Null; case ITEM_bool: { Value.Bool b = (Value.Bool) v; if (b.get()) { return RValue.True; } else { return RValue.False; } } case ITEM_by...
[ "private", "RValue", "executeConst", "(", "Expr", ".", "Constant", "expr", ",", "CallStack", "frame", ")", "{", "Value", "v", "=", "expr", ".", "getValue", "(", ")", ";", "switch", "(", "v", ".", "getOpcode", "(", ")", ")", "{", "case", "ITEM_null", ...
Execute a Constant expression at a given point in the function or method body @param expr --- The expression to execute @param frame --- The current stack frame @return
[ "Execute", "a", "Constant", "expression", "at", "a", "given", "point", "in", "the", "function", "or", "method", "body" ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L693-L728
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeConvert
private RValue executeConvert(Expr.Cast expr, CallStack frame) { RValue operand = executeExpression(ANY_T, expr.getOperand(), frame); return operand.convert(expr.getType()); }
java
private RValue executeConvert(Expr.Cast expr, CallStack frame) { RValue operand = executeExpression(ANY_T, expr.getOperand(), frame); return operand.convert(expr.getType()); }
[ "private", "RValue", "executeConvert", "(", "Expr", ".", "Cast", "expr", ",", "CallStack", "frame", ")", "{", "RValue", "operand", "=", "executeExpression", "(", "ANY_T", ",", "expr", ".", "getOperand", "(", ")", ",", "frame", ")", ";", "return", "operand"...
Execute a type conversion at a given point in the function or method body @param expr --- The expression to execute @param frame --- The current stack frame @return
[ "Execute", "a", "type", "conversion", "at", "a", "given", "point", "in", "the", "function", "or", "method", "body" ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L739-L742
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeQuantifier
private boolean executeQuantifier(int index, Expr.Quantifier expr, CallStack frame) { Tuple<Decl.Variable> vars = expr.getParameters(); if (index == vars.size()) { // This is the base case where we evaluate the condition itself. RValue.Bool r = executeExpression(BOOL_T, expr.getOperand(), frame); boolean q...
java
private boolean executeQuantifier(int index, Expr.Quantifier expr, CallStack frame) { Tuple<Decl.Variable> vars = expr.getParameters(); if (index == vars.size()) { // This is the base case where we evaluate the condition itself. RValue.Bool r = executeExpression(BOOL_T, expr.getOperand(), frame); boolean q...
[ "private", "boolean", "executeQuantifier", "(", "int", "index", ",", "Expr", ".", "Quantifier", "expr", ",", "CallStack", "frame", ")", "{", "Tuple", "<", "Decl", ".", "Variable", ">", "vars", "=", "expr", ".", "getParameters", "(", ")", ";", "if", "(", ...
Execute one range of the quantifier, or the body if no ranges remain. @param index @param expr @param frame @param context @return
[ "Execute", "one", "range", "of", "the", "quantifier", "or", "the", "body", "if", "no", "ranges", "remain", "." ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L777-L800
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeVariableAccess
private RValue executeVariableAccess(Expr.VariableAccess expr, CallStack frame) { Decl.Variable decl = expr.getVariableDeclaration(); return frame.getLocal(decl.getName()); }
java
private RValue executeVariableAccess(Expr.VariableAccess expr, CallStack frame) { Decl.Variable decl = expr.getVariableDeclaration(); return frame.getLocal(decl.getName()); }
[ "private", "RValue", "executeVariableAccess", "(", "Expr", ".", "VariableAccess", "expr", ",", "CallStack", "frame", ")", "{", "Decl", ".", "Variable", "decl", "=", "expr", ".", "getVariableDeclaration", "(", ")", ";", "return", "frame", ".", "getLocal", "(", ...
Execute a variable access expression at a given point in the function or method body. This simply loads the value of the given variable from the frame. @param expr --- The expression to execute @param frame --- The current stack frame @return
[ "Execute", "a", "variable", "access", "expression", "at", "a", "given", "point", "in", "the", "function", "or", "method", "body", ".", "This", "simply", "loads", "the", "value", "of", "the", "given", "variable", "from", "the", "frame", "." ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L813-L816
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeExpressions
private RValue[] executeExpressions(Tuple<Expr> expressions, CallStack frame) { RValue[][] results = new RValue[expressions.size()][]; int count = 0; for(int i=0;i!=expressions.size();++i) { results[i] = executeMultiReturnExpression(expressions.get(i),frame); count += results[i].length; } RValue[] rs = ...
java
private RValue[] executeExpressions(Tuple<Expr> expressions, CallStack frame) { RValue[][] results = new RValue[expressions.size()][]; int count = 0; for(int i=0;i!=expressions.size();++i) { results[i] = executeMultiReturnExpression(expressions.get(i),frame); count += results[i].length; } RValue[] rs = ...
[ "private", "RValue", "[", "]", "executeExpressions", "(", "Tuple", "<", "Expr", ">", "expressions", ",", "CallStack", "frame", ")", "{", "RValue", "[", "]", "[", "]", "results", "=", "new", "RValue", "[", "expressions", ".", "size", "(", ")", "]", "[",...
Execute one or more expressions. This is slightly more complex than for the single expression case because of the potential to encounter "positional operands". That is, severals which arise from executing the same expression. @param expressions @param frame @return
[ "Execute", "one", "or", "more", "expressions", ".", "This", "is", "slightly", "more", "complex", "than", "for", "the", "single", "expression", "case", "because", "of", "the", "potential", "to", "encounter", "positional", "operands", ".", "That", "is", "several...
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L1084-L1099
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeMultiReturnExpression
private RValue[] executeMultiReturnExpression(Expr expr, CallStack frame) { switch (expr.getOpcode()) { case WyilFile.EXPR_indirectinvoke: return executeIndirectInvoke((Expr.IndirectInvoke) expr, frame); case WyilFile.EXPR_invoke: return executeInvoke((Expr.Invoke) expr, frame); case WyilFile.EXPR_constan...
java
private RValue[] executeMultiReturnExpression(Expr expr, CallStack frame) { switch (expr.getOpcode()) { case WyilFile.EXPR_indirectinvoke: return executeIndirectInvoke((Expr.IndirectInvoke) expr, frame); case WyilFile.EXPR_invoke: return executeInvoke((Expr.Invoke) expr, frame); case WyilFile.EXPR_constan...
[ "private", "RValue", "[", "]", "executeMultiReturnExpression", "(", "Expr", "expr", ",", "CallStack", "frame", ")", "{", "switch", "(", "expr", ".", "getOpcode", "(", ")", ")", "{", "case", "WyilFile", ".", "EXPR_indirectinvoke", ":", "return", "executeIndirec...
Execute an expression which has the potential to return more than one result. Thus the return type must accommodate this by allowing zero or more returned values. @param expr @param frame @return
[ "Execute", "an", "expression", "which", "has", "the", "potential", "to", "return", "more", "than", "one", "result", ".", "Thus", "the", "return", "type", "must", "accommodate", "this", "by", "allowing", "zero", "or", "more", "returned", "values", "." ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L1110-L1127
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeIndirectInvoke
private RValue[] executeIndirectInvoke(Expr.IndirectInvoke expr, CallStack frame) { RValue.Lambda src = executeExpression(LAMBDA_T, expr.getSource(),frame); RValue[] arguments = executeExpressions(expr.getArguments(), frame); // Here we have to use the enclosing frame when the lambda was created. // The reason ...
java
private RValue[] executeIndirectInvoke(Expr.IndirectInvoke expr, CallStack frame) { RValue.Lambda src = executeExpression(LAMBDA_T, expr.getSource(),frame); RValue[] arguments = executeExpressions(expr.getArguments(), frame); // Here we have to use the enclosing frame when the lambda was created. // The reason ...
[ "private", "RValue", "[", "]", "executeIndirectInvoke", "(", "Expr", ".", "IndirectInvoke", "expr", ",", "CallStack", "frame", ")", "{", "RValue", ".", "Lambda", "src", "=", "executeExpression", "(", "LAMBDA_T", ",", "expr", ".", "getSource", "(", ")", ",", ...
Execute an IndirectInvoke bytecode instruction at a given point in the function or method body. This first checks the operand is a function reference, and then generates a recursive call to execute the given function. If the function does not exist, or is provided with the wrong number of arguments, then a runtime faul...
[ "Execute", "an", "IndirectInvoke", "bytecode", "instruction", "at", "a", "given", "point", "in", "the", "function", "or", "method", "body", ".", "This", "first", "checks", "the", "operand", "is", "a", "function", "reference", "and", "then", "generates", "a", ...
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L1144-L1162
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeInvoke
private RValue[] executeInvoke(Expr.Invoke expr, CallStack frame) { // Resolve function or method being invoked to a concrete declaration Decl.Callable decl = expr.getLink().getTarget(); // Evaluate argument expressions RValue[] arguments = executeExpressions(expr.getOperands(), frame); // Invoke the function...
java
private RValue[] executeInvoke(Expr.Invoke expr, CallStack frame) { // Resolve function or method being invoked to a concrete declaration Decl.Callable decl = expr.getLink().getTarget(); // Evaluate argument expressions RValue[] arguments = executeExpressions(expr.getOperands(), frame); // Invoke the function...
[ "private", "RValue", "[", "]", "executeInvoke", "(", "Expr", ".", "Invoke", "expr", ",", "CallStack", "frame", ")", "{", "// Resolve function or method being invoked to a concrete declaration", "Decl", ".", "Callable", "decl", "=", "expr", ".", "getLink", "(", ")", ...
Execute an Invoke bytecode instruction at a given point in the function or method body. This generates a recursive call to execute the given function. If the function does not exist, or is provided with the wrong number of arguments, then a runtime fault will occur. @param expr --- The expression to execute @param fra...
[ "Execute", "an", "Invoke", "bytecode", "instruction", "at", "a", "given", "point", "in", "the", "function", "or", "method", "body", ".", "This", "generates", "a", "recursive", "call", "to", "execute", "the", "given", "function", ".", "If", "the", "function",...
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L1177-L1185
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.constructLVal
private LValue constructLVal(Expr expr, CallStack frame) { switch (expr.getOpcode()) { case EXPR_arrayborrow: case EXPR_arrayaccess: { Expr.ArrayAccess e = (Expr.ArrayAccess) expr; LValue src = constructLVal(e.getFirstOperand(), frame); RValue.Int index = executeExpression(INT_T, e.getSecondOperand(), fr...
java
private LValue constructLVal(Expr expr, CallStack frame) { switch (expr.getOpcode()) { case EXPR_arrayborrow: case EXPR_arrayaccess: { Expr.ArrayAccess e = (Expr.ArrayAccess) expr; LValue src = constructLVal(e.getFirstOperand(), frame); RValue.Int index = executeExpression(INT_T, e.getSecondOperand(), fr...
[ "private", "LValue", "constructLVal", "(", "Expr", "expr", ",", "CallStack", "frame", ")", "{", "switch", "(", "expr", ".", "getOpcode", "(", ")", ")", "{", "case", "EXPR_arrayborrow", ":", "case", "EXPR_arrayaccess", ":", "{", "Expr", ".", "ArrayAccess", ...
This method constructs a "mutable" representation of the lval. This is a bit strange, but is necessary because values in the frame are currently immutable. @param operand @param frame @param context @return
[ "This", "method", "constructs", "a", "mutable", "representation", "of", "the", "lval", ".", "This", "is", "a", "bit", "strange", "but", "is", "necessary", "because", "values", "in", "the", "frame", "are", "currently", "immutable", "." ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L1201-L1230
train
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.checkType
@SafeVarargs public static <T extends RValue> T checkType(RValue operand, SyntacticItem context, Class<T>... types) { // Got through each type in turn checking for a match for (int i = 0; i != types.length; ++i) { if (types[i].isInstance(operand)) { // Matched! return (T) operand; } } // No match...
java
@SafeVarargs public static <T extends RValue> T checkType(RValue operand, SyntacticItem context, Class<T>... types) { // Got through each type in turn checking for a match for (int i = 0; i != types.length; ++i) { if (types[i].isInstance(operand)) { // Matched! return (T) operand; } } // No match...
[ "@", "SafeVarargs", "public", "static", "<", "T", "extends", "RValue", ">", "T", "checkType", "(", "RValue", "operand", ",", "SyntacticItem", "context", ",", "Class", "<", "T", ">", "...", "types", ")", "{", "// Got through each type in turn checking for a match",...
Check that a given operand value matches an expected type. @param operand --- bytecode operand to be checked @param context --- Context in which bytecodes are executed @param types --- Types to be checked against
[ "Check", "that", "a", "given", "operand", "value", "matches", "an", "expected", "type", "." ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L1278-L1295
train
GoogleCloudPlatform/app-maven-plugin
src/main/java/com/google/cloud/tools/maven/cloudsdk/CloudSdkMojo.java
CloudSdkMojo.getCompileTargetVersion
public String getCompileTargetVersion() { // TODO: Add support for maven.compiler.release // maven-plugin-compiler default is 1.5 String javaVersion = "1.5"; if (mavenProject != null) { // check the maven.compiler.target property first String mavenCompilerTargetProperty = mavenProj...
java
public String getCompileTargetVersion() { // TODO: Add support for maven.compiler.release // maven-plugin-compiler default is 1.5 String javaVersion = "1.5"; if (mavenProject != null) { // check the maven.compiler.target property first String mavenCompilerTargetProperty = mavenProj...
[ "public", "String", "getCompileTargetVersion", "(", ")", "{", "// TODO: Add support for maven.compiler.release", "// maven-plugin-compiler default is 1.5", "String", "javaVersion", "=", "\"1.5\"", ";", "if", "(", "mavenProject", "!=", "null", ")", "{", "// check the maven.com...
Determines the Java compiler target version by inspecting the project's maven-compiler-plugin configuration. @return The Java compiler target version.
[ "Determines", "the", "Java", "compiler", "target", "version", "by", "inspecting", "the", "project", "s", "maven", "-", "compiler", "-", "plugin", "configuration", "." ]
1f31bb8e963ce189e9ed6b88923a1853533485ff
https://github.com/GoogleCloudPlatform/app-maven-plugin/blob/1f31bb8e963ce189e9ed6b88923a1853533485ff/src/main/java/com/google/cloud/tools/maven/cloudsdk/CloudSdkMojo.java#L89-L114
train
GoogleCloudPlatform/app-maven-plugin
src/main/java/com/google/cloud/tools/maven/run/Runner.java
Runner.run
public void run() throws MojoExecutionException { try { runMojo .getAppEngineFactory() .devServerRunSync() .run(configBuilder.buildRunConfiguration(processServices(), processProjectId())); } catch (AppEngineException ex) { throw new MojoExecutionException("Failed to run...
java
public void run() throws MojoExecutionException { try { runMojo .getAppEngineFactory() .devServerRunSync() .run(configBuilder.buildRunConfiguration(processServices(), processProjectId())); } catch (AppEngineException ex) { throw new MojoExecutionException("Failed to run...
[ "public", "void", "run", "(", ")", "throws", "MojoExecutionException", "{", "try", "{", "runMojo", ".", "getAppEngineFactory", "(", ")", ".", "devServerRunSync", "(", ")", ".", "run", "(", "configBuilder", ".", "buildRunConfiguration", "(", "processServices", "(...
Run the dev appserver.
[ "Run", "the", "dev", "appserver", "." ]
1f31bb8e963ce189e9ed6b88923a1853533485ff
https://github.com/GoogleCloudPlatform/app-maven-plugin/blob/1f31bb8e963ce189e9ed6b88923a1853533485ff/src/main/java/com/google/cloud/tools/maven/run/Runner.java#L57-L66
train
GoogleCloudPlatform/app-maven-plugin
src/main/java/com/google/cloud/tools/maven/run/Runner.java
Runner.runAsync
public void runAsync(int startSuccessTimeout) throws MojoExecutionException { runMojo .getLog() .info("Waiting " + startSuccessTimeout + " seconds for the Dev App Server to start."); try { runMojo .getAppEngineFactory() .devServerRunAsync(startSuccessTimeout) ...
java
public void runAsync(int startSuccessTimeout) throws MojoExecutionException { runMojo .getLog() .info("Waiting " + startSuccessTimeout + " seconds for the Dev App Server to start."); try { runMojo .getAppEngineFactory() .devServerRunAsync(startSuccessTimeout) ...
[ "public", "void", "runAsync", "(", "int", "startSuccessTimeout", ")", "throws", "MojoExecutionException", "{", "runMojo", ".", "getLog", "(", ")", ".", "info", "(", "\"Waiting \"", "+", "startSuccessTimeout", "+", "\" seconds for the Dev App Server to start.\"", ")", ...
Run the dev appserver in async mode.
[ "Run", "the", "dev", "appserver", "in", "async", "mode", "." ]
1f31bb8e963ce189e9ed6b88923a1853533485ff
https://github.com/GoogleCloudPlatform/app-maven-plugin/blob/1f31bb8e963ce189e9ed6b88923a1853533485ff/src/main/java/com/google/cloud/tools/maven/run/Runner.java#L69-L83
train
GoogleCloudPlatform/app-maven-plugin
src/main/java/com/google/cloud/tools/maven/deploy/AbstractDeployMojo.java
AbstractDeployMojo.getProjectId
public String getProjectId() { if (project != null) { if (projectId != null) { throw new IllegalArgumentException( "Configuring <project> and <projectId> is not allowed, please use only <projectId>"); } getLog() .warn( "Configuring <project> is deprecate...
java
public String getProjectId() { if (project != null) { if (projectId != null) { throw new IllegalArgumentException( "Configuring <project> and <projectId> is not allowed, please use only <projectId>"); } getLog() .warn( "Configuring <project> is deprecate...
[ "public", "String", "getProjectId", "(", ")", "{", "if", "(", "project", "!=", "null", ")", "{", "if", "(", "projectId", "!=", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Configuring <project> and <projectId> is not allowed, please use only <...
Return projectId from either projectId or project. Show deprecation message if configured as project and throw error if both specified.
[ "Return", "projectId", "from", "either", "projectId", "or", "project", ".", "Show", "deprecation", "message", "if", "configured", "as", "project", "and", "throw", "error", "if", "both", "specified", "." ]
1f31bb8e963ce189e9ed6b88923a1853533485ff
https://github.com/GoogleCloudPlatform/app-maven-plugin/blob/1f31bb8e963ce189e9ed6b88923a1853533485ff/src/main/java/com/google/cloud/tools/maven/deploy/AbstractDeployMojo.java#L72-L85
train
GoogleCloudPlatform/app-maven-plugin
src/main/java/com/google/cloud/tools/maven/cloudsdk/ConfigReader.java
ConfigReader.getProjectId
public String getProjectId() { try { String gcloudProject = gcloud.getConfig().getProject(); if (gcloudProject == null || gcloudProject.trim().isEmpty()) { throw new RuntimeException("Project was not found in gcloud config"); } return gcloudProject; } catch (CloudSdkNotFoundExcep...
java
public String getProjectId() { try { String gcloudProject = gcloud.getConfig().getProject(); if (gcloudProject == null || gcloudProject.trim().isEmpty()) { throw new RuntimeException("Project was not found in gcloud config"); } return gcloudProject; } catch (CloudSdkNotFoundExcep...
[ "public", "String", "getProjectId", "(", ")", "{", "try", "{", "String", "gcloudProject", "=", "gcloud", ".", "getConfig", "(", ")", ".", "getProject", "(", ")", ";", "if", "(", "gcloudProject", "==", "null", "||", "gcloudProject", ".", "trim", "(", ")",...
Return gcloud config property for project, or error out if not found.
[ "Return", "gcloud", "config", "property", "for", "project", "or", "error", "out", "if", "not", "found", "." ]
1f31bb8e963ce189e9ed6b88923a1853533485ff
https://github.com/GoogleCloudPlatform/app-maven-plugin/blob/1f31bb8e963ce189e9ed6b88923a1853533485ff/src/main/java/com/google/cloud/tools/maven/cloudsdk/ConfigReader.java#L38-L52
train
GoogleCloudPlatform/app-maven-plugin
src/main/java/com/google/cloud/tools/maven/cloudsdk/CloudSdkChecker.java
CloudSdkChecker.checkCloudSdk
public void checkCloudSdk(CloudSdk cloudSdk, String version) throws CloudSdkVersionFileException, CloudSdkNotFoundException, CloudSdkOutOfDateException { if (!version.equals(cloudSdk.getVersion().toString())) { throw new RuntimeException( "Specified Cloud SDK version (" + version...
java
public void checkCloudSdk(CloudSdk cloudSdk, String version) throws CloudSdkVersionFileException, CloudSdkNotFoundException, CloudSdkOutOfDateException { if (!version.equals(cloudSdk.getVersion().toString())) { throw new RuntimeException( "Specified Cloud SDK version (" + version...
[ "public", "void", "checkCloudSdk", "(", "CloudSdk", "cloudSdk", ",", "String", "version", ")", "throws", "CloudSdkVersionFileException", ",", "CloudSdkNotFoundException", ",", "CloudSdkOutOfDateException", "{", "if", "(", "!", "version", ".", "equals", "(", "cloudSdk"...
Validates the cloud SDK installation @param cloudSdk CloudSdk with a configured sdk home directory
[ "Validates", "the", "cloud", "SDK", "installation" ]
1f31bb8e963ce189e9ed6b88923a1853533485ff
https://github.com/GoogleCloudPlatform/app-maven-plugin/blob/1f31bb8e963ce189e9ed6b88923a1853533485ff/src/main/java/com/google/cloud/tools/maven/cloudsdk/CloudSdkChecker.java#L32-L44
train
GoogleCloudPlatform/app-maven-plugin
src/main/java/com/google/cloud/tools/maven/cloudsdk/CloudSdkAppEngineFactory.java
CloudSdkAppEngineFactory.getGcloud
public Gcloud getGcloud() { return Gcloud.builder(buildCloudSdkMinimal()) .setMetricsEnvironment(mojo.getArtifactId(), mojo.getArtifactVersion()) .setCredentialFile(mojo.getServiceAccountKeyFile()) .build(); }
java
public Gcloud getGcloud() { return Gcloud.builder(buildCloudSdkMinimal()) .setMetricsEnvironment(mojo.getArtifactId(), mojo.getArtifactVersion()) .setCredentialFile(mojo.getServiceAccountKeyFile()) .build(); }
[ "public", "Gcloud", "getGcloud", "(", ")", "{", "return", "Gcloud", ".", "builder", "(", "buildCloudSdkMinimal", "(", ")", ")", ".", "setMetricsEnvironment", "(", "mojo", ".", "getArtifactId", "(", ")", ",", "mojo", ".", "getArtifactVersion", "(", ")", ")", ...
Return a Gcloud instance using global configuration.
[ "Return", "a", "Gcloud", "instance", "using", "global", "configuration", "." ]
1f31bb8e963ce189e9ed6b88923a1853533485ff
https://github.com/GoogleCloudPlatform/app-maven-plugin/blob/1f31bb8e963ce189e9ed6b88923a1853533485ff/src/main/java/com/google/cloud/tools/maven/cloudsdk/CloudSdkAppEngineFactory.java#L151-L156
train
GoogleCloudPlatform/app-maven-plugin
src/main/java/com/google/cloud/tools/maven/run/AbstractRunMojo.java
AbstractRunMojo.getServices
public List<Path> getServices() { return (services == null) ? null : services.stream().map(File::toPath).collect(Collectors.toList()); }
java
public List<Path> getServices() { return (services == null) ? null : services.stream().map(File::toPath).collect(Collectors.toList()); }
[ "public", "List", "<", "Path", ">", "getServices", "(", ")", "{", "return", "(", "services", "==", "null", ")", "?", "null", ":", "services", ".", "stream", "(", ")", ".", "map", "(", "File", "::", "toPath", ")", ".", "collect", "(", "Collectors", ...
Return a list of Paths, but can return also return an empty list or null.
[ "Return", "a", "list", "of", "Paths", "but", "can", "return", "also", "return", "an", "empty", "list", "or", "null", "." ]
1f31bb8e963ce189e9ed6b88923a1853533485ff
https://github.com/GoogleCloudPlatform/app-maven-plugin/blob/1f31bb8e963ce189e9ed6b88923a1853533485ff/src/main/java/com/google/cloud/tools/maven/run/AbstractRunMojo.java#L81-L85
train
GoogleCloudPlatform/app-maven-plugin
src/main/java/com/google/cloud/tools/maven/deploy/AppDeployer.java
AppDeployer.deployAll
public void deployAll() throws MojoExecutionException { stager.stage(); ImmutableList.Builder<Path> computedDeployables = ImmutableList.builder(); // Look for app.yaml Path appYaml = deployMojo.getStagingDirectory().resolve("app.yaml"); if (!Files.exists(appYaml)) { throw new MojoExecutionExc...
java
public void deployAll() throws MojoExecutionException { stager.stage(); ImmutableList.Builder<Path> computedDeployables = ImmutableList.builder(); // Look for app.yaml Path appYaml = deployMojo.getStagingDirectory().resolve("app.yaml"); if (!Files.exists(appYaml)) { throw new MojoExecutionExc...
[ "public", "void", "deployAll", "(", ")", "throws", "MojoExecutionException", "{", "stager", ".", "stage", "(", ")", ";", "ImmutableList", ".", "Builder", "<", "Path", ">", "computedDeployables", "=", "ImmutableList", ".", "builder", "(", ")", ";", "// Look for...
Deploy a single application and any found yaml configuration files.
[ "Deploy", "a", "single", "application", "and", "any", "found", "yaml", "configuration", "files", "." ]
1f31bb8e963ce189e9ed6b88923a1853533485ff
https://github.com/GoogleCloudPlatform/app-maven-plugin/blob/1f31bb8e963ce189e9ed6b88923a1853533485ff/src/main/java/com/google/cloud/tools/maven/deploy/AppDeployer.java#L64-L94
train
GoogleCloudPlatform/app-maven-plugin
src/main/java/com/google/cloud/tools/maven/deploy/AppDeployer.java
AppDeployer.deployCron
public void deployCron() throws MojoExecutionException { stager.stage(); try { deployMojo .getAppEngineFactory() .deployment() .deployCron( configBuilder.buildDeployProjectConfigurationConfiguration(appengineDirectory)); } catch (AppEngineException ex) { ...
java
public void deployCron() throws MojoExecutionException { stager.stage(); try { deployMojo .getAppEngineFactory() .deployment() .deployCron( configBuilder.buildDeployProjectConfigurationConfiguration(appengineDirectory)); } catch (AppEngineException ex) { ...
[ "public", "void", "deployCron", "(", ")", "throws", "MojoExecutionException", "{", "stager", ".", "stage", "(", ")", ";", "try", "{", "deployMojo", ".", "getAppEngineFactory", "(", ")", ".", "deployment", "(", ")", ".", "deployCron", "(", "configBuilder", "....
Deploy only cron.yaml.
[ "Deploy", "only", "cron", ".", "yaml", "." ]
1f31bb8e963ce189e9ed6b88923a1853533485ff
https://github.com/GoogleCloudPlatform/app-maven-plugin/blob/1f31bb8e963ce189e9ed6b88923a1853533485ff/src/main/java/com/google/cloud/tools/maven/deploy/AppDeployer.java#L97-L108
train
GoogleCloudPlatform/app-maven-plugin
src/main/java/com/google/cloud/tools/maven/cloudsdk/CloudSdkDownloader.java
CloudSdkDownloader.newManagedSdkFactory
static Function<String, ManagedCloudSdk> newManagedSdkFactory() { return (version) -> { try { if (Strings.isNullOrEmpty(version)) { return ManagedCloudSdk.newManagedSdk(); } else { return ManagedCloudSdk.newManagedSdk(new Version(version)); } } catch (Unsuppor...
java
static Function<String, ManagedCloudSdk> newManagedSdkFactory() { return (version) -> { try { if (Strings.isNullOrEmpty(version)) { return ManagedCloudSdk.newManagedSdk(); } else { return ManagedCloudSdk.newManagedSdk(new Version(version)); } } catch (Unsuppor...
[ "static", "Function", "<", "String", ",", "ManagedCloudSdk", ">", "newManagedSdkFactory", "(", ")", "{", "return", "(", "version", ")", "-", ">", "{", "try", "{", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "version", ")", ")", "{", "return", "Manag...
for delayed instantiation because it can error unnecessarily
[ "for", "delayed", "instantiation", "because", "it", "can", "error", "unnecessarily" ]
1f31bb8e963ce189e9ed6b88923a1853533485ff
https://github.com/GoogleCloudPlatform/app-maven-plugin/blob/1f31bb8e963ce189e9ed6b88923a1853533485ff/src/main/java/com/google/cloud/tools/maven/cloudsdk/CloudSdkDownloader.java#L88-L100
train
GoogleCloudPlatform/app-maven-plugin
src/main/java/com/google/cloud/tools/maven/stage/AbstractStageMojo.java
AbstractStageMojo.getExtraFilesDirectories
public List<Path> getExtraFilesDirectories() { return extraFilesDirectories == null ? null : extraFilesDirectories.stream().map(File::toPath).collect(Collectors.toList()); }
java
public List<Path> getExtraFilesDirectories() { return extraFilesDirectories == null ? null : extraFilesDirectories.stream().map(File::toPath).collect(Collectors.toList()); }
[ "public", "List", "<", "Path", ">", "getExtraFilesDirectories", "(", ")", "{", "return", "extraFilesDirectories", "==", "null", "?", "null", ":", "extraFilesDirectories", ".", "stream", "(", ")", ".", "map", "(", "File", "::", "toPath", ")", ".", "collect", ...
Returns a nullable list of Path to user configured extra files directories.
[ "Returns", "a", "nullable", "list", "of", "Path", "to", "user", "configured", "extra", "files", "directories", "." ]
1f31bb8e963ce189e9ed6b88923a1853533485ff
https://github.com/GoogleCloudPlatform/app-maven-plugin/blob/1f31bb8e963ce189e9ed6b88923a1853533485ff/src/main/java/com/google/cloud/tools/maven/stage/AbstractStageMojo.java#L241-L245
train
jenkinsci/pipeline-maven-plugin
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/MavenArtifact.java
MavenArtifact.getUrl
@Nullable public String getUrl() { if (getRepositoryUrl() == null) return null; return getRepositoryUrl() + "/" + getGroupId().replace('.', '/') + "/" + getArtifactId() + "/" + getVersion() + "/" + getFileNameWithBaseVersion(); }
java
@Nullable public String getUrl() { if (getRepositoryUrl() == null) return null; return getRepositoryUrl() + "/" + getGroupId().replace('.', '/') + "/" + getArtifactId() + "/" + getVersion() + "/" + getFileNameWithBaseVersion(); }
[ "@", "Nullable", "public", "String", "getUrl", "(", ")", "{", "if", "(", "getRepositoryUrl", "(", ")", "==", "null", ")", "return", "null", ";", "return", "getRepositoryUrl", "(", ")", "+", "\"/\"", "+", "getGroupId", "(", ")", ".", "replace", "(", "'"...
URL of the artifact on the maven repository on which it has been deployed if it has been deployed. @return URL of the artifact or {@code null} if the artifact has not been deployed (if "{@code mvn deploy}" was not invoked)
[ "URL", "of", "the", "artifact", "on", "the", "maven", "repository", "on", "which", "it", "has", "been", "deployed", "if", "it", "has", "been", "deployed", "." ]
685d7dbb894fb4c976dbfa922e3caba8e8d5bed8
https://github.com/jenkinsci/pipeline-maven-plugin/blob/685d7dbb894fb4c976dbfa922e3caba8e8d5bed8/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/MavenArtifact.java#L126-L131
train
jenkinsci/pipeline-maven-plugin
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/fix/jenkins49337/GeneralNonBlockingStepExecution.java
GeneralNonBlockingStepExecution.stop
@Override public void stop(Throwable cause) throws Exception { stopping = true; if (task != null) { task.cancel(true); } super.stop(cause); }
java
@Override public void stop(Throwable cause) throws Exception { stopping = true; if (task != null) { task.cancel(true); } super.stop(cause); }
[ "@", "Override", "public", "void", "stop", "(", "Throwable", "cause", ")", "throws", "Exception", "{", "stopping", "=", "true", ";", "if", "(", "task", "!=", "null", ")", "{", "task", ".", "cancel", "(", "true", ")", ";", "}", "super", ".", "stop", ...
If the computation is going synchronously, try to cancel that.
[ "If", "the", "computation", "is", "going", "synchronously", "try", "to", "cancel", "that", "." ]
685d7dbb894fb4c976dbfa922e3caba8e8d5bed8
https://github.com/jenkinsci/pipeline-maven-plugin/blob/685d7dbb894fb4c976dbfa922e3caba8e8d5bed8/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/fix/jenkins49337/GeneralNonBlockingStepExecution.java#L101-L108
train
jenkinsci/pipeline-maven-plugin
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/cause/MavenDependencyCauseHelper.java
MavenDependencyCauseHelper.isSameCause
@Nonnull public static List<MavenArtifact> isSameCause(MavenDependencyCause newMavenCause, Cause oldMavenCause) { if (!(oldMavenCause instanceof MavenDependencyCause)) { return Collections.emptyList(); } List<MavenArtifact> newCauseArtifacts = Preconditions.checkNotNull(newMaven...
java
@Nonnull public static List<MavenArtifact> isSameCause(MavenDependencyCause newMavenCause, Cause oldMavenCause) { if (!(oldMavenCause instanceof MavenDependencyCause)) { return Collections.emptyList(); } List<MavenArtifact> newCauseArtifacts = Preconditions.checkNotNull(newMaven...
[ "@", "Nonnull", "public", "static", "List", "<", "MavenArtifact", ">", "isSameCause", "(", "MavenDependencyCause", "newMavenCause", ",", "Cause", "oldMavenCause", ")", "{", "if", "(", "!", "(", "oldMavenCause", "instanceof", "MavenDependencyCause", ")", ")", "{", ...
Return matching artifact if the given causes refer to common Maven artifact. Empty list if there are no matching artifact
[ "Return", "matching", "artifact", "if", "the", "given", "causes", "refer", "to", "common", "Maven", "artifact", ".", "Empty", "list", "if", "there", "are", "no", "matching", "artifact" ]
685d7dbb894fb4c976dbfa922e3caba8e8d5bed8
https://github.com/jenkinsci/pipeline-maven-plugin/blob/685d7dbb894fb4c976dbfa922e3caba8e8d5bed8/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/cause/MavenDependencyCauseHelper.java#L22-L50
train
jenkinsci/pipeline-maven-plugin
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution2.java
WithMavenStepExecution2.setupJDK
private void setupJDK() throws AbortException, IOException, InterruptedException { String jdkInstallationName = step.getJdk(); if (StringUtils.isEmpty(jdkInstallationName)) { console.println("[withMaven] using JDK installation provided by the build agent"); return; }...
java
private void setupJDK() throws AbortException, IOException, InterruptedException { String jdkInstallationName = step.getJdk(); if (StringUtils.isEmpty(jdkInstallationName)) { console.println("[withMaven] using JDK installation provided by the build agent"); return; }...
[ "private", "void", "setupJDK", "(", ")", "throws", "AbortException", ",", "IOException", ",", "InterruptedException", "{", "String", "jdkInstallationName", "=", "step", ".", "getJdk", "(", ")", ";", "if", "(", "StringUtils", ".", "isEmpty", "(", "jdkInstallation...
Setup the selected JDK. If none is provided nothing is done.
[ "Setup", "the", "selected", "JDK", ".", "If", "none", "is", "provided", "nothing", "is", "done", "." ]
685d7dbb894fb4c976dbfa922e3caba8e8d5bed8
https://github.com/jenkinsci/pipeline-maven-plugin/blob/685d7dbb894fb4c976dbfa922e3caba8e8d5bed8/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution2.java#L274-L303
train
jenkinsci/pipeline-maven-plugin
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution2.java
WithMavenStepExecution2.readFromProcess
@Nullable private String readFromProcess(String... args) throws InterruptedException { try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { ProcStarter ps = launcher.launch(); Proc p = launcher.launch(ps.cmds(args).stdout(baos)); int exitCode = p.join(); ...
java
@Nullable private String readFromProcess(String... args) throws InterruptedException { try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { ProcStarter ps = launcher.launch(); Proc p = launcher.launch(ps.cmds(args).stdout(baos)); int exitCode = p.join(); ...
[ "@", "Nullable", "private", "String", "readFromProcess", "(", "String", "...", "args", ")", "throws", "InterruptedException", "{", "try", "(", "ByteArrayOutputStream", "baos", "=", "new", "ByteArrayOutputStream", "(", ")", ")", "{", "ProcStarter", "ps", "=", "la...
Executes a command and reads the result to a string. It uses the launcher to run the command to make sure the launcher decorator is used ie. docker.image step @param args command arguments @return output from the command or {@code null} if the command returned a non zero code @throws InterruptedException if interrupte...
[ "Executes", "a", "command", "and", "reads", "the", "result", "to", "a", "string", ".", "It", "uses", "the", "launcher", "to", "run", "the", "command", "to", "make", "sure", "the", "launcher", "decorator", "is", "used", "ie", ".", "docker", ".", "image", ...
685d7dbb894fb4c976dbfa922e3caba8e8d5bed8
https://github.com/jenkinsci/pipeline-maven-plugin/blob/685d7dbb894fb4c976dbfa922e3caba8e8d5bed8/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution2.java#L578-L593
train
jenkinsci/pipeline-maven-plugin
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution2.java
WithMavenStepExecution2.createWrapperScript
private FilePath createWrapperScript(FilePath tempBinDir, String name, String content) throws IOException, InterruptedException { FilePath scriptFile = tempBinDir.child(name); envOverride.put(MVN_CMD, scriptFile.getRemote()); scriptFile.write(content, getComputer().getDefaultCharset().name(...
java
private FilePath createWrapperScript(FilePath tempBinDir, String name, String content) throws IOException, InterruptedException { FilePath scriptFile = tempBinDir.child(name); envOverride.put(MVN_CMD, scriptFile.getRemote()); scriptFile.write(content, getComputer().getDefaultCharset().name(...
[ "private", "FilePath", "createWrapperScript", "(", "FilePath", "tempBinDir", ",", "String", "name", ",", "String", "content", ")", "throws", "IOException", ",", "InterruptedException", "{", "FilePath", "scriptFile", "=", "tempBinDir", ".", "child", "(", "name", ")...
Creates the actual wrapper script file and sets the permissions. @param tempBinDir dir to create the script file @param name the script file name @param content contents of the file @return @throws InterruptedException when processing remote calls @throws IOException when reading files
[ "Creates", "the", "actual", "wrapper", "script", "file", "and", "sets", "the", "permissions", "." ]
685d7dbb894fb4c976dbfa922e3caba8e8d5bed8
https://github.com/jenkinsci/pipeline-maven-plugin/blob/685d7dbb894fb4c976dbfa922e3caba8e8d5bed8/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution2.java#L636-L644
train
jenkinsci/pipeline-maven-plugin
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution2.java
WithMavenStepExecution2.setupMavenLocalRepo
@Nullable private String setupMavenLocalRepo() throws IOException, InterruptedException { String expandedMavenLocalRepo; if (StringUtils.isEmpty(step.getMavenLocalRepo())) { expandedMavenLocalRepo = null; } else { // resolve relative/absolute with workspace as b...
java
@Nullable private String setupMavenLocalRepo() throws IOException, InterruptedException { String expandedMavenLocalRepo; if (StringUtils.isEmpty(step.getMavenLocalRepo())) { expandedMavenLocalRepo = null; } else { // resolve relative/absolute with workspace as b...
[ "@", "Nullable", "private", "String", "setupMavenLocalRepo", "(", ")", "throws", "IOException", ",", "InterruptedException", "{", "String", "expandedMavenLocalRepo", ";", "if", "(", "StringUtils", ".", "isEmpty", "(", "step", ".", "getMavenLocalRepo", "(", ")", ")...
Sets the maven repo location according to the provided parameter on the agent @return path on the build agent to the repo or {@code null} if not defined @throws InterruptedException when processing remote calls @throws IOException when reading files
[ "Sets", "the", "maven", "repo", "location", "according", "to", "the", "provided", "parameter", "on", "the", "agent" ]
685d7dbb894fb4c976dbfa922e3caba8e8d5bed8
https://github.com/jenkinsci/pipeline-maven-plugin/blob/685d7dbb894fb4c976dbfa922e3caba8e8d5bed8/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution2.java#L653-L671
train
jenkinsci/pipeline-maven-plugin
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution2.java
WithMavenStepExecution2.globalSettingsFromConfig
private void globalSettingsFromConfig(String mavenGlobalSettingsConfigId, FilePath mavenGlobalSettingsFile, Collection<Credentials> credentials) throws AbortException { Config c = ConfigFiles.getByIdOrNull(build, mavenGlobalSettingsConfigId); if (c == null) { throw new AbortException("C...
java
private void globalSettingsFromConfig(String mavenGlobalSettingsConfigId, FilePath mavenGlobalSettingsFile, Collection<Credentials> credentials) throws AbortException { Config c = ConfigFiles.getByIdOrNull(build, mavenGlobalSettingsConfigId); if (c == null) { throw new AbortException("C...
[ "private", "void", "globalSettingsFromConfig", "(", "String", "mavenGlobalSettingsConfigId", ",", "FilePath", "mavenGlobalSettingsFile", ",", "Collection", "<", "Credentials", ">", "credentials", ")", "throws", "AbortException", "{", "Config", "c", "=", "ConfigFiles", "...
Reads the global config file from Config File Provider, expands the credentials and stores it in a file on the temp folder to use it with the maven wrapper script @param mavenGlobalSettingsConfigId global config file id from Config File Provider @param mavenGlobalSettingsFile path to write te content to @param cre...
[ "Reads", "the", "global", "config", "file", "from", "Config", "File", "Provider", "expands", "the", "credentials", "and", "stores", "it", "in", "a", "file", "on", "the", "temp", "folder", "to", "use", "it", "with", "the", "maven", "wrapper", "script" ]
685d7dbb894fb4c976dbfa922e3caba8e8d5bed8
https://github.com/jenkinsci/pipeline-maven-plugin/blob/685d7dbb894fb4c976dbfa922e3caba8e8d5bed8/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution2.java#L972-L1015
train
jenkinsci/pipeline-maven-plugin
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution2.java
WithMavenStepExecution2.getComputer
@Nonnull private Computer getComputer() throws AbortException { if (computer != null) { return computer; } String node = null; Jenkins j = Jenkins.getInstance(); for (Computer c : j.getComputers()) { if (c.getChannel() == launcher.getChanne...
java
@Nonnull private Computer getComputer() throws AbortException { if (computer != null) { return computer; } String node = null; Jenkins j = Jenkins.getInstance(); for (Computer c : j.getComputers()) { if (c.getChannel() == launcher.getChanne...
[ "@", "Nonnull", "private", "Computer", "getComputer", "(", ")", "throws", "AbortException", "{", "if", "(", "computer", "!=", "null", ")", "{", "return", "computer", ";", "}", "String", "node", "=", "null", ";", "Jenkins", "j", "=", "Jenkins", ".", "getI...
Gets the computer for the current launcher. @return the computer @throws AbortException in case of error.
[ "Gets", "the", "computer", "for", "the", "current", "launcher", "." ]
685d7dbb894fb4c976dbfa922e3caba8e8d5bed8
https://github.com/jenkinsci/pipeline-maven-plugin/blob/685d7dbb894fb4c976dbfa922e3caba8e8d5bed8/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution2.java#L1139-L1172
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/support/HibernateDialectDetectorFactoryBean.java
HibernateDialectDetectorFactoryBean.createDialectFactory
protected DialectFactory createDialectFactory() { DialectFactoryImpl factory = new DialectFactoryImpl(); factory.injectServices(new ServiceRegistryImplementor() { @Override public <R extends Service> R getService(Class<R> serviceRole) { if (serviceRole == Dialect...
java
protected DialectFactory createDialectFactory() { DialectFactoryImpl factory = new DialectFactoryImpl(); factory.injectServices(new ServiceRegistryImplementor() { @Override public <R extends Service> R getService(Class<R> serviceRole) { if (serviceRole == Dialect...
[ "protected", "DialectFactory", "createDialectFactory", "(", ")", "{", "DialectFactoryImpl", "factory", "=", "new", "DialectFactoryImpl", "(", ")", ";", "factory", ".", "injectServices", "(", "new", "ServiceRegistryImplementor", "(", ")", "{", "@", "Override", "publi...
should be using the ServiceRegistry, but getting it from the SessionFactory at startup fails in Spring
[ "should", "be", "using", "the", "ServiceRegistry", "but", "getting", "it", "from", "the", "SessionFactory", "at", "startup", "fails", "in", "Spring" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/support/HibernateDialectDetectorFactoryBean.java#L123-L161
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/HibernateMappingContextConfiguration.java
HibernateMappingContextConfiguration.matchesFilter
protected boolean matchesFilter(MetadataReader reader, MetadataReaderFactory readerFactory) throws IOException { for (TypeFilter filter : ENTITY_TYPE_FILTERS) { if (filter.match(reader, readerFactory)) { return true; } } return false; }
java
protected boolean matchesFilter(MetadataReader reader, MetadataReaderFactory readerFactory) throws IOException { for (TypeFilter filter : ENTITY_TYPE_FILTERS) { if (filter.match(reader, readerFactory)) { return true; } } return false; }
[ "protected", "boolean", "matchesFilter", "(", "MetadataReader", "reader", ",", "MetadataReaderFactory", "readerFactory", ")", "throws", "IOException", "{", "for", "(", "TypeFilter", "filter", ":", "ENTITY_TYPE_FILTERS", ")", "{", "if", "(", "filter", ".", "match", ...
Check whether any of the configured entity type filters matches the current class descriptor contained in the metadata reader.
[ "Check", "whether", "any", "of", "the", "configured", "entity", "type", "filters", "matches", "the", "current", "class", "descriptor", "contained", "in", "the", "metadata", "reader", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/HibernateMappingContextConfiguration.java#L181-L188
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/HibernateSession.java
HibernateSession.deleteAll
public long deleteAll(final QueryableCriteria criteria) { return getHibernateTemplate().execute((GrailsHibernateTemplate.HibernateCallback<Integer>) session -> { JpaQueryBuilder builder = new JpaQueryBuilder(criteria); builder.setConversionService(getMappingContext().getConversionService...
java
public long deleteAll(final QueryableCriteria criteria) { return getHibernateTemplate().execute((GrailsHibernateTemplate.HibernateCallback<Integer>) session -> { JpaQueryBuilder builder = new JpaQueryBuilder(criteria); builder.setConversionService(getMappingContext().getConversionService...
[ "public", "long", "deleteAll", "(", "final", "QueryableCriteria", "criteria", ")", "{", "return", "getHibernateTemplate", "(", ")", ".", "execute", "(", "(", "GrailsHibernateTemplate", ".", "HibernateCallback", "<", "Integer", ">", ")", "session", "->", "{", "Jp...
Deletes all objects matching the given criteria. @param criteria The criteria @return The total number of records deleted
[ "Deletes", "all", "objects", "matching", "the", "given", "criteria", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/HibernateSession.java#L91-L115
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/HibernateSession.java
HibernateSession.updateAll
public long updateAll(final QueryableCriteria criteria, final Map<String, Object> properties) { return getHibernateTemplate().execute((GrailsHibernateTemplate.HibernateCallback<Integer>) session -> { JpaQueryBuilder builder = new JpaQueryBuilder(criteria); builder.setConversionService(ge...
java
public long updateAll(final QueryableCriteria criteria, final Map<String, Object> properties) { return getHibernateTemplate().execute((GrailsHibernateTemplate.HibernateCallback<Integer>) session -> { JpaQueryBuilder builder = new JpaQueryBuilder(criteria); builder.setConversionService(ge...
[ "public", "long", "updateAll", "(", "final", "QueryableCriteria", "criteria", ",", "final", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "return", "getHibernateTemplate", "(", ")", ".", "execute", "(", "(", "GrailsHibernateTemplate", ".", ...
Updates all objects matching the given criteria and property values. @param criteria The criteria @param properties The properties @return The total number of records updated
[ "Updates", "all", "objects", "matching", "the", "given", "criteria", "and", "property", "values", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/HibernateSession.java#L124-L156
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/support/HibernateVersionSupport.java
HibernateVersionSupport.isAtLeastVersion
public static boolean isAtLeastVersion(String required) { String hibernateVersion = Hibernate.class.getPackage().getImplementationVersion(); if (hibernateVersion != null) { return GrailsVersion.isAtLeast(hibernateVersion, required); } else { return false; } }
java
public static boolean isAtLeastVersion(String required) { String hibernateVersion = Hibernate.class.getPackage().getImplementationVersion(); if (hibernateVersion != null) { return GrailsVersion.isAtLeast(hibernateVersion, required); } else { return false; } }
[ "public", "static", "boolean", "isAtLeastVersion", "(", "String", "required", ")", "{", "String", "hibernateVersion", "=", "Hibernate", ".", "class", ".", "getPackage", "(", ")", ".", "getImplementationVersion", "(", ")", ";", "if", "(", "hibernateVersion", "!="...
Check the current hibernate version @param required The required version @return True if it is at least the given version
[ "Check", "the", "current", "hibernate", "version" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/support/HibernateVersionSupport.java#L68-L75
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/support/HibernateVersionSupport.java
HibernateVersionSupport.createQuery
@Deprecated public static Query createQuery(Session session, String query) { return session.createQuery(query); }
java
@Deprecated public static Query createQuery(Session session, String query) { return session.createQuery(query); }
[ "@", "Deprecated", "public", "static", "Query", "createQuery", "(", "Session", "session", ",", "String", "query", ")", "{", "return", "session", ".", "createQuery", "(", "query", ")", ";", "}" ]
Creates a query @param session The session @param query The query @return The created query @deprecated Previously used for Hibernate backwards, will be removed in a future release.
[ "Creates", "a", "query" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/support/HibernateVersionSupport.java#L85-L88
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java
GrailsHibernateUtil.getGrailsDomainClassProperty
private static PersistentProperty getGrailsDomainClassProperty(AbstractHibernateDatastore datastore, Class<?> targetClass, String propertyName) { PersistentEntity grailsClass = datastore != null ? datastore.getMappingContext().getPersistentEntity( targetClass.getName()) : null; if (grailsClass == null) ...
java
private static PersistentProperty getGrailsDomainClassProperty(AbstractHibernateDatastore datastore, Class<?> targetClass, String propertyName) { PersistentEntity grailsClass = datastore != null ? datastore.getMappingContext().getPersistentEntity( targetClass.getName()) : null; if (grailsClass == null) ...
[ "private", "static", "PersistentProperty", "getGrailsDomainClassProperty", "(", "AbstractHibernateDatastore", "datastore", ",", "Class", "<", "?", ">", "targetClass", ",", "String", "propertyName", ")", "{", "PersistentEntity", "grailsClass", "=", "datastore", "!=", "nu...
Get hold of the GrailsDomainClassProperty represented by the targetClass' propertyName, assuming targetClass corresponds to a GrailsDomainClass.
[ "Get", "hold", "of", "the", "GrailsDomainClassProperty", "represented", "by", "the", "targetClass", "propertyName", "assuming", "targetClass", "corresponds", "to", "a", "GrailsDomainClass", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java#L242-L248
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java
GrailsHibernateUtil.cacheCriteriaByMapping
public static void cacheCriteriaByMapping(Class<?> targetClass, Criteria criteria) { Mapping m = GrailsDomainBinder.getMapping(targetClass); if (m != null && m.getCache() != null && m.getCache().getEnabled()) { criteria.setCacheable(true); } }
java
public static void cacheCriteriaByMapping(Class<?> targetClass, Criteria criteria) { Mapping m = GrailsDomainBinder.getMapping(targetClass); if (m != null && m.getCache() != null && m.getCache().getEnabled()) { criteria.setCacheable(true); } }
[ "public", "static", "void", "cacheCriteriaByMapping", "(", "Class", "<", "?", ">", "targetClass", ",", "Criteria", "criteria", ")", "{", "Mapping", "m", "=", "GrailsDomainBinder", ".", "getMapping", "(", "targetClass", ")", ";", "if", "(", "m", "!=", "null",...
Configures the criteria instance to cache based on the configured mapping. @param targetClass The target class @param criteria The criteria
[ "Configures", "the", "criteria", "instance", "to", "cache", "based", "on", "the", "configured", "mapping", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java#L256-L261
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java
GrailsHibernateUtil.getFetchMode
public static FetchMode getFetchMode(Object object) { String name = object != null ? object.toString() : "default"; if (name.equalsIgnoreCase(FetchMode.JOIN.toString()) || name.equalsIgnoreCase("eager")) { return FetchMode.JOIN; } if (name.equalsIgnoreCase(FetchMode.SELECT.to...
java
public static FetchMode getFetchMode(Object object) { String name = object != null ? object.toString() : "default"; if (name.equalsIgnoreCase(FetchMode.JOIN.toString()) || name.equalsIgnoreCase("eager")) { return FetchMode.JOIN; } if (name.equalsIgnoreCase(FetchMode.SELECT.to...
[ "public", "static", "FetchMode", "getFetchMode", "(", "Object", "object", ")", "{", "String", "name", "=", "object", "!=", "null", "?", "object", ".", "toString", "(", ")", ":", "\"default\"", ";", "if", "(", "name", ".", "equalsIgnoreCase", "(", "FetchMod...
Retrieves the fetch mode for the specified instance; otherwise returns the default FetchMode. @param object The object, converted to a string @return The FetchMode
[ "Retrieves", "the", "fetch", "mode", "for", "the", "specified", "instance", ";", "otherwise", "returns", "the", "default", "FetchMode", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java#L273-L282
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java
GrailsHibernateUtil.setObjectToReadyOnly
public static void setObjectToReadyOnly(Object target, SessionFactory sessionFactory) { Object resource = TransactionSynchronizationManager.getResource(sessionFactory); if(resource != null) { Session session = sessionFactory.getCurrentSession(); if (canModifyReadWriteState(sessio...
java
public static void setObjectToReadyOnly(Object target, SessionFactory sessionFactory) { Object resource = TransactionSynchronizationManager.getResource(sessionFactory); if(resource != null) { Session session = sessionFactory.getCurrentSession(); if (canModifyReadWriteState(sessio...
[ "public", "static", "void", "setObjectToReadyOnly", "(", "Object", "target", ",", "SessionFactory", "sessionFactory", ")", "{", "Object", "resource", "=", "TransactionSynchronizationManager", ".", "getResource", "(", "sessionFactory", ")", ";", "if", "(", "resource", ...
Sets the target object to read-only using the given SessionFactory instance. This avoids Hibernate performing any dirty checking on the object @see #setObjectToReadWrite(Object, org.hibernate.SessionFactory) @param target The target object @param sessionFactory The SessionFactory instance
[ "Sets", "the", "target", "object", "to", "read", "-", "only", "using", "the", "given", "SessionFactory", "instance", ".", "This", "avoids", "Hibernate", "performing", "any", "dirty", "checking", "on", "the", "object" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java#L293-L305
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java
GrailsHibernateUtil.setObjectToReadWrite
public static void setObjectToReadWrite(final Object target, SessionFactory sessionFactory) { Session session = sessionFactory.getCurrentSession(); if (!canModifyReadWriteState(session, target)) { return; } SessionImplementor sessionImpl = (SessionImplementor) session; ...
java
public static void setObjectToReadWrite(final Object target, SessionFactory sessionFactory) { Session session = sessionFactory.getCurrentSession(); if (!canModifyReadWriteState(session, target)) { return; } SessionImplementor sessionImpl = (SessionImplementor) session; ...
[ "public", "static", "void", "setObjectToReadWrite", "(", "final", "Object", "target", ",", "SessionFactory", "sessionFactory", ")", "{", "Session", "session", "=", "sessionFactory", ".", "getCurrentSession", "(", ")", ";", "if", "(", "!", "canModifyReadWriteState", ...
Sets the target object to read-write, allowing Hibernate to dirty check it and auto-flush changes. @see #setObjectToReadyOnly(Object, org.hibernate.SessionFactory) @param target The target object @param sessionFactory The SessionFactory instance
[ "Sets", "the", "target", "object", "to", "read", "-", "write", "allowing", "Hibernate", "to", "dirty", "check", "it", "and", "auto", "-", "flush", "changes", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java#L319-L340
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java
GrailsHibernateUtil.incrementVersion
public static void incrementVersion(Object target) { MetaClass metaClass = GroovySystem.getMetaClassRegistry().getMetaClass(target.getClass()); if (metaClass.hasProperty(target, GormProperties.VERSION)!=null) { Object version = metaClass.getProperty(target, GormProperties.VERSION); ...
java
public static void incrementVersion(Object target) { MetaClass metaClass = GroovySystem.getMetaClassRegistry().getMetaClass(target.getClass()); if (metaClass.hasProperty(target, GormProperties.VERSION)!=null) { Object version = metaClass.getProperty(target, GormProperties.VERSION); ...
[ "public", "static", "void", "incrementVersion", "(", "Object", "target", ")", "{", "MetaClass", "metaClass", "=", "GroovySystem", ".", "getMetaClassRegistry", "(", ")", ".", "getMetaClass", "(", "target", ".", "getClass", "(", ")", ")", ";", "if", "(", "meta...
Increments the entities version number in order to force an update @param target The target entity
[ "Increments", "the", "entities", "version", "number", "in", "order", "to", "force", "an", "update" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java#L346-L355
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java
GrailsHibernateUtil.ensureCorrectGroovyMetaClass
@Deprecated public static void ensureCorrectGroovyMetaClass(Object target, Class<?> persistentClass) { if (target instanceof GroovyObject) { GroovyObject go = ((GroovyObject)target); if (!go.getMetaClass().getTheClass().equals(persistentClass)) { go.setMetaClass(Groov...
java
@Deprecated public static void ensureCorrectGroovyMetaClass(Object target, Class<?> persistentClass) { if (target instanceof GroovyObject) { GroovyObject go = ((GroovyObject)target); if (!go.getMetaClass().getTheClass().equals(persistentClass)) { go.setMetaClass(Groov...
[ "@", "Deprecated", "public", "static", "void", "ensureCorrectGroovyMetaClass", "(", "Object", "target", ",", "Class", "<", "?", ">", "persistentClass", ")", "{", "if", "(", "target", "instanceof", "GroovyObject", ")", "{", "GroovyObject", "go", "=", "(", "(", ...
Ensures the meta class is correct for a given class @param target The GroovyObject @param persistentClass The persistent class
[ "Ensures", "the", "meta", "class", "is", "correct", "for", "a", "given", "class" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java#L363-L371
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java
GrailsHibernateUtil.getAssociationProxy
public static HibernateProxy getAssociationProxy(Object obj, String associationName) { return proxyHandler.getAssociationProxy(obj, associationName); }
java
public static HibernateProxy getAssociationProxy(Object obj, String associationName) { return proxyHandler.getAssociationProxy(obj, associationName); }
[ "public", "static", "HibernateProxy", "getAssociationProxy", "(", "Object", "obj", ",", "String", "associationName", ")", "{", "return", "proxyHandler", ".", "getAssociationProxy", "(", "obj", ",", "associationName", ")", ";", "}" ]
Returns the proxy for a given association or null if it is not proxied @param obj The object @param associationName The named assoication @return A proxy
[ "Returns", "the", "proxy", "for", "a", "given", "association", "or", "null", "if", "it", "is", "not", "proxied" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java#L389-L391
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/AbstractHibernateDatastore.java
AbstractHibernateDatastore.enableMultiTenancyFilter
public void enableMultiTenancyFilter() { Serializable currentId = Tenants.currentId(this); if(ConnectionSource.DEFAULT.equals(currentId)) { disableMultiTenancyFilter(); } else { getHibernateTemplate() .getSessionFactory() .g...
java
public void enableMultiTenancyFilter() { Serializable currentId = Tenants.currentId(this); if(ConnectionSource.DEFAULT.equals(currentId)) { disableMultiTenancyFilter(); } else { getHibernateTemplate() .getSessionFactory() .g...
[ "public", "void", "enableMultiTenancyFilter", "(", ")", "{", "Serializable", "currentId", "=", "Tenants", ".", "currentId", "(", "this", ")", ";", "if", "(", "ConnectionSource", ".", "DEFAULT", ".", "equals", "(", "currentId", ")", ")", "{", "disableMultiTenan...
Enable the tenant id filter for the given datastore and entity
[ "Enable", "the", "tenant", "id", "filter", "for", "the", "given", "datastore", "and", "entity" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/AbstractHibernateDatastore.java#L381-L393
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.configureNamingStrategy
public static void configureNamingStrategy(final Object strategy) throws ClassNotFoundException, InstantiationException, IllegalAccessException { configureNamingStrategy(ConnectionSource.DEFAULT, strategy); }
java
public static void configureNamingStrategy(final Object strategy) throws ClassNotFoundException, InstantiationException, IllegalAccessException { configureNamingStrategy(ConnectionSource.DEFAULT, strategy); }
[ "public", "static", "void", "configureNamingStrategy", "(", "final", "Object", "strategy", ")", "throws", "ClassNotFoundException", ",", "InstantiationException", ",", "IllegalAccessException", "{", "configureNamingStrategy", "(", "ConnectionSource", ".", "DEFAULT", ",", ...
Override the default naming strategy for the default datasource given a Class or a full class name. @param strategy the class or name @throws ClassNotFoundException When the class was not found for specified strategy @throws InstantiationException When an error occurred instantiating the strategy @throws IllegalAccessE...
[ "Override", "the", "default", "naming", "strategy", "for", "the", "default", "datasource", "given", "a", "Class", "or", "a", "full", "class", "name", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L176-L178
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.configureNamingStrategy
public static void configureNamingStrategy(final String datasourceName, final Object strategy) throws ClassNotFoundException, InstantiationException, IllegalAccessException { Class<?> namingStrategyClass = null; NamingStrategy namingStrategy; if (strategy instanceof Class<?>) { namin...
java
public static void configureNamingStrategy(final String datasourceName, final Object strategy) throws ClassNotFoundException, InstantiationException, IllegalAccessException { Class<?> namingStrategyClass = null; NamingStrategy namingStrategy; if (strategy instanceof Class<?>) { namin...
[ "public", "static", "void", "configureNamingStrategy", "(", "final", "String", "datasourceName", ",", "final", "Object", "strategy", ")", "throws", "ClassNotFoundException", ",", "InstantiationException", ",", "IllegalAccessException", "{", "Class", "<", "?", ">", "na...
Override the default naming strategy given a Class or a full class name, or an instance of a NamingStrategy. @param datasourceName the datasource name @param strategy the class, name, or instance @throws ClassNotFoundException When the class was not found for specified strategy @throws InstantiationException When an ...
[ "Override", "the", "default", "naming", "strategy", "given", "a", "Class", "or", "a", "full", "class", "name", "or", "an", "instance", "of", "a", "NamingStrategy", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L190-L208
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.isUnidirectionalOneToMany
protected boolean isUnidirectionalOneToMany(PersistentProperty property) { return ((property instanceof org.grails.datastore.mapping.model.types.OneToMany) && !((Association)property).isBidirectional()); }
java
protected boolean isUnidirectionalOneToMany(PersistentProperty property) { return ((property instanceof org.grails.datastore.mapping.model.types.OneToMany) && !((Association)property).isBidirectional()); }
[ "protected", "boolean", "isUnidirectionalOneToMany", "(", "PersistentProperty", "property", ")", "{", "return", "(", "(", "property", "instanceof", "org", ".", "grails", ".", "datastore", ".", "mapping", ".", "model", ".", "types", ".", "OneToMany", ")", "&&", ...
Checks whether a property is a unidirectional non-circular one-to-many @param property The property to check @return true if it is unidirectional and a one-to-many
[ "Checks", "whether", "a", "property", "is", "a", "unidirectional", "non", "-", "circular", "one", "-", "to", "-", "many" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L845-L847
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindDependentKeyValue
protected void bindDependentKeyValue(PersistentProperty property, DependantValue key, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { if (LOG.isDebugEnabled()) { LOG.debug("[GrailsDomainBinder] binding [" + property.getName() + "] with ...
java
protected void bindDependentKeyValue(PersistentProperty property, DependantValue key, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { if (LOG.isDebugEnabled()) { LOG.debug("[GrailsDomainBinder] binding [" + property.getName() + "] with ...
[ "protected", "void", "bindDependentKeyValue", "(", "PersistentProperty", "property", ",", "DependantValue", "key", ",", "InFlightMetadataCollector", "mappings", ",", "String", "sessionFactoryBeanName", ")", "{", "if", "(", "LOG", ".", "isDebugEnabled", "(", ")", ")", ...
Binds the primary key value column @param property The property @param key The key @param mappings The mappings @param sessionFactoryBeanName The name of the session factory
[ "Binds", "the", "primary", "key", "value", "column" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L857-L875
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.createPrimaryKeyValue
protected DependantValue createPrimaryKeyValue(InFlightMetadataCollector mappings, PersistentProperty property, Collection collection, Map<?, ?> persistentClasses) { KeyValue keyValue; DependantValue key; String propertyRef = collection.getRefer...
java
protected DependantValue createPrimaryKeyValue(InFlightMetadataCollector mappings, PersistentProperty property, Collection collection, Map<?, ?> persistentClasses) { KeyValue keyValue; DependantValue key; String propertyRef = collection.getRefer...
[ "protected", "DependantValue", "createPrimaryKeyValue", "(", "InFlightMetadataCollector", "mappings", ",", "PersistentProperty", "property", ",", "Collection", "collection", ",", "Map", "<", "?", ",", "?", ">", "persistentClasses", ")", "{", "KeyValue", "keyValue", ";...
Creates the DependentValue object that forms a primary key reference for the collection. @param mappings @param property The grails property @param collection The collection object @param persistentClasses @return The DependantValue (key)
[ "Creates", "the", "DependentValue", "object", "that", "forms", "a", "primary", "key", "reference", "for", "the", "collection", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L886-L908
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindUnidirectionalOneToMany
protected void bindUnidirectionalOneToMany(org.grails.datastore.mapping.model.types.OneToMany property, InFlightMetadataCollector mappings, Collection collection) { Value v = collection.getElement(); v.createForeignKey(); String entityName; if (v instanceof ManyToOne) { ManyT...
java
protected void bindUnidirectionalOneToMany(org.grails.datastore.mapping.model.types.OneToMany property, InFlightMetadataCollector mappings, Collection collection) { Value v = collection.getElement(); v.createForeignKey(); String entityName; if (v instanceof ManyToOne) { ManyT...
[ "protected", "void", "bindUnidirectionalOneToMany", "(", "org", ".", "grails", ".", "datastore", ".", "mapping", ".", "model", ".", "types", ".", "OneToMany", "property", ",", "InFlightMetadataCollector", "mappings", ",", "Collection", "collection", ")", "{", "Val...
Binds a unidirectional one-to-many creating a psuedo back reference property in the process. @param property @param mappings @param collection
[ "Binds", "a", "unidirectional", "one", "-", "to", "-", "many", "creating", "a", "psuedo", "back", "reference", "property", "in", "the", "process", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L917-L941
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.linkBidirectionalOneToMany
protected void linkBidirectionalOneToMany(Collection collection, PersistentClass associatedClass, DependantValue key, PersistentProperty otherSide) { collection.setInverse(true); // Iterator mappedByColumns = associatedClass.getProperty(otherSide.getName()).getValue().getColumnIterator(); Itera...
java
protected void linkBidirectionalOneToMany(Collection collection, PersistentClass associatedClass, DependantValue key, PersistentProperty otherSide) { collection.setInverse(true); // Iterator mappedByColumns = associatedClass.getProperty(otherSide.getName()).getValue().getColumnIterator(); Itera...
[ "protected", "void", "linkBidirectionalOneToMany", "(", "Collection", "collection", ",", "PersistentClass", "associatedClass", ",", "DependantValue", "key", ",", "PersistentProperty", "otherSide", ")", "{", "collection", ".", "setInverse", "(", "true", ")", ";", "// I...
Links a bidirectional one-to-many, configuring the inverse side and using a column copy to perform the link @param collection The collection one-to-many @param associatedClass The associated class @param key The key @param otherSide The other side of the relationship
[ "Links", "a", "bidirectional", "one", "-", "to", "-", "many", "configuring", "the", "inverse", "side", "and", "using", "a", "column", "copy", "to", "perform", "the", "link" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L964-L973
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindCollection
protected void bindCollection(ToMany property, Collection collection, PersistentClass owner, InFlightMetadataCollector mappings, String path, String sessionFactoryBeanName) { // set role String propertyName = getNameForPropertyAndPath(property, path); collectio...
java
protected void bindCollection(ToMany property, Collection collection, PersistentClass owner, InFlightMetadataCollector mappings, String path, String sessionFactoryBeanName) { // set role String propertyName = getNameForPropertyAndPath(property, path); collectio...
[ "protected", "void", "bindCollection", "(", "ToMany", "property", ",", "Collection", "collection", ",", "PersistentClass", "owner", ",", "InFlightMetadataCollector", "mappings", ",", "String", "path", ",", "String", "sessionFactoryBeanName", ")", "{", "// set role", "...
First pass to bind collection to Hibernate metamodel, sets up second pass @param property The GrailsDomainClassProperty instance @param collection The collection @param owner The owning persistent class @param mappings The Hibernate mappings instance @param path
[ "First", "pass", "to", "bind", "collection", "to", "Hibernate", "metamodel", "sets", "up", "second", "pass" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L1023-L1076
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.calculateTableForMany
protected String calculateTableForMany(ToMany property, String sessionFactoryBeanName) { NamingStrategy namingStrategy = getNamingStrategy(sessionFactoryBeanName); String propertyColumnName = namingStrategy.propertyToColumnName(property.getName()); //fix for GRAILS-5895 PropertyConfig c...
java
protected String calculateTableForMany(ToMany property, String sessionFactoryBeanName) { NamingStrategy namingStrategy = getNamingStrategy(sessionFactoryBeanName); String propertyColumnName = namingStrategy.propertyToColumnName(property.getName()); //fix for GRAILS-5895 PropertyConfig c...
[ "protected", "String", "calculateTableForMany", "(", "ToMany", "property", ",", "String", "sessionFactoryBeanName", ")", "{", "NamingStrategy", "namingStrategy", "=", "getNamingStrategy", "(", "sessionFactoryBeanName", ")", ";", "String", "propertyColumnName", "=", "namin...
Calculates the mapping table for a many-to-many. One side of the relationship has to "own" the relationship so that there is not a situation where you have two mapping tables for left_right and right_left
[ "Calculates", "the", "mapping", "table", "for", "a", "many", "-", "to", "-", "many", ".", "One", "side", "of", "the", "relationship", "has", "to", "own", "the", "relationship", "so", "that", "there", "is", "not", "a", "situation", "where", "you", "have",...
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L1131-L1184
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.getTableName
protected String getTableName(PersistentEntity domainClass, String sessionFactoryBeanName) { Mapping m = getMapping(domainClass); String tableName = null; if (m != null && m.getTableName() != null) { tableName = m.getTableName(); } if (tableName == null) { ...
java
protected String getTableName(PersistentEntity domainClass, String sessionFactoryBeanName) { Mapping m = getMapping(domainClass); String tableName = null; if (m != null && m.getTableName() != null) { tableName = m.getTableName(); } if (tableName == null) { ...
[ "protected", "String", "getTableName", "(", "PersistentEntity", "domainClass", ",", "String", "sessionFactoryBeanName", ")", "{", "Mapping", "m", "=", "getMapping", "(", "domainClass", ")", ";", "String", "tableName", "=", "null", ";", "if", "(", "m", "!=", "n...
Evaluates the table name for the given property @param domainClass The domain class to evaluate @return The table name
[ "Evaluates", "the", "table", "name", "for", "the", "given", "property" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L1199-L1217
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindClass
public void bindClass(PersistentEntity entity, InFlightMetadataCollector mappings, String sessionFactoryBeanName) throws MappingException { //if (domainClass.getClazz().getSuperclass() == Object.class) { if (entity.isRoot()) { bindRoot((HibernatePersistentEntity) entity, mappings...
java
public void bindClass(PersistentEntity entity, InFlightMetadataCollector mappings, String sessionFactoryBeanName) throws MappingException { //if (domainClass.getClazz().getSuperclass() == Object.class) { if (entity.isRoot()) { bindRoot((HibernatePersistentEntity) entity, mappings...
[ "public", "void", "bindClass", "(", "PersistentEntity", "entity", ",", "InFlightMetadataCollector", "mappings", ",", "String", "sessionFactoryBeanName", ")", "throws", "MappingException", "{", "//if (domainClass.getClazz().getSuperclass() == Object.class) {", "if", "(", "entity...
Binds a Grails domain class to the Hibernate runtime meta model @param entity The domain class to bind @param mappings The existing mappings @param sessionFactoryBeanName the session factory bean name @throws MappingException Thrown if the domain class uses inheritance which is not supported
[ "Binds", "a", "Grails", "domain", "class", "to", "the", "Hibernate", "runtime", "meta", "model" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L1235-L1241
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.trackCustomCascadingSaves
protected void trackCustomCascadingSaves(Mapping mapping, Iterable<PersistentProperty> persistentProperties) { for (PersistentProperty property : persistentProperties) { PropertyConfig propConf = mapping.getPropertyConfig(property.getName()); if (propConf != null && propConf.getCascade(...
java
protected void trackCustomCascadingSaves(Mapping mapping, Iterable<PersistentProperty> persistentProperties) { for (PersistentProperty property : persistentProperties) { PropertyConfig propConf = mapping.getPropertyConfig(property.getName()); if (propConf != null && propConf.getCascade(...
[ "protected", "void", "trackCustomCascadingSaves", "(", "Mapping", "mapping", ",", "Iterable", "<", "PersistentProperty", ">", "persistentProperties", ")", "{", "for", "(", "PersistentProperty", "property", ":", "persistentProperties", ")", "{", "PropertyConfig", "propCo...
Checks for any custom cascading saves set up via the mapping DSL and records them within the persistent property. @param mapping The Mapping. @param persistentProperties The persistent properties of the domain class.
[ "Checks", "for", "any", "custom", "cascading", "saves", "set", "up", "via", "the", "mapping", "DSL", "and", "records", "them", "within", "the", "persistent", "property", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L1276-L1284
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.isSaveUpdateCascade
protected boolean isSaveUpdateCascade(String cascade) { String[] cascades = cascade.split(","); for (String cascadeProp : cascades) { String trimmedProp = cascadeProp.trim(); if (CASCADE_SAVE_UPDATE.equals(trimmedProp) || CASCADE_ALL.equals(trimmedProp) || CASCADE_ALL_DELETE_OR...
java
protected boolean isSaveUpdateCascade(String cascade) { String[] cascades = cascade.split(","); for (String cascadeProp : cascades) { String trimmedProp = cascadeProp.trim(); if (CASCADE_SAVE_UPDATE.equals(trimmedProp) || CASCADE_ALL.equals(trimmedProp) || CASCADE_ALL_DELETE_OR...
[ "protected", "boolean", "isSaveUpdateCascade", "(", "String", "cascade", ")", "{", "String", "[", "]", "cascades", "=", "cascade", ".", "split", "(", "\",\"", ")", ";", "for", "(", "String", "cascadeProp", ":", "cascades", ")", "{", "String", "trimmedProp", ...
Check if a save-update cascade is defined within the Hibernate cascade properties string. @param cascade The string containing the cascade properties. @return True if save-update or any other cascade property that encompasses those is present.
[ "Check", "if", "a", "save", "-", "update", "cascade", "is", "defined", "within", "the", "Hibernate", "cascade", "properties", "string", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L1291-L1303
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindClass
protected void bindClass(PersistentEntity domainClass, PersistentClass persistentClass, InFlightMetadataCollector mappings) { // set lazy loading for now persistentClass.setLazy(true); final String entityName = domainClass.getName(); persistentClass.setEntityName(entityName); pe...
java
protected void bindClass(PersistentEntity domainClass, PersistentClass persistentClass, InFlightMetadataCollector mappings) { // set lazy loading for now persistentClass.setLazy(true); final String entityName = domainClass.getName(); persistentClass.setEntityName(entityName); pe...
[ "protected", "void", "bindClass", "(", "PersistentEntity", "domainClass", ",", "PersistentClass", "persistentClass", ",", "InFlightMetadataCollector", "mappings", ")", "{", "// set lazy loading for now", "persistentClass", ".", "setLazy", "(", "true", ")", ";", "final", ...
Binds the specified persistant class to the runtime model based on the properties defined in the domain class @param domainClass The Grails domain class @param persistentClass The persistant class @param mappings Existing mappings
[ "Binds", "the", "specified", "persistant", "class", "to", "the", "runtime", "model", "based", "on", "the", "properties", "defined", "in", "the", "domain", "class" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L1341-L1364
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.addMultiTenantFilterIfNecessary
protected void addMultiTenantFilterIfNecessary( HibernatePersistentEntity entity, PersistentClass persistentClass, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { if (entity.isMultiTenant()) { TenantId tenantId = entity.getTenantId(); if (ten...
java
protected void addMultiTenantFilterIfNecessary( HibernatePersistentEntity entity, PersistentClass persistentClass, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { if (entity.isMultiTenant()) { TenantId tenantId = entity.getTenantId(); if (ten...
[ "protected", "void", "addMultiTenantFilterIfNecessary", "(", "HibernatePersistentEntity", "entity", ",", "PersistentClass", "persistentClass", ",", "InFlightMetadataCollector", "mappings", ",", "String", "sessionFactoryBeanName", ")", "{", "if", "(", "entity", ".", "isMulti...
Add a Hibernate filter for multitenancy if the persistent class is multitenant @param entity target persistent entity for get tenant information @param persistentClass persistent class for add the filter and get tenant property info @param mappings mappings to add the filter @param sessionFactoryBeanName the session f...
[ "Add", "a", "Hibernate", "filter", "for", "multitenancy", "if", "the", "persistent", "class", "is", "multitenant" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L1419-L1443
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindSubClasses
protected void bindSubClasses(HibernatePersistentEntity domainClass, PersistentClass parent, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { final java.util.Collection<PersistentEntity> subClasses = domainClass.getMappingContext().getDirectChildEntities(dom...
java
protected void bindSubClasses(HibernatePersistentEntity domainClass, PersistentClass parent, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { final java.util.Collection<PersistentEntity> subClasses = domainClass.getMappingContext().getDirectChildEntities(dom...
[ "protected", "void", "bindSubClasses", "(", "HibernatePersistentEntity", "domainClass", ",", "PersistentClass", "parent", ",", "InFlightMetadataCollector", "mappings", ",", "String", "sessionFactoryBeanName", ")", "{", "final", "java", ".", "util", ".", "Collection", "<...
Binds the sub classes of a root class using table-per-heirarchy inheritance mapping @param domainClass The root domain class to bind @param parent The parent class instance @param mappings The mappings instance @param sessionFactoryBeanName the session factory bean name
[ "Binds", "the", "sub", "classes", "of", "a", "root", "class", "using", "table", "-", "per", "-", "heirarchy", "inheritance", "mapping" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L1453-L1463
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindSubClass
protected void bindSubClass(HibernatePersistentEntity sub, PersistentClass parent, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { evaluateMapping(sub, defaultMapping); Mapping m = getMapping(parent.getMappedClass()); Subclass subClass; ...
java
protected void bindSubClass(HibernatePersistentEntity sub, PersistentClass parent, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { evaluateMapping(sub, defaultMapping); Mapping m = getMapping(parent.getMappedClass()); Subclass subClass; ...
[ "protected", "void", "bindSubClass", "(", "HibernatePersistentEntity", "sub", ",", "PersistentClass", "parent", ",", "InFlightMetadataCollector", "mappings", ",", "String", "sessionFactoryBeanName", ")", "{", "evaluateMapping", "(", "sub", ",", "defaultMapping", ")", ";...
Binds a sub class. @param sub The sub domain class instance @param parent The parent persistent class instance @param mappings The mappings instance @param sessionFactoryBeanName the session factory bean name
[ "Binds", "a", "sub", "class", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L1473-L1537
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindJoinedSubClass
protected void bindJoinedSubClass(HibernatePersistentEntity sub, JoinedSubclass joinedSubclass, InFlightMetadataCollector mappings, Mapping gormMapping, String sessionFactoryBeanName) { bindClass(sub, joinedSubclass, mappings); String schemaName = getSchemaName(map...
java
protected void bindJoinedSubClass(HibernatePersistentEntity sub, JoinedSubclass joinedSubclass, InFlightMetadataCollector mappings, Mapping gormMapping, String sessionFactoryBeanName) { bindClass(sub, joinedSubclass, mappings); String schemaName = getSchemaName(map...
[ "protected", "void", "bindJoinedSubClass", "(", "HibernatePersistentEntity", "sub", ",", "JoinedSubclass", "joinedSubclass", ",", "InFlightMetadataCollector", "mappings", ",", "Mapping", "gormMapping", ",", "String", "sessionFactoryBeanName", ")", "{", "bindClass", "(", "...
Binds a joined sub-class mapping using table-per-subclass @param sub The Grails sub class @param joinedSubclass The Hibernate Subclass object @param mappings The mappings Object @param gormMapping The GORM mapping object @param sessionFactoryBeanName the session factory bean name
[ "Binds", "a", "joined", "sub", "-", "class", "mapping", "using", "table", "-", "per", "-", "subclass" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L1586-L1612
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindSubClass
protected void bindSubClass(HibernatePersistentEntity sub, Subclass subClass, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { bindClass(sub, subClass, mappings); if (LOG.isDebugEnabled()) LOG.debug("Mapping subclass: " + subClass.getEntit...
java
protected void bindSubClass(HibernatePersistentEntity sub, Subclass subClass, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { bindClass(sub, subClass, mappings); if (LOG.isDebugEnabled()) LOG.debug("Mapping subclass: " + subClass.getEntit...
[ "protected", "void", "bindSubClass", "(", "HibernatePersistentEntity", "sub", ",", "Subclass", "subClass", ",", "InFlightMetadataCollector", "mappings", ",", "String", "sessionFactoryBeanName", ")", "{", "bindClass", "(", "sub", ",", "subClass", ",", "mappings", ")", ...
Binds a sub-class using table-per-hierarchy inheritance mapping @param sub The Grails domain class instance representing the sub-class @param subClass The Hibernate SubClass instance @param mappings The mappings instance
[ "Binds", "a", "sub", "-", "class", "using", "table", "-", "per", "-", "hierarchy", "inheritance", "mapping" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L1635-L1645
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindDiscriminatorProperty
protected void bindDiscriminatorProperty(Table table, RootClass entity, InFlightMetadataCollector mappings) { Mapping m = getMapping(entity.getMappedClass()); SimpleValue d = new SimpleValue(metadataBuildingContext, table); entity.setDiscriminator(d); DiscriminatorConfig discriminatorCon...
java
protected void bindDiscriminatorProperty(Table table, RootClass entity, InFlightMetadataCollector mappings) { Mapping m = getMapping(entity.getMappedClass()); SimpleValue d = new SimpleValue(metadataBuildingContext, table); entity.setDiscriminator(d); DiscriminatorConfig discriminatorCon...
[ "protected", "void", "bindDiscriminatorProperty", "(", "Table", "table", ",", "RootClass", "entity", ",", "InFlightMetadataCollector", "mappings", ")", "{", "Mapping", "m", "=", "getMapping", "(", "entity", ".", "getMappedClass", "(", ")", ")", ";", "SimpleValue",...
Creates and binds the discriminator property used in table-per-hierarchy inheritance to discriminate between sub class instances @param table The table to bind onto @param entity The root class entity @param mappings The mappings instance
[ "Creates", "and", "binds", "the", "discriminator", "property", "used", "in", "table", "-", "per", "-", "hierarchy", "inheritance", "to", "discriminate", "between", "sub", "class", "instances" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L1655-L1699
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindComponent
protected void bindComponent(Component component, Embedded property, boolean isNullable, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { component.setEmbedded(true); Class<?> type = property.getType(); String role = qualify(type.getName(), pr...
java
protected void bindComponent(Component component, Embedded property, boolean isNullable, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { component.setEmbedded(true); Class<?> type = property.getType(); String role = qualify(type.getName(), pr...
[ "protected", "void", "bindComponent", "(", "Component", "component", ",", "Embedded", "property", ",", "boolean", "isNullable", ",", "InFlightMetadataCollector", "mappings", ",", "String", "sessionFactoryBeanName", ")", "{", "component", ".", "setEmbedded", "(", "true...
Binds a Hibernate component type using the given GrailsDomainClassProperty instance @param component The component to bind @param property The property @param isNullable Whether it is nullable or not @param mappings The Hibernate Mappings object @param sessionFactoryBeanName the session factory bean name
[ "Binds", "a", "Hibernate", "component", "type", "using", "the", "given", "GrailsDomainClassProperty", "instance" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L2184-L2212
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindManyToOne
@SuppressWarnings("unchecked") protected void bindManyToOne(Association property, ManyToOne manyToOne, String path, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { NamingStrategy namingStrategy = getNamingStrategy(sessionFactoryBeanName); bindM...
java
@SuppressWarnings("unchecked") protected void bindManyToOne(Association property, ManyToOne manyToOne, String path, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { NamingStrategy namingStrategy = getNamingStrategy(sessionFactoryBeanName); bindM...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "void", "bindManyToOne", "(", "Association", "property", ",", "ManyToOne", "manyToOne", ",", "String", "path", ",", "InFlightMetadataCollector", "mappings", ",", "String", "sessionFactoryBeanName", ")", ...
Binds a many-to-one relationship to the
[ "Binds", "a", "many", "-", "to", "-", "one", "relationship", "to", "the" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L2311-L2359
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.calculateForeignKeyColumnCount
private int calculateForeignKeyColumnCount(PersistentEntity refDomainClass, String[] propertyNames) { int expectedForeignKeyColumnLength = 0; for (String propertyName : propertyNames) { PersistentProperty referencedProperty = refDomainClass.getPropertyByName(propertyName); if(ref...
java
private int calculateForeignKeyColumnCount(PersistentEntity refDomainClass, String[] propertyNames) { int expectedForeignKeyColumnLength = 0; for (String propertyName : propertyNames) { PersistentProperty referencedProperty = refDomainClass.getPropertyByName(propertyName); if(ref...
[ "private", "int", "calculateForeignKeyColumnCount", "(", "PersistentEntity", "refDomainClass", ",", "String", "[", "]", "propertyNames", ")", "{", "int", "expectedForeignKeyColumnLength", "=", "0", ";", "for", "(", "String", "propertyName", ":", "propertyNames", ")", ...
number of columns required for a column key we have to perform the calculation here
[ "number", "of", "columns", "required", "for", "a", "column", "key", "we", "have", "to", "perform", "the", "calculation", "here" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L2422-L2441
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindProperty
protected void bindProperty(PersistentProperty grailsProperty, Property prop, InFlightMetadataCollector mappings) { // set the property name prop.setName(grailsProperty.getName()); if (isBidirectionalManyToOneWithListMapping(grailsProperty, prop)) { prop.setInsertable(false); ...
java
protected void bindProperty(PersistentProperty grailsProperty, Property prop, InFlightMetadataCollector mappings) { // set the property name prop.setName(grailsProperty.getName()); if (isBidirectionalManyToOneWithListMapping(grailsProperty, prop)) { prop.setInsertable(false); ...
[ "protected", "void", "bindProperty", "(", "PersistentProperty", "grailsProperty", ",", "Property", "prop", ",", "InFlightMetadataCollector", "mappings", ")", "{", "// set the property name", "prop", ".", "setName", "(", "grailsProperty", ".", "getName", "(", ")", ")",...
Binds a property to Hibernate runtime meta model. Deals with cascade strategy based on the Grails domain model @param grailsProperty The grails property instance @param prop The Hibernate property @param mappings The Hibernate mappings
[ "Binds", "a", "property", "to", "Hibernate", "runtime", "meta", "model", ".", "Deals", "with", "cascade", "strategy", "based", "on", "the", "Grails", "domain", "model" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L2626-L2674
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindSimpleValue
protected void bindSimpleValue(PersistentProperty property, PersistentProperty parentProperty, SimpleValue simpleValue, String path, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { // set type bindSimpleValue(property,parentProperty, simpleValue, p...
java
protected void bindSimpleValue(PersistentProperty property, PersistentProperty parentProperty, SimpleValue simpleValue, String path, InFlightMetadataCollector mappings, String sessionFactoryBeanName) { // set type bindSimpleValue(property,parentProperty, simpleValue, p...
[ "protected", "void", "bindSimpleValue", "(", "PersistentProperty", "property", ",", "PersistentProperty", "parentProperty", ",", "SimpleValue", "simpleValue", ",", "String", "path", ",", "InFlightMetadataCollector", "mappings", ",", "String", "sessionFactoryBeanName", ")", ...
Binds a simple value to the Hibernate metamodel. A simple value is any type within the Hibernate type system @param property @param parentProperty @param simpleValue The simple value to bind @param path @param mappings The Hibernate mappings instance @param sessionFactoryBeanName the session factory bean name
[ "Binds", "a", "simple", "value", "to", "the", "Hibernate", "metamodel", ".", "A", "simple", "value", "is", "any", "type", "within", "the", "Hibernate", "type", "system" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L2806-L2810
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindSimpleValue
protected void bindSimpleValue(String type, SimpleValue simpleValue, boolean nullable, String columnName, InFlightMetadataCollector mappings) { simpleValue.setTypeName(type); Table t = simpleValue.getTable(); Column column = new Column(); column.setNul...
java
protected void bindSimpleValue(String type, SimpleValue simpleValue, boolean nullable, String columnName, InFlightMetadataCollector mappings) { simpleValue.setTypeName(type); Table t = simpleValue.getTable(); Column column = new Column(); column.setNul...
[ "protected", "void", "bindSimpleValue", "(", "String", "type", ",", "SimpleValue", "simpleValue", ",", "boolean", "nullable", ",", "String", "columnName", ",", "InFlightMetadataCollector", "mappings", ")", "{", "simpleValue", ".", "setTypeName", "(", "type", ")", ...
Binds a value for the specified parameters to the meta model. @param type The type of the property @param simpleValue The simple value instance @param nullable Whether it is nullable @param columnName The property name @param mappings The mappings
[ "Binds", "a", "value", "for", "the", "specified", "parameters", "to", "the", "meta", "model", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L2920-L2932
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindStringColumnConstraints
protected void bindStringColumnConstraints(Column column, PersistentProperty constrainedProperty) { final org.grails.datastore.mapping.config.Property mappedForm = constrainedProperty.getMapping().getMappedForm(); Number columnLength = mappedForm.getMaxSize(); List<?> inListValues = mappedForm.g...
java
protected void bindStringColumnConstraints(Column column, PersistentProperty constrainedProperty) { final org.grails.datastore.mapping.config.Property mappedForm = constrainedProperty.getMapping().getMappedForm(); Number columnLength = mappedForm.getMaxSize(); List<?> inListValues = mappedForm.g...
[ "protected", "void", "bindStringColumnConstraints", "(", "Column", "column", ",", "PersistentProperty", "constrainedProperty", ")", "{", "final", "org", ".", "grails", ".", "datastore", ".", "mapping", ".", "config", ".", "Property", "mappedForm", "=", "constrainedP...
Interrogates the specified constraints looking for any constraints that would limit the length of the property's value. If such constraints exist, this method adjusts the length of the column accordingly. @param column the column that corresponds to the property @param constrainedProperty the property's c...
[ "Interrogates", "the", "specified", "constraints", "looking", "for", "any", "constraints", "that", "would", "limit", "the", "length", "of", "the", "property", "s", "value", ".", "If", "such", "constraints", "exist", "this", "method", "adjusts", "the", "length", ...
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L3209-L3218
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.property
public org.grails.datastore.mapping.query.api.ProjectionList property(String propertyName, String alias) { final PropertyProjection propertyProjection = Projections.property(calculatePropertyName(propertyName)); addProjectionToList(propertyProjection, alias); return this; }
java
public org.grails.datastore.mapping.query.api.ProjectionList property(String propertyName, String alias) { final PropertyProjection propertyProjection = Projections.property(calculatePropertyName(propertyName)); addProjectionToList(propertyProjection, alias); return this; }
[ "public", "org", ".", "grails", ".", "datastore", ".", "mapping", ".", "query", ".", "api", ".", "ProjectionList", "property", "(", "String", "propertyName", ",", "String", "alias", ")", "{", "final", "PropertyProjection", "propertyProjection", "=", "Projections...
A projection that selects a property name @param propertyName The name of the property @param alias The alias to use
[ "A", "projection", "that", "selects", "a", "property", "name" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L135-L139
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.addProjectionToList
protected void addProjectionToList(Projection propertyProjection, String alias) { if (alias != null) { projectionList.add(propertyProjection,alias); } else { projectionList.add(propertyProjection); } }
java
protected void addProjectionToList(Projection propertyProjection, String alias) { if (alias != null) { projectionList.add(propertyProjection,alias); } else { projectionList.add(propertyProjection); } }
[ "protected", "void", "addProjectionToList", "(", "Projection", "propertyProjection", ",", "String", "alias", ")", "{", "if", "(", "alias", "!=", "null", ")", "{", "projectionList", ".", "add", "(", "propertyProjection", ",", "alias", ")", ";", "}", "else", "...
Adds a projection to the projectList for the given alias @param propertyProjection The projection @param alias The alias
[ "Adds", "a", "projection", "to", "the", "projectList", "for", "the", "given", "alias" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L147-L154
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.distinct
public org.grails.datastore.mapping.query.api.ProjectionList distinct(String propertyName, String alias) { final Projection proj = Projections.distinct(Projections.property(calculatePropertyName(propertyName))); addProjectionToList(proj,alias); return this; }
java
public org.grails.datastore.mapping.query.api.ProjectionList distinct(String propertyName, String alias) { final Projection proj = Projections.distinct(Projections.property(calculatePropertyName(propertyName))); addProjectionToList(proj,alias); return this; }
[ "public", "org", ".", "grails", ".", "datastore", ".", "mapping", ".", "query", ".", "api", ".", "ProjectionList", "distinct", "(", "String", "propertyName", ",", "String", "alias", ")", "{", "final", "Projection", "proj", "=", "Projections", ".", "distinct"...
A projection that selects a distince property name @param propertyName The property name @param alias The alias to use
[ "A", "projection", "that", "selects", "a", "distince", "property", "name" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L204-L208
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.join
public BuildableCriteria join(String associationPath) { criteria.setFetchMode(calculatePropertyName(associationPath), FetchMode.JOIN); return this; }
java
public BuildableCriteria join(String associationPath) { criteria.setFetchMode(calculatePropertyName(associationPath), FetchMode.JOIN); return this; }
[ "public", "BuildableCriteria", "join", "(", "String", "associationPath", ")", "{", "criteria", ".", "setFetchMode", "(", "calculatePropertyName", "(", "associationPath", ")", ",", "FetchMode", ".", "JOIN", ")", ";", "return", "this", ";", "}" ]
Use a join query @param associationPath The path of the association
[ "Use", "a", "join", "query" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L263-L266
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.lock
public void lock(boolean shouldLock) { String lastAlias = getLastAlias(); if (shouldLock) { if (lastAlias != null) { criteria.setLockMode(lastAlias, LockMode.PESSIMISTIC_WRITE); } else { criteria.setLockMode(LockMode.PESSIMISTIC_WRITE)...
java
public void lock(boolean shouldLock) { String lastAlias = getLastAlias(); if (shouldLock) { if (lastAlias != null) { criteria.setLockMode(lastAlias, LockMode.PESSIMISTIC_WRITE); } else { criteria.setLockMode(LockMode.PESSIMISTIC_WRITE)...
[ "public", "void", "lock", "(", "boolean", "shouldLock", ")", "{", "String", "lastAlias", "=", "getLastAlias", "(", ")", ";", "if", "(", "shouldLock", ")", "{", "if", "(", "lastAlias", "!=", "null", ")", "{", "criteria", ".", "setLockMode", "(", "lastAlia...
Whether a pessimistic lock should be obtained. @param shouldLock True if it should
[ "Whether", "a", "pessimistic", "lock", "should", "be", "obtained", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L280-L299
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.select
public BuildableCriteria select(String associationPath) { criteria.setFetchMode(calculatePropertyName(associationPath), FetchMode.SELECT); return this; }
java
public BuildableCriteria select(String associationPath) { criteria.setFetchMode(calculatePropertyName(associationPath), FetchMode.SELECT); return this; }
[ "public", "BuildableCriteria", "select", "(", "String", "associationPath", ")", "{", "criteria", ".", "setFetchMode", "(", "calculatePropertyName", "(", "associationPath", ")", ",", "FetchMode", ".", "SELECT", ")", ";", "return", "this", ";", "}" ]
Use a select query @param associationPath The path of the association
[ "Use", "a", "select", "query" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L306-L309
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.calculatePropertyName
protected String calculatePropertyName(String propertyName) { String lastAlias = getLastAlias(); if (lastAlias != null) { return lastAlias +'.'+propertyName; } return propertyName; }
java
protected String calculatePropertyName(String propertyName) { String lastAlias = getLastAlias(); if (lastAlias != null) { return lastAlias +'.'+propertyName; } return propertyName; }
[ "protected", "String", "calculatePropertyName", "(", "String", "propertyName", ")", "{", "String", "lastAlias", "=", "getLastAlias", "(", ")", ";", "if", "(", "lastAlias", "!=", "null", ")", "{", "return", "lastAlias", "+", "'", "'", "+", "propertyName", ";"...
Calculates the property name including any alias paths @param propertyName The property name @return The calculated property name
[ "Calculates", "the", "property", "name", "including", "any", "alias", "paths" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L335-L342
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.calculatePropertyValue
@SuppressWarnings({ "rawtypes", "unchecked" }) protected Object calculatePropertyValue(Object propertyValue) { if (propertyValue instanceof CharSequence) { return propertyValue.toString(); } if (propertyValue instanceof QueryableCriteria) { propertyValue = convertToHi...
java
@SuppressWarnings({ "rawtypes", "unchecked" }) protected Object calculatePropertyValue(Object propertyValue) { if (propertyValue instanceof CharSequence) { return propertyValue.toString(); } if (propertyValue instanceof QueryableCriteria) { propertyValue = convertToHi...
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "protected", "Object", "calculatePropertyValue", "(", "Object", "propertyValue", ")", "{", "if", "(", "propertyValue", "instanceof", "CharSequence", ")", "{", "return", "propertyValue...
Calculates the property value, converting GStrings if necessary @param propertyValue The property value @return The calculated property value
[ "Calculates", "the", "property", "value", "converting", "GStrings", "if", "necessary" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L361-L374
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.count
public void count(String propertyName, String alias) { final CountProjection proj = Projections.count(calculatePropertyName(propertyName)); addProjectionToList(proj, alias); }
java
public void count(String propertyName, String alias) { final CountProjection proj = Projections.count(calculatePropertyName(propertyName)); addProjectionToList(proj, alias); }
[ "public", "void", "count", "(", "String", "propertyName", ",", "String", "alias", ")", "{", "final", "CountProjection", "proj", "=", "Projections", ".", "count", "(", "calculatePropertyName", "(", "propertyName", ")", ")", ";", "addProjectionToList", "(", "proj"...
Adds a projection that allows the criteria to return the property count @param propertyName The name of the property @param alias The alias to use
[ "Adds", "a", "projection", "that", "allows", "the", "criteria", "to", "return", "the", "property", "count" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L393-L396
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.groupProperty
public org.grails.datastore.mapping.query.api.ProjectionList groupProperty(String propertyName, String alias) { final PropertyProjection proj = Projections.groupProperty(calculatePropertyName(propertyName)); addProjectionToList(proj, alias); return this; }
java
public org.grails.datastore.mapping.query.api.ProjectionList groupProperty(String propertyName, String alias) { final PropertyProjection proj = Projections.groupProperty(calculatePropertyName(propertyName)); addProjectionToList(proj, alias); return this; }
[ "public", "org", ".", "grails", ".", "datastore", ".", "mapping", ".", "query", ".", "api", ".", "ProjectionList", "groupProperty", "(", "String", "propertyName", ",", "String", "alias", ")", "{", "final", "PropertyProjection", "proj", "=", "Projections", ".",...
Adds a projection that allows the criteria's result to be grouped by a property @param propertyName The name of the property @param alias The alias to use
[ "Adds", "a", "projection", "that", "allows", "the", "criteria", "s", "result", "to", "be", "grouped", "by", "a", "property" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L451-L455
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.min
public org.grails.datastore.mapping.query.api.ProjectionList min(String propertyName, String alias) { final AggregateProjection aggregateProjection = Projections.min(calculatePropertyName(propertyName)); addProjectionToList(aggregateProjection, alias); return this; }
java
public org.grails.datastore.mapping.query.api.ProjectionList min(String propertyName, String alias) { final AggregateProjection aggregateProjection = Projections.min(calculatePropertyName(propertyName)); addProjectionToList(aggregateProjection, alias); return this; }
[ "public", "org", ".", "grails", ".", "datastore", ".", "mapping", ".", "query", ".", "api", ".", "ProjectionList", "min", "(", "String", "propertyName", ",", "String", "alias", ")", "{", "final", "AggregateProjection", "aggregateProjection", "=", "Projections", ...
Adds a projection that allows the criteria to retrieve a minimum property value @param alias The alias to use
[ "Adds", "a", "projection", "that", "allows", "the", "criteria", "to", "retrieve", "a", "minimum", "property", "value" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L492-L496
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.sum
public org.grails.datastore.mapping.query.api.ProjectionList sum(String propertyName, String alias) { final AggregateProjection proj = Projections.sum(calculatePropertyName(propertyName)); addProjectionToList(proj, alias); return this; }
java
public org.grails.datastore.mapping.query.api.ProjectionList sum(String propertyName, String alias) { final AggregateProjection proj = Projections.sum(calculatePropertyName(propertyName)); addProjectionToList(proj, alias); return this; }
[ "public", "org", ".", "grails", ".", "datastore", ".", "mapping", ".", "query", ".", "api", ".", "ProjectionList", "sum", "(", "String", "propertyName", ",", "String", "alias", ")", "{", "final", "AggregateProjection", "proj", "=", "Projections", ".", "sum",...
Adds a projection that allows the criteria to retrieve the sum of the results of a property @param propertyName The name of the property @param alias The alias to use
[ "Adds", "a", "projection", "that", "allows", "the", "criteria", "to", "retrieve", "the", "sum", "of", "the", "results", "of", "a", "property" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L532-L536
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.fetchMode
public void fetchMode(String associationPath, FetchMode fetchMode) { if (criteria != null) { criteria.setFetchMode(associationPath, fetchMode); } }
java
public void fetchMode(String associationPath, FetchMode fetchMode) { if (criteria != null) { criteria.setFetchMode(associationPath, fetchMode); } }
[ "public", "void", "fetchMode", "(", "String", "associationPath", ",", "FetchMode", "fetchMode", ")", "{", "if", "(", "criteria", "!=", "null", ")", "{", "criteria", ".", "setFetchMode", "(", "associationPath", ",", "fetchMode", ")", ";", "}", "}" ]
Sets the fetch mode of an associated path @param associationPath The name of the associated path @param fetchMode The fetch mode to set
[ "Sets", "the", "fetch", "mode", "of", "an", "associated", "path" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L544-L548
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.createAlias
public Criteria createAlias(String associationPath, String alias) { return criteria.createAlias(associationPath, alias); }
java
public Criteria createAlias(String associationPath, String alias) { return criteria.createAlias(associationPath, alias); }
[ "public", "Criteria", "createAlias", "(", "String", "associationPath", ",", "String", "alias", ")", "{", "return", "criteria", ".", "createAlias", "(", "associationPath", ",", "alias", ")", ";", "}" ]
Join an association, assigning an alias to the joined association. Functionally equivalent to createAlias(String, String, int) using CriteriaSpecificationINNER_JOIN for the joinType. @param associationPath A dot-seperated property path @param alias The alias to assign to the joined association (for later reference). ...
[ "Join", "an", "association", "assigning", "an", "alias", "to", "the", "joined", "association", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L574-L576
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.geProperty
public org.grails.datastore.mapping.query.api.Criteria geProperty(String propertyName, String otherPropertyName) { if (!validateSimpleExpression()) { throwRuntimeException(new IllegalArgumentException("Call to [geProperty] with propertyName [" + propertyName + "] and other proper...
java
public org.grails.datastore.mapping.query.api.Criteria geProperty(String propertyName, String otherPropertyName) { if (!validateSimpleExpression()) { throwRuntimeException(new IllegalArgumentException("Call to [geProperty] with propertyName [" + propertyName + "] and other proper...
[ "public", "org", ".", "grails", ".", "datastore", ".", "mapping", ".", "query", ".", "api", ".", "Criteria", "geProperty", "(", "String", "propertyName", ",", "String", "otherPropertyName", ")", "{", "if", "(", "!", "validateSimpleExpression", "(", ")", ")",...
Creates a Criterion that tests if the first property is greater than or equal to the second property @param propertyName The first property name @param otherPropertyName The second property name @return A Criterion instance
[ "Creates", "a", "Criterion", "that", "tests", "if", "the", "first", "property", "is", "greater", "than", "or", "equal", "to", "the", "second", "property" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L639-L649
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.le
public org.grails.datastore.mapping.query.api.Criteria le(String propertyName, Object propertyValue) { if (!validateSimpleExpression()) { throwRuntimeException(new IllegalArgumentException("Call to [le] with propertyName [" + propertyName + "] and value [" + propertyValue + "] no...
java
public org.grails.datastore.mapping.query.api.Criteria le(String propertyName, Object propertyValue) { if (!validateSimpleExpression()) { throwRuntimeException(new IllegalArgumentException("Call to [le] with propertyName [" + propertyName + "] and value [" + propertyValue + "] no...
[ "public", "org", ".", "grails", ".", "datastore", ".", "mapping", ".", "query", ".", "api", ".", "Criteria", "le", "(", "String", "propertyName", ",", "Object", "propertyValue", ")", "{", "if", "(", "!", "validateSimpleExpression", "(", ")", ")", "{", "t...
Creates a "less than or equal to" Criterion based on the specified property name and value @param propertyName The property name @param propertyValue The property value @return A Criterion instance
[ "Creates", "a", "less", "than", "or", "equal", "to", "Criterion", "based", "on", "the", "specified", "property", "name", "and", "value" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L986-L1003
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.inList
@SuppressWarnings("rawtypes") public org.grails.datastore.mapping.query.api.Criteria inList(String propertyName, Collection values) { return in(propertyName, values); }
java
@SuppressWarnings("rawtypes") public org.grails.datastore.mapping.query.api.Criteria inList(String propertyName, Collection values) { return in(propertyName, values); }
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "org", ".", "grails", ".", "datastore", ".", "mapping", ".", "query", ".", "api", ".", "Criteria", "inList", "(", "String", "propertyName", ",", "Collection", "values", ")", "{", "return", "in", ...
Delegates to in as in is a Groovy keyword
[ "Delegates", "to", "in", "as", "in", "is", "a", "Groovy", "keyword" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L1264-L1267
train
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.order
public org.grails.datastore.mapping.query.api.Criteria order(String propertyName, String direction) { if (criteria == null) { throwRuntimeException(new IllegalArgumentException("Call to [order] with propertyName [" + propertyName + "]not allowed here.")); } proper...
java
public org.grails.datastore.mapping.query.api.Criteria order(String propertyName, String direction) { if (criteria == null) { throwRuntimeException(new IllegalArgumentException("Call to [order] with propertyName [" + propertyName + "]not allowed here.")); } proper...
[ "public", "org", ".", "grails", ".", "datastore", ".", "mapping", ".", "query", ".", "api", ".", "Criteria", "order", "(", "String", "propertyName", ",", "String", "direction", ")", "{", "if", "(", "criteria", "==", "null", ")", "{", "throwRuntimeException...
Orders by the specified property name and direction @param propertyName The property name to order by @param direction Either "asc" for ascending or "desc" for descending @return A Order instance
[ "Orders", "by", "the", "specified", "property", "name", "and", "direction" ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L1384-L1404
train