query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
/ / / / / / / /
private String filterText(Player player, String txt) /* */ { /* 76 */ if (this.settings.enabled) /* */ { /* 78 */ Chatter chatter = ChatterHandler.getChatter(player.getUniqueId()); /* 79 */ String filteredTxt = this.plugin.getFilterHandler().execute(player, txt); /* */ /* 81 */ if (filteredTxt != null) /* */ { /* */ /* 84 */ chatter.addMessage(new ChatMessage(filteredTxt)); /* */ /* 86 */ return filteredTxt; /* */ } /* */ /* 89 */ return null; /* */ } /* */ /* */ /* 93 */ return txt; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void divide() {\n\t\t\n\t}", "private int rightChild(int i){return 2*i+2;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public abstract void bepaalGrootte();", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "double passer();", "public String ring();", "public void gored() {\n\t\t\n\t}", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "int getWidth() {return width;}", "public String toString(){ return \"DIV\";}", "public abstract String division();", "public void getTile_B8();", "public double getWidth() {\n return this.size * 2.0; \n }", "public Integer getWidth(){return this.width;}", "int width();", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "@Override\n public void bfs() {\n\n }", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "double volume(){\n return width*height*depth;\n }", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "@Override\npublic void processDirection() {\n\t\n}", "Operations operations();", "public double getWidth() { return _width<0? -_width : _width; }", "public int generateRoshambo(){\n ;]\n\n }", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "static void pyramid(){\n\t}", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "public void SubRect(){\n\t\n}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "void sharpen();", "void sharpen();", "void mo33732Px();", "void walk() {\n\t\t\n\t}", "public void skystonePos4() {\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "public double getPerimiter(){return (2*height +2*width);}", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "double getNewWidth();", "Parallelogram(){\n length = width = height = 0;\n }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "long getWidth();", "public int getWidth() {\r\n\treturn this.width;\r\n}", "double getPerimeter(){\n return 2*height+width;\n }", "public int getEdgeCount() \n {\n return 3;\n }", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public void stg() {\n\n\t}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "double seBlesser();", "public void leerPlanesDietas();", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public int my_leaf_count();", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "public String getRing();", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "public int getWidth(){\n return width;\n }", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "private int get_left_child(int index){\r\n return 2 * index + 1;\r\n }", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "protected int parent(int i) { return (i - 1) / 2; }", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "private int get_parent(int index){\r\n return (index-1)/2;\r\n }", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "protected int getWidth()\n\t{\n\t\treturn 0;\n\t}", "static int getNumPatterns() { return 64; }", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "public abstract double getBaseWidth();", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public int upright();", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Override\n public String toString()\n {\n\treturn getClass().getSimpleName() + \" (\" + getLength() + \"x\" + getWidth() + \")\";\n }", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "public int getDireccion(Pixel p) {\r\n\t\tif (x == p.x && y < p.y)\r\n\t\t\treturn DIR_N;\r\n\t\tif (x > p.x && y < p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_NE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_NE;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_E;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_N;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x < p.x && y < p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_NO;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_NO;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_O;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_N;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x == p.x && y > p.y)\r\n\t\t\treturn DIR_S;\r\n\t\tif (x > p.x && y > p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_SE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_SE;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_E;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_S;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x < p.x && y > p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_SO;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_SO;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_O;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_S;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x > p.x && y == p.y)\r\n\t\t\treturn DIR_E;\r\n\t\tif (x < p.x && y == p.y)\r\n\t\t\treturn DIR_O;\r\n\t\treturn -1;\r\n\t}", "void block(Directions dir);", "@Override\r\n public void draw()\r\n {\n\r\n }", "int getWidth1();", "@Override\n\tpublic float getWidth() {\n\t\treturn 26;\n\t}", "int expand();", "int getR();", "private int right(int parent) {\n\t\treturn parent*2+2;\n\t}", "public void snare();" ]
[ "0.55049527", "0.54132545", "0.5298104", "0.52380925", "0.52058434", "0.5148157", "0.5101382", "0.507637", "0.50369906", "0.5031998", "0.5009869", "0.49817902", "0.4981198", "0.4978498", "0.49735028", "0.49626762", "0.4937221", "0.492919", "0.49037388", "0.48935315", "0.4878925", "0.48603266", "0.48546374", "0.48474872", "0.48440295", "0.48437494", "0.48404217", "0.48289716", "0.48272792", "0.4821976", "0.48184958", "0.4803486", "0.48024514", "0.48019546", "0.48010612", "0.47979236", "0.4796159", "0.47899675", "0.47899008", "0.47898105", "0.47898105", "0.4779357", "0.47784406", "0.47748962", "0.47726098", "0.47666183", "0.47663304", "0.47662857", "0.47644624", "0.4759417", "0.4758728", "0.47568414", "0.47494224", "0.47483176", "0.47481185", "0.4741822", "0.4741359", "0.4739998", "0.4733422", "0.4733422", "0.47304484", "0.47281104", "0.4724607", "0.4721184", "0.4720441", "0.471938", "0.4711545", "0.4710926", "0.47099394", "0.4709627", "0.47074342", "0.47063792", "0.46962094", "0.4692173", "0.46898013", "0.46896878", "0.46893874", "0.4689199", "0.46865323", "0.46843717", "0.46749675", "0.4673216", "0.46721715", "0.46685347", "0.46652782", "0.4664887", "0.4662483", "0.4657706", "0.46539602", "0.46514836", "0.46471143", "0.4646346", "0.46434107", "0.46423686", "0.46415353", "0.46410298", "0.46406373", "0.46389073", "0.4637081", "0.4631085", "0.4629557" ]
0.0
-1
/ call by using but could be invoked by any name
public static void main(String[] args) { HttpConnector connector = new HttpConnector(); Wrapper wrapper = new SimpleWrapper(); wrapper.setServletClass("ModernServlet"); Loader loader = new SimpleLoader(); Valve valve1 = new HeaderLoggerValve(); Valve valve2 = new ClientIPLoggerValve();// 在这里显示IP wrapper.setLoader(loader); ((Pipeline) wrapper).addValve(valve1); ((Pipeline) wrapper).addValve(valve2); connector.setContainer(wrapper); try { connector.initialize(); connector.start(); // make the application wait until we press a key. System.in.read(); } catch (Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void use();", "public void use()\n\t{\n\t}", "public abstract String use();", "public Object invoke(String name, Object... args) throws Exception;", "void call();", "Object invoke(Object reqest) throws IOException, ClassNotFoundException,\n InvocationTargetException, IllegalAccessException, IllegalArgumentException;", "public void callit();", "@Override\n\tpublic void call() {\n\t\t\n\t}", "public abstract void call();", "public void use(Context context)\n {\n useImplementation.use(context);\n }", "public void reuse() {}", "abstract protected Object invoke0 (Object obj, Object[] args);", "public interface IUseCase {\n\n void execute();\n}", "private AliasAction() {\n\n\t}", "@Override\r\n\tpublic void call(String value) {\n\t\t\r\n\t}", "public void makeCall() {\n\n }", "public S<T> callFun(String name){\n\t\t\n\t\tClass<? extends Activity> aClass = activity.getClass();\n\t\ttry {\n\t\t\tjava.lang.reflect.Method method = aClass.getMethod(name, new Class[]{});\n\t\t\tmethod.invoke(activity,new Object[] {});\n\t\t\t\n\t\t} catch (NoSuchMethodException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn this;\n\t}", "void callMethod(Object obj, String name, Object... args)\n throws ScriptRunnerException;", "void callMethod(String name, Object... args)\n throws ScriptRunnerException;", "public interface Callable {\n void call(String name, String telNumber);\n}", "Call mo35727a(Request request);", "private void sub() {\n\n\t}", "Result invoke(Invoker<?> invoker, Invocation invocation);", "default void beforeUse() {\n\t}", "public void registerInvocation(Invocation inv) {\r\n\t\tif(inv == null) return;\r\n\t\t//If it is already used we were already here\r\n\t\tboolean alreadyChecked = inv.isUsed();\r\n\t\t\r\n\t\t//The invocation is used indeed\r\n\t\tinv.use();\r\n\t\t\r\n\t\tAbstractFunction invocationTarget = inv.getWhichFunction();\r\n\t\t\r\n\t\t//XPilot: invocationTarget is null for default constructors\r\n\t\tif(invocationTarget == null) return;\r\n\t\t\r\n\t\tif(!alreadyChecked&&invocationTarget.getScope().getInclusionType() != AndromedaFileInfo.TYPE_NATIVE) {\r\n\t\t\t//Only check it if it is no function defined in blizzard's libs\r\n\t\t\tinvocationTarget.getDefinition().accept(parent);\r\n\t\t}\r\n\r\n\t\t//Check if we can inline this function call\r\n\t\tint inlineType = InlineDecider.decide(inv);\r\n\t\tif(inlineType != InlineDecider.INLINE_NO) {\r\n\t\t\tinvocationTarget.addInline();\r\n\t\t\tthrow new Error(\"inline not yet supported.\");\r\n\t\t} else {\r\n\t\t\tinvocationTarget.addInvocation();\r\n\t\t\t//visit(invocationTarget);\r\n\t\t}\r\n\t}", "void run(String name, int v);", "private void method(String name) {\n app.method(name);\n }", "public void perform(Object o, String prepUsed, Engine t) {\n\t\ttry {\n\t\t\tmyFunc2.accept(o, t);\n\t\t} catch (Exception e) {\n\t\t\t/*Terminal.println(\"You cannot \" + synonyms.get(0) + (prepUsed.isEmpty() ? \" the \" : prepUsed + \" \")\n\t\t\t\t\t+ o.accessor + \".\");*/\n\t\t\tmyError2.accept(o, t);\n\t\t}\n\t}", "default Object callMe(Object injector, Annotation[] ans)\n\t{\n\t\tfor(Annotation a : ans)\n\t\t\tif(a instanceof CallMe)\n\t\t\t\treturn this.callMe(injector, (CallMe) a);\n\n\t\treturn null;\n\t}", "K invoke(Map<String, Method> methods, T object);", "default void interactWith(Lever lever) {\n\t}", "static void perform_call(String passed){\n\t\tint type = type_of_call(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tcall_without_condition(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "FunctionCall getFc();", "@Override\n\tpublic void invoke(String origin, boolean allow, boolean remember) {\n\t\t\n\t}", "public Object call(Context cx, Scriptable scope, Scriptable thisObj,\n Object[] args);", "public void use(Player player) {\n\n\t}", "public abstract void doInvoke(InvocationContext ic) throws Exception;", "<T> T runWithContext(String applicationName, Callable<T> callable, Locale locale) throws Exception;", "@Override\n\tpublic String onCall(String name, String user, String[] args) {\n\t\t// Does the object macro exist?\n\t\tObjectMacro macro = this.handlers.get(name);\n\t\tif (macro == null) {\n\t\t\treturn \"[ERR: Object Not Found]\";\n\t\t}\n\n\t\t// Call it!\n\t\treturn macro.call(this.parent, args);\n\t}", "@Override\n\tpublic void randomMethod(String name) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tThisoperator op = new Thisoperator();\n\t\top.localmethod();\n\t\t\n\n\t}", "Reuse getReuse();", "private void test() {\n\n\t}", "protected abstract boolean invokable(Resource r);", "@Override\n public void doExeception(Map<String, Object> args)\n {\n \n }", "@Override\n public void doExeception(Map<String, Object> args)\n {\n \n }", "public abstract Object invoke(T target , Method method , Object[] args) throws Throwable;", "public Object call(Object[] args) {\r\n return invoke(args);\r\n }", "public interface ApiMixer {\n Object execute(Object[] parameters);\n}", "public Call_simple() {\n }", "public void invoke(Context context) throws ChainException;", "protected abstract String invoke(HttpServletRequest request) throws DriverException, WorkflowException;", "protected void onFirstUse() {}", "protected Object invoke(String name,Object... pParams) {\n\t\ttry {\n\t\t\tif (pParams != null) {\n\t\t\t\tMethod m =activity.getClass().getDeclaredMethod(name, pParams.getClass());\n\t\t\t\tObject res = m.invoke(activity, new Object[]{pParams});\n\t\t\t\treturn res;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMethod m =activity.getClass().getDeclaredMethod(name);\n\t\t\t\tObject res = m.invoke(activity);\n\t\t\t\treturn res;\n\t\t\t}\n\t\t} catch (NoSuchMethodException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (InvocationTargetException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "private void kk12() {\n\n\t}", "private stendhal() {\n\t}", "FunCall createFunCall();", "@Override\n\tpublic void calling() {\n\t\tSystem.out.println(\"Calling using JIO...\");\n\t}", "@Override\n\tpublic void use() {\n\t\tSystem.out.println(\"체력회복!\");\n\t}", "public static void main(String[] args) {\n\t\tMovable m = MyClass::aMethod;\n\t\tm.move();\n\t\t//instance method reference on specific object\n\t\tYourClass y = new YourClass();\n\t\tm = y::yourMethod;\n\t\tm.move();\n\t\t// instance method reference on arbitrary object\n\t\tStringMerger sm = String::concat;\n\t\tSystem.out.println(sm.merge(\"Hello\", \" World\"));\n\t\t//constructor reference\n\t\tMessaging mg = Message::new;\n\t\tMessage ob = mg.getInstance(\"abc\");\n\t\tSystem.out.println(ob.getMsg());\n\t}", "public interface IMazePathFinder extends Callable<OutputBundle> {\n\n}", "private static void oneUserExample()\t{\n\t}", "private test5() {\r\n\t\r\n\t}", "public void Execute() {\n\n }", "protected Doodler() {\n\t}", "public void callManager() throws IOException {\n\n\n }", "private ChainingMethods() {\n // private constructor\n\n }", "public interface RequestExecute {\n\n public String execute(Object... args) throws Exception;\n\n}", "public void call(T arg);", "public Object invoke(String name, Object[] arguments, String[] types) throws Exception {\n return null;\n }", "void setCaller(String caller);", "@Override\n\tpublic void function() {\n\t\t\n\t}", "default void doProcessor(URLBuilder builder, APIResult result){}", "<T> T callMethod(Object obj, String name, Class<T> resultType, Object... args)\n throws ScriptRunnerException;", "public ObjectType callMethod(String methodName, ObjectType... args) {\n\t\t// getting the member\n\t\tObjectType member = getProperty(methodName);\n\t\t//check if exists\n\t\tif (member.isUndefined())\n\t\t\t//call hosted one instead if not exist\n\t\t\treturn callHostedMethod(\"_\", methodName, args);\n\t\t\n\t\t//calling the function\n\t\treturn member.invoke(this, args);\n\t}", "public abstract String run(String args);", "void call(Person obj);", "protected void execute() {}", "@Test public void singletonResolutionInFunctions() {\n fail( \"Not yet implemented\" );\n }", "T call( @Nonnull final Object... args );", "public void act();", "static void libCall(Token t, String s) {\n\topCode.put(t, \"invokestatic sal/Library/\"+s.replace(\"~\",\"Ljava.lang.String;\"));\n}", "public void startMethod (Symbol methodName, java.lang.Object[] args) throws G2AccessException;", "public Object invoke( Object[] args )\n {\n return invokeFromBytecode(args);\n }", "public static void thisDemo() {\n\t}", "String runAlgo(THost host, String classname, String param);", "public void dispatch();", "V call() throws StatusRuntimeException;", "public void doSomething(Object str){\n System.out.println(\"Base impl:\"+str);\n }", "default void interactWith(Apple apple) {\n\t}", "public abstract String usage();", "@ReflectiveMethod(name = \"t_\", types = {})\n public void t_(){\n NMSWrapper.getInstance().exec(nmsObject);\n }", "protected Alias() {\n }", "public void calling(){ // when the abstract method is implemented in other class 'public' keyword is used..\r\n System.out.println(\"I am calling...\");\r\n }", "@CalledBy({\n \"kz.edu.nu.monitored_test.Main#main\"\n })\n void test2() {\n\n }", "public static void main(String[] args) {\n\t\t\tCC c=new CC();\r\n\t\t\tc.callme();\r\n\t\t\tc.callmetoo();\r\n\t\t\t\r\n\t\t\t\r\n}", "public void callmetoo(){\r\n\tSystem.out.println(\"This is a concrete method\");\r\n\t}", "protected abstract Object invokeInContext(MethodInvocation paramMethodInvocation)\r\n/* 111: */ throws Throwable;", "public void apply();", "public void apply();", "public void apply();" ]
[ "0.70564383", "0.6982834", "0.6584325", "0.6338758", "0.6090485", "0.60328746", "0.59118646", "0.5910765", "0.5760628", "0.5731739", "0.5668127", "0.5427356", "0.5394961", "0.5366944", "0.5350349", "0.5333052", "0.53315735", "0.5268805", "0.5246071", "0.52308804", "0.5217508", "0.52107304", "0.52101505", "0.519327", "0.51831686", "0.51754713", "0.517463", "0.5160196", "0.51559037", "0.5152677", "0.51493096", "0.51266086", "0.5123959", "0.51039875", "0.5091984", "0.5088414", "0.50730664", "0.5068593", "0.5068239", "0.5065585", "0.50636774", "0.5058839", "0.5057818", "0.5052086", "0.5048205", "0.5048205", "0.5043021", "0.50420564", "0.50416267", "0.5040439", "0.5038474", "0.5034885", "0.5017951", "0.5015398", "0.5012278", "0.5009424", "0.500624", "0.5005566", "0.4996273", "0.49895787", "0.49880794", "0.49804676", "0.49736115", "0.49725577", "0.49708518", "0.49678156", "0.4958534", "0.49550378", "0.49546584", "0.49536115", "0.49525943", "0.4952217", "0.49515897", "0.4950498", "0.49482533", "0.49419126", "0.49402973", "0.49384308", "0.4930335", "0.49287087", "0.49267024", "0.4926126", "0.4924374", "0.4921919", "0.49202982", "0.49180412", "0.491312", "0.49094513", "0.49087122", "0.49062455", "0.49057016", "0.49024296", "0.489658", "0.48962936", "0.48936963", "0.48928285", "0.48915353", "0.48902008", "0.4887866", "0.4887866", "0.4887866" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate( R.layout.fragment_more, container, false ); unbinder = ButterKnife.bind( this, view ); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n\n view = inflater.inflate(LAYOUT, container, false);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }" ]
[ "0.673917", "0.67246467", "0.67207617", "0.66973495", "0.66911536", "0.6687934", "0.6687156", "0.6684066", "0.6676597", "0.6674479", "0.66666025", "0.666631", "0.6664046", "0.66606456", "0.6653267", "0.6648499", "0.6642142", "0.66378975", "0.6636604", "0.66333616", "0.6624909", "0.661926", "0.66171587", "0.66083974", "0.65965307", "0.6592555", "0.65846574", "0.65842414", "0.657273", "0.65713966", "0.65692973", "0.65688044", "0.65673363", "0.65673256", "0.6565135", "0.65532607", "0.65525806", "0.6544364", "0.6543796", "0.6541405", "0.6538898", "0.6535756", "0.6535738", "0.6535218", "0.6532747", "0.6532247", "0.6531757", "0.65281403", "0.6528012", "0.6525453", "0.6523987", "0.65235907", "0.6523111", "0.6522982", "0.6517837", "0.65123457", "0.651226", "0.65114546", "0.6511261", "0.6510387", "0.65097845", "0.65093553", "0.6508582", "0.65084016", "0.6508325", "0.6502612", "0.6501131", "0.65006375", "0.65004766", "0.64977044", "0.6493013", "0.64909226", "0.64903146", "0.64884", "0.6487079", "0.64867455", "0.6486657", "0.64865863", "0.6485584", "0.64838946", "0.64833415", "0.6481576", "0.64814043", "0.6481035", "0.64801836", "0.6479892", "0.6477297", "0.647679", "0.6475934", "0.6474023", "0.64736354", "0.6470897", "0.64704853", "0.64699966", "0.6469823", "0.64659214", "0.64654046", "0.6462473", "0.6461842", "0.6461607", "0.6460939" ]
0.0
-1
Created by jiangzhe on 2018/9/29.
public interface OnShareListener { void onShare(int scene); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n void init() {\n }", "public void mo38117a() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private void init() {\n\n\t}", "public void mo4359a() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private void kk12() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void init() {}", "private void strin() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo6081a() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public void gored() {\n\t\t\n\t}", "Petunia() {\r\n\t\t}", "@Override\n public void initialize() { \n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n public void initialize() {\n \n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public Pitonyak_09_02() {\r\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private void init() {\n\n\n\n }", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private UsineJoueur() {}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}" ]
[ "0.60971636", "0.60578525", "0.581831", "0.581831", "0.579913", "0.5797723", "0.5728978", "0.56911594", "0.56888247", "0.5660424", "0.5621279", "0.56161034", "0.5615755", "0.56100804", "0.56053627", "0.5576269", "0.5574073", "0.5567871", "0.55528444", "0.55498946", "0.55375665", "0.55323553", "0.5531164", "0.5530858", "0.5522952", "0.5513231", "0.550495", "0.5498369", "0.5498369", "0.5498369", "0.5498369", "0.5498369", "0.5498369", "0.5493196", "0.5481414", "0.5481414", "0.5481414", "0.5481414", "0.5481414", "0.5474816", "0.5469901", "0.54636204", "0.54564697", "0.54500455", "0.5443447", "0.544215", "0.54365146", "0.54365146", "0.5426025", "0.5412941", "0.5410143", "0.5410143", "0.54098094", "0.54098094", "0.54098094", "0.5406315", "0.54061085", "0.5397862", "0.53916407", "0.53916407", "0.53916407", "0.53916407", "0.53916407", "0.53916407", "0.53916407", "0.53890187", "0.5385431", "0.53724277", "0.53724277", "0.53713447", "0.5359804", "0.53592515", "0.5359045", "0.5359045", "0.5359045", "0.5358589", "0.53535163", "0.53535163", "0.53535163", "0.53511655", "0.5343223", "0.5339502", "0.53308296", "0.5310835", "0.53078353", "0.53074145", "0.5303088", "0.5297579", "0.5288618", "0.5282649", "0.52754015", "0.52735496", "0.5272429", "0.5272429", "0.5272429", "0.52709365", "0.5261268", "0.5259865", "0.5253023", "0.52443814", "0.52125627" ]
0.0
-1
/ return the type of an optional element or null if there is no such element
protected Class<?> getOptionalElementType(String optionalName) { try { Method m = type.getMethod(optionalName); return m.getReturnType(); } catch (NoSuchMethodException ex) { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Optional<X> elem();", "TypeElement getTypeElement();", "default Optional<ClassElement> getClassElement(Class<?> type) {\n if (type != null) {\n return getClassElement(type.getName());\n }\n return Optional.empty();\n }", "Element getGenericElement();", "public Optional<String> getType() {\n return Optional.ofNullable(type);\n }", "public Optional<String> getType() {\n\t\treturn Optional.ofNullable(_type);\n\t}", "public Optional<String> type() {\n\t\t\treturn Optional.ofNullable(_type);\n\t\t}", "default Optional<ClassElement> getClassElement(String name) {\n return Optional.empty();\n }", "public String typeOf() { return null; }", "public Class getType(Element element) {\r\n Class type = element.type();\r\n \r\n if(type == void.class) {\r\n return contact.getType();\r\n }\r\n return type;\r\n }", "MediaPackageElement.Type getElementType();", "XClass getClassOrElementClass();", "public TypeElement<?> getTypeElement(int I) {\n\t\t\tif(this.TypeElementKeys == null)\n\t\t\t\tthis.TypeElementKeys = this.TypeElements.keySet().toArray(new Object[this.TypeElements.size()]);\n\t\t\treturn ((I < 0) || (I >= this.TypeElements.size()))?null:this.TypeElements.get(this.TypeElementKeys[I]);\n\t\t}", "public Class getType(ElementMap element) {\r\n return element.valueType();\r\n }", "ElementType getElementType();", "public Optional<Type<?>> findFieldTypeOpt(final String name) {\n return Optional.empty();\n }", "public Class getType(ElementList element) {\r\n return element.type();\r\n }", "@Override\n\tpublic Type getType() {\n\t\treturn null;\n\t}", "String getNativeType(Object elementID) throws Exception;", "protected abstract Type loadDefaultElement();", "@NonNull\n\t<T> Optional<T> get(@NonNull Class<T> type);", "private Optional optionalToOptional(ElementOptional optional) throws SemQAException {\n\t\tElement elm = optional.getOptionalElement();\r\n\t\tGraphPattern gp;\r\n\t\tValueConstraint vc;\r\n\t\tif (elm instanceof ElementGroup) {\r\n\t\t\tList<Element> children = ((ElementGroup) elm).getElements();\r\n\t\t\tSet<GraphPattern> childSemQA = new LinkedHashSet<GraphPattern>();\r\n\t\t\tSet<Optional> optionals = new LinkedHashSet<Optional>();\r\n\t\t\tSet<ElementFilter> filters = new LinkedHashSet<ElementFilter>();\r\n\t\t\tfor (Element child : children) {\r\n\t\t\t\tif (child instanceof ElementFilter) {\r\n\t\t\t\t\tfilters.add((ElementFilter) child);\r\n\t\t\t\t}\r\n\t\t\t\telse if (child instanceof ElementOptional) {\r\n\t\t\t\t\t// if child is an optional, need to get the graph pattern for the optional\r\n\t\t\t\t\t// and add it to the list of optional graph patterns\r\n\t\t\t\t\toptionals.add(optionalToOptional((ElementOptional) child));\r\n//\t\t\t\t\tchildSemQA.add(optionalToOptional((ElementOptional) child));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tchildSemQA.add(sparqlToSemQA(child));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tGraphPattern baseGp = convertSetToJoin(childSemQA);\r\n\t\t\tif (childSemQA.size() == 0) {\r\n\t\t\t\tthrow new SemQAException(\"semQA: OPTIONAL without non-optional side not supported.\");\r\n\t\t\t}\r\n\t\t\tif (optionals.size() > 0) {\r\n\t\t\t\t// if there are optional elements, create a left join\r\n\t\t\t\t// convert the non-filter non-optional graph patterns to a Join if necessary\r\n\t\t\t\t// then, each optional element is part of a left join\r\n\t\t\t\tgp = new LeftJoin(baseGp, optionals);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// no optionals, just return the join of the graph patterns\r\n\t\t\t\tgp = baseGp;\r\n\t\t\t}\r\n\t\t\tif (filters.size() > 0) {\r\n\t\t\t\tvc = getConstraintFromFilters(filters);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvc = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tgp = sparqlToSemQA(elm); // if it is not a group\r\n\t\t\tvc = null;\r\n\t\t}\r\n\t\treturn new Optional(gp, vc);\r\n\t\t\r\n\t}", "private AnyType elementAt(BinaryNode<AnyType> t) {\n\t\treturn t == null ? null : t.element;\n\t}", "String getModeledType(Object elementID) throws Exception;", "Type getElementType();", "default @org.jetbrains.annotations.Nullable java.lang.String getType() {\n return null;\n }", "protected Node getOptionalNode(Node parent, int idx)\n {\n if (hasArgument(parent, idx)) {\n return parent.jjtGetChild(idx);\n }\n return null;\n }", "default Optional<ClassElement> getClassElement(String name, ElementAnnotationMetadataFactory annotationMetadataFactory) {\n return Optional.empty();\n }", "public Integer getType()\r\n\t\t{ return element instanceof Schema ? SCHEMA : element instanceof Alias ? ALIAS : ELEMENT; }", "@Override\n public Type getType() {\n return null;\n }", "private static Object nullOrDefaultFor(final Class<?> type) {\r\n return defaultByPrimitiveType.get(type);\r\n }", "static Object missingValue(Class type) {\n if (!OptionalParameter.class.isAssignableFrom(type)) {\n return null;\n } else if (type == OptString.class) {\n return OptString.theMissingValue;\n } else if (type == OptBoolean.class) {\n return OptBoolean.theMissingValue;\n } else if (type == OptInteger.class) {\n return OptInteger.theMissingValue;\n } else if (type == OptDouble.class) {\n return OptDouble.theMissingValue;\n } else {\n return null;\n }\n }", "@Override\r\n\tpublic String getType() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getType() {\n\t\treturn null;\r\n\t}", "public Optional<TypeDefId> getType() {\n\t\treturn type;\n\t}", "public E head() {\n E ret = (val == null\n ? null\n : val ); //@ nowarn Cast;\n //@ assume ret != null ==> \\typeof(ret) <: elementType;\n //@ assume !containsNull ==> ret != null;\n return ret;\n }", "public String getType()\n\t\t{\n\t\t\tElement typeElement = XMLUtils.findChild(mediaElement, TYPE_ELEMENT_NAME);\n\t\t\treturn typeElement == null ? null : typeElement.getTextContent();\n\t\t}", "public java.lang.String getStructuretype()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STRUCTURETYPE$2);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public Optional<TypeDefId> getType() {\n\t\t\treturn type;\n\t\t}", "T getNullValue();", "@Override\r\n public Element findElement()\r\n {\n return null;\r\n }", "@Override\n public Type type() {\n return null;\n }", "@Override\r\n\tpublic T find(T element) {\n\t\treturn null;\r\n\t}", "public TypeWithElements getTypeWithElements(int I) {\n\t\t\tint Count = this.TypeWithElements.size();\n\t\t\tif(this.TypeWithElementKeys == null)\n\t\t\t\tthis.TypeWithElementKeys = this.TypeWithElements.keySet().toArray(new Object[Count]);\n\t\t\t\n\t\t\treturn ((I < 0) || (I >= Count))?null:this.TypeWithElements.get(this.TypeWithElementKeys[I]);\n\t\t}", "private static IJavaElement getAsTypeOrCu(IJavaElement element) {\n\t\t\tif (element.getElementType() == IJavaElement.COMPILATION_UNIT || element.getElementType() == IJavaElement.TYPE)\n\t\t\t\treturn element;\n\t\t\tIJavaElement ancestorType= element.getAncestor(IJavaElement.TYPE);\n\t\t\tif (ancestorType != null)\n\t\t\t\treturn ancestorType;\n\t\t\treturn ReorgUtils.getCompilationUnit(element);\n\t\t}", "private static IJavaElement getAsTypeOrCu(IJavaElement element) {\n\t\t\tif (element.getElementType() == IJavaElement.COMPILATION_UNIT || element.getElementType() == IJavaElement.TYPE)\n\t\t\t\treturn element;\n\t\t\tIJavaElement ancestorType= element.getAncestor(IJavaElement.TYPE);\n\t\t\tif (ancestorType != null)\n\t\t\t\treturn ancestorType;\n\t\t\treturn ReorgUtils.getCompilationUnit(element);\n\t\t}", "@Override\r\n\tpublic String getType(Uri arg0) {\n\t\treturn null;\r\n\t}", "public abstract Optional<A> val();", "private Class<?> resolveBuiltInAttrType(String anAlloyAttrType){\n\t\tif(anAlloyAttrType == \"int\" || anAlloyAttrType == \"Int\") return int.class;\n\t\telse if(anAlloyAttrType == \"String\") return String.class;\n\t\telse if(anAlloyAttrType == \"univ\") assertMessage(\"TODO: Map univ with Java type\");\n\t\telse if(anAlloyAttrType == \"none\") assertMessage(\"TODO: Map none with Java type\");\n\t\telse if(anAlloyAttrType.contains(\"seq\")) assertMessage(\"TODO: Map seqInt with Java type\");\n\t\t\n\t\treturn null;\n\t}", "@Override\n\tpublic String getType(Uri arg0) {\n\t\treturn null;\n\t}", "public abstract jq_Type getDeclaredType();", "java.lang.String getOptionalValue();", "public TypeElement getTypeElement() {\n return this.te;\n }", "Optional<ValueType> getSingle(KeyType key);", "public Optional<TypeUsage> getFieldType(String name) {\n if (!typeDeclaration.hasField(name)) {\n return Optional.empty();\n }\n TypeUsage typeUsage = typeDeclaration.getField(name).getType();\n typeUsage = replaceTypeParams(typeUsage);\n return Optional.of(typeUsage);\n }", "@NotNull\r\n public Type getFoxType();", "@Override\npublic String getType() {\n\treturn null;\n}", "public Object getTipo() {\n\t\treturn null;\n\t}", "public Optional<MimeHelper> getOptionalMimeHelper() {\n return Optional.empty();\n }", "public T caseElement(Element object)\n {\n return null;\n }", "public T getElement();", "@Override\r\n\tpublic E element() {\n\t\treturn null;\r\n\t}", "private static Optional<Schema> isOfOptionType(Schema schema) {\n Preconditions.checkNotNull(schema);\n\n // If not of type UNION, cant be an OPTION\n if (!Schema.Type.UNION.equals(schema.getType())) {\n return Optional.<Schema>absent();\n }\n\n // If has more than two members, can't be an OPTION\n List<Schema> types = schema.getTypes();\n if (null != types && types.size() == 2) {\n Schema first = types.get(0);\n Schema second = types.get(1);\n\n // One member should be of type NULL and other of non NULL type\n if (Schema.Type.NULL.equals(first.getType()) && !Schema.Type.NULL.equals(second.getType())) {\n return Optional.of(second);\n } else if (!Schema.Type.NULL.equals(first.getType()) && Schema.Type.NULL.equals(second.getType())) {\n return Optional.of(first);\n }\n }\n\n return Optional.<Schema>absent();\n }", "private AnnotationMirror findDependent(Element element) {\n List<TypeCompound> tas = ((Symbol) element).getRawTypeAttributes();\n for (TypeCompound ta : tas) {\n if (ta.getAnnotationType().toString().equals(Dependent.class.getCanonicalName())) {\n return ta;\n }\n }\n return null;\n }", "@Override\r\n\t\tpublic final INamedElement resolveTypeForValueContext() {\n\t\t\treturn null;\r\n\t\t}", "public Optional<ResolvedType> getFieldType(String name) {\n if (!typeDeclaration.hasField(name)) {\n return Optional.empty();\n }\n ResolvedType type = typeDeclaration.getField(name).getType();\n type = useThisTypeParametersOnTheGivenType(type);\n return Optional.of(type);\n }", "@Override\r\n \tpublic int getElementType() {\r\n \t\treturn 0; \r\n \t}", "default ClassElement getRequiredClassElement(String name, ElementAnnotationMetadataFactory annotationMetadataFactory) {\n return getClassElement(name, annotationMetadataFactory).orElseThrow(() -> new IllegalStateException(\"Unknown type: \" + name));\n }", "@Nonnull Class<? extends DataElement> getDataElementType();", "@Override\n\tpublic Element getElement() {\n\t\treturn null;\n\t}", "public StringDt getTypeElement() { \n\t\tif (myType == null) {\n\t\t\tmyType = new StringDt();\n\t\t}\n\t\treturn myType;\n\t}", "@Override\n\tpublic String getAoType() {\n\t\treturn null;\n\t}", "public TypeRef getNoNameTypeRef(Executable.ExecKind pExecKind, ExecInterface pInterface, MoreData pExtraData,\n\t\t\tStringBuffer pSB) {\n\t\tint L = (pSB == null)?0:pSB.length();\n\t\tTypeSpec TS = this.getTypeSpec(null, pExecKind, pInterface, pExtraData, pSB);\n\t\tif((TS == null) || ((pSB != null) && (L != pSB.length()))) return null;\n\t\treturn TS.getTypeRef();\n\t}", "boolean isOptional();", "public String getType(String xmlName)\n {\n int index = getIndex(xmlName);\n \n if (index < 0)\n {\n return null;\n }\n return getType(index);\n }", "private Class<?> getType(final Object metadata, final ValueNode node) throws ParseException {\n if (node.type != null) {\n return readType(node);\n }\n Class type;\n if (metadata instanceof ReferenceSystemMetadata || metadata instanceof Period || metadata instanceof AbstractTimePosition || metadata instanceof Instant) {\n final Method getter = ReflectionUtilities.getGetterFromName(node.name, metadata.getClass());\n return getter.getReturnType();\n } else {\n type = standard.asTypeMap(metadata.getClass(), KeyNamePolicy.UML_IDENTIFIER, TypeValuePolicy.ELEMENT_TYPE).get(node.name);\n }\n final Class<?> special = specialized.get(type);\n if (special != null) {\n return special;\n }\n return type;\n }", "public String getElementClass ();", "public T caseTypedElement(TypedElement object) {\r\n\t\treturn null;\r\n\t}", "public static <T> T asOptionalType(final Object o, final Class<T> type) {\n if (o == null) {\n return null;\n }\n if (!type.isAssignableFrom(o.getClass())) {\n return null;\n }\n @SuppressWarnings(\"unchecked\") T co = (T) o;\n return co;\n }", "public String getValueType() {\n String valueType = getAttribute(\"ValueType\");\n if (valueType.equals(\"\"))\n return null;\n return valueType;\n }", "public E peek() {\n E item;\n try {\n item = element();\n } catch (NoSuchElementException e) {\n return null;\n }\n return item;\n }", "public String getType(Uri uri) \n {\n return null;\n }", "Optional<Type> buscarPorType(String type);", "@Override\n\tpublic Object visitType(Type type) {\n\t\treturn null;\n\t}", "@Nullable\n public PsiElement<?> getParsedElement() {\n return element;\n }", "QName getType();", "String getDefaultType();", "@XmlTransient\r\n @JsonIgnore\r\n public URI getType() {\r\n return this.type == null ? null : this.type.getType();\r\n }", "default Class<?> getType(String key) {\n Object v = get(key);\n return v == null ? null : v.getClass();\n }", "public String getType() {\n return null; //To change body of implemented methods use File | Settings | File Templates.\n }", "protected Object getOptionalValue(Node node, int idx,\n InternalContextAdapter context)\n throws MethodInvocationException\n {\n Node target = getOptionalNode(node, idx);\n if (target == null) {\n return null;\n }\n return target.value(context);\n }", "public Type getTypeFirstRep() {\n\t\tif (getType().isEmpty()) {\n\t\t\treturn addType();\n\t\t}\n\t\treturn getType().get(0); \n\t}", "NonElement<T,C> getTypeInfo(Ref<T,C> ref);", "public static FuzzyXMLElement getFirstElement(FuzzyXMLElement element){\r\n\t\tFuzzyXMLNode[] nodes = element.getChildren();\r\n\t\tfor(int i=0;i<nodes.length;i++){\r\n\t\t\tif(nodes[i] instanceof FuzzyXMLElement){\r\n\t\t\t\treturn (FuzzyXMLElement)nodes[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private static String getType(Node node) {\r\n NodeList children = node.getChildNodes();\r\n for (int j = 0; j < children.getLength(); j++) {\r\n Node type = children.item(j); \r\n if( type.getNodeName().equals(\"type\") ) {\r\n return getAttribute(type, \"xlink:href\");\r\n }\r\n }\r\n \r\n return null; \r\n }", "public ValueType peek() {\r\n // TODO\r\n return null;\r\n }", "@objid (\"002ff058-0d4f-10c6-842f-001ec947cd2a\")\n @Override\n public Object visitElement(Element theElement) {\n return null;\n }", "public /*override*/ Type GetValueType() \r\n {\r\n if (_dictionary != null)\r\n {\r\n // Take a peek at the element type of the ElementStartRecord \r\n // within the ResourceDictionary's deferred content.\r\n boolean found; \r\n return _dictionary.GetValueType(_keyOrValue, /*out*/ found); \r\n }\r\n else \r\n {\r\n return _keyOrValue != null ? _keyOrValue.GetType() : null;\r\n }\r\n }", "public static Object ElementDefaultValidImmediate(XSTypeDefinition type, String value, ValidationContext context, ValidatedInfo vinfo) {\n/* 288 */ XSSimpleType dv = null;\n/* */ \n/* */ \n/* */ \n/* */ \n/* 293 */ if (type.getTypeCategory() == 16) {\n/* 294 */ dv = (XSSimpleType)type;\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* */ \n/* 300 */ XSComplexTypeDecl ctype = (XSComplexTypeDecl)type;\n/* */ \n/* */ \n/* 303 */ if (ctype.fContentType == 1) {\n/* 304 */ dv = ctype.fXSSimpleType;\n/* */ \n/* */ }\n/* 307 */ else if (ctype.fContentType == 3) {\n/* 308 */ if (!((XSParticleDecl)ctype.getParticle()).emptiable()) {\n/* 309 */ return null;\n/* */ }\n/* */ } else {\n/* 312 */ return null;\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 317 */ Object actualValue = null;\n/* 318 */ if (dv == null)\n/* */ {\n/* */ \n/* */ \n/* 322 */ dv = STRING_TYPE;\n/* */ }\n/* */ \n/* */ try {\n/* 326 */ actualValue = dv.validate(value, context, vinfo);\n/* */ \n/* 328 */ if (vinfo != null)\n/* 329 */ actualValue = dv.validate(vinfo.stringValue(), context, vinfo); \n/* 330 */ } catch (InvalidDatatypeValueException ide) {\n/* 331 */ return null;\n/* */ } \n/* */ \n/* 334 */ return actualValue;\n/* */ }", "@NonNull\n\t<T> Optional<T> get(@NonNull String path, @NonNull Class<T> type);" ]
[ "0.6975359", "0.66401994", "0.6637423", "0.6258151", "0.6214114", "0.61867344", "0.60816807", "0.6023402", "0.60018194", "0.5995159", "0.5937654", "0.5874457", "0.58169204", "0.5805099", "0.57786417", "0.57720715", "0.57609373", "0.57518446", "0.573644", "0.5735531", "0.57278645", "0.56800205", "0.56370527", "0.5599781", "0.55923176", "0.5575437", "0.5529974", "0.5520795", "0.5510862", "0.5509513", "0.54981333", "0.5496384", "0.54904246", "0.54904246", "0.54757434", "0.54741687", "0.54667157", "0.542148", "0.5399199", "0.5396862", "0.53422666", "0.5314959", "0.5311382", "0.52891064", "0.52791154", "0.52791154", "0.52707654", "0.5250372", "0.524896", "0.5240642", "0.52359784", "0.52168965", "0.5209749", "0.520864", "0.5178846", "0.5176746", "0.5173823", "0.514984", "0.51440185", "0.51433367", "0.51427656", "0.51299554", "0.51286304", "0.51248217", "0.5117132", "0.51140934", "0.51078224", "0.51034707", "0.50852966", "0.50769025", "0.50746506", "0.50548965", "0.50474566", "0.5041179", "0.50408703", "0.50246537", "0.5011763", "0.5006478", "0.50031793", "0.49885687", "0.49739698", "0.49683544", "0.49673405", "0.49582678", "0.4956462", "0.49546924", "0.49538484", "0.4953259", "0.4936421", "0.49361268", "0.4933068", "0.49322546", "0.49294958", "0.49203238", "0.49165222", "0.49162912", "0.49136856", "0.49063763", "0.49026155", "0.49020058" ]
0.76278
0
TODO Autogenerated method stub
@Override public String getLocation() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
XXX MemoryTreeElement should be a VirtualTreeElement (use constrainType)
public void setType(Class<? extends Resource> type) { this.type = type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void visit(MemoryExpression expression);", "@Override\r\n\tpublic void accept(MemoryVisitor memVis) {\r\n\t\tmemVis.visit(this);\r\n\t}", "public IMemory getMemory() { return memory; }", "public interface MemoryExpressionVisitor {\n /**\n * Invoked to visit memory expressions.\n *\n * @param expression The expression to visit.\n */\n void visit(MemoryExpression expression);\n\n /**\n * Invoked to visit subtraction expressions.\n *\n * @param expression The expression to visit.\n */\n void visit(MinusExpression expression);\n\n /**\n * Invoked to visit multiplication expressions.\n *\n * @param expression The expression to visit.\n */\n void visit(MultiplicationExpression expression);\n\n /**\n * Invoked to visit numerical value expressions.\n *\n * @param expression The expression to visit.\n */\n void visit(NumericalValue expression);\n\n /**\n * Invoked to visit addition expressions.\n *\n * @param expression The expression to visit.\n */\n void visit(PlusExpression expression);\n\n /**\n * Invoked to visit register expressions.\n *\n * @param expression The expression to visit.\n */\n void visit(Register expression);\n\n /**\n * Invoked to visit subtraction expressions.\n *\n * @param expression The expression to visit.\n */\n void visit(SubExpression expression);\n}", "public interface TmxElement {\n\n\t/**\n\t * Method used to implement the visitor pattern with the different TMX\n\t * elements\n\t * \n\t * @param visitor\n\t */\n\tvoid accept(TmxElementVisitor visitor);\n\n\t/**\n\t * @return a textual description of the object implementation\n\t */\n\tString description();\n\n\t/**\n\t * @return an element assembler that will accept or not other TMX elements\n\t * to be assembled with it\n\t */\n\tTmxElementAssembler createAssembler();\n\n\t/**\n\t * Get this object assembled to another using an assembler\n\t * \n\t * @param assembler\n\t */\n\tvoid getAssembled(TmxElementAssembler assembler) throws TmxInvalidAssembly;\n}", "public MyMemory(){\n super();\n this.instruction = new Instruction(); //Only the IR register will use this attribute\n }", "protected abstract M createNewElement();", "private void setData(T data, int size, List<? extends T> memory, T type) { }", "public interface DataNode\r\n{\r\n /** @return type name of this data node */\r\n public String get_type_name();\r\n /** @return the bits of this data node */\r\n public String get_bitsequence_value() ;\r\n \r\n /** @return size of this data in bits*/\r\n public int get_bit_size(); \r\n \r\n /** @return size of this data as an integer (for expresion evaluation\r\n * purpose */\r\n public int get_int_value() throws Exception;\r\n \r\n /** @return the number of bits this type takes */ \r\n public int get_fieldsize();\r\n \r\n /** set the expression for number of bits this type takes*/\r\n public void set_fieldsize(AST fieldsize);\r\n \r\n /** set valid ok nok */\r\n public void set_verify_then_else(AST verify_ast,AST then_ast , AST else_ast) throws Exception;\r\n \r\n /** sets the contaxt for evaluation of expressions for this data node*/\r\n public void set_context(VariableSymbolTable context);\r\n \r\n /** print a human readable form of this node */\r\n public String print();\r\n \r\n /** print with formatting \r\n * 0 = print() [debug formatted]\r\n * 1 = as string [useful to write to a file]\r\n * 2 = debug with strings [similar to 0, but with strings instad of bytes]\r\n * @return Formatted output ready to be printed\r\n */\r\n public String print(int format);\r\n public void set_name(String name);\r\n public String get_name();\r\n \r\n /** returns the maximum size this object can accept (hold) or -1 for infinity */\r\n public int get_max_accept() throws Exception;\r\n public void assign(DataNodeAbstract rhs) throws Exception;\r\n public void populate(BdplFile rhs) throws Exception;\r\n \r\n}", "@Override\n\tpublic void VisitInstanceOfNode(BunInstanceOfNode Node) {\n\n\t}", "protected MemObject (int nElem)\n {\n if (nElem > 0) mem = new Object [nElem];\n }", "public abstract Type treeCopyNoTransform();", "public abstract Type treeCopy();", "Memory() {}", "public abstract OMElement serialize();", "@Override\n\tpublic String getMemoryValue() {\n\t\treturn null;\n\t}", "private void setMemorySize() { }", "protected abstract Type loadDefaultElement();", "public PlainMemory(String name)\n\t{\n\t\tsuper(name);\n\t\t\t\n\t}", "void accept(TmxElementVisitor visitor);", "private Memory memory(Expression expression, cat.footoredo.mx.type.Type type) {\n return new Memory(asmType(type), expression);\n }", "public int serialize(VirtualPointer vp, Object val);", "public < T > T getMemory ( MemoryKey < T > memoryKey ) {\n\t\treturn extract ( handle -> handle.getMemory ( memoryKey ) );\n\t}", "public interface TElement extends HasID, THasPropertyChange, PropertyChangeListener, Serializable {\n\n /**\n * Used if a requested attribute is not a member of the TElement derived\n * Class.\n */\n public final Object NOT_DEFINED = \"ATT_NOT_DEFINED\";\n\n /**\n * return the attribute value or teal.sim.TElement.NOT_DEFINED\n **/\n public Object getProperty(String attName);\n\n /**\n * set the attribute value return value is success\n **/\n public boolean setProperty(String attName, Object value);\n\n public void addRoute(Route r);\n \n /** \n * Establish a route from this object's source attribute and the targeted \n * attribute of another TElement. \n **/\n public void addRoute(String attribute, TElement listener, String targetName);\n \n \n /** \n * Remove a route from this object's source attribute and the target's output attribute. \n **/\n public void removeRoute(String attribute, TElement listener, String targetName);\n}", "public interface Node extends Serializable {\n\n\tvoid setOwner(Object owner);\n Object getOwner();\n\n String getName();\n Node getChild(int i);\n List<Node> childList();\n\n Node attach(int id, Node n) throws VetoTypeInduction;\n void induceOutputType(Class type) throws VetoTypeInduction;\n int getInputCount();\n\tClass getInputType(int id);\n List<Class> getInputTypes();\n Class getOutputType();\n Tuple.Two<Class,List<Class>> getType();\n\n Object evaluate();\n\n boolean isTerminal();\n\n <T extends Node> T copy();\n String debugString(Set<Node> set);\n}", "@objid (\"0006fc34-c4c0-1fd8-97fe-001ec947cd2a\")\npublic interface BpmnItemAwareElement extends BpmnFlowElement {\n /**\n * The metaclass simple name.\n */\n @objid (\"2fe549f8-3f6c-4165-affa-9c833b04554a\")\n public static final String MNAME = \"BpmnItemAwareElement\";\n\n /**\n * The metaclass qualified name.\n */\n @objid (\"92737e58-71fd-4d9b-9c7e-04063f527768\")\n public static final String MQNAME = \"Standard.BpmnItemAwareElement\";\n\n /**\n * Getter for relation 'BpmnItemAwareElement->TargetOfDataAssociation'\n * \n * Metamodel description:\n * <i>Data associations that computes the value of this element.</i>\n */\n @objid (\"ef92d9d1-93c5-49d4-9ec8-65c4eb806567\")\n EList<BpmnDataAssociation> getTargetOfDataAssociation();\n\n /**\n * Filtered Getter for relation 'BpmnItemAwareElement->TargetOfDataAssociation'\n * \n * Metamodel description:\n * <i>Data associations that computes the value of this element.</i>\n */\n @objid (\"3390963b-d6b2-4509-8979-45543db839db\")\n <T extends BpmnDataAssociation> List<T> getTargetOfDataAssociation(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'BpmnItemAwareElement->ItemSubjectRef'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"dba9c7e2-545f-4c12-9866-f5f1258ee9f9\")\n BpmnItemDefinition getItemSubjectRef();\n\n /**\n * Setter for relation 'BpmnItemAwareElement->ItemSubjectRef'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"63776972-d780-48de-b4bd-5d34faa2cbf1\")\n void setItemSubjectRef(BpmnItemDefinition value);\n\n /**\n * Getter for relation 'BpmnItemAwareElement->DataState'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"331f64c4-884c-4de9-a104-ba68088d9e2b\")\n BpmnDataState getDataState();\n\n /**\n * Setter for relation 'BpmnItemAwareElement->DataState'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"dec04375-0805-4a30-ba61-5edb1bdcf44a\")\n void setDataState(BpmnDataState value);\n\n /**\n * Getter for relation 'BpmnItemAwareElement->SourceOfDataAssociation'\n * \n * Metamodel description:\n * <i>Data associations that use this element to compute a value.</i>\n */\n @objid (\"a721af22-ba64-4339-a50c-349201da2a69\")\n EList<BpmnDataAssociation> getSourceOfDataAssociation();\n\n /**\n * Filtered Getter for relation 'BpmnItemAwareElement->SourceOfDataAssociation'\n * \n * Metamodel description:\n * <i>Data associations that use this element to compute a value.</i>\n */\n @objid (\"41478043-fa77-40f4-a16f-953b85cd578a\")\n <T extends BpmnDataAssociation> List<T> getSourceOfDataAssociation(java.lang.Class<T> filterClass);\n\n}", "public interface Element {\r\n\r\n void accept(Visitor visitor);\r\n}", "public interface MyAbstractElement extends EObject {\n}", "public Object getElement();", "public interface IsChild extends XmlSerializable {\r\n\tObject findPrimaryKey();\r\n}", "public T getElement();", "@Override\r\n \tpublic int getElementType() {\r\n \t\treturn 0; \r\n \t}", "public MemoryType getMemoryType() {\n Long __key = this.memoryTypeId;\n if (memoryType__resolvedKey == null || !memoryType__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n MemoryTypeDao targetDao = daoSession.getMemoryTypeDao();\n MemoryType memoryTypeNew = targetDao.load(__key);\n synchronized (this) {\n memoryType = memoryTypeNew;\n \tmemoryType__resolvedKey = __key;\n }\n }\n return memoryType;\n }", "private Set<T> getMemory() { return null; }", "@Override\n\tvoid internalStorage(Class type,String line) throws NotEnoughElements {\n\t T t = createInternalT(type);\n\t t.load(line);\n\t insert(t);\n\t}", "public interface ICpMemory extends ICpDeviceProperty {\n\n\tfinal static char READ_ACCESS \t\t= 'r';\n\tfinal static char WRITE_ACCESS\t\t= 'w';\n\tfinal static char EXECUTE_ACCESS\t= 'x';\n\tfinal static char SECURE_ACCESS\t\t= 's';\n\tfinal static char NON_SECURE_ACCESS\t= 'n';\n\tfinal static char CALLABLE_ACCESS\t= 'c';\n\tfinal static char PERIPHERAL_ACCESS\t= 'p';\n\t\n\t/**\n\t * Checks if the memory shall be used for the startup by linker\n\t * @return true if startup memory\n\t */\n\tboolean isStartup();\n\t\n\t/**\n\t * Returns access string corresponding following regular expression pattern: \"[rwxpsnc]+\"\n\t * @return \"access\" attribute value if present or default derived from ID for deprecated elements \n\t */\n\tString getAccess();\n\n\t/**\n\t * Checks if the memory region represents RAM (\"rwx\")\n\t * @return true if RAM\n\t */\n\tboolean isRAM();\n\n\t/**\n\t * Checks if the memory region represents ROM (\"rx\")\n\t * @return true if ROM\n\t */\n\tboolean isROM();\n\n\t\n\t/**\n\t * Checks if memory has specified access\n\t * @param access : one of <code>rwxpsnc</code> characters\n\t * @return true if memory provides specified access\n\t */\n\tboolean isAccess(char access);\n\t\n\t/**\n\t * Checks if memory has read access\n\t * @return true if memory has read access\n\t */\n\tboolean isReadAccess();\n\t\n\t/**\n\t * Checks if memory has write access\n\t * @return true if memory has write access\n\t */\n\tboolean isWriteAccess();\n\n\t/**\n\t * Checks if memory has execute access\n\t * @return true if memory has execute access\n\t */\n\tboolean isExecuteAccess();\n\n\t\n\t/**\n\t * Checks if memory has secure access\n\t * @return true if memory has secure access\n\t */\n\tboolean isSecureAccess();\n\t\n\t/**\n\t * Checks if memory has non-secure access\n\t * @return true if memory has non-secure access\n\t */\n\tboolean isNonSecureAccess();\n\t\n\t/**\n\t * Checks if memory has callable access\n\t * @return true if memory has callable access\n\t */\n\tboolean isCallableAccess();\n\n\t/**\n\t * Checks if memory has peripheral access\n\t * @return true if memory has peripheral access\n\t */\n\tboolean isPeripheralAccess(); \n\n\t\n}", "Object element();", "Object element();", "public interface ElementExtensibleXMLObject extends XMLObject {\n\n /**\n * Gets the list of XMLObjects added to this XMLObject as part of the \"any\" content model.\n * \n * @return list of XMLObjects added to this XMLObject as part of the \"any\" content model\n */\n public List<XMLObject> getUnknownXMLObjects();\n \n /**\n * Gets the list of XMLObjects added to this XMLObject as part of the \"any\" content model,\n * and which match the specified QName.\n * \n * @param typeOrName the QName of the statements to return\n * @return list of XMLObjects added to this XMLObject as part of the \"any\" content model\n */\n public List<XMLObject> getUnknownXMLObjects(QName typeOrName);\n}", "public void onMemoryExceed();", "Element getGenericElement();", "Elem getPointedElem();", "public ReferenceType getTargetElement();", "public interface BinaryTreeADT<T> extends Iterable<T>\n{\n//Returns the element stored in the root of the tree.\npublic T getRootElement();\n\n//Returns the left subtree of the root.\npublic BinaryTreeADT<T> getLeft();\n\n//Returns the right subtree of the root.\npublic BinaryTreeADT<T> getRight();\n\n//Returns true if the binary tree contains an element that\n//matches the specified element and false otherwise.\npublic boolean contains (T target);\n\n//Returns a reference to the element in the tree matching\n//the specified target.\npublic T find (T target);\n\n//Returns true if the binary tree contains no elements, and\n//false otherwise.\npublic boolean isEmpty();\n\n//Returns the number of elements in this binary tree.\npublic int size();\n\n//Returns the string representation of the binary tree.\npublic String toString();\n\n\n}", "public boolean decode(Element element, TYPE type)\n\t{\n\t\tboolean success = true;\n\t\tNodeList nodes = element.getElementsByTagName(\"SycamoreSystemMemory\");\n\n\t\t// if there is at least a Keyframe node, decode it\n\t\tif (nodes.getLength() > 0)\n\t\t{\n\t\t\t// selfPositions\n\t\t\tNodeList selfPositions = element.getElementsByTagName(\"selfPositions\");\n\t\t\tthis.selfPositions.removeAllElements();\n\n\t\t\tif (selfPositions.getLength() > 0)\n\t\t\t{\n\t\t\t\tElement selfPositionsElem = (Element) selfPositions.item(0);\n\t\t\t\tNodeList selfPosition = selfPositionsElem.getElementsByTagName(\"selfPosition\");\n\n\t\t\t\t// positions\n\t\t\t\tfor (int i = 0; i < selfPosition.getLength(); i++)\n\t\t\t\t{\n\t\t\t\t\tElement pointElem = (Element) selfPosition.item(i);\n\t\t\t\t\tP point = SycamoreUtil.getNewPoint(type);\n\n\t\t\t\t\tif (point.decode(pointElem, type))\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.selfPositions.add(point);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// snapshots\n\t\t\tNodeList snapshots = element.getElementsByTagName(\"snapshots\");\n\t\t\tthis.snapshots.removeAllElements();\n\n\t\t\tif (snapshots.getLength() > 0)\n\t\t\t{\n\t\t\t\tElement snapshotsElem = (Element) snapshots.item(0);\n\t\t\t\tNodeList snapshot = snapshotsElem.getElementsByTagName(\"snapshot\");\n\n\t\t\t\t// single snapshot\n\t\t\t\tfor (int i = 0; i < snapshot.getLength(); i++)\n\t\t\t\t{\n\t\t\t\t\tVector<P> data = new Vector<P>();\n\t\t\t\t\tElement snapshotElem = (Element) snapshot.item(i);\n\t\t\t\t\tNodeList position = snapshotElem.getElementsByTagName(\"position\");\n\n\t\t\t\t\t// positions\n\t\t\t\t\tfor (int j = 0; j < position.getLength(); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tElement positionElem = (Element) position.item(j);\n\t\t\t\t\t\tP point = SycamoreUtil.getNewPoint(type);\n\n\t\t\t\t\t\tif (point.decode(positionElem, type))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdata.add(point);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.snapshots.add(data);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn success;\n\t}", "Element asElement();", "int memSize() {\n return super.memSize() + 4 * 4; }", "public MemoryInfo(com.google.appinventor.components.runtime.ComponentContainer r7) {\n /*\n r6 = this;\n r1 = r6\n r2 = r7\n r3 = r1\n r4 = r2\n com.google.appinventor.components.runtime.Form r4 = r4.$form()\n r3.<init>(r4)\n r3 = r1\n r4 = 1048576(0x100000, double:5.180654E-318)\n r3.hxYOFxFjLpN1maJuWNxUV40nExCGxsxkDPOTgtzMu4zlZCQb3bPlKsXo1SYJg6ME = r4\n r3 = r1\n r4 = r2\n android.app.Activity r4 = r4.$context()\n r3.context = r4\n r3 = r1\n r4 = r2\n r3.container = r4\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.appinventor.components.runtime.MemoryInfo.<init>(com.google.appinventor.components.runtime.ComponentContainer):void\");\n }", "public interface BinaryNode<T> { }", "public interface MemoryEntity {\n void onCreate();\n void onLoad();\n void onMemoryLow();\n void onDestroy();\n boolean shouldLoad();\n}", "public final byte[] getMemory() {\r\n return this.memory;\r\n }", "@Override public void accept(JannotTreeVisitor v)\n{\n v.visitBinary(this);\n}", "ObjectElement createObjectElement();", "public interface TreeElementI extends Serializable\n{\n public void addChild(TreeElementI child);\n public String getId();\n public void setId(String id);\n public String getOutlineTitle();\n public void setOutlineTitle(String outlineTitle);\n public boolean isHasParent();\n public void setHasParent(boolean hasParent);\n public boolean isHasChild();\n public void setHasChild(boolean hasChild);\n public int getLevel();\n public void setLevel(int level);\n public boolean isExpanded();\n public void setExpanded(boolean expanded);\n public ArrayList<TreeElementI> getChildList();\n public TreeElementI getParent();\n public void setParent(TreeElementI parent);\n\n}", "public interface IQuadTree<T extends INodeElement<T>>\n{\n\t/**\n\t * Metoda sa vola pri zmene pozicii vrchola.\n\t * \n\t * @param v\n\t * Vertex\n\t * @param old\n\t * Stara pozicia = null tak prvok sa pridava prvykrat\n\t */\n\tpublic void insert(T vertex, Point2D pos);\n\t\n\t/**\n\t * Najdi a vymaz prvok zo stromu.\n\t * @param element\n\t * @param pos\n\t * @return\n\t */\n\tpublic boolean remove(T element, Point2D pos);\n\n\t/**\n\t * Spusti IWalkThrought pre vsetky objekty ktory su v oblasti Rectangle.\n\t * \n\t * @param re\n\t * @param i\n\t */\n\tpublic void walk(Rectangle re, IWalkThrought<T> i);\n\n\t/**\n\t * Prehladaj cely strom a najdi prvok.\n\t * Teda sa nehlada podla pozicie objektu ale vsade.\n\t * \n\t * @param element\n\t * @return\n\t */\n\tpublic Node<T> findSlow(T element);\n\n\t/**\n\t * Vymaz vsetky objekty v strome, ktore su totozne s element.\n\t * \n\t * @param element\n\t */\n\tpublic void removeAll(Object element);\n\n\t/**\n\t * Interface ktory sa spusta na kazdu skupinu vertexov v 1 node.\n\t * Prvky vo vnutri by som nemal modifikovat lebo su v QDtree.\n\t * \n\t * Povodne to bol interface na 1 prvok, ale toto by to malo urychlit.\n\t * \n\t * Interface pri VertexsInRectangle moze spustit vertexi hoci sedia mimo obrazovky.\n\t * O dalsie sa postara JUNG ktory to este raz otestuje\n\t * Alebo ked v jednom NODE su napriklad len 4 prvky tak mozme vypnut dalsiu kontrolu a zobrazit\n\t * to.\n\t * \n\t * @author Lukas Sekerak\n\t * \n\t * @param <T>\n\t */\n\tpublic interface IWalkThrought<T>\n\t{\n\t\tpublic void walkThrought(ArrayList<T> v);\n\t}\n\n\t/**\n\t * Vrat elementy v danej oblasti.\n\t * \n\t * @param point\n\t * @return\n\t */\n\tpublic ArrayList<T> getElements(Point2D point);\n\n\t/**\n\t * Vymaz vsetko v strome.\n\t */\n\tpublic void clear();\n}", "@DISPID(1610940416) //= 0x60050000. The runtime will prefer the VTID if present\n @VTID(22)\n GeometricElements geometricElements();", "public interface Marshaller<X> {\n Bytestring marshall(X x);\n\n X unmarshall(Bytestring string);\n}", "private AnyType elementAt(BinaryNode<AnyType> t) {\n\t\treturn t == null ? null : t.element;\n\t}", "private VirtualBoxMachine validateVirtualBoxMachine(VirtualMachine virtualMachine) throws VMDriverException {\n if (virtualMachine instanceof VirtualBoxMachine) { // TODO evitar el instance_of y el cast ¿?\n return (VirtualBoxMachine) virtualMachine;\n } else {\n throw new VMDriverException(\"Non-valid virtual machine especification\");\n }\n }", "public long memoryAddress()\r\n/* 143: */ {\r\n/* 144:172 */ throw new UnsupportedOperationException();\r\n/* 145: */ }", "public abstract long estimateMemorySize();", "@Override\n\tpublic void visitarObjeto(Objeto o) {\n\t\t\n\t}", "public int deserialize(VirtualPointer vp, Object[] val);", "default boolean visitElementContent(MappedElementKind targetKind) {\n\t\treturn true;\n\t}", "@Override\r\n\tpublic void visit(ParkB parkB) {\n\t\t\r\n\t}", "@objid (\"002ff058-0d4f-10c6-842f-001ec947cd2a\")\n @Override\n public Object visitElement(Element theElement) {\n return null;\n }", "public Heap(){\n data = new Vector();\n }", "public T caseTypedElement(TypedElement object) {\r\n\t\treturn null;\r\n\t}", "TypeElement getTypeElement();", "public abstract void write(T dataElement);", "protected abstract Object handleElement(Element aElement) throws AeXMLDBException;", "protected abstract void fromXmlEx(Element source)\n throws PSUnknownNodeTypeException;", "E getElement() throws IllegalStateException;", "@Override\n\tpublic void visit(CastExpression arg0) {\n\t\t\n\t}", "private static interface Node {\n\t\t/**\n\t\t * Set value to child node identified by given ID.\n\t\t * \n\t\t * @param childID child ID is a field name or array/list index.\n\t\t * @param value node value.\n\t\t * @throws ConverterException if value is primitive and fail to convert to field type.\n\t\t * @throws IllegalAccessException this exception is required by reflective field signature but never thrown.\n\t\t */\n\t\tvoid setValue(String childID, Object value) throws ConverterException, IllegalAccessException;\n\n\t\t/**\n\t\t * Returns child node identified by its ID or null if not found. A child ID is the field name or array/list index.\n\t\t * \n\t\t * @param childID child ID is a field name or array/list index.\n\t\t * @return child node or null.\n\t\t * @throws IllegalAccessException this exception is required by reflective field signature but never thrown.\n\t\t */\n\t\tNode getChild(String childID) throws IllegalAccessException;\n\t}", "VirtualThing createVirtualThing();", "protected abstract Object toObject(ByteBuffer content, Type targetType) throws BeanConversionException;", "public MainMemory getMem()\n {\n return mem;\n }", "@Override\n\tpublic void run(VirtualMachine vm) {\n\t\tint bytesToAllocCount=vm.popNumberFromStack(this.isExtended());\n\n\n\n\t\tfor(int i=0;i<bytesToAllocCount;i++)\n\t\t{\n\t\t\tvm.getHeap().add(new NumericByteCodeToken((byte)0));\n\t\t}\n\t}", "@Override\n public void onLowMemory() {\n \tsuper.onLowMemory();\n }", "public MyMemory(int size){\n super(size);\n printSize();\n loadMemory(); //loads memory with instructions to be executed during the instruction cycle\n }", "ElementType getElementType();", "abstract public Node load();", "@Override\n public void onLowMemory() {\n super.onLowMemory();\n }", "@Override\n public void onLowMemory() {\n super.onLowMemory();\n }", "public PhysicalMemory()\n {\n frames = new TreeMap<Long, MemoryFrame>();\n for (int i = 0; i < Const.MEM_FRAMES; i++) {\n MemoryFrame frame = new MemoryFrame(i);\n Long zero = new Long(i);\n frames.put(zero, frame);\n }\n }", "public static android.renderscript.Element createVector(android.renderscript.RenderScript rs, android.renderscript.Element.DataType dt, int size) { throw new RuntimeException(\"Stub!\"); }", "BElementStructure createBElementStructure();", "int memSize() {\r\n\t\treturn BASE_NODE_SIZE + 5 * 4;\r\n\t}", "public interface XMLizable {\n\n /**\n * Write this element as an XML DOM element.\n */\n Element toXML();\n\n /**\n * Read this element as the content of the given element.\n */\n void readXML(Element elem) throws XMLSyntaxError;\n}", "public static void copy(NodeInfo node,\n Receiver out,\n NamePool namePool,\n int whichNamespaces,\n boolean copyAnnotations, int locationId) throws XPathException {\n \n switch (node.getNodeKind()) {\n case Type.DOCUMENT:\n {\n out.startDocument(0);\n AxisIterator children0 = node.iterateAxis(Axis.CHILD, AnyNodeTest.getInstance());\n while (true) {\n NodeInfo child = (NodeInfo)children0.next();\n if (child == null) {\n break;\n }\n child.copy(out, whichNamespaces, copyAnnotations, locationId);\n }\n out.endDocument();\n break;\n }\n case Type.ELEMENT:\n {\n out.startElement(node.getNameCode(),\n copyAnnotations ? node.getTypeAnnotation() : StandardNames.XDT_UNTYPED,\n 0, 0);\n \n // output the namespaces\n \n if (whichNamespaces != NodeInfo.NO_NAMESPACES) {\n node.sendNamespaceDeclarations(out, true);\n }\n \n // output the attributes\n \n AxisIterator attributes = node.iterateAxis(Axis.ATTRIBUTE, AnyNodeTest.getInstance());\n while (true) {\n NodeInfo att = (NodeInfo)attributes.next();\n if (att == null) {\n break;\n }\n att.copy(out, whichNamespaces, copyAnnotations, locationId);\n }\n \n // notify the start of content\n \n out.startContent();\n \n // output the children\n \n AxisIterator children = node.iterateAxis(Axis.CHILD, AnyNodeTest.getInstance());\n while (true) {\n NodeInfo child = (NodeInfo)children.next();\n if (child == null) {\n break;\n }\n child.copy(out, whichNamespaces, copyAnnotations, locationId);\n }\n \n // finally the end tag\n \n out.endElement();\n return;\n }\n case Type.ATTRIBUTE:\n {\n out.attribute(node.getNameCode(),\n copyAnnotations ? node.getTypeAnnotation() : StandardNames.XDT_UNTYPED_ATOMIC,\n node.getStringValueCS(), 0, 0);\n return;\n }\n case Type.TEXT:\n {\n out.characters(node.getStringValueCS(), 0, 0);\n return;\n }\n case Type.COMMENT:\n {\n out.comment(node.getStringValueCS(), 0, 0);\n return;\n }\n case Type.PROCESSING_INSTRUCTION:\n {\n out.processingInstruction(node.getLocalPart(), node.getStringValueCS(), 0, 0);\n return;\n }\n case Type.NAMESPACE:\n {\n out.namespace(namePool.allocateNamespaceCode(node.getLocalPart(), node.getStringValue()), 0);\n return;\n }\n default:\n \n }\n }", "public Collection viewMemoryContents()\n {\n Collection<MemoryFrame> frameCollection = frames.values();\n return frameCollection;\n }", "public interface IWlanElement {\n\n\t/**\n\t * retrieve element id\n\t * \n\t * @return\n\t */\n\tpublic byte getElementId();\n\t\n\t/**\n\t * data \n\t * @return\n\t */\n\tpublic byte[] getData();\n\t\n}", "public interface XMLObject {\n public XMLObject getXMLObject();\n}", "static void mvi_to_mem(String passed){\n\t\tint memory_address = memory_address_hl();\n\t\tmemory.put(memory_address, passed.substring(6));\n\t}", "public interface BytesRetrievableIfc\n{\n //---------------------------------------------------------------------\n /**\n Gets the entered text as bytes\n @return byte array\n */\n //---------------------------------------------------------------------\n public byte[] getTextBytes();\n\n //---------------------------------------------------------------------\n /**\n Sets the text as bytes\n @param byte array\n */\n //---------------------------------------------------------------------\n public void setTextBytes(byte[] value);\n\n //---------------------------------------------------------------------\n /**\n Clears the content of currently held values.\n */\n //---------------------------------------------------------------------\n public void clearTextBytes();\n}", "public interface Member2 extends org.apache.xmlbeans.XmlAnySimpleType\n {\n java.util.List getListValue();\n java.util.List xgetListValue();\n void setListValue(java.util.List list);\n /** @deprecated */\n java.util.List listValue();\n /** @deprecated */\n java.util.List xlistValue();\n /** @deprecated */\n void set(java.util.List list);\n public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)\n org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Member2.class.getClassLoader(), \"schemaorg_apache_xmlbeans.system.sXMLSCHEMA\").resolveHandle(\"anona0e6type\");\n \n /**\n * An anonymous inner XML type.\n *\n * This is a union type. Instances are of one of the following types:\n * org.apache.xmlbeans.XmlAnyURI\n * org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList$Member2$Item$Member\n */\n public interface Item extends org.apache.xmlbeans.XmlAnySimpleType\n {\n java.lang.Object getObjectValue();\n void setObjectValue(java.lang.Object val);\n /** @deprecated */\n java.lang.Object objectValue();\n /** @deprecated */\n void objectSet(java.lang.Object val);\n org.apache.xmlbeans.SchemaType instanceType();\n public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)\n org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Item.class.getClassLoader(), \"schemaorg_apache_xmlbeans.system.sXMLSCHEMA\").resolveHandle(\"anon16cetype\");\n \n /**\n * An anonymous inner XML type.\n *\n * This is an atomic type that is a restriction of org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList$Member2$Item$Member.\n */\n public interface Member extends org.apache.xmlbeans.XmlToken\n {\n public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)\n org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Member.class.getClassLoader(), \"schemaorg_apache_xmlbeans.system.sXMLSCHEMA\").resolveHandle(\"anon0c73type\");\n \n org.apache.xmlbeans.StringEnumAbstractBase enumValue();\n void set(org.apache.xmlbeans.StringEnumAbstractBase e);\n \n static final Enum TARGET_NAMESPACE = Enum.forString(\"##targetNamespace\");\n static final Enum LOCAL = Enum.forString(\"##local\");\n \n static final int INT_TARGET_NAMESPACE = Enum.INT_TARGET_NAMESPACE;\n static final int INT_LOCAL = Enum.INT_LOCAL;\n \n /**\n * Enumeration value class for org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList$Member2$Item$Member.\n * These enum values can be used as follows:\n * <pre>\n * enum.toString(); // returns the string value of the enum\n * enum.intValue(); // returns an int value, useful for switches\n * // e.g., case Enum.INT_TARGET_NAMESPACE\n * Enum.forString(s); // returns the enum value for a string\n * Enum.forInt(i); // returns the enum value for an int\n * </pre>\n * Enumeration objects are immutable singleton objects that\n * can be compared using == object equality. They have no\n * public constructor. See the constants defined within this\n * class for all the valid values.\n */\n static final class Enum extends org.apache.xmlbeans.StringEnumAbstractBase\n {\n /**\n * Returns the enum value for a string, or null if none.\n */\n public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }\n /**\n * Returns the enum value corresponding to an int, or null if none.\n */\n public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }\n \n private Enum(java.lang.String s, int i)\n { super(s, i); }\n \n static final int INT_TARGET_NAMESPACE = 1;\n static final int INT_LOCAL = 2;\n \n public static final org.apache.xmlbeans.StringEnumAbstractBase.Table table =\n new org.apache.xmlbeans.StringEnumAbstractBase.Table\n (\n new Enum[]\n {\n new Enum(\"##targetNamespace\", INT_TARGET_NAMESPACE),\n new Enum(\"##local\", INT_LOCAL),\n }\n );\n private static final long serialVersionUID = 1L;\n private java.lang.Object readResolve() { return forInt(intValue()); } \n }\n \n /**\n * A factory class with static methods for creating instances\n * of this type.\n */\n \n public static final class Factory\n {\n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newValue(java.lang.Object obj) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) type.newValue( obj ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newInstance() {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newInstance(org.apache.xmlbeans.XmlOptions options) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }\n \n private Factory() { } // No instance of this class allowed\n }\n }\n \n /**\n * A factory class with static methods for creating instances\n * of this type.\n */\n \n public static final class Factory\n {\n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item newValue(java.lang.Object obj) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item) type.newValue( obj ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item newInstance() {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item newInstance(org.apache.xmlbeans.XmlOptions options) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }\n \n private Factory() { } // No instance of this class allowed\n }\n }\n \n /**\n * A factory class with static methods for creating instances\n * of this type.\n */\n \n public static final class Factory\n {\n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2 newValue(java.lang.Object obj) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2) type.newValue( obj ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2 newInstance() {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2 newInstance(org.apache.xmlbeans.XmlOptions options) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }\n \n private Factory() { } // No instance of this class allowed\n }\n }", "private IExpressionElement createExpression() throws RodinDBException {\n\t\tfinal IMachineRoot mch = createMachine(\"mch\");\n\t\treturn mch.createChild(IVariant.ELEMENT_TYPE, null, null);\n\t}", "public Object getElement()\n {return data;}", "public void push(Object anElement);", "public Element encode(DocumentBuilderFactory factory, DocumentBuilder builder, Document document)\n\t{\n\t\t// create element\n\t\tElement element = document.createElement(\"SycamoreSystemMemory\");\n\n\t\t// children\n\t\tElement selfPositionsElem = document.createElement(\"selfPositions\");\n\t\tfor (int i = 0; i < selfPositions.size(); i++)\n\t\t{\n\t\t\tElement selfpositionElem = document.createElement(\"selfPosition\");\n\n\t\t\tP position = selfPositions.elementAt(i);\n\t\t\tselfpositionElem.appendChild(position.encode(factory, builder, document));\n\t\t\tselfPositionsElem.appendChild(selfpositionElem);\n\t\t}\n\n\t\tElement snapshotsElem = document.createElement(\"snapshots\");\n\t\tfor (int i = 0; i < snapshots.size(); i++)\n\t\t{\n\t\t\tElement snapshotElem = document.createElement(\"snapshot\");\n\t\t\tVector<P> points = snapshots.elementAt(i);\n\t\t\tfor (int j = 0; j < points.size(); j++)\n\t\t\t{\n\t\t\t\tElement positionElem = document.createElement(\"position\");\n\n\t\t\t\tP position = points.elementAt(j);\n\t\t\t\tpositionElem.appendChild(position.encode(factory, builder, document));\n\t\t\t\tsnapshotElem.appendChild(positionElem);\n\t\t\t}\n\n\t\t\tsnapshotsElem.appendChild(snapshotElem);\n\t\t}\n\n\t\t// append children\n\t\telement.appendChild(selfPositionsElem);\n\t\telement.appendChild(snapshotsElem);\n\n\t\treturn element;\n\t}" ]
[ "0.5879979", "0.5732589", "0.549658", "0.54914004", "0.5468761", "0.53543437", "0.53056914", "0.5138374", "0.5127206", "0.5113685", "0.50862885", "0.5062806", "0.5054663", "0.50247705", "0.4974982", "0.49707437", "0.49661982", "0.49415767", "0.49281088", "0.491221", "0.4899668", "0.4869005", "0.4844366", "0.4843423", "0.48235437", "0.48192185", "0.4805757", "0.47891763", "0.47836098", "0.4768018", "0.47654226", "0.47653702", "0.4737074", "0.47335234", "0.47303465", "0.47287887", "0.47272414", "0.47272414", "0.46973428", "0.4693091", "0.46850944", "0.46850514", "0.46786886", "0.46673277", "0.46607834", "0.46574414", "0.46552804", "0.46389893", "0.46255836", "0.4622716", "0.4615522", "0.46149158", "0.4614637", "0.45888358", "0.45776272", "0.45767123", "0.45684522", "0.456589", "0.45641983", "0.45627624", "0.4561249", "0.45609152", "0.45581698", "0.45282337", "0.45240355", "0.4519817", "0.4519184", "0.45191565", "0.4508945", "0.45005184", "0.44974437", "0.44937384", "0.44923344", "0.44922325", "0.44863713", "0.44796136", "0.44784155", "0.44783506", "0.44748184", "0.4467846", "0.44659913", "0.4465918", "0.44628677", "0.44604313", "0.44604313", "0.44553813", "0.4450114", "0.44496748", "0.44495845", "0.44484174", "0.44446877", "0.4442267", "0.44380346", "0.44351423", "0.44277418", "0.44256875", "0.44236842", "0.44213152", "0.44205326", "0.44179466", "0.44175306" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<FqcInspectionTemplateL> myselect(IRequest requestContext, FqcInspectionTemplateL dto, int page, int pageSize) { PageHelper.startPage(page, pageSize); return fqcInspectionTemplateLMapper.myselect(dto); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
IBaseService self = ((IBaseService) AopContext.currentProxy());
@Override public List<FqcInspectionTemplateL> historynumberUpdate(IRequest request, @StdWho List<FqcInspectionTemplateL> list) { for (FqcInspectionTemplateL t : list) { switch (((BaseDTO) t).get__status()) { case DTOStatus.ADD: self().insertSelective(request, t); break; case DTOStatus.UPDATE: if (useSelectiveUpdate()) { t.setHistoryNum(t.getHistoryNum()+1); self().updateByPrimaryKeySelective(request, t); } else { t.setHistoryNum(t.getHistoryNum()+1); self().updateByPrimaryKey(request, t); } break; case DTOStatus.DELETE: self().deleteByPrimaryKey(t); break; default: break; } } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface AopProxy {\n Object getProxy();\n\n Object getProxy(ClassLoader classLoader);\n\n}", "MyService getService() {\n return MyService.this;\n }", "@Override @SuppressWarnings({ \"cast\",\"unchecked\" })\n\tpublic Object invoke(final MethodInvocation invocation) throws Throwable {\t\t\t\n\t\t// Do not intercept the ServicesClientProxy base type methods\n\t\tif (!_isInterceptedMethodCall(invocation.getMethod())) return invocation.proceed();\n\n\t\t// If the return type is a ServiceInteface or a SubServiceInterface, do the lazy load if needed\n\t\tObject out = invocation.proceed();\t// <-- this can return null if the ServiceInterface or SubServiceInterface was NOT created previously\n\t\t\n\t\tif (out != null) return out;\t\t// the ServiceInterface was previously created\n\t\t\n\t\t// Type of the proxy aggregator\n\t\tServiceProxiesAggregator serviceProxyAggregator = (ServiceProxiesAggregator)invocation.getThis();\n\t\tClass<? extends ServiceProxiesAggregator> serviceProxyAggregatorType = (Class<? extends ServiceProxiesAggregator>)serviceProxyAggregator.getClass();\n\t\t\n\t\t// the ServiceInterface or SubServiceInterface concrete type \n\t\tClass<?> returnType = invocation.getMethod().getReturnType();\n\t\t\n\t\tif (returnType != null && ReflectionUtils.isImplementing(returnType,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ServiceInterface.class)) {\n\t\t\t// Find the field at the aggregator type that contains the proxy\n\t\t\tClass<? extends ServiceInterface> serviceInterfaceType = (Class<? extends ServiceInterface>)returnType;\n\t\t\tField serviceInterfaceBaseField = _findServiceInterfaceField(serviceProxyAggregatorType,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t serviceInterfaceType);\n\t\t\t\n\t\t\t// get the service impl (if available) or proxy instance from the injected MapBinder\n\t\t\tServiceInterface serviceImplOrProxy = _allServiceInterfaceTypesToImplOrProxyMappings.get().get(serviceInterfaceType);\n\t\t\tif (serviceImplOrProxy != null) {\n\t\t\t\tReflectionUtils.setFieldValue(serviceProxyAggregator,serviceInterfaceBaseField,\n\t\t\t\t\t\t\t\t\t\t\t serviceImplOrProxy,\n\t\t\t\t\t\t\t\t\t\t\t false);\n\t\t\t\tout = serviceImplOrProxy;\n\t\t\t\tlog.info(\"[ServiceProxy aggregation] > {} field of type {} was not initialized on services proxy aggregator {} so an instance of {} was lazily created\",\n\t\t\t\t\t\t serviceInterfaceBaseField.getName(),serviceInterfaceType,serviceProxyAggregator.getClass(),serviceImplOrProxy.getClass());\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}", "public interface OpLogService extends BaseService<OpLog> {\n}", "public interface IWecorpAccountService extends IBaseService<WecorpAccount>, ProxySelf<IWecorpAccountService> {\n\n public WecorpAccount getWoaAccountByAppId(String appid);\n\n public WecorpAccount getWoaAccountByAccountNum(String accountNum);\n}", "@Override\n\tprotected BaseService getService() {\n\t\treturn null;\n\t}", "private Service getService() {\n return service;\n }", "public interface Advice extends MethodInterceptor {\n public Pointcut getPointcut();\n}", "@Override\n\tpublic BaseService<Object> getService() {\n\t\treturn analyticsService;\n\t}", "public interface Service1 extends Service {\n}", "public interface BaseService<T> extends IService<T> {\n}", "public AbstractService getService() {\n return service;\n }", "PubService getService() {\n return PubService.this;\n }", "@Test\n\tpublic void testAroundAdvice() {\n\t\tSystem.out.println(customerService.getClass().getName());\n\t\t//customerService.applyForChequeBook(12345);\n\t\t//customerService.stopCheque(12345);\n\t\t//manually creating a new instance bypassing sping\n\t\tcustomerService = new CustomerServiceImpl();\n\t\tcustomerService.applyForChequeBook(12345);\n\t\tcustomerService.stopCheque(12345);\n\n\t}", "public interface PanSequenceService extends BaseService<PanSequence> {\n}", "@Override\r\n public Object invoke(Object proxy, Method method, Object[] args) throws Throwable\r\n {\r\n HashSet<IInterceptor> interceptors;\r\n\r\n // Instantiation of the desired service\r\n if(implementation != null) {\r\n try {\r\n instance = InstanceManager.getInstance(implementation);\r\n\r\n // Cascade injection\r\n EJBInjector.inject(instance);\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n throw new ImpossibleAllocationException();\r\n }\r\n }\r\n\r\n // Get interceptors\r\n interceptors = InterceptorManager.getInterceptors(instance, method);\r\n\r\n // Before\r\n for(IInterceptor interceptor : interceptors) {\r\n interceptor.before(instance, method, args);\r\n }\r\n\r\n Object methodReturn = null;\r\n Throwable exceptionReturn = null;\r\n\r\n try {\r\n methodReturn = method.invoke(instance, args);\r\n } catch (InvocationTargetException e) {\r\n exceptionReturn = e.getTargetException();\r\n }\r\n\r\n // After\r\n for(IInterceptor interceptor : interceptors) {\r\n interceptor.after(instance, method, methodReturn, exceptionReturn, args);\r\n }\r\n\r\n // If there has been an exception, throw it\r\n if(exceptionReturn != null) {\r\n throw exceptionReturn;\r\n }\r\n\r\n return methodReturn;\r\n }", "public Object getService() {\n return service;\n }", "public interface Service {\n\n}", "public interface Service {\n\n}", "MainService getService() {\n return MainService.this;\n }", "public interface ProductService extends BaseService<Product> {\n}", "protected Proxy(InvocationHandler h) { }", "@Bean(name=\"ordersService\")\r\n\t@Scope(value=\"prototype\", proxyMode=ScopedProxyMode.TARGET_CLASS) \r\n\tpublic OrdersBusinessInterface getOrdersService()\r\n\t{\r\n\t\treturn new OrdersBusinessService();\r\n\t}", "@Override\n\tpublic BaseServic<Banco> getService() {\n\t\treturn service;\n\t}", "public interface ImportedOsgiServiceProxy {\r\n\r\n\t/**\r\n\t * Provides access to the service reference used for accessing the backing\r\n\t * object. The returned object is a proxy over the native ServiceReference\r\n\t * obtained from the OSGi platform, so that proper service tracking is\r\n\t * obtained. This means that if the imported service change, the updates are\r\n\t * reflected to the returned service reference automatically.\r\n\t * \r\n\t * @return backing object service reference\r\n\t */\r\n\tServiceReferenceProxy getServiceReference();\r\n}", "public interface ServiceContext {\r\n /**\r\n * @return configuration for the service.\r\n */\r\n ServiceConfigurable service();\r\n}", "public Object getProxy() {\n\t\t\r\n\t\treturn getProxy(this.advised.getTargetClass().getClassLoader());\r\n\t}", "public interface ISystemUpdateHistoryService extends IBaseService<SystemUpdateHistory> {\n\n}", "public interface InspectSchemeServiceI extends BaseService<InspectScheme> {\n}", "public interface SloganService extends BaseService<Slogan> {\n}", "public interface SysLogService extends CurdService<SysLog> {\n\n}", "Object intercept(T proxy, Method method, Object[] args, SuperMethod superMethod);", "public void service() {\n\t}", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation1();\n\t\t}", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation2();\n\t\t}", "protected AbstractApplicationContext getServicesContext() {\r\n\t\treturn this.servicesContext;\r\n\t}", "public interface SysMessageService extends Service<SysMessage> {\r\n\r\n}", "public interface ServiceIface {\n void service();\n}", "public interface HibernateService {\n\n <T> T initializeAndUnproxy(T entity);\n}", "public interface CartService extends Service<Cart> {\n\n}", "public interface SysPluginService extends BaseService<Sys_plugin> {\n}", "@Override\n public void onServiceConnected(ComponentName componentName, IBinder iBinder) {\n selfServiceMethodSolver = (ISelfMethod) iBinder;\n Log.d(\"BindLog\", \"Client - SelfService已Bind成功,并获取了代理\");\n }", "public interface BaseUserService\n extends UserDetailsService {\n}", "public interface Service {\n // Service-specific methods go here\n }", "public interface DiscountService extends ServiceInterface<DiscountEntity>{\n}", "public interface RolUsuarioSessionService extends _RolUsuarioSessionService{\r\n\r\n}", "public interface BeanSelfAware {\n\n //设定代理到类内部,嵌套调用时使用代理进行方法调用\n void setSelf(Object obj);\n\n}", "@Override\n public Object invoke(Object proxy, Method method, Object[] args)\n throws Throwable {\n if (method.getDeclaringClass() == Object.class) {\n return method.invoke(this, args);\n }\n ServiceMethod<Object, Object> serviceMethod =\n (ServiceMethod<Object, Object>) loadServiceMethod(method);\n ServiceCall<Object> serviceCall = new ServiceCall<>(serviceMethod, args);\n return serviceMethod.adapt(serviceCall, args);\n }", "private static interface Service {}", "@Pointcut(\"execution(* com.bharath.spring.mvc.aop.service.*.*(..))\")\n private void forServicePackage() {}", "public interface EmployeeService extends BaseService<Employee>{\r\n}", "public interface OrderedProductService extends Service<OrderedProduct> {\n}", "public interface AlarmDataEnvService extends Service<AlarmDataEnv> {\n\n}", "@VisibleForTesting\n public IAppOpsService injectIAppOpsService() {\n return IAppOpsService.Stub.asInterface(ServiceManager.getService(\"appops\"));\n }", "public interface ControllcurveService extends Service<Controllcurve> {\n\n}", "public interface BaseApiService {\n // Empty declaration\n}", "public interface PaTaskItemPointViewService extends Service<PaTaskItemPointView> {\n\n}", "abstract public LoggingService getLoggingService();", "interface Injector {\n void inject(InternalContext context, Object o);\n }", "public interface KioskLogService extends GenericService<KioskLog, Long> {\n\t\n}", "ServiceReferenceProxy getServiceReference();", "public MyCustomInterceptor(UtilisateurDAO userDAO){\r\n this.userDAO = userDAO ;\r\n }", "public interface ISpringService {\n\tpublic String getServiceName();\n\n\tpublic Properties getServiceProperties();\n}", "@Override\n protected ProdutoServicoImpl getservice() {\n return produtoService;\n }", "public Service getService() {\n\t\treturn this;\n\t}", "ClassOfService getClassOfService();", "ServiceEntity getService();", "public Service getService()\n {\n return (Service) getSource();\n }", "public interface WeighInService {\n}", "public interface SportInfoService extends BaseService<SportInfo> {\n}", "private ServiceLocator() {\r\n\t\t\r\n\t}", "@Override\n public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {\n if (method.getName().equals(\"toString\") || method.getName().equals(\"hashCode\")) {\n return methodProxy.invokeSuper(o, objects);\n }\n logger.debug(\"Start microservice method {} in {}\", method.getName(), o.toString());\n\n List<String> result = new ArrayList<>();\n result.add(\"Ivan\");\n result.add(\"Petr\");\n\n logger.debug(\"End microservice method {} in {}\", method.getName(), o.toString());\n return result;\n }", "public interface PredictsService extends Service<Predicts> {\n\n}", "private void inject() {\n }", "public Service getService() {\n return serviceInstance;\n }", "public void doLog() {\n SelfInvokeTestService self = (SelfInvokeTestService)context.getBean(\"selfInvokeTestService\");\n self.selfLog();\n //selfLog();\n }", "public interface NewsArticleService extends ArticleExtendedService {\n}", "public interface GoodStyleService extends Service<GoodStyle> {\n\n}", "public Service getService() {\n\t\treturn _service;\n\t}", "public Method getAopMethod() {\r\n\t\t\treturn aopMethod;\r\n\t\t}", "public interface MineService {\n}", "public interface IssuePhotoService extends BaseService<IssuePhotoBean> {\n}", "public static com.itheima.alipay.IALiPayService asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.itheima.alipay.IALiPayService))) {\nreturn ((com.itheima.alipay.IALiPayService)iin);\n}\nreturn new com.itheima.alipay.IALiPayService.Stub.Proxy(obj);\n}", "@Override\n\tpublic Service upstreamServiceInit() {\n\t\treturn null;\n\t}", "@Override\n public Object createPerJoinpoint(Advisor advisor, Joinpoint jp)\n {\n TransactionManagementType type = TxUtil.getTransactionManagementType(advisor);\n if (type == TransactionManagementType.BEAN)\n return new NullInterceptor();\n \n TransactionManager tm = TxUtil.getTransactionManager();\n \n Method method = ((MethodJoinpoint) jp).getMethod();\n int timeout = resolveTransactionTimeout(advisor, method);\n \n if (policy == null)\n {\n super.initialize();\n }\n \n TransactionAttributeType txType = getTxType(advisor, jp);\n \n if (txType.equals(TransactionAttributeType.NEVER))\n {\n // make sure we use the EJB3 interceptor, not the AOP one. \n return new TxInterceptor.Never(tm, policy);\n }\n else if (txType.equals(TransactionAttributeType.REQUIRED))\n {\n return new TxInterceptor.Required(tm, policy, timeout);\n }\n else if (txType.equals(TransactionAttributeType.REQUIRES_NEW))\n {\n return new TxInterceptor.RequiresNew(tm, policy, timeout);\n }\n else if(txType.equals(TransactionAttributeType.NOT_SUPPORTED))\n {\n return new TxInterceptor.NotSupported(tm, policy, timeout);\n }\n else if(txType.equals(TransactionAttributeType.MANDATORY))\n {\n return new TxInterceptor.Mandatory(tm, policy, timeout);\n }\n else if(txType.equals(TransactionAttributeType.SUPPORTS))\n {\n return new TxInterceptor.Supports(tm, policy, timeout);\n }\n else\n {\n Object interceptor = super.createPerJoinpoint(advisor, jp);\n return interceptor;\n }\n }", "private ServiceLocator(){}", "public interface AttentionService extends CoreService<AttentionDO> {\n \n}", "@Test\n public void testProxy() {\n Dell dell = new Dell();\n Proxy proxy = new Proxy(dell);\n proxy.salePc();\n }", "public CommonService getCommonService()\n {\n return commonService;\n }", "public interface UserService extends Service<User> {\n\n}", "public interface UserService extends Service<User> {\n\n}", "public interface UserService extends Service<User> {\n\n}", "public int calProxyService() {\n\t\treturn proxyDao.calProxyService();\n\t}", "public Class getServiceClass()\n {\n return serviceClass;\n }", "public interface SysTaskService extends BaseService<Sys_task> {\n\n}", "@Override\r\n\tpublic Object invoke(MethodInvocation invocation) throws Throwable {\n\t\tSystem.out.println(\"AroundMethodInterceptor start ......\");\r\n\t\tObject or=invocation.proceed();\r\n\t\tSystem.out.println(\"AroundMethodInterceptor end ......\");\r\n\t\treturn or;\r\n\t}", "public PolicyServiceDelegate()\n {\n log.debug(\"\") ;\n log.debug(\"----\\\"----\") ;\n log.debug(\"PolicyServiceDelegate()\") ;\n try\n {\n service = getService(CommunityConfig.getServiceUrl());\n }\n catch(Exception e) {\n e.printStackTrace();\n service = null;\n }\n log.debug(\"----\\\"----\") ;\n log.debug(\"\") ;\n }", "Proxy getProxy();", "private FournisseurArboTraficService() {\r\n\t\tsuper();\r\n\t}", "public interface AccountInfoService extends IService<AccountInfo> {\n\n}", "@Around(\"execution(* be.pxl.backend.restcontrollers.*.*(..))\")\n public Object logServiceAccess(ProceedingJoinPoint joinPoint) throws Throwable {\n //What the proxy will return\n Object retVal ;\n //Get the userdetails (Spring) of the user performing the request\n try{\n UserDetails auth = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n //Get the account of that user\n Account account = accountService.findByUsername(auth.getUsername());\n //Checks whether or not the request is allowed to be executed and if it is, executes it and saves the request to the database\n Boolean isAllowedToMakeRequest = performedRequestService.ExecuteRequest(account,joinPoint.getSignature().toLongString());\n\n\n if(isAllowedToMakeRequest){\n //Proceed the request as usual\n retVal = joinPoint.proceed();\n }\n else {\n //If the user has done too many requests, log that he tried again and return TOO_MANY_REQUESTS status code\n LOGGER.info(auth.getUsername() + \" has done too many requests\");\n retVal = new ResponseEntity(HttpStatus.TOO_MANY_REQUESTS);\n }\n\n }catch (Exception ex){\n retVal = joinPoint.proceed();\n }\n\n return retVal;\n }" ]
[ "0.68836135", "0.6567319", "0.6477139", "0.643896", "0.63472575", "0.62764186", "0.6044986", "0.6022762", "0.5996878", "0.5983437", "0.5939997", "0.5923634", "0.59181434", "0.5898906", "0.5888355", "0.5872472", "0.58621", "0.5855299", "0.5855299", "0.5835947", "0.5835322", "0.5821455", "0.5818407", "0.58171797", "0.5815546", "0.58154225", "0.58104515", "0.58089125", "0.5793035", "0.5785083", "0.57698137", "0.57683593", "0.57609636", "0.57495594", "0.5738154", "0.5730286", "0.57291365", "0.5721528", "0.5721006", "0.57163817", "0.571419", "0.5711198", "0.571095", "0.5699825", "0.5688132", "0.56874144", "0.5686071", "0.5684512", "0.5682035", "0.5681549", "0.56759214", "0.5671711", "0.5664363", "0.56576806", "0.564713", "0.5619567", "0.5603279", "0.5600888", "0.55922425", "0.5588547", "0.5581359", "0.5571225", "0.55658627", "0.55597305", "0.5557107", "0.5556069", "0.5556029", "0.55537176", "0.5550167", "0.5545023", "0.5541124", "0.55392694", "0.55270904", "0.5518067", "0.551134", "0.5510648", "0.55055475", "0.5501758", "0.54911935", "0.54828614", "0.5480428", "0.5480136", "0.54796463", "0.54764485", "0.54712707", "0.54687846", "0.5468329", "0.5467364", "0.5458625", "0.5454995", "0.5454995", "0.5454995", "0.5454957", "0.5453929", "0.5453076", "0.5452718", "0.54495883", "0.54459363", "0.54447013", "0.5441983", "0.5431853" ]
0.0
-1
Returns the value of the 'CDA Type' reference. If the meaning of the 'CDA Type' reference isn't clear, there really should be more of a description here...
Act getCDAType();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getcType() {\n return cType;\n }", "DType getType();", "public String getCocType() {\n\t\treturn cocType;\n\t}", "public String getCtype() {\n return ctype;\n }", "public String getLINK_TYPE_CD() {\n return LINK_TYPE_CD;\n }", "public String getAccType() {\n\t\tString Acctype = null;\r\n\t\ttry{\r\n\t\t\tif(selectedIndex == 0){\r\n\t\t\t\tAcctype = \"SA\";\r\n\t\t\t}else if (selectedIndex == 1){\r\n\t\t\t\tAcctype = \"CA\";\r\n\t\t\t}else if (selectedIndex == 2){\r\n\t\t\t\tAcctype = \"OA\";\r\n\t\t\t}else if (selectedIndex == 3){\r\n\t\t\t\tAcctype = \"CC\";\r\n\t\t\t}else if (selectedIndex == 4){\r\n\t\t\t\tAcctype = \"LA\";\r\n\t\t\t}\r\n\t\t}catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn Acctype;\r\n\t}", "public String getLBR_CNAB240DocType();", "public int getC_DocType_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_DocType_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public String getRefType() {\n return refType;\n }", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "PSObject getTypeReference();", "com.google.cloud.datacatalog.FieldType getType();", "public String getHelp() {\n\t\treturn \"DCAU type\";\n\t}", "public String getType(String name) {\n/* 164 */ return \"CDATA\";\n/* */ }", "public CIType getType() {\r\n\t\treturn type;\r\n\t}", "public char getType() {\r\n return type.charAt(1);\r\n }", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "public int getType() throws PDFNetException {\n/* 466 */ return GetType(this.a);\n/* */ }", "public char getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\tCharacter tempType = (char)type;\n\t\treturn tempType.toString();\n\t}", "Coding getType();", "public char getType() {\r\n return type;\r\n }", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public DvText getType() {\n return type;\n }", "public char getType(){\n\t\treturn type;\n\t}", "public CWLType getType() {\n return type;\n }", "public char getType() {\n return type;\n }", "public char getType() {\n return type;\n }", "public final smaliTreeWalker.reference_type_descriptor_return reference_type_descriptor() throws RecognitionException {\n smaliTreeWalker.reference_type_descriptor_return retval = new smaliTreeWalker.reference_type_descriptor_return();\n retval.start = input.LT(1);\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1146:3: ( ( CLASS_DESCRIPTOR | ARRAY_DESCRIPTOR ) )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1146:5: ( CLASS_DESCRIPTOR | ARRAY_DESCRIPTOR )\n {\n if (input.LA(1) == ARRAY_DESCRIPTOR || input.LA(1) == CLASS_DESCRIPTOR) {\n input.consume();\n state.errorRecovery = false;\n } else {\n MismatchedSetException mse = new MismatchedSetException(null, input);\n throw mse;\n }\n\n retval.type = ((CommonTree) retval.start).getText();\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return retval;\n }", "public java.lang.String getClttype() {\n return clttype;\n }", "public String getType()\n \t{\n \t\treturn this.type;\n \t}", "public void setLINK_TYPE_CD( String lINK_TYPE_CD ) {\n LINK_TYPE_CD = lINK_TYPE_CD;\n }", "ComponentTypes.AccessPoint getType();", "public String getType()\r\n\t{\r\n\t\treturn type;\r\n\t}", "public String get_type()\r\n\t{\r\n\t\treturn this.type;\r\n\t}", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "public String getType() { return type; }", "public String type();", "public String getType(int index)\n {\n if (index < 0 || index >= attributesList.size())\n {\n return null;\n }\n String type = parser.getAttributeType(elementName, getQName(index));\n if (type == null)\n {\n return \"CDATA\";\n }\n // ... use DeclHandler.attributeDecl to see enumerations\n if (type == \"ENUMERATION\")\n {\n return \"NMTOKEN\";\n }\n return type;\n }", "public String getAccessTypeCd() {\n\t return this.rtCode;\n\t}" ]
[ "0.7385301", "0.69186676", "0.6909926", "0.6829763", "0.67283595", "0.662665", "0.66002613", "0.6365875", "0.6340756", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6238689", "0.6235464", "0.62177044", "0.6205039", "0.6199379", "0.6194468", "0.61726886", "0.61703205", "0.61703205", "0.61703205", "0.61703205", "0.61703205", "0.61703205", "0.61703205", "0.61703205", "0.61703205", "0.61703205", "0.61703205", "0.61703205", "0.61703205", "0.615503", "0.6136949", "0.61230725", "0.6097792", "0.60949045", "0.6094723", "0.6094723", "0.6094723", "0.6094723", "0.6094723", "0.6094723", "0.6094723", "0.6094723", "0.6094723", "0.6094723", "0.6094723", "0.6094723", "0.6094723", "0.60819966", "0.60683817", "0.6066692", "0.6031939", "0.6031939", "0.6005006", "0.5993989", "0.59736985", "0.5964929", "0.5953095", "0.5950069", "0.5945226", "0.59443927", "0.59443927", "0.59443927", "0.59443927", "0.59443927", "0.59443927", "0.59443927", "0.59443927", "0.59443927", "0.59443927", "0.59443927", "0.59443927", "0.59443927", "0.5939028", "0.59329176", "0.59254235", "0.5924142" ]
0.75517416
0
CCD Policy Activity SHALL contain at least one [1..] id (CONF51).
II addId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasCampaignId();", "boolean hasCampaignId();", "boolean hasPrerequisiteId();", "private int isPrivacyModelFulfilled(Transformation<?> transformation, HashGroupifyEntry entry) {\n \n // Check minimal group size\n if (minimalClassSize != Integer.MAX_VALUE && entry.count < minimalClassSize) {\n return 0;\n }\n \n // Check other criteria\n // Note: The d-presence criterion must be checked first to ensure correct handling of d-presence with tuple suppression.\n // This is currently ensured by convention. See ARXConfiguration.getCriteriaAsArray();\n for (int i = 0; i < classBasedCriteria.length; i++) {\n if (!classBasedCriteria[i].isAnonymous(transformation, entry)) {\n return i + 1;\n }\n }\n return -1;\n }", "boolean isActivityExist(long activityId);", "public LearningResultHasActivity[] findWhereActivityIdActivityEquals(int activityIdActivity) throws LearningResultHasActivityDaoException;", "private static void checkIDConstraintRestriction(XSElementDecl derivedElemDecl, XSElementDecl baseElemDecl) throws XMLSchemaException {}", "public boolean isAssocId();", "public boolean hasCampaignId() {\n return campaignIdBuilder_ != null || campaignId_ != null;\n }", "public boolean hasCampaignId() {\n return campaignIdBuilder_ != null || campaignId_ != null;\n }", "boolean hasAchievementId();", "boolean hasAchievementId();", "public List<String> oneConnectionIdMustBePresent() {\n return this.oneConnectionIdMustBePresent;\n }", "@Test\n void test50IdsAllowed() throws Exception {\n setEppInput(\"host_check_50.xml\");\n runFlow();\n }", "public boolean hasCampaignId() {\n return campaignId_ != null;\n }", "public boolean hasCampaignId() {\n return campaignId_ != null;\n }", "public boolean isEveryIdValid()\n {\n return(idValidation.size()==0);\n }", "public MergingPrerequisites withOneConnectionIdMustBePresent(List<String> oneConnectionIdMustBePresent) {\n this.oneConnectionIdMustBePresent = oneConnectionIdMustBePresent;\n return this;\n }", "boolean hasPersonCharacteristicIds();", "static final /* synthetic */ boolean m114833a(Activity activity) {\n if (!(activity instanceof C41387m) || !((C41387m) activity).mo88338b()) {\n return false;\n }\n return true;\n }", "boolean isSetIdVerificationResponseData();", "boolean hasSuccessorId();", "boolean policyDetailExist(PolicyDetail policyDetail);", "private void checkCreatingPendingIntentsWithoutIntentVariable(Source<CompilationUnit> java) {\n java.getModel().findAll(MethodCallExpr.class).stream()\n .filter(expr -> expr.getName().getIdentifier().matches(\"getActivity|getBroadcast|getService\"))\n .filter(expr -> expr.getArguments().size() >= 4)\n .filter(expr -> expr.getArguments().get(2).isObjectCreationExpr())\n .filter(expr -> isCreatingImplicitIntent(expr.getArguments().get(2).asObjectCreationExpr()))\n .forEach(expr -> addJavaIssue(Severity.VULNERABILITY, \".PENDING_INTENT\", java.getFile(), expr));\n\n // Works for: getActivities(this, 0, new Intent[] { new Intent(...), ...}, 0)\n java.getModel().findAll(MethodCallExpr.class).stream()\n .filter(expr -> expr.getName().getIdentifier().matches(\"getActivities\"))\n .filter(expr -> expr.getArguments().size() >= 4)\n .filter(expr -> expr.getArguments().get(2).isArrayCreationExpr())\n .filter(expr -> isCreatingImplicitIntentsArray(expr.getArguments().get(2).asArrayCreationExpr()))\n .forEach(expr -> addJavaIssue(Severity.VULNERABILITY, \".PENDING_INTENT\", java.getFile(), expr));\n }", "@Override\n\tpublic boolean deviceHasActiveCoupons(String deviceUUID) throws ASException {\n\t\tDeviceInfo di = deviceInfoDao.get(deviceUUID, true);\n\t\tif(StringUtils.hasText(di.getUserId())) {\n\t\t\tDate now = new Date();\n\t\t\tList<Integer> redeemStatus = Arrays.asList(new Integer[] {CampaignActivity.REDEEM_STATUS_DELIVERED, CampaignActivity.REDEEM_STATUS_ACCEPTED});\n\t\t\tList<CampaignActivity> list = caDao.getUsingUserAndRedeemStatusAndRange(di.getUserId(), redeemStatus, null, null);\n\t\t\tfor( CampaignActivity obj : list ) {\n\t\t\t\tif( obj.getLimitDateTime().after(now)) return true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean collectiveDeliveryPolicyHasEntry(Message msg){\n\t\treturn collectiveDatastruct.containsKey(new DeliveryPolicyDataStructureKey(msg.getId(), msg.getSenderId()));\r\n\t}", "private void checkCreatingPendingIntentsWithIntentVariables(Source<CompilationUnit> java) {\n List<String> implicitIntentsVariables = java.getModel().findAll(ObjectCreationExpr.class).stream()\n .filter(expr -> expr.getType().getName().getIdentifier().equals(\"Intent\"))\n .filter(this::isCreatingImplicitIntent)\n .map(Node::getParentNode)\n .flatMap(Optional::stream)\n .filter(node -> node instanceof VariableDeclarator)\n .map(node -> (VariableDeclarator) node)\n .map(VariableDeclarator::getName)\n .map(SimpleName::getIdentifier)\n .collect(Collectors.toList());\n java.getModel().findAll(MethodCallExpr.class).stream()\n .filter(expr -> expr.getName().getIdentifier().matches(\"getActivity|getBroadcast|getService\"))\n .filter(expr -> expr.getArguments().size() >= 4)\n .filter(expr -> expr.getArguments().get(2).isNameExpr())\n .filter(expr -> implicitIntentsVariables.contains(expr.getArguments().get(2).asNameExpr().getName().getIdentifier()))\n .forEach(expr -> addJavaIssue(Severity.VULNERABILITY, \".PENDING_INTENT\", java.getFile(), expr));\n }", "@UpnpAction(out = {@UpnpOutputArgument(name = \"Result\", stateVariable = \"A_ARG_TYPE_Result\")})\n/* */ public int isAuthorized(@UpnpInputArgument(name = \"DeviceID\", stateVariable = \"A_ARG_TYPE_DeviceID\") String deviceID) {\n/* 118 */ return 1;\n/* */ }", "boolean isAssignedForChannel(String ccid);", "public boolean isSetActiveID() {\n return this.ActiveID != null;\n }", "boolean hasAdId();", "public void m13410a() {\n if (this.f12818b == null) {\n throw new C4550jl(\"Required field 'id' was not present! Struct: \" + toString());\n } else if (this.f12820c == null) {\n throw new C4550jl(\"Required field 'appId' was not present! Struct: \" + toString());\n }\n }", "boolean hasCampaignAudienceView();", "boolean hasCampaignSharedSet();", "private final boolean matchActivity(AbstractArea area, ExecutionEntity entity) {\r\n\t\tboolean expr1 = StringUtils.equals(area.getActivityId(), entity.getActivityId());\r\n\t\tboolean expr2 = StringUtils.equals(area.getProcessId(), entity.getProcessDefinitionId());\r\n\r\n\t\treturn expr1 && expr2;\r\n\t}", "boolean hasCampaignTypeId();", "private boolean checkCompletedCourse(int id) {\r\n boolean x = false;\r\n for (Registration registration : completeCourses) {\r\n if (id == registration.getCourseId()) {\r\n x = true;\r\n break;\r\n }\r\n x = false;\r\n }\r\n return x;\r\n }", "boolean getCampaignIdNull();", "boolean hasBusinessCircleId();", "public int getC_Activity_ID();", "public Rule idExprReq()\n \t{\n \t\treturn firstOf(field(), call());\n \t}", "boolean getXAxisCharacteristicIdNull();", "@Test\n public void minimumValidClaim() {\n claim.setClaimId(EXPECTED_CLAIM_ID);\n claim.setDcn(\"dcn\");\n claim.setIntermediaryNb(\"inter\");\n claim.setHicNo(\"hicn\");\n claim.setCurrStatus('T');\n claim.setCurrLoc1('M');\n claim.setCurrLoc2(\"9000\");\n claim.setLastUpdated(clock.instant());\n claimBuilder\n .setRdaClaimKey(\"claim_id\")\n .setDcn(\"dcn\")\n .setIntermediaryNb(\"inter\")\n .setHicNo(\"hicn\")\n .setCurrStatusEnum(FissClaimStatus.CLAIM_STATUS_RTP)\n .setCurrLoc1Enum(FissProcessingType.PROCESSING_TYPE_MANUAL)\n .setCurrLoc2Enum(FissCurrentLocation2.CURRENT_LOCATION_2_CABLE);\n changeBuilder\n .setSeq(MIN_SEQUENCE_NUM)\n .setChangeType(ChangeType.CHANGE_TYPE_INSERT)\n .setClaim(claimBuilder.build());\n assertChangeMatches(RdaChange.Type.INSERT);\n }", "private boolean isInList(int id){\n for (Module module :event.getModules()){\n if(module.getInt_type() == id+1){\n return true;\n }\n }\n return false;\n }", "public boolean approveAppointment() {\n\t\tSet <String> set=(HealthCareDAO.map).keySet();\r\n\t\tint count=1;\r\n\t\tfor(String s:set)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"You have a center \"+map.get(s).getCenterName() +\"--\"+\"Center and id is \"+s);\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\tSystem.out.println(\"Enter Center id :\");\r\n\t\tString str=scan.next();\r\n\t\tDiagnoisticCenter center=HealthCareDAO.map.get(str); //get Diagonistic object of given key \r\n\t\tList<Appointment> l=center.getAppointmentList();\r\n\t\t//System.out.println(l);\r\n\t\tint y=1;\r\n\t\tfor(Appointment a:l)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Enter Approval or disapproval\");\r\n\t\tboolean decision=scan.nextBoolean()\t;\r\n\t\t\ta.setApproved(decision);\r\n\t\t\tif(a.isApproved()==true)\r\n\t\t\t{\tSystem.out.println(\"Appointment id number \"+a.getAppointmentid()+\"---is Approved\");}\r\n\t\t\telse {System.out.println(\"Appointment id number \"+a.getAppointmentid()+\"---is not Approved\");}\r\n\t\t\ty++;\r\n\t\t\tif(y>3)\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t}\r\n\t\tcenter.setAppointmentList(l);\r\n\t\tSystem.out.println(\"Appointment List count :\"+l.size());\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public boolean hasChulaId() {\n return chulaIdBuilder_ != null || chulaId_ != null;\n }", "boolean hasFromId();", "public boolean hasCampaignTypeId() {\n return campaignTypeIdBuilder_ != null || campaignTypeId_ != null;\n }", "boolean multiplicity(DiagnosticChain diagnostics, Map<Object, Object> context);", "public boolean isContinuingEducationPassed(CapIDModel capID) throws AAException, RemoteException;", "public boolean isSetIsactivity() {\n return __isset_bit_vector.get(__ISACTIVITY_ISSET_ID);\n }", "boolean hasContentId();", "boolean hasReceivingMajorFragmentId();", "public boolean checkPublic(Integer ctId) {\n ContestEntity contestEntity = getContestById(ctId);\n if (contestEntity.getIsAnyoneCanParticipate().equals(1)\n && contestEntity.getShowInforToAll().equals(1)){\n return true;\n }\n return true;\n }", "private static boolean m34054a(Context context, Intent intent) {\n return context.getPackageManager().queryIntentActivities(intent, 65536).size() > 0;\n }", "boolean hasRecognitionId();", "boolean hasValueCharacteristicId();", "boolean hasQuestId();", "boolean hasQuestId();", "boolean hasQuestId();", "boolean hasQuestId();", "public boolean claim(String id);", "private boolean checkDuplicate(int id) {\r\n boolean x = false;\r\n for (Registration registration : studentRegList) {\r\n if (id == registration.getCourseId()) {\r\n x = true;\r\n break;\r\n }\r\n x = false;\r\n }\r\n return x;\r\n }", "public boolean eventIdAtCapacity(String id){\n Event e = getEvent(id);\n return e.getCapacity() == e.getUsersSignedUp().size();\n }", "boolean hasCombinedAudience();", "private boolean m42a(Context context, AdSize adSize, AttributeSet attributeSet) {\n if (AdUtil.m479c(context)) {\n return true;\n }\n m40a(context, \"You must have AdActivity declared in AndroidManifest.xml with configChanges.\", adSize, attributeSet);\n return false;\n }", "boolean hasXAxisCharacteristicId();", "@Override\n\tpublic boolean deviceHasAvailability(String deviceUUID, String campaignActionId) throws ASException {\n\n\t\ttry {\n\t\t\tDeviceInfo di = deviceInfoDao.get(deviceUUID, true);\n\t\t\tif(StringUtils.hasText(di.getUserId())) {\n\t\t\t\tUser user = userDao.get(di.getUserId(), true);\n\t\t\t\tif(!user.getGeoFenceEnabled() || !user.getReceivePushMessages()) return false;\n\t\t\t}\n\t\t} catch( Exception e ) {\n\t\t\tlog.log(Level.SEVERE, e.getMessage(), e);\n\t\t}\n\t\t \n\t\tList<DeviceMessageLock> locks = dmlDao.getDeviceActiveLocks(deviceUUID, new Date());\n\t\tfor( DeviceMessageLock lock : locks ) {\n\t\t\tif(lock.getScope() != 2 ) return false;\n\t\t\tif(StringUtils.hasText(lock.getCampaignActivityId())) {\n\t\t\t\tCampaignActivity ca = caDao.get(lock.getCampaignActivityId(), true);\n\t\t\t\tCampaignAction cs = csDao.get(ca.getCampaignActionId(), true);\n\t\t\t\tif( cs.getIdentifier().equals(campaignActionId)) return false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// No surprises till now... means it's OK\n\t\treturn true;\n\t}", "public LearningResultHasActivity findByPrimaryKey(LearningResultHasActivityPk pk) throws LearningResultHasActivityDaoException;", "boolean hasResMineID();", "boolean hasCampaign();", "boolean capabilityExist( String id );", "private static boolean checkForMultipleIDs(String id)\n\t{\n\t\tif (id.indexOf(',') >= 0)\n\t\t{\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\treturn true; \n\t}", "public Boolean verifyBusinessID(int id, int count){\n //checks that number entered is more than 0 and less than max\n return !(id > count || id <= 0);\n }", "public void requirePatientId() {\n hasPatientIdParam = true;\n }", "public LearningResultHasActivity[] findByActivity(int activityIdActivity, String namePhase, String projectCode) throws LearningResultHasActivityDaoException;", "@Test\n public void canGetApprovalsWithAutoApproveTrue() {\n addApproval(marissa.getId(), \"c1\", \"uaa.user\", 6000, APPROVED);\n addApproval(marissa.getId(), \"c1\", \"uaa.admin\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"openid\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n\n addApproval(marissa.getId(), \"c1\", \"read\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"write\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n }", "private void validateDatasetId() {\n\n Dataset dataset = getGenericService().find(Dataset.class, mappedDatasetId);\n boolean isValid = getResourceCollection().getResourceIds().contains(mappedDatasetId);\n if(!isValid) {\n addActionError(\"Invalid mapped dataset\");\n }\n\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof ArtifactCon)) {\n return false;\n }\n return id != null && id.equals(((ArtifactCon) o).id);\n }", "boolean hasCampaignCriterion();", "boolean isSetId();", "boolean hasSourceId();", "public boolean hasPermission(String actionId) throws PortalException {\n\t\treturn _themeDisplay.getPermissionChecker().hasPermission(\n\t\t\tthis._themeDisplay.getScopeGroupId(),\n\t\t\tStrasbourgPortletKeys.ACTIVITY_BO,\n\t\t\tStrasbourgPortletKeys.ACTIVITY_BO, actionId);\n\t}", "@java.lang.Override\n public boolean hasChulaId() {\n return chulaId_ != null;\n }", "public List<GLJournalApprovalVO> getActivityfromuniquecode(String OrgId, String ClientId,\n String actId) {\n String sqlQuery = \"\";\n PreparedStatement st = null;\n ResultSet rs = null;\n List<GLJournalApprovalVO> list = null;\n try {\n list = new ArrayList<GLJournalApprovalVO>();\n sqlQuery = \" select f.c_activity_id,act.name from fact_acct f join c_activity act on act.c_activity_id = f.c_activity_id WHERE f.AD_ORG_ID IN (\"\n + OrgId + \") \" + \" AND f.AD_CLIENT_ID IN (\" + ClientId\n + \") AND f.em_efin_uniquecode IN ('\" + actId\n + \"') and f.c_bpartner_id is not null and f.c_salesregion_id is not null and f.c_project_id is not null and f.c_campaign_id is not null and f.c_activity_id is not null and f.user1_id is not null and f.user2_id is not null limit 1\";\n st = conn.prepareStatement(sqlQuery);\n rs = st.executeQuery();\n while (rs.next()) {\n GLJournalApprovalVO VO = new GLJournalApprovalVO();\n VO.setId(rs.getString(1));\n VO.setName(rs.getString(2));\n list.add(VO);\n }\n } catch (Exception e) {\n log4j.error(\"Exception in getOrgs()\", e);\n }\n return list;\n }", "private boolean checkCustomerID(int CusIDPty, int CusID) {\n\t\tint getCusIDPtyValue = 0 ; \t\t\r\n\t\ttry {\r\n\t\t\tgetCusIDPtyValue = SDKSession.getCameraPropertyClint().getCurrentPropertyValue(CusIDPty);\r\n\t\t} catch (IchInvalidSessionException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IchSocketException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IchCameraModeException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IchDevicePropException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t\t\t\t\r\n\t\tif ((getCusIDPtyValue & 0xffff) == (CusID & 0xffff) ) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Test\n\tvoid attributeCardinality() {\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..*]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..0]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..1]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"{\" +\n\t\t\t\t\t\t\t\t\"[1..1]\" + FINDING_SITE + \" != <<\" + PULMONARY_VALVE_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS + \"\" +\n\t\t\t\t\t\t\t\t\"}\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + FINDING_SITE + \" != <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t}", "public boolean hasCampaignTypeId() {\n return campaignTypeId_ != null;\n }", "boolean hasSecIdType();", "private final boolean matchCallActivity(AbstractArea area, ExecutionEntity entity) {\r\n\r\n\t\tif (!(area instanceof CallActivityTaskHighlight)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tCallActivityTaskHighlight callActivity = (CallActivityTaskHighlight) area;\r\n\r\n\t\tfinal String processId = entity.getProcessDefinitionId();\r\n\t\treturn StringUtils.equals(callActivity.getProcessDescriptionId(), processId);\r\n\t}", "private void haveFcmId(){\n Request.getAppData();\n App.removeNonChatUsers();\n boolean termsAccepted = AppPreferences.getBoolean(Keys.termsAccepted,false);\n String userId = AppPreferences.getString(Keys.userId,\"\");\n int userState = AppPreferences.getInt(Keys.userState,0);\n if(!termsAccepted){\n startActivity(new Intent(this, ActivityTerms.class));\n } else if(userId.isEmpty() || userState == 0) {\n startActivity(new Intent(this, ActivitySignInUp.class));\n } else if(userState == 1){\n startActivity(new Intent(this, ActivitySecurityQuestions.class));\n } else if(userState == 2){\n startActivity(new Intent(this, ActivitySetProfile.class));\n } else {\n startActivity(new Intent(this, ActivityContacts.class));\n }\n finish();\n }", "public boolean canAddThreePid() {\n return (supportStage(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY) && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY))\n || (supportStage(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN) && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN));\n }", "@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }", "boolean hasApikeyOpId();", "public boolean hasChannelId()\n {\n return channelId != null && channelId.length() > 0;\n }", "int insertSelective(CmsActivity record);", "private static boolean isPositive(int ID) {\n return ID > 0;\n }", "public boolean validPID(int pid){\n\t\treturn (pid >= 0 && pid < layerAttributes.size() && layerAttributes.get(pid) != null);\n\t}", "public void setAssertionIdLength(int idLength) {\n _assertionIdLength = idLength;\n }", "public final boolean mo44051c(String str) {\n return \"1\".equals(this.f47356a.mo43629a(str, \"gaia_collection_enabled\"));\n }", "public boolean checkCourseID(String id) {\n // check for empty String\n if (id == null || id.strip().equals(\"\")) {\n return false;\n }\n\n // check for length\n if (id.length() > 6) {\n return false;\n }\n\n return true;\n }" ]
[ "0.53438574", "0.53438574", "0.50676215", "0.50667894", "0.5055622", "0.50366384", "0.49764866", "0.4953438", "0.49510378", "0.49510378", "0.49139968", "0.49139968", "0.48941097", "0.47972772", "0.47966352", "0.47966352", "0.4749352", "0.47432223", "0.47055635", "0.47023562", "0.46173045", "0.4613806", "0.4602077", "0.45796815", "0.45776406", "0.4574333", "0.4555556", "0.4548349", "0.4539042", "0.45373324", "0.4535879", "0.4504479", "0.45030865", "0.44979838", "0.44966236", "0.44930384", "0.44871494", "0.44789046", "0.44687754", "0.4465995", "0.44640458", "0.44577143", "0.44513083", "0.44489345", "0.44463375", "0.44456312", "0.44311064", "0.44234252", "0.44232887", "0.44113123", "0.44071898", "0.4394778", "0.43916005", "0.43911865", "0.43858996", "0.4377599", "0.43755406", "0.4373944", "0.4373944", "0.4373944", "0.4373944", "0.4372065", "0.43683204", "0.4365471", "0.4359003", "0.43587598", "0.435036", "0.43429345", "0.4342242", "0.4331103", "0.43241224", "0.43211246", "0.43074378", "0.43052498", "0.43031442", "0.4302929", "0.43012407", "0.4300402", "0.42909592", "0.4288096", "0.4287874", "0.42865023", "0.42810267", "0.42753676", "0.42745182", "0.4273688", "0.4272561", "0.42719686", "0.42642215", "0.42599705", "0.42596778", "0.42584446", "0.42549923", "0.42543116", "0.42520604", "0.42448997", "0.42425787", "0.4240294", "0.42376027", "0.42352176", "0.4234057" ]
0.0
-1
CCD Policy Activity SHALL contain at least one [1..] id (CONF51).
IPayerEntry addId(II value);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasCampaignId();", "boolean hasCampaignId();", "private int isPrivacyModelFulfilled(Transformation<?> transformation, HashGroupifyEntry entry) {\n \n // Check minimal group size\n if (minimalClassSize != Integer.MAX_VALUE && entry.count < minimalClassSize) {\n return 0;\n }\n \n // Check other criteria\n // Note: The d-presence criterion must be checked first to ensure correct handling of d-presence with tuple suppression.\n // This is currently ensured by convention. See ARXConfiguration.getCriteriaAsArray();\n for (int i = 0; i < classBasedCriteria.length; i++) {\n if (!classBasedCriteria[i].isAnonymous(transformation, entry)) {\n return i + 1;\n }\n }\n return -1;\n }", "boolean hasPrerequisiteId();", "boolean isActivityExist(long activityId);", "public LearningResultHasActivity[] findWhereActivityIdActivityEquals(int activityIdActivity) throws LearningResultHasActivityDaoException;", "private static void checkIDConstraintRestriction(XSElementDecl derivedElemDecl, XSElementDecl baseElemDecl) throws XMLSchemaException {}", "public boolean isAssocId();", "public boolean hasCampaignId() {\n return campaignIdBuilder_ != null || campaignId_ != null;\n }", "public boolean hasCampaignId() {\n return campaignIdBuilder_ != null || campaignId_ != null;\n }", "boolean hasAchievementId();", "boolean hasAchievementId();", "public List<String> oneConnectionIdMustBePresent() {\n return this.oneConnectionIdMustBePresent;\n }", "@Test\n void test50IdsAllowed() throws Exception {\n setEppInput(\"host_check_50.xml\");\n runFlow();\n }", "public boolean hasCampaignId() {\n return campaignId_ != null;\n }", "public boolean hasCampaignId() {\n return campaignId_ != null;\n }", "public boolean isEveryIdValid()\n {\n return(idValidation.size()==0);\n }", "public MergingPrerequisites withOneConnectionIdMustBePresent(List<String> oneConnectionIdMustBePresent) {\n this.oneConnectionIdMustBePresent = oneConnectionIdMustBePresent;\n return this;\n }", "static final /* synthetic */ boolean m114833a(Activity activity) {\n if (!(activity instanceof C41387m) || !((C41387m) activity).mo88338b()) {\n return false;\n }\n return true;\n }", "boolean hasPersonCharacteristicIds();", "boolean isSetIdVerificationResponseData();", "boolean hasSuccessorId();", "boolean policyDetailExist(PolicyDetail policyDetail);", "private void checkCreatingPendingIntentsWithoutIntentVariable(Source<CompilationUnit> java) {\n java.getModel().findAll(MethodCallExpr.class).stream()\n .filter(expr -> expr.getName().getIdentifier().matches(\"getActivity|getBroadcast|getService\"))\n .filter(expr -> expr.getArguments().size() >= 4)\n .filter(expr -> expr.getArguments().get(2).isObjectCreationExpr())\n .filter(expr -> isCreatingImplicitIntent(expr.getArguments().get(2).asObjectCreationExpr()))\n .forEach(expr -> addJavaIssue(Severity.VULNERABILITY, \".PENDING_INTENT\", java.getFile(), expr));\n\n // Works for: getActivities(this, 0, new Intent[] { new Intent(...), ...}, 0)\n java.getModel().findAll(MethodCallExpr.class).stream()\n .filter(expr -> expr.getName().getIdentifier().matches(\"getActivities\"))\n .filter(expr -> expr.getArguments().size() >= 4)\n .filter(expr -> expr.getArguments().get(2).isArrayCreationExpr())\n .filter(expr -> isCreatingImplicitIntentsArray(expr.getArguments().get(2).asArrayCreationExpr()))\n .forEach(expr -> addJavaIssue(Severity.VULNERABILITY, \".PENDING_INTENT\", java.getFile(), expr));\n }", "@Override\n\tpublic boolean deviceHasActiveCoupons(String deviceUUID) throws ASException {\n\t\tDeviceInfo di = deviceInfoDao.get(deviceUUID, true);\n\t\tif(StringUtils.hasText(di.getUserId())) {\n\t\t\tDate now = new Date();\n\t\t\tList<Integer> redeemStatus = Arrays.asList(new Integer[] {CampaignActivity.REDEEM_STATUS_DELIVERED, CampaignActivity.REDEEM_STATUS_ACCEPTED});\n\t\t\tList<CampaignActivity> list = caDao.getUsingUserAndRedeemStatusAndRange(di.getUserId(), redeemStatus, null, null);\n\t\t\tfor( CampaignActivity obj : list ) {\n\t\t\t\tif( obj.getLimitDateTime().after(now)) return true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean collectiveDeliveryPolicyHasEntry(Message msg){\n\t\treturn collectiveDatastruct.containsKey(new DeliveryPolicyDataStructureKey(msg.getId(), msg.getSenderId()));\r\n\t}", "private void checkCreatingPendingIntentsWithIntentVariables(Source<CompilationUnit> java) {\n List<String> implicitIntentsVariables = java.getModel().findAll(ObjectCreationExpr.class).stream()\n .filter(expr -> expr.getType().getName().getIdentifier().equals(\"Intent\"))\n .filter(this::isCreatingImplicitIntent)\n .map(Node::getParentNode)\n .flatMap(Optional::stream)\n .filter(node -> node instanceof VariableDeclarator)\n .map(node -> (VariableDeclarator) node)\n .map(VariableDeclarator::getName)\n .map(SimpleName::getIdentifier)\n .collect(Collectors.toList());\n java.getModel().findAll(MethodCallExpr.class).stream()\n .filter(expr -> expr.getName().getIdentifier().matches(\"getActivity|getBroadcast|getService\"))\n .filter(expr -> expr.getArguments().size() >= 4)\n .filter(expr -> expr.getArguments().get(2).isNameExpr())\n .filter(expr -> implicitIntentsVariables.contains(expr.getArguments().get(2).asNameExpr().getName().getIdentifier()))\n .forEach(expr -> addJavaIssue(Severity.VULNERABILITY, \".PENDING_INTENT\", java.getFile(), expr));\n }", "@UpnpAction(out = {@UpnpOutputArgument(name = \"Result\", stateVariable = \"A_ARG_TYPE_Result\")})\n/* */ public int isAuthorized(@UpnpInputArgument(name = \"DeviceID\", stateVariable = \"A_ARG_TYPE_DeviceID\") String deviceID) {\n/* 118 */ return 1;\n/* */ }", "boolean isAssignedForChannel(String ccid);", "public boolean isSetActiveID() {\n return this.ActiveID != null;\n }", "boolean hasAdId();", "public void m13410a() {\n if (this.f12818b == null) {\n throw new C4550jl(\"Required field 'id' was not present! Struct: \" + toString());\n } else if (this.f12820c == null) {\n throw new C4550jl(\"Required field 'appId' was not present! Struct: \" + toString());\n }\n }", "boolean hasCampaignAudienceView();", "private final boolean matchActivity(AbstractArea area, ExecutionEntity entity) {\r\n\t\tboolean expr1 = StringUtils.equals(area.getActivityId(), entity.getActivityId());\r\n\t\tboolean expr2 = StringUtils.equals(area.getProcessId(), entity.getProcessDefinitionId());\r\n\r\n\t\treturn expr1 && expr2;\r\n\t}", "boolean hasCampaignSharedSet();", "boolean hasCampaignTypeId();", "private boolean checkCompletedCourse(int id) {\r\n boolean x = false;\r\n for (Registration registration : completeCourses) {\r\n if (id == registration.getCourseId()) {\r\n x = true;\r\n break;\r\n }\r\n x = false;\r\n }\r\n return x;\r\n }", "boolean getCampaignIdNull();", "public int getC_Activity_ID();", "boolean hasBusinessCircleId();", "public Rule idExprReq()\n \t{\n \t\treturn firstOf(field(), call());\n \t}", "boolean getXAxisCharacteristicIdNull();", "@Test\n public void minimumValidClaim() {\n claim.setClaimId(EXPECTED_CLAIM_ID);\n claim.setDcn(\"dcn\");\n claim.setIntermediaryNb(\"inter\");\n claim.setHicNo(\"hicn\");\n claim.setCurrStatus('T');\n claim.setCurrLoc1('M');\n claim.setCurrLoc2(\"9000\");\n claim.setLastUpdated(clock.instant());\n claimBuilder\n .setRdaClaimKey(\"claim_id\")\n .setDcn(\"dcn\")\n .setIntermediaryNb(\"inter\")\n .setHicNo(\"hicn\")\n .setCurrStatusEnum(FissClaimStatus.CLAIM_STATUS_RTP)\n .setCurrLoc1Enum(FissProcessingType.PROCESSING_TYPE_MANUAL)\n .setCurrLoc2Enum(FissCurrentLocation2.CURRENT_LOCATION_2_CABLE);\n changeBuilder\n .setSeq(MIN_SEQUENCE_NUM)\n .setChangeType(ChangeType.CHANGE_TYPE_INSERT)\n .setClaim(claimBuilder.build());\n assertChangeMatches(RdaChange.Type.INSERT);\n }", "private boolean isInList(int id){\n for (Module module :event.getModules()){\n if(module.getInt_type() == id+1){\n return true;\n }\n }\n return false;\n }", "public boolean hasChulaId() {\n return chulaIdBuilder_ != null || chulaId_ != null;\n }", "public boolean approveAppointment() {\n\t\tSet <String> set=(HealthCareDAO.map).keySet();\r\n\t\tint count=1;\r\n\t\tfor(String s:set)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"You have a center \"+map.get(s).getCenterName() +\"--\"+\"Center and id is \"+s);\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\tSystem.out.println(\"Enter Center id :\");\r\n\t\tString str=scan.next();\r\n\t\tDiagnoisticCenter center=HealthCareDAO.map.get(str); //get Diagonistic object of given key \r\n\t\tList<Appointment> l=center.getAppointmentList();\r\n\t\t//System.out.println(l);\r\n\t\tint y=1;\r\n\t\tfor(Appointment a:l)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Enter Approval or disapproval\");\r\n\t\tboolean decision=scan.nextBoolean()\t;\r\n\t\t\ta.setApproved(decision);\r\n\t\t\tif(a.isApproved()==true)\r\n\t\t\t{\tSystem.out.println(\"Appointment id number \"+a.getAppointmentid()+\"---is Approved\");}\r\n\t\t\telse {System.out.println(\"Appointment id number \"+a.getAppointmentid()+\"---is not Approved\");}\r\n\t\t\ty++;\r\n\t\t\tif(y>3)\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t}\r\n\t\tcenter.setAppointmentList(l);\r\n\t\tSystem.out.println(\"Appointment List count :\"+l.size());\r\n\t\t\r\n\t\treturn false;\r\n\t}", "boolean hasFromId();", "boolean multiplicity(DiagnosticChain diagnostics, Map<Object, Object> context);", "public boolean hasCampaignTypeId() {\n return campaignTypeIdBuilder_ != null || campaignTypeId_ != null;\n }", "public boolean isContinuingEducationPassed(CapIDModel capID) throws AAException, RemoteException;", "public boolean isSetIsactivity() {\n return __isset_bit_vector.get(__ISACTIVITY_ISSET_ID);\n }", "boolean hasContentId();", "boolean hasReceivingMajorFragmentId();", "public boolean checkPublic(Integer ctId) {\n ContestEntity contestEntity = getContestById(ctId);\n if (contestEntity.getIsAnyoneCanParticipate().equals(1)\n && contestEntity.getShowInforToAll().equals(1)){\n return true;\n }\n return true;\n }", "private static boolean m34054a(Context context, Intent intent) {\n return context.getPackageManager().queryIntentActivities(intent, 65536).size() > 0;\n }", "boolean hasRecognitionId();", "boolean hasValueCharacteristicId();", "boolean hasQuestId();", "boolean hasQuestId();", "boolean hasQuestId();", "boolean hasQuestId();", "public boolean claim(String id);", "private boolean checkDuplicate(int id) {\r\n boolean x = false;\r\n for (Registration registration : studentRegList) {\r\n if (id == registration.getCourseId()) {\r\n x = true;\r\n break;\r\n }\r\n x = false;\r\n }\r\n return x;\r\n }", "public boolean eventIdAtCapacity(String id){\n Event e = getEvent(id);\n return e.getCapacity() == e.getUsersSignedUp().size();\n }", "private boolean m42a(Context context, AdSize adSize, AttributeSet attributeSet) {\n if (AdUtil.m479c(context)) {\n return true;\n }\n m40a(context, \"You must have AdActivity declared in AndroidManifest.xml with configChanges.\", adSize, attributeSet);\n return false;\n }", "boolean hasCombinedAudience();", "boolean hasXAxisCharacteristicId();", "@Override\n\tpublic boolean deviceHasAvailability(String deviceUUID, String campaignActionId) throws ASException {\n\n\t\ttry {\n\t\t\tDeviceInfo di = deviceInfoDao.get(deviceUUID, true);\n\t\t\tif(StringUtils.hasText(di.getUserId())) {\n\t\t\t\tUser user = userDao.get(di.getUserId(), true);\n\t\t\t\tif(!user.getGeoFenceEnabled() || !user.getReceivePushMessages()) return false;\n\t\t\t}\n\t\t} catch( Exception e ) {\n\t\t\tlog.log(Level.SEVERE, e.getMessage(), e);\n\t\t}\n\t\t \n\t\tList<DeviceMessageLock> locks = dmlDao.getDeviceActiveLocks(deviceUUID, new Date());\n\t\tfor( DeviceMessageLock lock : locks ) {\n\t\t\tif(lock.getScope() != 2 ) return false;\n\t\t\tif(StringUtils.hasText(lock.getCampaignActivityId())) {\n\t\t\t\tCampaignActivity ca = caDao.get(lock.getCampaignActivityId(), true);\n\t\t\t\tCampaignAction cs = csDao.get(ca.getCampaignActionId(), true);\n\t\t\t\tif( cs.getIdentifier().equals(campaignActionId)) return false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// No surprises till now... means it's OK\n\t\treturn true;\n\t}", "public LearningResultHasActivity findByPrimaryKey(LearningResultHasActivityPk pk) throws LearningResultHasActivityDaoException;", "boolean hasResMineID();", "boolean hasCampaign();", "boolean capabilityExist( String id );", "private static boolean checkForMultipleIDs(String id)\n\t{\n\t\tif (id.indexOf(',') >= 0)\n\t\t{\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\treturn true; \n\t}", "public LearningResultHasActivity[] findByActivity(int activityIdActivity, String namePhase, String projectCode) throws LearningResultHasActivityDaoException;", "public Boolean verifyBusinessID(int id, int count){\n //checks that number entered is more than 0 and less than max\n return !(id > count || id <= 0);\n }", "public void requirePatientId() {\n hasPatientIdParam = true;\n }", "@Test\n public void canGetApprovalsWithAutoApproveTrue() {\n addApproval(marissa.getId(), \"c1\", \"uaa.user\", 6000, APPROVED);\n addApproval(marissa.getId(), \"c1\", \"uaa.admin\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"openid\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n\n addApproval(marissa.getId(), \"c1\", \"read\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"write\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n }", "private void validateDatasetId() {\n\n Dataset dataset = getGenericService().find(Dataset.class, mappedDatasetId);\n boolean isValid = getResourceCollection().getResourceIds().contains(mappedDatasetId);\n if(!isValid) {\n addActionError(\"Invalid mapped dataset\");\n }\n\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof ArtifactCon)) {\n return false;\n }\n return id != null && id.equals(((ArtifactCon) o).id);\n }", "boolean hasCampaignCriterion();", "boolean isSetId();", "boolean hasSourceId();", "public boolean hasPermission(String actionId) throws PortalException {\n\t\treturn _themeDisplay.getPermissionChecker().hasPermission(\n\t\t\tthis._themeDisplay.getScopeGroupId(),\n\t\t\tStrasbourgPortletKeys.ACTIVITY_BO,\n\t\t\tStrasbourgPortletKeys.ACTIVITY_BO, actionId);\n\t}", "@java.lang.Override\n public boolean hasChulaId() {\n return chulaId_ != null;\n }", "private boolean checkCustomerID(int CusIDPty, int CusID) {\n\t\tint getCusIDPtyValue = 0 ; \t\t\r\n\t\ttry {\r\n\t\t\tgetCusIDPtyValue = SDKSession.getCameraPropertyClint().getCurrentPropertyValue(CusIDPty);\r\n\t\t} catch (IchInvalidSessionException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IchSocketException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IchCameraModeException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IchDevicePropException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t\t\t\t\r\n\t\tif ((getCusIDPtyValue & 0xffff) == (CusID & 0xffff) ) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public List<GLJournalApprovalVO> getActivityfromuniquecode(String OrgId, String ClientId,\n String actId) {\n String sqlQuery = \"\";\n PreparedStatement st = null;\n ResultSet rs = null;\n List<GLJournalApprovalVO> list = null;\n try {\n list = new ArrayList<GLJournalApprovalVO>();\n sqlQuery = \" select f.c_activity_id,act.name from fact_acct f join c_activity act on act.c_activity_id = f.c_activity_id WHERE f.AD_ORG_ID IN (\"\n + OrgId + \") \" + \" AND f.AD_CLIENT_ID IN (\" + ClientId\n + \") AND f.em_efin_uniquecode IN ('\" + actId\n + \"') and f.c_bpartner_id is not null and f.c_salesregion_id is not null and f.c_project_id is not null and f.c_campaign_id is not null and f.c_activity_id is not null and f.user1_id is not null and f.user2_id is not null limit 1\";\n st = conn.prepareStatement(sqlQuery);\n rs = st.executeQuery();\n while (rs.next()) {\n GLJournalApprovalVO VO = new GLJournalApprovalVO();\n VO.setId(rs.getString(1));\n VO.setName(rs.getString(2));\n list.add(VO);\n }\n } catch (Exception e) {\n log4j.error(\"Exception in getOrgs()\", e);\n }\n return list;\n }", "@Test\n\tvoid attributeCardinality() {\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..*]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..0]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..1]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"{\" +\n\t\t\t\t\t\t\t\t\"[1..1]\" + FINDING_SITE + \" != <<\" + PULMONARY_VALVE_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS + \"\" +\n\t\t\t\t\t\t\t\t\"}\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + FINDING_SITE + \" != <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t}", "public boolean hasCampaignTypeId() {\n return campaignTypeId_ != null;\n }", "boolean hasSecIdType();", "private final boolean matchCallActivity(AbstractArea area, ExecutionEntity entity) {\r\n\r\n\t\tif (!(area instanceof CallActivityTaskHighlight)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tCallActivityTaskHighlight callActivity = (CallActivityTaskHighlight) area;\r\n\r\n\t\tfinal String processId = entity.getProcessDefinitionId();\r\n\t\treturn StringUtils.equals(callActivity.getProcessDescriptionId(), processId);\r\n\t}", "private void haveFcmId(){\n Request.getAppData();\n App.removeNonChatUsers();\n boolean termsAccepted = AppPreferences.getBoolean(Keys.termsAccepted,false);\n String userId = AppPreferences.getString(Keys.userId,\"\");\n int userState = AppPreferences.getInt(Keys.userState,0);\n if(!termsAccepted){\n startActivity(new Intent(this, ActivityTerms.class));\n } else if(userId.isEmpty() || userState == 0) {\n startActivity(new Intent(this, ActivitySignInUp.class));\n } else if(userState == 1){\n startActivity(new Intent(this, ActivitySecurityQuestions.class));\n } else if(userState == 2){\n startActivity(new Intent(this, ActivitySetProfile.class));\n } else {\n startActivity(new Intent(this, ActivityContacts.class));\n }\n finish();\n }", "public boolean canAddThreePid() {\n return (supportStage(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY) && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY))\n || (supportStage(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN) && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN));\n }", "@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }", "boolean hasApikeyOpId();", "public boolean hasChannelId()\n {\n return channelId != null && channelId.length() > 0;\n }", "int insertSelective(CmsActivity record);", "private static boolean isPositive(int ID) {\n return ID > 0;\n }", "public boolean validPID(int pid){\n\t\treturn (pid >= 0 && pid < layerAttributes.size() && layerAttributes.get(pid) != null);\n\t}", "public void setAssertionIdLength(int idLength) {\n _assertionIdLength = idLength;\n }", "public final boolean mo44051c(String str) {\n return \"1\".equals(this.f47356a.mo43629a(str, \"gaia_collection_enabled\"));\n }", "public boolean checkCourseID(String id) {\n // check for empty String\n if (id == null || id.strip().equals(\"\")) {\n return false;\n }\n\n // check for length\n if (id.length() > 6) {\n return false;\n }\n\n return true;\n }" ]
[ "0.5343452", "0.5343452", "0.5066215", "0.50660485", "0.50558835", "0.5035496", "0.4976422", "0.495295", "0.4951126", "0.4951126", "0.49138895", "0.49138895", "0.48940688", "0.47972357", "0.47966406", "0.47966406", "0.47477746", "0.47429833", "0.47043929", "0.47034144", "0.46141735", "0.4612533", "0.46003813", "0.45801708", "0.45797965", "0.45725772", "0.45562184", "0.45491195", "0.45395958", "0.45377654", "0.45366699", "0.45044026", "0.45027617", "0.44975924", "0.44962427", "0.449165", "0.44846866", "0.44797057", "0.44691277", "0.44673988", "0.4463063", "0.44586888", "0.44512346", "0.44464", "0.44453153", "0.44441152", "0.44287223", "0.44235823", "0.44232363", "0.4410641", "0.44070238", "0.43940106", "0.43904385", "0.4388742", "0.43872225", "0.43762103", "0.43746233", "0.43728667", "0.43728667", "0.43728667", "0.43728667", "0.43705943", "0.43647692", "0.4363217", "0.43618312", "0.43586424", "0.43500346", "0.43425968", "0.43423435", "0.4330079", "0.43235132", "0.43208393", "0.43044737", "0.4303018", "0.4302892", "0.4302112", "0.43008253", "0.42988944", "0.42901844", "0.42871654", "0.42862087", "0.42856115", "0.42797104", "0.42749828", "0.42731756", "0.42731398", "0.42722288", "0.42717654", "0.42640814", "0.42610794", "0.4259262", "0.42582193", "0.42543867", "0.42531526", "0.4252683", "0.4246261", "0.42412287", "0.42409936", "0.42374548", "0.42349145", "0.4232586" ]
0.0
-1
CCD Policy Activity SHOULD contain exactly one [1..1] code, which SHOULD be selected from ValueSet 2.16.840.1.113883.1.11.19832 ActCoverageType DYNAMIC (CONF54, CONF55).
CD withCode();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testClaimCancAdjCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setCancAdjCdEnum,\n RdaFissClaim::getCancAdjCd,\n FissCancelAdjustmentCode.CANCEL_ADJUSTMENT_CODE_COVERAGE,\n \"C\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setCancAdjCdUnrecognized,\n RdaFissClaim::getCancAdjCd,\n RdaFissClaim.Fields.cancAdjCd,\n 1);\n }", "@Test\n\tvoid attributeCardinality() {\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..*]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..0]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..1]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"{\" +\n\t\t\t\t\t\t\t\t\"[1..1]\" + FINDING_SITE + \" != <<\" + PULMONARY_VALVE_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS + \"\" +\n\t\t\t\t\t\t\t\t\"}\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + FINDING_SITE + \" != <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t}", "@DISPID(11)\n\t// = 0xb. The runtime will prefer the VTID if present\n\t@VTID(23)\n\tvoid riskAnalysisType(int pVal);", "@Test\n public void testClaimAdjReqCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setAdjReqCdEnum,\n RdaFissClaim::getAdjReqCd,\n FissAdjustmentRequestorCode.ADJUSTMENT_REQUESTOR_CODE_FISCAL_INTERMEDIARY,\n \"F\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setAdjReqCdUnrecognized,\n RdaFissClaim::getAdjReqCd,\n RdaFissClaim.Fields.adjReqCd,\n 1);\n }", "@Override\r\n\tpublic boolean isValid(String code, ConstraintValidatorContext theConstaint) {\r\n \r\n titles = customerService.getTitles();\r\n \r\n for(String i : titles)\r\n {\r\n \tSystem.out.println(i);\r\n }\r\n //descriptions = ec.getDescriptions();\r\n for(String i : titles)\r\n {\r\n\t result = code.equals(i);\r\n\t\tif(code != null)\t\t\r\n\t\t\tresult = code.equals(i);\r\n\t\telse\r\n\t\t\tresult = true;\r\n\t\tif(result == true)\r\n\t\t\tbreak;\r\n }\r\n\t\treturn result;\r\n\t}", "@Test\n public void testClaimPrimaryPayerCode() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setPrimaryPayerCodeEnum,\n RdaFissClaim::getPrimaryPayerCode,\n FissPayersCode.PAYERS_CODE_AUTO_NO_FAULT,\n \"D\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setPrimaryPayerCodeUnrecognized,\n RdaFissClaim::getPrimaryPayerCode,\n RdaFissClaim.Fields.primaryPayerCode,\n 1);\n }", "public void setSpecialReviewCode() {\r\n try {\r\n //CoeusVector cvParameter = queryEngine.executeQuery(queryKey,CoeusParameterBean.class,CoeusVector.FILTER_ACTIVE_BEANS);\r\n boolean isHumanSubFetched = false;\r\n boolean isAnimalUsagefetched = false;\r\n for (int index=0;index<cvParameters.size();index++) {\r\n CoeusParameterBean coeusParameterBean=(CoeusParameterBean)cvParameters.elementAt(index);\r\n //get the value for the SPL_REV_TYPE_CODE_HUMAN parameter\r\n if(HUMAN_SUBJECTS.equals(coeusParameterBean.getParameterName())){\r\n if(CoeusConstants.SPL_REV_TYPE_CODE_HUMAN.equals(coeusParameterBean.getParameterName())){\r\n specialReviewTypeCode = Integer.parseInt(coeusParameterBean.getParameterValue());\r\n specialReviewForm.setSpecialRevTypeCode(coeusParameterBean.getParameterValue());\r\n isHumanSubFetched = true;\r\n }\r\n }\r\n //Added for the COEUSQA-3119- Need to implement IACUC link to Award, IP, Prop Dev, and IRB - start\r\n //getting the data for parameter IACUC_SPL_REV_TYPE_CODE\r\n else if(ANIMAL_USAGE.equals(coeusParameterBean.getParameterName())) {\r\n if(CoeusConstants.IACUC_SPL_REV_TYPE_CODE.equals(coeusParameterBean.getParameterName())){\r\n specialRevTypeCodeParamForIacuc = Integer.parseInt(coeusParameterBean.getParameterValue());\r\n specialReviewForm.setSpecialRevTypeCodeForIacuc(coeusParameterBean.getParameterValue());\r\n isAnimalUsagefetched = true;\r\n }\r\n }\r\n //if value for both SPL_REV_TYPE_CODE_HUMAN and IACUC_SPL_REV_TYPE_CODE are fetched then break the loop\r\n if(isHumanSubFetched && isAnimalUsagefetched ){\r\n break;\r\n }\r\n //Added for the COEUSQA-3119- Need to implement IACUC link to Award, IP, Prop Dev, and IRB - end\r\n }\r\n }catch(Exception exception) {\r\n \r\n }\r\n }", "@Override\n\tpublic boolean validataRepeat(String code) throws Exception {\n\t\treturn false;\n\t}", "public void set2305CR701DisciplineTypeCode$1(java.lang.CharSequence value) {\n this._2305CR701DisciplineTypeCode = value;\n }", "int evaluate(ISeqActivity iThisActivity) {\n\n\t\tif (_Debug) {\n\t\t\tSystem.out.println(\" :: SeqConditionSet --> BEGIN - evaluate\");\n\t\t\tSystem.out.println(\" :: --> RETRY == \" + mRetry);\n\t\t}\n\n\t\tint result = EVALUATE_UNKNOWN;\n\n\t\t// Make sure we have a valid target activity \n\t\tif (iThisActivity != null) {\n\n\t\t\tif (_Debug) {\n\t\t\t\tSystem.out.println(\" ::--> Set - \" + mCombination);\n\n\t\t\t\tif (mConditions != null) {\n\t\t\t\t\tSystem.out.println(\" ::--> [\" + mConditions.size() + \"]\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\" ::--> NULL\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (mConditions != null) {\n\t\t\t\t// Evaluate this rule's conditions\n\t\t\t\tif (mCombination.equals(COMBINATION_ALL)) {\n\t\t\t\t\tresult = EVALUATE_TRUE;\n\n\t\t\t\t\tfor (int i = 0; i < mConditions.size(); i++) {\n\t\t\t\t\t\tint thisEval = evaluateCondition(i, (SeqActivity) iThisActivity);\n\n\t\t\t\t\t\tif (thisEval != EVALUATE_TRUE) {\n\t\t\t\t\t\t\tresult = thisEval;\n\n\t\t\t\t\t\t\t// done with this evaluation\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (mCombination.equals(COMBINATION_ANY)) {\n\t\t\t\t\t// Assume we have enought information to evaluate\n\t\t\t\t\tresult = EVALUATE_FALSE;\n\n\t\t\t\t\tfor (int i = 0; i < mConditions.size(); i++) {\n\t\t\t\t\t\tint thisEval = evaluateCondition(i, (SeqActivity) iThisActivity);\n\n\t\t\t\t\t\tif (thisEval == EVALUATE_TRUE) {\n\t\t\t\t\t\t\tresult = EVALUATE_TRUE;\n\n\t\t\t\t\t\t\t// done with this evaluation\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if (thisEval == EVALUATE_UNKNOWN) {\n\t\t\t\t\t\t\t// Something is missing...\n\t\t\t\t\t\t\tresult = EVALUATE_UNKNOWN;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Reset the 'retry' flag\n\t\tmRetry = false;\n\n\t\tif (_Debug) {\n\t\t\tSystem.out.println(\" ::--> \" + result);\n\t\t\tSystem.out.println(\" :: SeqConditionSet --> END - evaluate\");\n\t\t}\n\n\t\treturn result;\n\n\t}", "public boolean meetsRequirement(String sId, String sName, CCode sColor, Type sType, int sLevel, int sCost, Trigger sTrigger, int sPower, int sSoul, String sTrait, String sAbility) {\n \n \t\tboolean isMet = true;\n \n \t\tif (!id.isEmpty()) {\n \n \t\t\tString[] parts = sId.split(\" \");\n \n \t\t\tfor (int i = 0; i < sameID.length; i++) {\n \t\t\t\tisMet = true;\n \t\t\t\tfor (int j = 0; j < parts.length; j++) {\n \t\t\t\t\tisMet = isMet && sameID[i].toLowerCase().contains(parts[j].toLowerCase());\n \t\t\t\t\t/*\n \t\t\t\t\t * if (sameID[i].toLowerCase()\n \t\t\t\t\t * .contains(parts[j].toLowerCase()))\n \t\t\t\t\t * System.out.println(sameID[i] + \"???\" + parts[j]);\n \t\t\t\t\t */\n \t\t\t\t}\n \t\t\t\tif (isMet) {\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \n \t\t\t}\n \t\t\tisMet = true;\n \t\t\tfor (int j = 0; j < parts.length; j++) {\n \t\t\t\tisMet = isMet && id.toLowerCase().contains(parts[j].toLowerCase());\n \t\t\t\t/*\n \t\t\t\t * if (id.toLowerCase().contains(parts[j].toLowerCase()))\n \t\t\t\t * System.out.println(id + \"::CONTAINS::\" + parts[j]);\n \t\t\t\t */\n \t\t\t}\n \n \t\t\t/*\n \t\t\t * if (isMet) { for (int i = 0; i < sameID.length; i++) {\n \t\t\t * System.out.print(\"[(\" + i + \")\" + sameID[i] + \"]\"); }\n \t\t\t * System.out.println(); }\n \t\t\t */\n \t\t}\n \n \t\tif (!sName.isEmpty()) {\n \t\t\tisMet = isMet && (cardName.toLowerCase().contains(sName.toLowerCase()) || cardName_e.toLowerCase().contains(sName.toLowerCase()));\n \t\t}\n \n \t\tif (sColor != null && sColor != CCode.ALL) {\n \t\t\tisMet = isMet && (sColor == c);\n \t\t}\n \n \t\tif (sType != null && sType != CardAssociation.Type.ALL) {\n \t\t\tisMet = isMet && (sType == t);\n \t\t}\n \n \t\tif (sLevel > -1) {\n \t\t\tisMet = isMet && (sLevel == level);\n \t\t}\n \n \t\tif (sCost > -1) {\n \t\t\tisMet = isMet && (sCost == cost);\n \t\t}\n \n \t\tif (sTrigger != null && sTrigger != Trigger.ALL) {\n \t\t\tisMet = isMet && (sTrigger == trigger);\n \t\t}\n \n \t\tif (sPower > -1) {\n \t\t\tisMet = isMet && (sPower == power);\n \t\t}\n \n \t\tif (sSoul > -1) {\n \t\t\tisMet = isMet && (sSoul == soul);\n \t\t}\n \n \t\tif (!sTrait.isEmpty()) {\n \t\t\tisMet = isMet && (trait1.toLowerCase().contains(sTrait) || trait2.toLowerCase().contains(sTrait) || trait1_e.toLowerCase().contains(sTrait) || trait2_e.toLowerCase().contains(sTrait));\n \t\t}\n \n \t\tif (!sAbility.isEmpty()) {\n \n \t\t\tString[] parts = sAbility.split(\" \");\n \n \t\t\tfor (int i = 0; i < parts.length; i++) {\n \t\t\t\tisMet = isMet && (getEffects().toLowerCase().contains(parts[i].toLowerCase()) || getEffects_e().toLowerCase().contains(parts[i].toLowerCase()));\n \t\t\t}\n \t\t}\n \n \t\treturn isMet;\n \t}", "@DISPID(11)\n\t// = 0xb. The runtime will prefer the VTID if present\n\t@VTID(22)\n\tint riskAnalysisType();", "boolean isSetValueCodeableConcept();", "@Test\n public void testClaimProcNewHicInd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setProcNewHicIndEnum,\n RdaFissClaim::getProcNewHicInd,\n FissProcessNewHealthInsuranceClaimNumberIndicator.PROCESS_NEW_HIC_INDICATOR_Y,\n \"Y\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setProcNewHicIndUnrecognized,\n RdaFissClaim::getProcNewHicInd,\n RdaFissClaim.Fields.procNewHicInd,\n 1);\n }", "@Test\n public void testDiagnosisCodePoaInd() {\n new DiagnosisCodeFieldTester(true)\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissDiagnosisCode.Builder::setDiagPoaIndEnum,\n RdaFissDiagnosisCode::getDiagPoaInd,\n FissDiagnosisPresentOnAdmissionIndicator.DIAGNOSIS_PRESENT_ON_ADMISSION_INDICATOR_YES,\n \"Y\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissDiagnosisCode.Builder::setDiagPoaIndUnrecognized,\n RdaFissDiagnosisCode::getDiagPoaInd,\n RdaFissDiagnosisCode.Fields.diagPoaInd,\n 1);\n }", "private void setActivityType(int value) {\n this.bitField0_ |= 4;\n this.activityType_ = value;\n }", "@Test\n public void test025() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n ArrayStringFilter.Mode arrayStringFilter_Mode0 = ArrayStringFilter.Mode.EXACT;\n String[] stringArray0 = new String[6];\n stringArray0[0] = \"iul \";\n stringArray0[1] = \"iul \";\n stringArray0[2] = \"iul \";\n ArrayStringFilter arrayStringFilter0 = new ArrayStringFilter(arrayStringFilter_Mode0, stringArray0);\n String string0 = arrayStringFilter0.toString();\n Any any0 = new Any((Component) errorPage0, (CharSequence) \"EXACT:iul ,iul ,iul ,null,null,null\");\n }", "@Test\n public void ANDSearch_CareQualityComissionAdmission() throws Exception {\n\n final Set<String> searchResults = newsLineSearch.search(TEST_FILE, \"Care Quality Commission admission\",\n SearchType.AND);\n\n assertThat(searchResults).hasSize(1).contains(allLines.get(1));\n }", "public boolean has2305CR701DisciplineTypeCode$1() {\n return fieldSetFlags()[0];\n }", "protected IExpressionValue cardinality()throws TableFunctionMalformedException {\r\n\t\tIExpressionValue ret = null;\r\n\t\tmatch('(');\r\n\t\t\r\n\t\tskipWhite();\r\n\t\tString var = null;\r\n\t\tif (look != ')') {\t// check if argument was provided\r\n\t\t\tvar = this.varsetname();\r\n\t\t\tskipWhite();\r\n\t\t}\r\n\t\t\r\n\t\t// Debug.println(\"CARDINALITY'S ARGUMENT IS \" + var);\r\n\t\t// TODO test if ret has returned NaN (guarantees \"value\" is a varsetname)?\r\n\t\tret = new CardinalityProbabilityValue(this.currentHeader, var);\r\n\t\tmatch(')');\r\n\t\treturn ret;\r\n\t\t\r\n\t}", "String getAssetTypeRestriction();", "public void setCLAPPROVAL(java.lang.CharSequence value) {\n this.CL_APPROVAL = value;\n }", "@Test\n public void testClaimAttendPhysFlag() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setAttendPhysFlagEnum,\n RdaFissClaim::getAttendPhysFlag,\n FissPhysicianFlag.PHYSICIAN_FLAG_NO,\n \"N\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setAttendPhysFlagUnrecognized,\n RdaFissClaim::getAttendPhysFlag,\n RdaFissClaim.Fields.attendPhysFlag,\n 1);\n }", "@Override\n public byte getSubtype() {\n return SUBTYPE_COLORED_COINS_ASSET_ISSUANCE;\n }", "@IID(\"{05518018-2339-4E08-87BE-D14C69527B7A}\")\npublic interface ICustomizationReqType extends com.gc.ICustomizationType {\n\t// Methods:\n\t/**\n\t * <p>\n\t * Indicates if this requirement type supports direct coverage by tests or\n\t * test instances.\n\t * </p>\n\t * <p>\n\t * Getter method for the COM property \"HasDirectCoverage\"\n\t * </p>\n\t * \n\t * @return Returns a value of type boolean\n\t */\n\n\t@DISPID(10)\n\t// = 0xa. The runtime will prefer the VTID if present\n\t@VTID(20)\n\tboolean hasDirectCoverage();\n\n\t/**\n\t * <p>\n\t * Indicates if this requirement type supports direct coverage by tests or\n\t * test instances.\n\t * </p>\n\t * <p>\n\t * Setter method for the COM property \"HasDirectCoverage\"\n\t * </p>\n\t * \n\t * @param pVal\n\t * Mandatory boolean parameter.\n\t */\n\n\t@DISPID(10)\n\t// = 0xa. The runtime will prefer the VTID if present\n\t@VTID(21)\n\tvoid hasDirectCoverage(boolean pVal);\n\n\t/**\n\t * <p>\n\t * The Type of the Risk Analysis that is applicable to this requirement.\n\t * </p>\n\t * <p>\n\t * Getter method for the COM property \"RiskAnalysisType\"\n\t * </p>\n\t * \n\t * @return Returns a value of type int\n\t */\n\n\t@DISPID(11)\n\t// = 0xb. The runtime will prefer the VTID if present\n\t@VTID(22)\n\tint riskAnalysisType();\n\n\t/**\n\t * <p>\n\t * The Type of the Risk Analysis that is applicable to this requirement.\n\t * </p>\n\t * <p>\n\t * Setter method for the COM property \"RiskAnalysisType\"\n\t * </p>\n\t * \n\t * @param pVal\n\t * Mandatory int parameter.\n\t */\n\n\t@DISPID(11)\n\t// = 0xb. The runtime will prefer the VTID if present\n\t@VTID(23)\n\tvoid riskAnalysisType(int pVal);\n\n\t// Properties:\n}", "@Test\n public void testDiagnosisCodeBitFlags() {\n new DiagnosisCodeFieldTester(false)\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissDiagnosisCode.Builder::setBitFlags,\n RdaFissDiagnosisCode::getBitFlags,\n RdaFissDiagnosisCode.Fields.bitFlags,\n 4);\n }", "@java.lang.Override\n public boolean hasAabbValue() {\n return typeCase_ == 12;\n }", "@Test\n public void testClaimAdjMbiInd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setAdjMbiIndEnum,\n RdaFissClaim::getAdjMbiInd,\n FissAdjustmentMedicareBeneficiaryIdentifierIndicator\n .ADJUSTMENT_MBI_INDICATOR_HIC_SUBMITTED_ON_ADJUSTMENT_OR_CANCEL_CLAIM,\n \"H\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setAdjMbiIndUnrecognized,\n RdaFissClaim::getAdjMbiInd,\n RdaFissClaim.Fields.adjMbiInd,\n 1);\n }", "private boolean checkVisualCondition(final String[] condArray) throws Exception {\r\n\t\t//boolean isDisplay = true ; // remarked by Leo YEUNG for testing\r\n\t\tboolean isDisplay = false ;\r\n\t\tint CondPassCount = 0; //Use to count the number of Boolean expressions passed\t\t\t\t\t\t \r\n\t\tint CondAmount = condArray.length;//Total number of Boolean expressions in this Node\r\n\t\t//Loop for all Boolean expressions in one conditon\t\t\t \r\n\t\tfor (int k=0; k<CondAmount; k++) {\t\t \t\t\t\t\t\r\n\t\t\tif (CondPassCount<k) break;\t //Exit the following condition check while one of the Boolean expresssion is failure which save the loop time\r\n\t\t\t//Loop for sort out different Attribute\r\n\t\t\tfor (int m=0; m<conAttName.length; m++) {\r\n\t\t\t\tint previousCondPassCount = CondPassCount;//a value use to check the Boolean expresssion is failure\r\n\t\t\t\tif (condArray[k].toUpperCase().startsWith(conAttName[m].toUpperCase())){ \r\n\t\t\t\t\tfinal String tempConAttType = conAttType[m]; // ldap attribute type\r\n\t\t\t\t\tfinal String tempValue = condArray[k].substring(conAttName[m].length());\r\n\t\t\t\t\tfinal int tempColonIndex = condArray[k].indexOf(\"\\\"\");\r\n\t\t\t\t\tfinal String attName = condArray[k].substring(0,conAttName[m].length()); \t \t\t\t \t\t \t\t\t\t //Attribute Name\r\n\t\t\t\t\tfinal String attCond = condArray[k].substring(conAttName[m].length(),tempColonIndex); //Attribute condition syntax\r\n\t\t\t\t\tfinal String attVal = condArray[k].substring(tempColonIndex+1,condArray[k].lastIndexOf(\"\\\"\"));//Attribute Value\r\n\t\t\t\t\tint k2 = k+1;\r\n\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" checking for \" + condArray[k]+\" Start\");\r\n\t\t\t\t\t//Condition Greater Than\r\n\t\t\t\t\tif (attCond.equalsIgnoreCase(Constant.gt)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null){\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (strCrtUserInfo.compareTo(strAttVal) > 0 ){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t} else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Greater Than> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo > intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Less Than\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.lt)){\r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (strCrtUserInfo.compareTo(strAttVal) < 0 ){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Less than> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo < intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Greater and Equal\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.ge)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (strCrtUserInfo.compareTo(strAttVal) >= 0 ){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t}else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t} catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Greater and Equal to> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo >= intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Less and Equal\t\t\t\t\t\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.le)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (strCrtUserInfo.compareTo(strAttVal) <= 0 ){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t}else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition::\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Less and Equal to> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo <= intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Equal\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.equal)){ //Equal\r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\t\tif (strCrtUserInfo.equalsIgnoreCase(strAttVal)){\r\n\t\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t} else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <equal to> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo == intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Not Equal to\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.not_equal)){\r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (!strCrtUserInfo.equalsIgnoreCase(strAttVal)){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t} else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Not equal to> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo != intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Contain\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.contain)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tif (((String)ht.get(attName.toUpperCase())).indexOf(attVal)!=-1){\r\n\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Start with\t \t \r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.start_with)){\r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tif (((String)ht.get(attName.toUpperCase())).startsWith(attVal)){\r\n\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition\tNot contain\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.not_contain)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tif (((String)ht.get(attName.toUpperCase())).indexOf(attVal)==-1){\r\n\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Not start with\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.not_start_with)){\r\n\t\t\t\t\t\tif (!((String)ht.get(attName.toUpperCase())).startsWith(attVal)){\r\n\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Finally, Syntax Error\t \r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlogger.error(\"checkVisualCondition:Invalid condition syntax found: \" + attCond);\r\n\t\t\t\t\t} \r\n\t\t\t\t}\t\r\n\t\t\t\tif (previousCondPassCount<CondPassCount) break; // condition passed. Exit the for loop\r\n\t\t\t}\r\n\t\t\tif (CondPassCount == CondAmount) isDisplay = true;\r\n\t\t}\r\n\t\t//logger.debug(\"checkVistualCondition: isDisplay = \" + isDisplay);\r\n\t\t//logger.debug(\"checkVistualCondition: CondPassCount = \" + CondPassCount);\r\n\t\t//logger.debug(\"checkVistualCondition: CondAmount = \" + CondAmount);\r\n\t\treturn isDisplay;\r\n\t}", "@Test\n public void test () throws IOException\n {\n CacheList clist = new CacheList(new Scanner(\n \"GCABCD\\tAs The World Turns\\tbunny\\t1\\t1\\tN40 45.875\\tW111 48.986\\nGCRQWK\\tOld Three Tooth\\tgeocadet\\t3.5\\t3\\tN40 45.850\\tW111 48.045\\n\"));\n clist.setTitleConstraint(\"Turns\");\n ArrayList<Cache> selected = clist.select();\n assertEquals(1, selected.size());\n assertEquals(\"GCABCD\", selected.get(0).getGcCode());\n }", "@DISPID(10)\n\t// = 0xa. The runtime will prefer the VTID if present\n\t@VTID(21)\n\tvoid hasDirectCoverage(boolean pVal);", "public static Condition meaningOfCode(Integer code) {return BY_LABEL.get(code);}", "@Test\n public void testClaimAdmSource() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setAdmSourceEnum,\n RdaFissClaim::getAdmSource,\n FissSourceOfAdmission.SOURCE_OF_ADMISSION_CLINIC_REFERRAL,\n \"2\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setAdmSourceUnrecognized,\n RdaFissClaim::getAdmSource,\n RdaFissClaim.Fields.admSource,\n 1);\n }", "public boolean testCategory(EIfcmaterialconstituent type) throws SdaiException;", "@java.lang.Override\n public boolean hasAabbValue() {\n return typeCase_ == 12;\n }", "@Test\n public void testConstraintGenerator() throws Exception {\n\n // Tests the generation of constraints generated from bindings that include a MaxValueSet extension,\n // by using a Device profile and extensions created specifically for this test.\n //\n // Each of the following combinations is tested:\n // Choice: No/Yes; Optional: No/Yes; Repeatable: No/Yes\n //-----------------------------------------------\n // Choice: No; Optional: No; Repeatable: No\n //-----[Device.specialization.systemType]\n // Choice: No; Optional: No; Repeatable: Yes\n //-----[Device.statusReason] (no MaxValueSet)\n // Choice: No; Optional: Yes; Repeatable: No\n //-----[Device.type]\n // Choice: No; Optional: Yes; Repeatable: Yes\n //-----[Device.safety]\n // Choice: Yes; Optional: No; Repeatable: No\n //----[test-language-primary-extension]\n // Choice: Yes; Optional: No; Repeatable: Yes\n //----[test-language-others-req-extension]\n // Choice: Yes; Optional: Yes; Repeatable: No\n //----[test-language-secondary-extension]\n // Choice: Yes; Optional: Yes; Repeatable: Yes\n //----[test-language-others-opt-extension]\n //-----------------------------------------------\n\n StructureDefinition structureDefinition = FHIRRegistry.getInstance().getResource(\"http://ibm.com/fhir/StructureDefinition/test-device\", StructureDefinition.class);\n ConstraintGenerator generator = new ConstraintGenerator(structureDefinition);\n List<Constraint> constraints = generator.generate();\n assertEquals(constraints.size(), 7);\n constraints.forEach(constraint -> compile(constraint.expression()));\n assertEquals(constraints.get(3).expression(), \"statusReason.count() >= 1\");\n assertEquals(constraints.get(4).expression(), \"type.exists() implies (type.memberOf('http://hl7.org/fhir/ValueSet/languages', 'extensible') and type.memberOf('http://hl7.org/fhir/ValueSet/all-languages', 'required'))\");\n assertEquals(constraints.get(5).expression(), \"specialization.exists() implies (specialization.all(systemType.exists() and systemType.memberOf('http://hl7.org/fhir/ValueSet/languages', 'extensible') and systemType.memberOf('http://hl7.org/fhir/ValueSet/all-languages', 'required')))\");\n assertEquals(constraints.get(6).expression(), \"safety.exists() implies (safety.all(memberOf('http://hl7.org/fhir/ValueSet/languages', 'extensible')) and safety.all(memberOf('http://hl7.org/fhir/ValueSet/all-languages', 'required')))\");\n\n structureDefinition = FHIRRegistry.getInstance().getResource(\"http://ibm.com/fhir/StructureDefinition/test-language-primary-extension\", StructureDefinition.class);\n generator = new ConstraintGenerator(structureDefinition);\n constraints = generator.generate();\n assertEquals(constraints.size(), 2);\n constraints.forEach(constraint -> compile(constraint.expression()));\n assertEquals(constraints.get(1).expression(), \"value.as(CodeableConcept).exists() and value.as(CodeableConcept).memberOf('http://hl7.org/fhir/ValueSet/languages', 'preferred') and value.as(CodeableConcept).memberOf('http://hl7.org/fhir/ValueSet/all-languages', 'required')\");\n\n structureDefinition = FHIRRegistry.getInstance().getResource(\"http://ibm.com/fhir/StructureDefinition/test-language-secondary-extension\", StructureDefinition.class);\n generator = new ConstraintGenerator(structureDefinition);\n constraints = generator.generate();\n assertEquals(constraints.size(), 2);\n constraints.forEach(constraint -> compile(constraint.expression()));\n assertEquals(constraints.get(1).expression(), \"value.as(Coding).exists() implies (value.as(Coding).memberOf('http://hl7.org/fhir/ValueSet/languages', 'preferred') and value.as(Coding).memberOf('http://hl7.org/fhir/ValueSet/all-languages', 'required'))\");\n\n structureDefinition = FHIRRegistry.getInstance().getResource(\"http://ibm.com/fhir/StructureDefinition/test-language-tertiary-extension\", StructureDefinition.class);\n generator = new ConstraintGenerator(structureDefinition);\n constraints = generator.generate();\n assertEquals(constraints.size(), 2);\n constraints.forEach(constraint -> compile(constraint.expression()));\n assertEquals(constraints.get(1).expression(), \"value.as(code).exists() and value.as(code).memberOf('http://hl7.org/fhir/ValueSet/languages', 'preferred') and value.as(code).memberOf('http://hl7.org/fhir/ValueSet/all-languages', 'required')\");\n\n structureDefinition = FHIRRegistry.getInstance().getResource(\"http://ibm.com/fhir/StructureDefinition/test-language-others-opt-extension\", StructureDefinition.class);\n generator = new ConstraintGenerator(structureDefinition);\n constraints = generator.generate();\n assertEquals(constraints.size(), 2);\n constraints.forEach(constraint -> compile(constraint.expression()));\n assertEquals(constraints.get(1).expression(), \"value.as(CodeableConcept).exists() implies (value.as(CodeableConcept).all(memberOf('http://hl7.org/fhir/ValueSet/languages', 'preferred')) and value.as(CodeableConcept).all(memberOf('http://hl7.org/fhir/ValueSet/all-languages', 'required')))\");\n\n structureDefinition = FHIRRegistry.getInstance().getResource(\"http://ibm.com/fhir/StructureDefinition/test-language-others-req-extension\", StructureDefinition.class);\n generator = new ConstraintGenerator(structureDefinition);\n constraints = generator.generate();\n assertEquals(constraints.size(), 2);\n constraints.forEach(constraint -> compile(constraint.expression()));\n assertEquals(constraints.get(1).expression(), \"value.as(CodeableConcept).exists() and value.as(CodeableConcept).all(memberOf('http://hl7.org/fhir/ValueSet/languages', 'preferred')) and value.as(CodeableConcept).all(memberOf('http://hl7.org/fhir/ValueSet/all-languages', 'required'))\");\n }", "@Test\n public void testClaimServTypCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setServTypeCdEnum,\n claim -> String.valueOf(claim.getServTypeCd()),\n FissBillClassification.BILL_CLASSIFICATION_INPATIENT_PART_A,\n \"1\")\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setServTypCdUnrecognized,\n claim -> String.valueOf(claim.getServTypeCd()),\n RdaFissClaim.Fields.servTypeCd,\n 1);\n }", "private void checkCreatingPendingIntentsWithoutIntentVariable(Source<CompilationUnit> java) {\n java.getModel().findAll(MethodCallExpr.class).stream()\n .filter(expr -> expr.getName().getIdentifier().matches(\"getActivity|getBroadcast|getService\"))\n .filter(expr -> expr.getArguments().size() >= 4)\n .filter(expr -> expr.getArguments().get(2).isObjectCreationExpr())\n .filter(expr -> isCreatingImplicitIntent(expr.getArguments().get(2).asObjectCreationExpr()))\n .forEach(expr -> addJavaIssue(Severity.VULNERABILITY, \".PENDING_INTENT\", java.getFile(), expr));\n\n // Works for: getActivities(this, 0, new Intent[] { new Intent(...), ...}, 0)\n java.getModel().findAll(MethodCallExpr.class).stream()\n .filter(expr -> expr.getName().getIdentifier().matches(\"getActivities\"))\n .filter(expr -> expr.getArguments().size() >= 4)\n .filter(expr -> expr.getArguments().get(2).isArrayCreationExpr())\n .filter(expr -> isCreatingImplicitIntentsArray(expr.getArguments().get(2).asArrayCreationExpr()))\n .forEach(expr -> addJavaIssue(Severity.VULNERABILITY, \".PENDING_INTENT\", java.getFile(), expr));\n }", "public LearningResultHasActivity[] findWhereCompetitionCodeEquals(String competitionCode) throws LearningResultHasActivityDaoException;", "public final ManchesterOWLSyntaxAutoComplete.cardinalityRestriction_return cardinalityRestriction() {\n ManchesterOWLSyntaxAutoComplete.cardinalityRestriction_return retval = new ManchesterOWLSyntaxAutoComplete.cardinalityRestriction_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxAutoComplete.unary_return p = null;\n ManchesterOWLSyntaxAutoComplete.expression_return filler = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:238:1:\n // ( ^( CARDINALITY_RESTRICTION MIN i= INTEGER p= unary (filler=\n // expression )? ) | ^( CARDINALITY_RESTRICTION MAX i= INTEGER p=\n // unary (filler= expression )? ) | ^( CARDINALITY_RESTRICTION\n // EXACTLY i= INTEGER p= unary (filler= expression )? ) )\n int alt14 = 3;\n int LA14_0 = input.LA(1);\n if (LA14_0 == CARDINALITY_RESTRICTION) {\n int LA14_1 = input.LA(2);\n if (LA14_1 == DOWN) {\n switch (input.LA(3)) {\n case MIN: {\n alt14 = 1;\n }\n break;\n case MAX: {\n alt14 = 2;\n }\n break;\n case EXACTLY: {\n alt14 = 3;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 14,\n 2, input);\n throw nvae;\n }\n } else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 14, 1, input);\n throw nvae;\n }\n } else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 14, 0, input);\n throw nvae;\n }\n switch (alt14) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:239:5:\n // ^( CARDINALITY_RESTRICTION MIN i= INTEGER p= unary (filler=\n // expression )? )\n {\n match(input, CARDINALITY_RESTRICTION,\n FOLLOW_CARDINALITY_RESTRICTION_in_cardinalityRestriction719);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, MIN, FOLLOW_MIN_in_cardinalityRestriction722);\n if (state.failed) {\n return retval;\n }\n match(input, INTEGER, FOLLOW_INTEGER_in_cardinalityRestriction727);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_cardinalityRestriction733);\n p = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:239:65:\n // (filler= expression )?\n int alt11 = 2;\n int LA11_0 = input.LA(1);\n if (LA11_0 >= IDENTIFIER && LA11_0 <= ENTITY_REFERENCE\n || LA11_0 >= DISJUNCTION && LA11_0 <= NEGATED_EXPRESSION\n || LA11_0 >= SOME_RESTRICTION && LA11_0 <= ONE_OF\n || LA11_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n alt11 = 1;\n }\n switch (alt11) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:239:65:\n // filler= expression\n {\n pushFollow(FOLLOW_expression_in_cardinalityRestriction740);\n filler = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(filler == null ? p.node.getCompletions()\n : filler.node.getCompletions());\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:243:6:\n // ^( CARDINALITY_RESTRICTION MAX i= INTEGER p= unary (filler=\n // expression )? )\n {\n match(input, CARDINALITY_RESTRICTION,\n FOLLOW_CARDINALITY_RESTRICTION_in_cardinalityRestriction755);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, MAX, FOLLOW_MAX_in_cardinalityRestriction758);\n if (state.failed) {\n return retval;\n }\n match(input, INTEGER, FOLLOW_INTEGER_in_cardinalityRestriction762);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_cardinalityRestriction768);\n p = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:243:65:\n // (filler= expression )?\n int alt12 = 2;\n int LA12_0 = input.LA(1);\n if (LA12_0 >= IDENTIFIER && LA12_0 <= ENTITY_REFERENCE\n || LA12_0 >= DISJUNCTION && LA12_0 <= NEGATED_EXPRESSION\n || LA12_0 >= SOME_RESTRICTION && LA12_0 <= ONE_OF\n || LA12_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n alt12 = 1;\n }\n switch (alt12) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:243:65:\n // filler= expression\n {\n pushFollow(FOLLOW_expression_in_cardinalityRestriction775);\n filler = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(filler == null ? p.node.getCompletions()\n : filler.node.getCompletions());\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:247:6:\n // ^( CARDINALITY_RESTRICTION EXACTLY i= INTEGER p= unary\n // (filler= expression )? )\n {\n match(input, CARDINALITY_RESTRICTION,\n FOLLOW_CARDINALITY_RESTRICTION_in_cardinalityRestriction794);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXACTLY, FOLLOW_EXACTLY_in_cardinalityRestriction797);\n if (state.failed) {\n return retval;\n }\n match(input, INTEGER, FOLLOW_INTEGER_in_cardinalityRestriction802);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_cardinalityRestriction809);\n p = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:247:71:\n // (filler= expression )?\n int alt13 = 2;\n int LA13_0 = input.LA(1);\n if (LA13_0 >= IDENTIFIER && LA13_0 <= ENTITY_REFERENCE\n || LA13_0 >= DISJUNCTION && LA13_0 <= NEGATED_EXPRESSION\n || LA13_0 >= SOME_RESTRICTION && LA13_0 <= ONE_OF\n || LA13_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n alt13 = 1;\n }\n switch (alt13) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:247:71:\n // filler= expression\n {\n pushFollow(FOLLOW_expression_in_cardinalityRestriction816);\n filler = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(filler == null ? p.node.getCompletions()\n : filler.node.getCompletions());\n }\n }\n break;\n }\n if (state.backtracking == 1) {\n retval.node = (ManchesterOWLSyntaxTree) retval.start;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "private boolean getDesignType(String[] _data) {\n\t\tif(_data != null && _data.length >1) {\n\t\t\tif(_data[1].trim().equalsIgnoreCase(\"Material Design\")) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "protected void initSpecSpecificConditions() {\r\n // THESE ARE ALL FOR MAF SPEC 1.0 ONLY\r\n\r\n //If variant_Type is \"ins\" Reference_Allele should always be \"-\",\r\n conditions.add(new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantInsSymbol(), FIELD_REFERENCE_ALLELE, Pattern.compile(\"[^\\\\-]\"), \"contain anything but '-' characters\", true));\r\n // and either of Tumor_Seq_Allele1 and Tumor_Seq_Allele2 should have \"-\".\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantInsSymbol(), FIELD_TUMOR_SEQ_ALLELE1, Pattern.compile(\"-\"), \"contain at least one '-'\", false),\r\n new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantInsSymbol(), FIELD_TUMOR_SEQ_ALLELE2, Pattern.compile(\"-\"), \"contain at least one '-'\", false)));\r\n //If variant_Type is \"del\", then Reference_Allele can't contain \"-\",\r\n conditions.add(new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantTypeDelSymbol(), FIELD_REFERENCE_ALLELE, Pattern.compile(\"-\"), \"contain any '-' characters\", true));\r\n // and either Tumor_Seq_Allele1 or Tumor_Seq_Allele2 should contain \"-\".\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantTypeDelSymbol(), FIELD_TUMOR_SEQ_ALLELE1, Pattern.compile(\"-\"), \"contain at least one '-'\", false),\r\n new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantTypeDelSymbol(), FIELD_TUMOR_SEQ_ALLELE2, Pattern.compile(\"-\"), \"contain at least one '-'\", false)));\r\n\r\n //If validation_status is \"wildtype\", then Tumor_Seq_Allele1=Tumor_Seq_Allele2\r\n //and Tumor_Seq_Allele1=Reference_Allele)\r\n conditions.add(new ConditionalRequirement(FIELD_VALIDATION_STATUS, VALIDATION_STATUS_WILDTYPE, FIELD_TUMOR_SEQ_ALLELE1, FIELD_TUMOR_SEQ_ALLELE2, false));\r\n conditions.add(new ConditionalRequirement(FIELD_VALIDATION_STATUS, VALIDATION_STATUS_WILDTYPE, FIELD_TUMOR_SEQ_ALLELE1, FIELD_REFERENCE_ALLELE, false));\r\n\r\n // if mutation_status is germline, tumor_seql_allele1 must be equal to match_norm_seq_allele1\r\n conditions.add(new ConditionalRequirement(FIELD_MUTATION_STATUS, MUTATION_STATUS_GERMLINE, FIELD_TUMOR_SEQ_ALLELE1,\r\n FIELD_MATCH_NORM_SEQ_ALLELE1, false));\r\n conditions.add(new ConditionalRequirement(FIELD_MUTATION_STATUS, MUTATION_STATUS_GERMLINE, FIELD_TUMOR_SEQ_ALLELE2,\r\n FIELD_MATCH_NORM_SEQ_ALLELE2, false));\r\n // if mutation_status is somatic and validation status is valid, then Match_Norm_Validation_Allele1 should equal Reference_Allele\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_SOMATIC, VALIDATION_STATUS_VALID}, FIELD_MATCH_NORM_VALIDATION_ALLELE1,\r\n FIELD_REFERENCE_ALLELE, false));\r\n // if mutation_status is somatic and validation status is valid, then Match_Norm_Validation_Allele2 should equal Reference_Allele\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_SOMATIC, VALIDATION_STATUS_VALID}, FIELD_MATCH_NORM_VALIDATION_ALLELE2,\r\n FIELD_REFERENCE_ALLELE, false));\r\n // if mutation_status is somatic and validation status is valid, then either Tumor_Seq_Allele1 or Tumor_Seq_Allele2 should NOT match Reference_Allele\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_SOMATIC, VALIDATION_STATUS_VALID}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_REFERENCE_ALLELE, true), // not\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_SOMATIC, VALIDATION_STATUS_VALID}, FIELD_TUMOR_SEQ_ALLELE2, FIELD_REFERENCE_ALLELE, true))); // not\r\n\r\n //If Mutation_Status == LOH AND Validation_Status==Unknown, then\r\n //Tumor_Seq_Allele1 == Tumor_Seq_Allele2 and\r\n //Match_Norm_Seq_Allele1 != Match_Norm_Seq_Allele2 and\r\n //Tumor_Seq_Allele1 = (Match_Norm_Seq_Allele1 or Match_Norm_Seq_Allele2)\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_UNKNOWN}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_TUMOR_SEQ_ALLELE2, false));\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_UNKNOWN}, FIELD_MATCH_NORM_SEQ_ALLELE1, FIELD_MATCH_NORM_SEQ_ALLELE2, true)); // not\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_UNKNOWN}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_MATCH_NORM_SEQ_ALLELE1, false),\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_UNKNOWN}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_MATCH_NORM_SEQ_ALLELE2, false)));\r\n //If Mutation_Status == LOH AND Validation_Status==Valid, then\r\n //Tumor_Validation_Allele1 == Tumor_Validation_Allele2 and\r\n //Match_Norm_Validation_Allele1 != Match_Norm_Validation_Allele2 and\r\n //Tumor_Validation_Allele1 == (Match_Norm_Validation_Allele1 or Match_Norm_Validation_Allele2).\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_VALID}, FIELD_TUMOR_VALIDATION_ALLELE1, FIELD_TUMOR_VALIDATION_ALLELE2, false));\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_VALID}, FIELD_MATCH_NORM_VALIDATION_ALLELE1, FIELD_MATCH_NORM_VALIDATION_ALLELE2, true)); // not\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_VALID}, FIELD_TUMOR_VALIDATION_ALLELE1, FIELD_MATCH_NORM_VALIDATION_ALLELE1, false),\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_VALID}, FIELD_TUMOR_VALIDATION_ALLELE1, FIELD_MATCH_NORM_VALIDATION_ALLELE2, false)));\r\n // Tumor_Seq_Allele1 != Reference_Allele OR Tumor_Seq_Allele2 != Reference_Allele\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(new String[]{}, new String[]{}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_REFERENCE_ALLELE, true),\r\n new ConditionalRequirement(new String[]{}, new String[]{}, FIELD_TUMOR_SEQ_ALLELE2, FIELD_REFERENCE_ALLELE, true)));\r\n\r\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void test_getTermsOfUse_agreeabilityTypeIdsEmpty() throws Exception {\r\n instance.getTermsOfUse(projectId, 1, new int[0]);\r\n }", "static int type_of_cmc(String passed){\n\t\treturn 1;\n\t}", "@Test\n public void normalCategorySecondRangeInKgAndCm() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"81\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"180\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Normal\",\n \"actual text is not: Your category is Normal\");\n }", "@Test(priority=2)\n\tpublic void validatePredictNiftyInContestPage1()\n\t{\n\t\th.contest.click();\n\t\tc=new ContestPage(driver);\n\t\tAssert.assertTrue(c.historyWinnings.getText().equalsIgnoreCase(\"History & Winnings\"));\n\t\tAssert.assertTrue(c.predictNifty.getAttribute(\"src\").contains(\"active\"));\n\t\tAssert.assertFalse(c.pickTopStock.getAttribute(\"src\").contains(\"active\"));\n\t\t\n\t}", "public void selectNCDPotectedClaim ()\r\n\t{\r\n\t\tWebDriverWait wait = new WebDriverWait (driver, GlobalWaitTime.getIntWaitTime ());\r\n\t\twait.until (ExpectedConditions.elementToBeClickable (orPolicyVehicleHub.ddlNCDProtected));\r\n\t\tSelect oNCDProtectedClaims = new Select (orPolicyVehicleHub.ddlNCDProtected);\r\n\t\tint intNCDProtectedIndex = RandomCount.selectRandomItem (oNCDProtectedClaims);\r\n\t\toNCDProtectedClaims.selectByIndex (intNCDProtectedIndex);\r\n\r\n\t}", "public void setNewValues_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localNewValues_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localNewValues_descriptionType=param;\n \n\n }", "@Test\n public void aminoCountsTest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n int[] expected = {1,3,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "private boolean validateType(int type)\n {\n return type >=0 && type < TYPE_ENUM.length;\n }", "@Test\n public void testClaimMbiSubmBeneInd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setMbiSubmBeneIndEnum,\n RdaFissClaim::getMbiSubmBeneInd,\n FissHealthInsuranceClaimNumberOrMedicareBeneficiaryIdentifier.FISS_HIC_OR_MBI_IS_HIC,\n \"H\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setMbiSubmBeneIndUnrecognized,\n RdaFissClaim::getMbiSubmBeneInd,\n RdaFissClaim.Fields.mbiSubmBeneInd,\n 1);\n }", "@Test\n public void testClaimFreqCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setFreqCdEnum,\n RdaFissClaim::getFreqCd,\n FissBillFrequency.BILL_FREQUENCY_ADJUSTMENT_CLAIM_F,\n \"F\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setFreqCdUnrecognized,\n RdaFissClaim::getFreqCd,\n RdaFissClaim.Fields.freqCd,\n 1);\n }", "public String getCollectCondition()\n\t{\n\t\tStringBuffer stbf = new StringBuffer(256) ;\n\t\tboolean existFlg = false ;\n\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableCollect() != null)\n\t\t\t{\n\n\t\t\t\t//#CM708969\n\t\t\t\t// Edit acquisition Condition + acquisition column when acquisition Condition is described clearly. \n\t\t\t\tif (!ky.getTableCollect().trim().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tstbf.append(ky.getTableCollect()) ;\n\t\t\t\t\tstbf.append(\"(\") ;\n\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\tstbf.append(\") \") ;\n\t\t\t\t\tint wPnt = ky.getTableColumn().indexOf(\".\") ;\n\n\t\t\t\t\tif (wPnt >= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tstbf.append(ky.getTableColumn().substring((wPnt + 1))) ;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\t}\n\t\t\t\t\tstbf.append(\", \") ;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\tstbf.append(\", \") ;\n\t\t\t\t}\n\n\t\t\t\tif (existFlg == false)\n\t\t\t\t\texistFlg = true ;\n\t\t\t}\n\t\t}\n\t\t//#CM708970\n\t\t// Return '*' as all item acquisition when data is not set in the key value. \n\t\tif (existFlg == false)\n\t\t\treturn null ;\n\n\t\t//#CM708971\n\t\t// The last \"\"is removed because it is extra. \n\t\tint ep = stbf.toString().lastIndexOf(\",\") ;\n\t\treturn stbf.toString().substring(0, ep) ;\n\t}", "@Test\n public void normalCategoryFirstRangeInKgAndCm() {\n\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"59.3\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"179\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Normal\",\n \"actual text is not: Your category is Normal\");\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder(763);\n SQLUtil.addRequiredCondition(\" cannot:crate islance, odle ignorwd.\", stringBuilder0);\n assertEquals(\" cannot:crate islance, odle ignorwd.\", stringBuilder0.toString());\n }", "@Test\n public void testValue() {\n System.out.println(\"value\");\n String[] expResults = {\"deleted\"};\n StatusType[] verbTypes = {StatusType.DELETED};\n for (int index1 = 0; index1 < verbTypes.length; index1++) {\n String result = verbTypes[index1].value();\n assertEquals(expResults[index1], result);\n }\n }", "@Test\r\n\tpublic void testValuesMatchObjecType(){\r\n\t\t// Make sure we can get all of the values\r\n\t\tEntityType[] values = EntityType.values();\r\n\t\tassertNotNull(values);\r\n\t\tassertEquals(\"Expected one EntityType for each EntityType\",EntityType.values().length,values.length);\r\n\t}", "public static boolean m37109aC(Activity activity) {\n AppMethodBeat.m2504i(49000);\n if (C24143a.m37112aE(activity) != null) {\n AppMethodBeat.m2505o(49000);\n return true;\n }\n AppMethodBeat.m2505o(49000);\n return false;\n }", "public static boolean m14539c(C44919o c44919o, C8235ad c8235ad, C8235ad c8235ad2) {\n AppMethodBeat.m2504i(122754);\n C25052j.m39376p(c44919o, \"context\");\n C25052j.m39376p(c8235ad, \"subType\");\n C25052j.m39376p(c8235ad2, \"superType\");\n boolean z = C8230j.m14537e(c8235ad) || C8230j.m14536d(c8235ad) || c44919o.mo72115e(c8235ad);\n Throwable assertionError;\n if (!C44847aa.AUz || z) {\n z = C8230j.m14536d(c8235ad2) || c44919o.mo72115e(c8235ad2);\n if (C44847aa.AUz && !z) {\n assertionError = new AssertionError(\"Not singleClassifierType superType: \".concat(String.valueOf(c8235ad2)));\n AppMethodBeat.m2505o(122754);\n throw assertionError;\n } else if (c8235ad2.eci()) {\n AppMethodBeat.m2505o(122754);\n return true;\n } else if (C41444ag.m72304ap(c8235ad)) {\n AppMethodBeat.m2505o(122754);\n return true;\n } else if (C8232l.m14538a(c44919o, c8235ad, C37047a.BKT)) {\n AppMethodBeat.m2505o(122754);\n return true;\n } else if (C41444ag.m72304ap(c8235ad2)) {\n AppMethodBeat.m2505o(122754);\n return false;\n } else if (C8232l.m14538a(c44919o, c8235ad2, C17311d.BKV)) {\n AppMethodBeat.m2505o(122754);\n return false;\n } else if (C8230j.m14535c(c8235ad)) {\n AppMethodBeat.m2505o(122754);\n return false;\n } else {\n boolean d = C8232l.m14540d(c44919o, c8235ad, c8235ad2.ejw());\n AppMethodBeat.m2505o(122754);\n return d;\n }\n }\n assertionError = new AssertionError(\"Not singleClassifierType superType: \".concat(String.valueOf(c8235ad2)));\n AppMethodBeat.m2505o(122754);\n throw assertionError;\n }", "public static TypeDictionaryDicoActionQualificatifActivite get(int value) {\n\t\tswitch (value) {\n\t\t\tcase UNIQUE_VALUE: return UNIQUE;\n\t\t\tcase MINIMAL_VALUE: return MINIMAL;\n\t\t\tcase MAXIMAL_VALUE: return MAXIMAL;\n\t\t\tcase POSSIBLE_VALUE: return POSSIBLE;\n\t\t}\n\t\treturn null;\n\t}", "@Test\n public void testClaimAdmDiagCode() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setAdmDiagCode,\n RdaFissClaim::getAdmitDiagCode,\n RdaFissClaim.Fields.admitDiagCode,\n 7);\n }", "@Test(suiteName = \"NowPlaying\", testName = \"DMCA Restricted\", description = \"Validating DMCA restricted\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-220\" })\n\tpublic void dmcaRestrictedChannelNumber() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"verifying DMCA restricted Channel Number MOBANDEVER-220\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickonMusic();\n\t\t\tcommon.scrollUntilTextExists(\"Dance/Electronic\");\n\t\t\tgetPageFactory().getEvehome().clickMucisSubRock();\n\t\t\tgetPageFactory().getEvehome().popChannel1();\n\t\t\tgetPageFactory().getCategory().nplChnumber();\n\t\t\tgetPageFactory().getEvehome().clickminimize();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}", "private void addAOCAndCOCombinationError(Event event, Reporter reporter, Program program) {\n if (hasNoAttributeOptionComboSet(event)) {\n reporter.addError(\n event,\n ValidationCode.E1117,\n program.getCategoryCombo(),\n event.getAttributeCategoryOptions().stream()\n .map(MetadataIdentifier::getIdentifierOrAttributeValue)\n .collect(Collectors.toSet())\n .toString());\n } else {\n reporter.addError(\n event,\n ValidationCode.E1117,\n event.getAttributeOptionCombo(),\n event.getAttributeCategoryOptions().stream()\n .map(MetadataIdentifier::getIdentifierOrAttributeValue)\n .collect(Collectors.toSet())\n .toString());\n }\n }", "private void checkCreatingPendingIntentsWithIntentVariables(Source<CompilationUnit> java) {\n List<String> implicitIntentsVariables = java.getModel().findAll(ObjectCreationExpr.class).stream()\n .filter(expr -> expr.getType().getName().getIdentifier().equals(\"Intent\"))\n .filter(this::isCreatingImplicitIntent)\n .map(Node::getParentNode)\n .flatMap(Optional::stream)\n .filter(node -> node instanceof VariableDeclarator)\n .map(node -> (VariableDeclarator) node)\n .map(VariableDeclarator::getName)\n .map(SimpleName::getIdentifier)\n .collect(Collectors.toList());\n java.getModel().findAll(MethodCallExpr.class).stream()\n .filter(expr -> expr.getName().getIdentifier().matches(\"getActivity|getBroadcast|getService\"))\n .filter(expr -> expr.getArguments().size() >= 4)\n .filter(expr -> expr.getArguments().get(2).isNameExpr())\n .filter(expr -> implicitIntentsVariables.contains(expr.getArguments().get(2).asNameExpr().getName().getIdentifier()))\n .forEach(expr -> addJavaIssue(Severity.VULNERABILITY, \".PENDING_INTENT\", java.getFile(), expr));\n }", "public void testSetAllFields_Behavior(String profileConf,String behaviorOfMandatory,String behaviorOfOptional) throws Exception{\r\n ProfileManagement instProfileManagement = new ProfileManagement(selenium);\r\n String arr[]={\"givenname\",\"lastname\",\"emailaddress\",\"nickname\",\"dob\",\"gender\",\"country\",\"streetaddress\",\"telephone\",\"mobile\",\"locality\",\"postalcode\",\"region\",\"role\",\"title\",\"url\",\"im\",\"organization\",\"otherphone\",\"fullname\",\"stateorprovince\"};\r\n int i=0;\r\n while(i<21){\r\n if((\"http://wso2.org/claims/\"+arr[i]).equals(\"http://wso2.org/claims/givenname\")||(\"http://wso2.org/claims/\"+arr[i]).equals(\"http://wso2.org/claims/lastname\")||(\"http://wso2.org/claims/\"+arr[i]).equals(\"http://wso2.org/claims/emailaddress\"))\r\n instProfileManagement.testUpdateDefaultProfile_Configuration(profileConf,\"http://wso2.org/claims/\"+arr[i],behaviorOfMandatory);\r\n else\r\n instProfileManagement.testUpdateDefaultProfile_Configuration(profileConf,\"http://wso2.org/claims/\"+arr[i],behaviorOfOptional);\r\n\r\n i=i+1;\r\n }\r\n }", "private boolean hasFailures(Map item){\n if(item.containsKey(\"code\") && item.get(\"code\").equals(\"ACCEPTED\"))\n return false;\n return ((Integer)item.get(\"failuresCount\")) > 0;\n }", "@Test\n public void testDiagnosisCodeDiagCd2() {\n new DiagnosisCodeFieldTester(false)\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissDiagnosisCode.Builder::setDiagCd2,\n RdaFissDiagnosisCode::getDiagCd2,\n RdaFissDiagnosisCode.Fields.diagCd2,\n 7);\n }", "@Test\n public void testDiffConstraint () throws IOException\n {\n CacheList clist = new CacheList(new Scanner(\n \"GCABCD\\tAs The World Turns\\tbunny\\t1\\t1\\tN40 45.875\\tW111 48.986\\nGCRQWK\\tOld Three Tooth\\tgeocadet\\t3.5\\t3\\tN40 45.850\\tW111 48.045\\n\"));\n clist.setDifficultyConstraints(2, 4);\n ArrayList<Cache> selected = clist.select();\n assertEquals(\"GCRQWK\", selected.get(0).getGcCode());\n }", "private void validateTransactionCode(ATMSparrowMessage atmSparrowMessage, BankFusionEnvironment env) {\n boolean result = isTransactionSupported(atmSparrowMessage.getMessageType() + atmSparrowMessage.getTransactionType(), env);\n if (result) {\n atmSparrowMessage.setAuthorisedFlag(ATMConstants.AUTHORIZED_MESSAGE_FLAG);\n // String ubTransCode =\n // atmHelper.getBankTransactionCode(atmSparrowMessage.getMessageType()\n // + atmSparrowMessage.getTransactionType(), env);\n // //UBTransaction type mapped or not?\n // try {\n // IBOMisTransactionCodes misTransactionCodes =\n // (IBOMisTransactionCodes)env.getFactory().findByPrimaryKey(IBOMisTransactionCodes.BONAME,\n // ubTransCode);\n // } catch (FinderException bfe) {\n // Object[] field = new Object[] { ubTransCode };\n // atmSparrowMessage.setAuthorisedFlag(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG);\n // if\n // (atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_0))\n // {\n // populateErrorDetails (ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG,\n // ATMConstants.WARNING, 7508, BankFusionMessages.ERROR_LEVEL,\n // atmSparrowMessage, field, env);\n // } else if\n // (atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_1)\n // ||\n // atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_2)\n // ||\n // atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_3)\n // ||\n // atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_7))\n // {\n // populateErrorDetails (ATMConstants.AUTHORIZED_MESSAGE_FLAG,\n // ATMConstants.CRITICAL, 7508, BankFusionMessages.ERROR_LEVEL,\n // atmSparrowMessage, field, env);\n // if (controlDetails != null) {\n // ubTransCode = controlDetails.getAtmTransactionType();\n // }\n // }\n // }\n }\n else {\n atmSparrowMessage.setAuthorisedFlag(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG);\n /*\n * String errorMessage = BankFusionMessages.getFormattedMessage(BankFusionMessages\n * .ERROR_LEVEL, 7506, env, new Object[] { atmSparrowMessage .getMessageType() +\n * atmSparrowMessage.getTransactionType() });\n */\n String errorMessage = BankFusionMessages.getInstance().getFormattedEventMessage(40407506,\n new Object[] { atmSparrowMessage.getMessageType() + atmSparrowMessage.getTransactionType() },\n BankFusionThreadLocal.getUserSession().getUserLocale());\n String errorStatus = null;\n if (atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_0)\n || atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_6)) {\n errorStatus = ATMConstants.WARNING;\n logger.warn(errorMessage);\n }\n else {\n errorStatus = ATMConstants.CRITICAL;\n logger.error(errorMessage);\n }\n atmSparrowMessage.setErrorCode(errorStatus);\n atmSparrowMessage.setErrorDescription(errorMessage);\n }\n }", "public net.explorys.samhat.z12.r837.X837Ins_2305_CR7_HomeHealthCarePlanInformation.Builder set2305CR701DisciplineTypeCode$1(java.lang.CharSequence value) {\n validate(fields()[0], value);\n this._2305CR701DisciplineTypeCode = value;\n fieldSetFlags()[0] = true;\n return this; \n }", "public org.LNDCDC_NCS_NCSAR.NCSAR_BUSINESS_UNITS.apache.nifi.LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS.Builder setCLAPPROVAL(java.lang.CharSequence value) {\n validate(fields()[5], value);\n this.CL_APPROVAL = value;\n fieldSetFlags()[5] = true;\n return this;\n }", "public static List<C4456g4> m15909a(JSONArray jSONArray) {\n if (jSONArray == null) {\n return null;\n }\n ArrayList arrayList = new ArrayList();\n for (int i = 0; i < jSONArray.length(); i++) {\n JSONObject optJSONObject = jSONArray.optJSONObject(i);\n if (optJSONObject == null) {\n C1557c.m7473e(f11398a, \"Received null or blank trigger condition Json. Not parsing.\");\n } else {\n String string = optJSONObject.getString(\"type\");\n if (string.equals(\"purchase\")) {\n arrayList.add(new C4490k4(optJSONObject));\n } else if (string.equals(\"custom_event\")) {\n arrayList.add(new C4416c4(optJSONObject));\n } else if (string.equals(\"push_click\")) {\n arrayList.add(new C4512m4(optJSONObject));\n } else if (string.equals(\"open\")) {\n arrayList.add(new C4473i4());\n } else if (string.equals(\"iam_click\")) {\n arrayList.add(new C4465h4(optJSONObject));\n } else if (string.equals(\"test\")) {\n arrayList.add(new C4523n4());\n } else if (string.equals(\"custom_event_property\")) {\n arrayList.add(new C4427d4(optJSONObject));\n } else if (string.equals(\"purchase_property\")) {\n arrayList.add(new C4502l4(optJSONObject));\n } else {\n String str = f11398a;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Received triggered condition Json with unknown type: \");\n sb.append(string);\n sb.append(\". Not parsing.\");\n C1557c.m7473e(str, sb.toString());\n }\n }\n }\n return arrayList;\n }", "public void howToGetASubject(String cCode){\n\t\t//CODE HERE\n\t\t\n\t\tfor (RegCourse course:registeredCourses){\n\t\t\tif(course.getCourseCode().equals(cCode)){\n\t\t\t\t\n\t\t\t\tif(this.findAccum(course)+(1-this.findFullAccum(course))<0.8){\n\t\t\t\t\tSystem.out.println(\"You can't get A for this subject\");\n\t\t\t\t}else {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.printf(\"You need %.2f score more to get an A for this subject\\n\",(0.8-this.findAccum(course))*100);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private boolean contains(Object annotationType, Set allowed, Set configured) {\n \t\tif (allowed.contains(annotationType))\n \t\t\treturn true;\n \n \t\tboolean covered= isCovered(annotationType, configured);\n \t\tif (covered)\n \t\t\tallowed.add(annotationType);\n \n \t\treturn covered;\n \t}", "gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type.Value.Enum getValue();", "public String onChangeResidenceCode()\r\n {\r\n\ttry\r\n\t{\r\n\r\n\t SessionCO sessionCO = returnSessionObject();\r\n\t residenceTypesSC.setCompCode(sessionCO.getCompanyCode());\r\n\t residenceTypesSC.setPreferredLanguage(sessionCO.getPreferredLanguage());\r\n\t residenceTypesVO = residenceTypesBO.returnDependencyByCode(residenceTypesSC);\r\n\t if(residenceTypesVO == null)\r\n\t {\r\n\t\tthrow new BOException(MessageCodes.INVALID_MISSING_CODE);\r\n\t }\r\n\r\n\t}\r\n\tcatch(Exception e)\r\n\t{\r\n\t residenceTypesVO = new RESIDENCE_TYPESVO();\r\n\t handleException(e, null, null);\r\n\t}\r\n\treturn SUCCESS;\r\n }", "public void validateRpd15s1()\n {\n // This guideline cannot be automatically tested.\n }", "com.google.container.v1.StatusCondition.Code getCode();", "public void setAccidentCircumstance(typekey.AccidentCircumstancePEL value);", "@Test\n public void officeActionCreateWithMismatchingEviCaseNo77777778() {\n // This test case validate the understanding based on which the create\n // office-action api has been developed.\n // ie, while creating an office-action inside a given serial number the\n // incoming association of evidence file has to match\n // the serial number of office-action.\n // In-other words the incoming associated evidence files needs to exists\n // inside the same office-action case number.\n testCreateSampleEviOneForOffActn78();\n testCreateSampleEviTwoForOffActn78();\n testCreateOfficeAction77();\n }", "@java.lang.Override\n public boolean hasBasisValue() {\n return typeCase_ == 13;\n }", "@Override\n\tpublic boolean checkCourse(String code) {\n\t\treturn false;\n\t}", "public boolean checkSeatTaken(int[] RC) {\n return seatPlan[RC[0] - 1][RC[1] - 1].getStatus();\n }", "public boolean isSetCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(CODE$6) != 0;\n }\n }", "public List<GLJournalApprovalVO> getActivityfromuniquecode(String OrgId, String ClientId,\n String actId) {\n String sqlQuery = \"\";\n PreparedStatement st = null;\n ResultSet rs = null;\n List<GLJournalApprovalVO> list = null;\n try {\n list = new ArrayList<GLJournalApprovalVO>();\n sqlQuery = \" select f.c_activity_id,act.name from fact_acct f join c_activity act on act.c_activity_id = f.c_activity_id WHERE f.AD_ORG_ID IN (\"\n + OrgId + \") \" + \" AND f.AD_CLIENT_ID IN (\" + ClientId\n + \") AND f.em_efin_uniquecode IN ('\" + actId\n + \"') and f.c_bpartner_id is not null and f.c_salesregion_id is not null and f.c_project_id is not null and f.c_campaign_id is not null and f.c_activity_id is not null and f.user1_id is not null and f.user2_id is not null limit 1\";\n st = conn.prepareStatement(sqlQuery);\n rs = st.executeQuery();\n while (rs.next()) {\n GLJournalApprovalVO VO = new GLJournalApprovalVO();\n VO.setId(rs.getString(1));\n VO.setName(rs.getString(2));\n list.add(VO);\n }\n } catch (Exception e) {\n log4j.error(\"Exception in getOrgs()\", e);\n }\n return list;\n }", "static int type_of_aci(String passed){\n\t\treturn 1;\n\t}", "public void setNewCardinalityType(int param){\n \n // setting primitive attribute tracker to true\n localNewCardinalityTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localNewCardinalityType=param;\n \n\n }", "private void generate_verification_code(StringBuffer Code, DataType ReturnType)\n {\n String TypeString = ReturnType.getDescriptor(m_Language);\n\n Code.append(\"\\tvoid verify_case(int Case, const \" + TypeString + \" &Expected, const \" + TypeString + \" &Received) { \");\n\n Code.append(\"cerr << \\\"Test Case #\\\" << Case << \\\"...\\\"; \");\n\n // Print \"PASSED\" or \"FAILED\" based on the result\n Code.append(\"if (Expected == Received) cerr << \\\"PASSED\\\" << endl; \");\n Code.append(\"else { cerr << \\\"FAILED\\\" << endl; \");\n\n if (ReturnType.getDimension() == 0)\n {\n Code.append(\"cerr << \\\"\\\\tExpected: \\\\\\\"\\\" << Expected << \\'\\\\\\\"\\' << endl; \");\n Code.append(\"cerr << \\\"\\\\tReceived: \\\\\\\"\\\" << Received << \\'\\\\\\\"\\' << endl; } }\\n\");\n }\n else\n {\n Code.append(\"cerr << \\\"\\\\tExpected: \\\" << print_array(Expected) << endl; \");\n Code.append(\"cerr << \\\"\\\\tReceived: \\\" << print_array(Received) << endl; } }\\n\");\n }\n // end if\n }", "public void testAllMedicalConditionParametersPopulated() {\n Map<String, MedicalCondition> conditions = cache.getConditions(Service.NOTIFY);\n MedicalCondition condition = conditions.get(DIABETES_CONDITION);\n\n assertNotNull(condition);\n\n assertEquals(\"DIAB\", condition.getID());\n assertEquals(\"Diabetes\", condition.getTitle());\n assertEquals(\"diabetes\", condition.getName());\n assertEquals(EMPTY, condition.getType());\n assertEquals(\"DIAB1\", condition.getForm());\n assertEquals(DIABETES_CONDITION, condition.getDomain());\n assertEquals(\"diabetes-with-insulin\", condition.getStart());\n assertEquals(\"diabetes\", condition.getDomain());\n assertEquals(\"diabetes-driving\", condition.getInformation());\n assertTrue(condition.getSynonyms().isEmpty());\n assertEquals(1, condition.getCasp().size());\n assertTrue(condition.getCasp().contains(\"D01\"));\n assertEquals(condition.getCeg(), \"101\");\n assertEquals(Severity.NOTIFIABLE, condition.getSeverity());\n assertEquals(Boolean.TRUE, condition.getEnabled());\n\n assertNotNull(condition.toString());\n }", "private static boolean acceptsNominal(Automaton type, Automaton.Term tState, Automaton automaton,\n\t\t\tAutomaton.State aState, Schema schema, BinaryMatrix assumptions) {\n\t\tAutomaton.List l = (Automaton.List) type.get(tState.contents);\n\t\treturn accepts(type, l.get(1), automaton, aState, schema, assumptions);\n\t}", "@Test\n\tpublic void testSingleSetOnlyPositiveInteger()\n\t{\n\t\tcreateSingleValueSet(5);\n\t\tKeyedValues actual = DataUtilities.getCumulativePercentages(m_values);\n\t\t\n\t\tassertEquals(\"Cumulative percentage of a single positive integer should be 100%.\",\n\t\t\t\t1.0, actual.getValue(0).doubleValue(), 0.0000001);\n\t}", "private boolean m43013b(int responseCode) {\n if (responseCode == 200 || responseCode == 202 || responseCode == 206) {\n return true;\n }\n return false;\n }", "public boolean isSetCode() {\n return this.code != null;\n }", "public static boolean m71678a(Activity activity) {\n if (f57214d || activity == null) {\n return false;\n }\n Intent intent = new Intent(activity, MusLoginActivity.class);\n if (C22352y.m74025f()) {\n Keva.getRepo(\"compliance_setting\").storeBoolean(\"need_to_show_ftc_age_gate_but_no_showed\", true);\n if (C21886a.f58594a.mo58324c()) {\n intent = new Intent(activity, SignUpOrLoginActivity.class);\n intent.putExtra(\"next_page\", Step.AGE_GATE.getValue());\n } else {\n intent.putExtra(\"init_page\", 4);\n }\n intent.putExtra(\"enter_type\", \"click_login\");\n } else if (C22352y.m74022c()) {\n intent.putExtra(\"init_page\", 5);\n intent.putExtra(\"enter_type\", \"click_sign_up\");\n } else if (C22352y.m74023d()) {\n intent.putExtra(\"init_page\", 6);\n intent.putExtra(\"enter_type\", \"click_sign_up\");\n } else if (!C22352y.m74024e()) {\n return false;\n } else {\n Intent intent2 = new Intent(activity, DeleteVideoAlertActivity.class);\n intent2.putExtra(\"age_gate_response\", new AgeGateResponse(0, \"\", C22345t.m73968c(), C22345t.m73976g()));\n activity.startActivity(intent2);\n return true;\n }\n f57214d = true;\n activity.startActivity(intent);\n return true;\n }", "protected int canTargetCode()\r\n\t{\r\n\t\treturn 0;\r\n\t}", "public boolean testPredefinedtype(EIfccablecarrierfitting type) throws SdaiException;", "@java.lang.Override\n public boolean hasBasisValue() {\n return typeCase_ == 13;\n }", "@Test\n public void underweightCategoryFirstRangeInKgAndCm() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"47\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"177\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Underweight\",\n \"actual text is not: Your category is Underweight\");\n }", "@Test\n public void testClaimCurrLoc1() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setCurrLoc1Enum,\n claim -> String.valueOf(claim.getCurrLoc1()),\n FissProcessingType.PROCESSING_TYPE_BATCH,\n \"B\")\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setCurrLoc1Unrecognized,\n claim -> String.valueOf(claim.getCurrLoc1()),\n RdaFissClaim.Fields.currLoc1,\n 1);\n }", "public Integer[] abilitaAzioneSpecifica(TipoAzione tipoAzione){\n\n Integer[] celleDisattivate=null;\n if(tipoAzione == TipoAzione.TORRE_EDIFICIO) celleDisattivate = mantieniAbilitati(5, 8);\n else if(tipoAzione == TipoAzione.TORRE_TERRITORIO) celleDisattivate =mantieniAbilitati(1, 4);\n else if(tipoAzione == TipoAzione.TORRE_IMPRESA) celleDisattivate =mantieniAbilitati(13, 16);\n else if(tipoAzione == TipoAzione.TORRE_PERSONAGGIO) celleDisattivate =mantieniAbilitati(9, 12);\n else if(tipoAzione == TipoAzione.TORRE) celleDisattivate =mantieniAbilitati(1, 16);\n else if(tipoAzione == TipoAzione.PRODUZIONE) celleDisattivate =mantieniAbilitati(17, 18);\n else if(tipoAzione == TipoAzione.RACCOLTO) celleDisattivate =mantieniAbilitati(19, 20);\n return celleDisattivate;\n\n }", "public org.LNDCDC_NCS_NCSAR.NCSAR_BUSINESS_UNITS.apache.nifi.LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS.Builder setALLOWMISCINVCREATION(java.lang.CharSequence value) {\n validate(fields()[9], value);\n this.ALLOW_MISC_INV_CREATION = value;\n fieldSetFlags()[9] = true;\n return this;\n }" ]
[ "0.49422783", "0.48995242", "0.4877483", "0.48334554", "0.47450122", "0.46724457", "0.4662693", "0.45681813", "0.45633888", "0.45053837", "0.44980788", "0.44553432", "0.44533807", "0.44479498", "0.44431448", "0.44100332", "0.44098273", "0.4396971", "0.43963087", "0.43845123", "0.43735176", "0.4369787", "0.43689585", "0.43686524", "0.43634295", "0.43382847", "0.4337155", "0.43311325", "0.43298018", "0.43270376", "0.4324336", "0.4323844", "0.4322355", "0.4315828", "0.4315412", "0.43115523", "0.431084", "0.4310416", "0.43014085", "0.4298603", "0.42968112", "0.42871416", "0.42818567", "0.42781797", "0.42722508", "0.4266716", "0.426423", "0.42591068", "0.42549425", "0.42484984", "0.42379692", "0.42298147", "0.42287642", "0.42254385", "0.42245036", "0.4218025", "0.4213506", "0.4211828", "0.42096215", "0.42082533", "0.4204034", "0.4197157", "0.41958478", "0.4194777", "0.419122", "0.41897088", "0.4185853", "0.4178244", "0.41695336", "0.41684204", "0.41652745", "0.41525182", "0.4151802", "0.41505933", "0.41377258", "0.41344464", "0.4126508", "0.412242", "0.4117652", "0.41161737", "0.41155097", "0.4115408", "0.41137144", "0.41112185", "0.41108778", "0.41098288", "0.41092423", "0.410708", "0.41055024", "0.41008627", "0.41008437", "0.40993318", "0.4099262", "0.4097261", "0.40961108", "0.4091967", "0.40911978", "0.4090852", "0.40883288", "0.40875837", "0.4086007" ]
0.0
-1
CCD Policy Activity SHOULD contain exactly one [1..1] code, which SHOULD be selected from ValueSet 2.16.840.1.113883.1.11.19832 ActCoverageType DYNAMIC (CONF54, CONF55).
IPayerEntry setCode(CD value);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testClaimCancAdjCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setCancAdjCdEnum,\n RdaFissClaim::getCancAdjCd,\n FissCancelAdjustmentCode.CANCEL_ADJUSTMENT_CODE_COVERAGE,\n \"C\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setCancAdjCdUnrecognized,\n RdaFissClaim::getCancAdjCd,\n RdaFissClaim.Fields.cancAdjCd,\n 1);\n }", "@Test\n\tvoid attributeCardinality() {\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..*]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..0]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..1]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"{\" +\n\t\t\t\t\t\t\t\t\"[1..1]\" + FINDING_SITE + \" != <<\" + PULMONARY_VALVE_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS + \"\" +\n\t\t\t\t\t\t\t\t\"}\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + FINDING_SITE + \" != <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t}", "@DISPID(11)\n\t// = 0xb. The runtime will prefer the VTID if present\n\t@VTID(23)\n\tvoid riskAnalysisType(int pVal);", "@Test\n public void testClaimAdjReqCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setAdjReqCdEnum,\n RdaFissClaim::getAdjReqCd,\n FissAdjustmentRequestorCode.ADJUSTMENT_REQUESTOR_CODE_FISCAL_INTERMEDIARY,\n \"F\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setAdjReqCdUnrecognized,\n RdaFissClaim::getAdjReqCd,\n RdaFissClaim.Fields.adjReqCd,\n 1);\n }", "@Override\r\n\tpublic boolean isValid(String code, ConstraintValidatorContext theConstaint) {\r\n \r\n titles = customerService.getTitles();\r\n \r\n for(String i : titles)\r\n {\r\n \tSystem.out.println(i);\r\n }\r\n //descriptions = ec.getDescriptions();\r\n for(String i : titles)\r\n {\r\n\t result = code.equals(i);\r\n\t\tif(code != null)\t\t\r\n\t\t\tresult = code.equals(i);\r\n\t\telse\r\n\t\t\tresult = true;\r\n\t\tif(result == true)\r\n\t\t\tbreak;\r\n }\r\n\t\treturn result;\r\n\t}", "@Test\n public void testClaimPrimaryPayerCode() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setPrimaryPayerCodeEnum,\n RdaFissClaim::getPrimaryPayerCode,\n FissPayersCode.PAYERS_CODE_AUTO_NO_FAULT,\n \"D\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setPrimaryPayerCodeUnrecognized,\n RdaFissClaim::getPrimaryPayerCode,\n RdaFissClaim.Fields.primaryPayerCode,\n 1);\n }", "public void setSpecialReviewCode() {\r\n try {\r\n //CoeusVector cvParameter = queryEngine.executeQuery(queryKey,CoeusParameterBean.class,CoeusVector.FILTER_ACTIVE_BEANS);\r\n boolean isHumanSubFetched = false;\r\n boolean isAnimalUsagefetched = false;\r\n for (int index=0;index<cvParameters.size();index++) {\r\n CoeusParameterBean coeusParameterBean=(CoeusParameterBean)cvParameters.elementAt(index);\r\n //get the value for the SPL_REV_TYPE_CODE_HUMAN parameter\r\n if(HUMAN_SUBJECTS.equals(coeusParameterBean.getParameterName())){\r\n if(CoeusConstants.SPL_REV_TYPE_CODE_HUMAN.equals(coeusParameterBean.getParameterName())){\r\n specialReviewTypeCode = Integer.parseInt(coeusParameterBean.getParameterValue());\r\n specialReviewForm.setSpecialRevTypeCode(coeusParameterBean.getParameterValue());\r\n isHumanSubFetched = true;\r\n }\r\n }\r\n //Added for the COEUSQA-3119- Need to implement IACUC link to Award, IP, Prop Dev, and IRB - start\r\n //getting the data for parameter IACUC_SPL_REV_TYPE_CODE\r\n else if(ANIMAL_USAGE.equals(coeusParameterBean.getParameterName())) {\r\n if(CoeusConstants.IACUC_SPL_REV_TYPE_CODE.equals(coeusParameterBean.getParameterName())){\r\n specialRevTypeCodeParamForIacuc = Integer.parseInt(coeusParameterBean.getParameterValue());\r\n specialReviewForm.setSpecialRevTypeCodeForIacuc(coeusParameterBean.getParameterValue());\r\n isAnimalUsagefetched = true;\r\n }\r\n }\r\n //if value for both SPL_REV_TYPE_CODE_HUMAN and IACUC_SPL_REV_TYPE_CODE are fetched then break the loop\r\n if(isHumanSubFetched && isAnimalUsagefetched ){\r\n break;\r\n }\r\n //Added for the COEUSQA-3119- Need to implement IACUC link to Award, IP, Prop Dev, and IRB - end\r\n }\r\n }catch(Exception exception) {\r\n \r\n }\r\n }", "@Override\n\tpublic boolean validataRepeat(String code) throws Exception {\n\t\treturn false;\n\t}", "public void set2305CR701DisciplineTypeCode$1(java.lang.CharSequence value) {\n this._2305CR701DisciplineTypeCode = value;\n }", "int evaluate(ISeqActivity iThisActivity) {\n\n\t\tif (_Debug) {\n\t\t\tSystem.out.println(\" :: SeqConditionSet --> BEGIN - evaluate\");\n\t\t\tSystem.out.println(\" :: --> RETRY == \" + mRetry);\n\t\t}\n\n\t\tint result = EVALUATE_UNKNOWN;\n\n\t\t// Make sure we have a valid target activity \n\t\tif (iThisActivity != null) {\n\n\t\t\tif (_Debug) {\n\t\t\t\tSystem.out.println(\" ::--> Set - \" + mCombination);\n\n\t\t\t\tif (mConditions != null) {\n\t\t\t\t\tSystem.out.println(\" ::--> [\" + mConditions.size() + \"]\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\" ::--> NULL\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (mConditions != null) {\n\t\t\t\t// Evaluate this rule's conditions\n\t\t\t\tif (mCombination.equals(COMBINATION_ALL)) {\n\t\t\t\t\tresult = EVALUATE_TRUE;\n\n\t\t\t\t\tfor (int i = 0; i < mConditions.size(); i++) {\n\t\t\t\t\t\tint thisEval = evaluateCondition(i, (SeqActivity) iThisActivity);\n\n\t\t\t\t\t\tif (thisEval != EVALUATE_TRUE) {\n\t\t\t\t\t\t\tresult = thisEval;\n\n\t\t\t\t\t\t\t// done with this evaluation\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (mCombination.equals(COMBINATION_ANY)) {\n\t\t\t\t\t// Assume we have enought information to evaluate\n\t\t\t\t\tresult = EVALUATE_FALSE;\n\n\t\t\t\t\tfor (int i = 0; i < mConditions.size(); i++) {\n\t\t\t\t\t\tint thisEval = evaluateCondition(i, (SeqActivity) iThisActivity);\n\n\t\t\t\t\t\tif (thisEval == EVALUATE_TRUE) {\n\t\t\t\t\t\t\tresult = EVALUATE_TRUE;\n\n\t\t\t\t\t\t\t// done with this evaluation\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if (thisEval == EVALUATE_UNKNOWN) {\n\t\t\t\t\t\t\t// Something is missing...\n\t\t\t\t\t\t\tresult = EVALUATE_UNKNOWN;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Reset the 'retry' flag\n\t\tmRetry = false;\n\n\t\tif (_Debug) {\n\t\t\tSystem.out.println(\" ::--> \" + result);\n\t\t\tSystem.out.println(\" :: SeqConditionSet --> END - evaluate\");\n\t\t}\n\n\t\treturn result;\n\n\t}", "public boolean meetsRequirement(String sId, String sName, CCode sColor, Type sType, int sLevel, int sCost, Trigger sTrigger, int sPower, int sSoul, String sTrait, String sAbility) {\n \n \t\tboolean isMet = true;\n \n \t\tif (!id.isEmpty()) {\n \n \t\t\tString[] parts = sId.split(\" \");\n \n \t\t\tfor (int i = 0; i < sameID.length; i++) {\n \t\t\t\tisMet = true;\n \t\t\t\tfor (int j = 0; j < parts.length; j++) {\n \t\t\t\t\tisMet = isMet && sameID[i].toLowerCase().contains(parts[j].toLowerCase());\n \t\t\t\t\t/*\n \t\t\t\t\t * if (sameID[i].toLowerCase()\n \t\t\t\t\t * .contains(parts[j].toLowerCase()))\n \t\t\t\t\t * System.out.println(sameID[i] + \"???\" + parts[j]);\n \t\t\t\t\t */\n \t\t\t\t}\n \t\t\t\tif (isMet) {\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \n \t\t\t}\n \t\t\tisMet = true;\n \t\t\tfor (int j = 0; j < parts.length; j++) {\n \t\t\t\tisMet = isMet && id.toLowerCase().contains(parts[j].toLowerCase());\n \t\t\t\t/*\n \t\t\t\t * if (id.toLowerCase().contains(parts[j].toLowerCase()))\n \t\t\t\t * System.out.println(id + \"::CONTAINS::\" + parts[j]);\n \t\t\t\t */\n \t\t\t}\n \n \t\t\t/*\n \t\t\t * if (isMet) { for (int i = 0; i < sameID.length; i++) {\n \t\t\t * System.out.print(\"[(\" + i + \")\" + sameID[i] + \"]\"); }\n \t\t\t * System.out.println(); }\n \t\t\t */\n \t\t}\n \n \t\tif (!sName.isEmpty()) {\n \t\t\tisMet = isMet && (cardName.toLowerCase().contains(sName.toLowerCase()) || cardName_e.toLowerCase().contains(sName.toLowerCase()));\n \t\t}\n \n \t\tif (sColor != null && sColor != CCode.ALL) {\n \t\t\tisMet = isMet && (sColor == c);\n \t\t}\n \n \t\tif (sType != null && sType != CardAssociation.Type.ALL) {\n \t\t\tisMet = isMet && (sType == t);\n \t\t}\n \n \t\tif (sLevel > -1) {\n \t\t\tisMet = isMet && (sLevel == level);\n \t\t}\n \n \t\tif (sCost > -1) {\n \t\t\tisMet = isMet && (sCost == cost);\n \t\t}\n \n \t\tif (sTrigger != null && sTrigger != Trigger.ALL) {\n \t\t\tisMet = isMet && (sTrigger == trigger);\n \t\t}\n \n \t\tif (sPower > -1) {\n \t\t\tisMet = isMet && (sPower == power);\n \t\t}\n \n \t\tif (sSoul > -1) {\n \t\t\tisMet = isMet && (sSoul == soul);\n \t\t}\n \n \t\tif (!sTrait.isEmpty()) {\n \t\t\tisMet = isMet && (trait1.toLowerCase().contains(sTrait) || trait2.toLowerCase().contains(sTrait) || trait1_e.toLowerCase().contains(sTrait) || trait2_e.toLowerCase().contains(sTrait));\n \t\t}\n \n \t\tif (!sAbility.isEmpty()) {\n \n \t\t\tString[] parts = sAbility.split(\" \");\n \n \t\t\tfor (int i = 0; i < parts.length; i++) {\n \t\t\t\tisMet = isMet && (getEffects().toLowerCase().contains(parts[i].toLowerCase()) || getEffects_e().toLowerCase().contains(parts[i].toLowerCase()));\n \t\t\t}\n \t\t}\n \n \t\treturn isMet;\n \t}", "@DISPID(11)\n\t// = 0xb. The runtime will prefer the VTID if present\n\t@VTID(22)\n\tint riskAnalysisType();", "boolean isSetValueCodeableConcept();", "@Test\n public void testClaimProcNewHicInd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setProcNewHicIndEnum,\n RdaFissClaim::getProcNewHicInd,\n FissProcessNewHealthInsuranceClaimNumberIndicator.PROCESS_NEW_HIC_INDICATOR_Y,\n \"Y\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setProcNewHicIndUnrecognized,\n RdaFissClaim::getProcNewHicInd,\n RdaFissClaim.Fields.procNewHicInd,\n 1);\n }", "@Test\n public void testDiagnosisCodePoaInd() {\n new DiagnosisCodeFieldTester(true)\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissDiagnosisCode.Builder::setDiagPoaIndEnum,\n RdaFissDiagnosisCode::getDiagPoaInd,\n FissDiagnosisPresentOnAdmissionIndicator.DIAGNOSIS_PRESENT_ON_ADMISSION_INDICATOR_YES,\n \"Y\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissDiagnosisCode.Builder::setDiagPoaIndUnrecognized,\n RdaFissDiagnosisCode::getDiagPoaInd,\n RdaFissDiagnosisCode.Fields.diagPoaInd,\n 1);\n }", "private void setActivityType(int value) {\n this.bitField0_ |= 4;\n this.activityType_ = value;\n }", "@Test\n public void test025() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n ArrayStringFilter.Mode arrayStringFilter_Mode0 = ArrayStringFilter.Mode.EXACT;\n String[] stringArray0 = new String[6];\n stringArray0[0] = \"iul \";\n stringArray0[1] = \"iul \";\n stringArray0[2] = \"iul \";\n ArrayStringFilter arrayStringFilter0 = new ArrayStringFilter(arrayStringFilter_Mode0, stringArray0);\n String string0 = arrayStringFilter0.toString();\n Any any0 = new Any((Component) errorPage0, (CharSequence) \"EXACT:iul ,iul ,iul ,null,null,null\");\n }", "@Test\n public void ANDSearch_CareQualityComissionAdmission() throws Exception {\n\n final Set<String> searchResults = newsLineSearch.search(TEST_FILE, \"Care Quality Commission admission\",\n SearchType.AND);\n\n assertThat(searchResults).hasSize(1).contains(allLines.get(1));\n }", "public boolean has2305CR701DisciplineTypeCode$1() {\n return fieldSetFlags()[0];\n }", "protected IExpressionValue cardinality()throws TableFunctionMalformedException {\r\n\t\tIExpressionValue ret = null;\r\n\t\tmatch('(');\r\n\t\t\r\n\t\tskipWhite();\r\n\t\tString var = null;\r\n\t\tif (look != ')') {\t// check if argument was provided\r\n\t\t\tvar = this.varsetname();\r\n\t\t\tskipWhite();\r\n\t\t}\r\n\t\t\r\n\t\t// Debug.println(\"CARDINALITY'S ARGUMENT IS \" + var);\r\n\t\t// TODO test if ret has returned NaN (guarantees \"value\" is a varsetname)?\r\n\t\tret = new CardinalityProbabilityValue(this.currentHeader, var);\r\n\t\tmatch(')');\r\n\t\treturn ret;\r\n\t\t\r\n\t}", "String getAssetTypeRestriction();", "public void setCLAPPROVAL(java.lang.CharSequence value) {\n this.CL_APPROVAL = value;\n }", "@Test\n public void testClaimAttendPhysFlag() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setAttendPhysFlagEnum,\n RdaFissClaim::getAttendPhysFlag,\n FissPhysicianFlag.PHYSICIAN_FLAG_NO,\n \"N\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setAttendPhysFlagUnrecognized,\n RdaFissClaim::getAttendPhysFlag,\n RdaFissClaim.Fields.attendPhysFlag,\n 1);\n }", "@Override\n public byte getSubtype() {\n return SUBTYPE_COLORED_COINS_ASSET_ISSUANCE;\n }", "@IID(\"{05518018-2339-4E08-87BE-D14C69527B7A}\")\npublic interface ICustomizationReqType extends com.gc.ICustomizationType {\n\t// Methods:\n\t/**\n\t * <p>\n\t * Indicates if this requirement type supports direct coverage by tests or\n\t * test instances.\n\t * </p>\n\t * <p>\n\t * Getter method for the COM property \"HasDirectCoverage\"\n\t * </p>\n\t * \n\t * @return Returns a value of type boolean\n\t */\n\n\t@DISPID(10)\n\t// = 0xa. The runtime will prefer the VTID if present\n\t@VTID(20)\n\tboolean hasDirectCoverage();\n\n\t/**\n\t * <p>\n\t * Indicates if this requirement type supports direct coverage by tests or\n\t * test instances.\n\t * </p>\n\t * <p>\n\t * Setter method for the COM property \"HasDirectCoverage\"\n\t * </p>\n\t * \n\t * @param pVal\n\t * Mandatory boolean parameter.\n\t */\n\n\t@DISPID(10)\n\t// = 0xa. The runtime will prefer the VTID if present\n\t@VTID(21)\n\tvoid hasDirectCoverage(boolean pVal);\n\n\t/**\n\t * <p>\n\t * The Type of the Risk Analysis that is applicable to this requirement.\n\t * </p>\n\t * <p>\n\t * Getter method for the COM property \"RiskAnalysisType\"\n\t * </p>\n\t * \n\t * @return Returns a value of type int\n\t */\n\n\t@DISPID(11)\n\t// = 0xb. The runtime will prefer the VTID if present\n\t@VTID(22)\n\tint riskAnalysisType();\n\n\t/**\n\t * <p>\n\t * The Type of the Risk Analysis that is applicable to this requirement.\n\t * </p>\n\t * <p>\n\t * Setter method for the COM property \"RiskAnalysisType\"\n\t * </p>\n\t * \n\t * @param pVal\n\t * Mandatory int parameter.\n\t */\n\n\t@DISPID(11)\n\t// = 0xb. The runtime will prefer the VTID if present\n\t@VTID(23)\n\tvoid riskAnalysisType(int pVal);\n\n\t// Properties:\n}", "@Test\n public void testDiagnosisCodeBitFlags() {\n new DiagnosisCodeFieldTester(false)\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissDiagnosisCode.Builder::setBitFlags,\n RdaFissDiagnosisCode::getBitFlags,\n RdaFissDiagnosisCode.Fields.bitFlags,\n 4);\n }", "@java.lang.Override\n public boolean hasAabbValue() {\n return typeCase_ == 12;\n }", "@Test\n public void testClaimAdjMbiInd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setAdjMbiIndEnum,\n RdaFissClaim::getAdjMbiInd,\n FissAdjustmentMedicareBeneficiaryIdentifierIndicator\n .ADJUSTMENT_MBI_INDICATOR_HIC_SUBMITTED_ON_ADJUSTMENT_OR_CANCEL_CLAIM,\n \"H\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setAdjMbiIndUnrecognized,\n RdaFissClaim::getAdjMbiInd,\n RdaFissClaim.Fields.adjMbiInd,\n 1);\n }", "private boolean checkVisualCondition(final String[] condArray) throws Exception {\r\n\t\t//boolean isDisplay = true ; // remarked by Leo YEUNG for testing\r\n\t\tboolean isDisplay = false ;\r\n\t\tint CondPassCount = 0; //Use to count the number of Boolean expressions passed\t\t\t\t\t\t \r\n\t\tint CondAmount = condArray.length;//Total number of Boolean expressions in this Node\r\n\t\t//Loop for all Boolean expressions in one conditon\t\t\t \r\n\t\tfor (int k=0; k<CondAmount; k++) {\t\t \t\t\t\t\t\r\n\t\t\tif (CondPassCount<k) break;\t //Exit the following condition check while one of the Boolean expresssion is failure which save the loop time\r\n\t\t\t//Loop for sort out different Attribute\r\n\t\t\tfor (int m=0; m<conAttName.length; m++) {\r\n\t\t\t\tint previousCondPassCount = CondPassCount;//a value use to check the Boolean expresssion is failure\r\n\t\t\t\tif (condArray[k].toUpperCase().startsWith(conAttName[m].toUpperCase())){ \r\n\t\t\t\t\tfinal String tempConAttType = conAttType[m]; // ldap attribute type\r\n\t\t\t\t\tfinal String tempValue = condArray[k].substring(conAttName[m].length());\r\n\t\t\t\t\tfinal int tempColonIndex = condArray[k].indexOf(\"\\\"\");\r\n\t\t\t\t\tfinal String attName = condArray[k].substring(0,conAttName[m].length()); \t \t\t\t \t\t \t\t\t\t //Attribute Name\r\n\t\t\t\t\tfinal String attCond = condArray[k].substring(conAttName[m].length(),tempColonIndex); //Attribute condition syntax\r\n\t\t\t\t\tfinal String attVal = condArray[k].substring(tempColonIndex+1,condArray[k].lastIndexOf(\"\\\"\"));//Attribute Value\r\n\t\t\t\t\tint k2 = k+1;\r\n\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" checking for \" + condArray[k]+\" Start\");\r\n\t\t\t\t\t//Condition Greater Than\r\n\t\t\t\t\tif (attCond.equalsIgnoreCase(Constant.gt)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null){\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (strCrtUserInfo.compareTo(strAttVal) > 0 ){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t} else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Greater Than> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo > intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Less Than\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.lt)){\r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (strCrtUserInfo.compareTo(strAttVal) < 0 ){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Less than> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo < intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Greater and Equal\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.ge)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (strCrtUserInfo.compareTo(strAttVal) >= 0 ){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t}else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t} catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Greater and Equal to> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo >= intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Less and Equal\t\t\t\t\t\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.le)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (strCrtUserInfo.compareTo(strAttVal) <= 0 ){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t}else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition::\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Less and Equal to> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo <= intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Equal\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.equal)){ //Equal\r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\t\tif (strCrtUserInfo.equalsIgnoreCase(strAttVal)){\r\n\t\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t} else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <equal to> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo == intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Not Equal to\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.not_equal)){\r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (!strCrtUserInfo.equalsIgnoreCase(strAttVal)){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t} else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Not equal to> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo != intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Contain\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.contain)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tif (((String)ht.get(attName.toUpperCase())).indexOf(attVal)!=-1){\r\n\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Start with\t \t \r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.start_with)){\r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tif (((String)ht.get(attName.toUpperCase())).startsWith(attVal)){\r\n\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition\tNot contain\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.not_contain)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tif (((String)ht.get(attName.toUpperCase())).indexOf(attVal)==-1){\r\n\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Not start with\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.not_start_with)){\r\n\t\t\t\t\t\tif (!((String)ht.get(attName.toUpperCase())).startsWith(attVal)){\r\n\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Finally, Syntax Error\t \r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlogger.error(\"checkVisualCondition:Invalid condition syntax found: \" + attCond);\r\n\t\t\t\t\t} \r\n\t\t\t\t}\t\r\n\t\t\t\tif (previousCondPassCount<CondPassCount) break; // condition passed. Exit the for loop\r\n\t\t\t}\r\n\t\t\tif (CondPassCount == CondAmount) isDisplay = true;\r\n\t\t}\r\n\t\t//logger.debug(\"checkVistualCondition: isDisplay = \" + isDisplay);\r\n\t\t//logger.debug(\"checkVistualCondition: CondPassCount = \" + CondPassCount);\r\n\t\t//logger.debug(\"checkVistualCondition: CondAmount = \" + CondAmount);\r\n\t\treturn isDisplay;\r\n\t}", "@Test\n public void test () throws IOException\n {\n CacheList clist = new CacheList(new Scanner(\n \"GCABCD\\tAs The World Turns\\tbunny\\t1\\t1\\tN40 45.875\\tW111 48.986\\nGCRQWK\\tOld Three Tooth\\tgeocadet\\t3.5\\t3\\tN40 45.850\\tW111 48.045\\n\"));\n clist.setTitleConstraint(\"Turns\");\n ArrayList<Cache> selected = clist.select();\n assertEquals(1, selected.size());\n assertEquals(\"GCABCD\", selected.get(0).getGcCode());\n }", "@DISPID(10)\n\t// = 0xa. The runtime will prefer the VTID if present\n\t@VTID(21)\n\tvoid hasDirectCoverage(boolean pVal);", "@Test\n public void testClaimAdmSource() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setAdmSourceEnum,\n RdaFissClaim::getAdmSource,\n FissSourceOfAdmission.SOURCE_OF_ADMISSION_CLINIC_REFERRAL,\n \"2\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setAdmSourceUnrecognized,\n RdaFissClaim::getAdmSource,\n RdaFissClaim.Fields.admSource,\n 1);\n }", "public static Condition meaningOfCode(Integer code) {return BY_LABEL.get(code);}", "public boolean testCategory(EIfcmaterialconstituent type) throws SdaiException;", "@java.lang.Override\n public boolean hasAabbValue() {\n return typeCase_ == 12;\n }", "private void checkCreatingPendingIntentsWithoutIntentVariable(Source<CompilationUnit> java) {\n java.getModel().findAll(MethodCallExpr.class).stream()\n .filter(expr -> expr.getName().getIdentifier().matches(\"getActivity|getBroadcast|getService\"))\n .filter(expr -> expr.getArguments().size() >= 4)\n .filter(expr -> expr.getArguments().get(2).isObjectCreationExpr())\n .filter(expr -> isCreatingImplicitIntent(expr.getArguments().get(2).asObjectCreationExpr()))\n .forEach(expr -> addJavaIssue(Severity.VULNERABILITY, \".PENDING_INTENT\", java.getFile(), expr));\n\n // Works for: getActivities(this, 0, new Intent[] { new Intent(...), ...}, 0)\n java.getModel().findAll(MethodCallExpr.class).stream()\n .filter(expr -> expr.getName().getIdentifier().matches(\"getActivities\"))\n .filter(expr -> expr.getArguments().size() >= 4)\n .filter(expr -> expr.getArguments().get(2).isArrayCreationExpr())\n .filter(expr -> isCreatingImplicitIntentsArray(expr.getArguments().get(2).asArrayCreationExpr()))\n .forEach(expr -> addJavaIssue(Severity.VULNERABILITY, \".PENDING_INTENT\", java.getFile(), expr));\n }", "@Test\n public void testClaimServTypCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setServTypeCdEnum,\n claim -> String.valueOf(claim.getServTypeCd()),\n FissBillClassification.BILL_CLASSIFICATION_INPATIENT_PART_A,\n \"1\")\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setServTypCdUnrecognized,\n claim -> String.valueOf(claim.getServTypeCd()),\n RdaFissClaim.Fields.servTypeCd,\n 1);\n }", "@Test\n public void testConstraintGenerator() throws Exception {\n\n // Tests the generation of constraints generated from bindings that include a MaxValueSet extension,\n // by using a Device profile and extensions created specifically for this test.\n //\n // Each of the following combinations is tested:\n // Choice: No/Yes; Optional: No/Yes; Repeatable: No/Yes\n //-----------------------------------------------\n // Choice: No; Optional: No; Repeatable: No\n //-----[Device.specialization.systemType]\n // Choice: No; Optional: No; Repeatable: Yes\n //-----[Device.statusReason] (no MaxValueSet)\n // Choice: No; Optional: Yes; Repeatable: No\n //-----[Device.type]\n // Choice: No; Optional: Yes; Repeatable: Yes\n //-----[Device.safety]\n // Choice: Yes; Optional: No; Repeatable: No\n //----[test-language-primary-extension]\n // Choice: Yes; Optional: No; Repeatable: Yes\n //----[test-language-others-req-extension]\n // Choice: Yes; Optional: Yes; Repeatable: No\n //----[test-language-secondary-extension]\n // Choice: Yes; Optional: Yes; Repeatable: Yes\n //----[test-language-others-opt-extension]\n //-----------------------------------------------\n\n StructureDefinition structureDefinition = FHIRRegistry.getInstance().getResource(\"http://ibm.com/fhir/StructureDefinition/test-device\", StructureDefinition.class);\n ConstraintGenerator generator = new ConstraintGenerator(structureDefinition);\n List<Constraint> constraints = generator.generate();\n assertEquals(constraints.size(), 7);\n constraints.forEach(constraint -> compile(constraint.expression()));\n assertEquals(constraints.get(3).expression(), \"statusReason.count() >= 1\");\n assertEquals(constraints.get(4).expression(), \"type.exists() implies (type.memberOf('http://hl7.org/fhir/ValueSet/languages', 'extensible') and type.memberOf('http://hl7.org/fhir/ValueSet/all-languages', 'required'))\");\n assertEquals(constraints.get(5).expression(), \"specialization.exists() implies (specialization.all(systemType.exists() and systemType.memberOf('http://hl7.org/fhir/ValueSet/languages', 'extensible') and systemType.memberOf('http://hl7.org/fhir/ValueSet/all-languages', 'required')))\");\n assertEquals(constraints.get(6).expression(), \"safety.exists() implies (safety.all(memberOf('http://hl7.org/fhir/ValueSet/languages', 'extensible')) and safety.all(memberOf('http://hl7.org/fhir/ValueSet/all-languages', 'required')))\");\n\n structureDefinition = FHIRRegistry.getInstance().getResource(\"http://ibm.com/fhir/StructureDefinition/test-language-primary-extension\", StructureDefinition.class);\n generator = new ConstraintGenerator(structureDefinition);\n constraints = generator.generate();\n assertEquals(constraints.size(), 2);\n constraints.forEach(constraint -> compile(constraint.expression()));\n assertEquals(constraints.get(1).expression(), \"value.as(CodeableConcept).exists() and value.as(CodeableConcept).memberOf('http://hl7.org/fhir/ValueSet/languages', 'preferred') and value.as(CodeableConcept).memberOf('http://hl7.org/fhir/ValueSet/all-languages', 'required')\");\n\n structureDefinition = FHIRRegistry.getInstance().getResource(\"http://ibm.com/fhir/StructureDefinition/test-language-secondary-extension\", StructureDefinition.class);\n generator = new ConstraintGenerator(structureDefinition);\n constraints = generator.generate();\n assertEquals(constraints.size(), 2);\n constraints.forEach(constraint -> compile(constraint.expression()));\n assertEquals(constraints.get(1).expression(), \"value.as(Coding).exists() implies (value.as(Coding).memberOf('http://hl7.org/fhir/ValueSet/languages', 'preferred') and value.as(Coding).memberOf('http://hl7.org/fhir/ValueSet/all-languages', 'required'))\");\n\n structureDefinition = FHIRRegistry.getInstance().getResource(\"http://ibm.com/fhir/StructureDefinition/test-language-tertiary-extension\", StructureDefinition.class);\n generator = new ConstraintGenerator(structureDefinition);\n constraints = generator.generate();\n assertEquals(constraints.size(), 2);\n constraints.forEach(constraint -> compile(constraint.expression()));\n assertEquals(constraints.get(1).expression(), \"value.as(code).exists() and value.as(code).memberOf('http://hl7.org/fhir/ValueSet/languages', 'preferred') and value.as(code).memberOf('http://hl7.org/fhir/ValueSet/all-languages', 'required')\");\n\n structureDefinition = FHIRRegistry.getInstance().getResource(\"http://ibm.com/fhir/StructureDefinition/test-language-others-opt-extension\", StructureDefinition.class);\n generator = new ConstraintGenerator(structureDefinition);\n constraints = generator.generate();\n assertEquals(constraints.size(), 2);\n constraints.forEach(constraint -> compile(constraint.expression()));\n assertEquals(constraints.get(1).expression(), \"value.as(CodeableConcept).exists() implies (value.as(CodeableConcept).all(memberOf('http://hl7.org/fhir/ValueSet/languages', 'preferred')) and value.as(CodeableConcept).all(memberOf('http://hl7.org/fhir/ValueSet/all-languages', 'required')))\");\n\n structureDefinition = FHIRRegistry.getInstance().getResource(\"http://ibm.com/fhir/StructureDefinition/test-language-others-req-extension\", StructureDefinition.class);\n generator = new ConstraintGenerator(structureDefinition);\n constraints = generator.generate();\n assertEquals(constraints.size(), 2);\n constraints.forEach(constraint -> compile(constraint.expression()));\n assertEquals(constraints.get(1).expression(), \"value.as(CodeableConcept).exists() and value.as(CodeableConcept).all(memberOf('http://hl7.org/fhir/ValueSet/languages', 'preferred')) and value.as(CodeableConcept).all(memberOf('http://hl7.org/fhir/ValueSet/all-languages', 'required'))\");\n }", "public LearningResultHasActivity[] findWhereCompetitionCodeEquals(String competitionCode) throws LearningResultHasActivityDaoException;", "public final ManchesterOWLSyntaxAutoComplete.cardinalityRestriction_return cardinalityRestriction() {\n ManchesterOWLSyntaxAutoComplete.cardinalityRestriction_return retval = new ManchesterOWLSyntaxAutoComplete.cardinalityRestriction_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxAutoComplete.unary_return p = null;\n ManchesterOWLSyntaxAutoComplete.expression_return filler = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:238:1:\n // ( ^( CARDINALITY_RESTRICTION MIN i= INTEGER p= unary (filler=\n // expression )? ) | ^( CARDINALITY_RESTRICTION MAX i= INTEGER p=\n // unary (filler= expression )? ) | ^( CARDINALITY_RESTRICTION\n // EXACTLY i= INTEGER p= unary (filler= expression )? ) )\n int alt14 = 3;\n int LA14_0 = input.LA(1);\n if (LA14_0 == CARDINALITY_RESTRICTION) {\n int LA14_1 = input.LA(2);\n if (LA14_1 == DOWN) {\n switch (input.LA(3)) {\n case MIN: {\n alt14 = 1;\n }\n break;\n case MAX: {\n alt14 = 2;\n }\n break;\n case EXACTLY: {\n alt14 = 3;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 14,\n 2, input);\n throw nvae;\n }\n } else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 14, 1, input);\n throw nvae;\n }\n } else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 14, 0, input);\n throw nvae;\n }\n switch (alt14) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:239:5:\n // ^( CARDINALITY_RESTRICTION MIN i= INTEGER p= unary (filler=\n // expression )? )\n {\n match(input, CARDINALITY_RESTRICTION,\n FOLLOW_CARDINALITY_RESTRICTION_in_cardinalityRestriction719);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, MIN, FOLLOW_MIN_in_cardinalityRestriction722);\n if (state.failed) {\n return retval;\n }\n match(input, INTEGER, FOLLOW_INTEGER_in_cardinalityRestriction727);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_cardinalityRestriction733);\n p = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:239:65:\n // (filler= expression )?\n int alt11 = 2;\n int LA11_0 = input.LA(1);\n if (LA11_0 >= IDENTIFIER && LA11_0 <= ENTITY_REFERENCE\n || LA11_0 >= DISJUNCTION && LA11_0 <= NEGATED_EXPRESSION\n || LA11_0 >= SOME_RESTRICTION && LA11_0 <= ONE_OF\n || LA11_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n alt11 = 1;\n }\n switch (alt11) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:239:65:\n // filler= expression\n {\n pushFollow(FOLLOW_expression_in_cardinalityRestriction740);\n filler = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(filler == null ? p.node.getCompletions()\n : filler.node.getCompletions());\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:243:6:\n // ^( CARDINALITY_RESTRICTION MAX i= INTEGER p= unary (filler=\n // expression )? )\n {\n match(input, CARDINALITY_RESTRICTION,\n FOLLOW_CARDINALITY_RESTRICTION_in_cardinalityRestriction755);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, MAX, FOLLOW_MAX_in_cardinalityRestriction758);\n if (state.failed) {\n return retval;\n }\n match(input, INTEGER, FOLLOW_INTEGER_in_cardinalityRestriction762);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_cardinalityRestriction768);\n p = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:243:65:\n // (filler= expression )?\n int alt12 = 2;\n int LA12_0 = input.LA(1);\n if (LA12_0 >= IDENTIFIER && LA12_0 <= ENTITY_REFERENCE\n || LA12_0 >= DISJUNCTION && LA12_0 <= NEGATED_EXPRESSION\n || LA12_0 >= SOME_RESTRICTION && LA12_0 <= ONE_OF\n || LA12_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n alt12 = 1;\n }\n switch (alt12) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:243:65:\n // filler= expression\n {\n pushFollow(FOLLOW_expression_in_cardinalityRestriction775);\n filler = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(filler == null ? p.node.getCompletions()\n : filler.node.getCompletions());\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:247:6:\n // ^( CARDINALITY_RESTRICTION EXACTLY i= INTEGER p= unary\n // (filler= expression )? )\n {\n match(input, CARDINALITY_RESTRICTION,\n FOLLOW_CARDINALITY_RESTRICTION_in_cardinalityRestriction794);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXACTLY, FOLLOW_EXACTLY_in_cardinalityRestriction797);\n if (state.failed) {\n return retval;\n }\n match(input, INTEGER, FOLLOW_INTEGER_in_cardinalityRestriction802);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_cardinalityRestriction809);\n p = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:247:71:\n // (filler= expression )?\n int alt13 = 2;\n int LA13_0 = input.LA(1);\n if (LA13_0 >= IDENTIFIER && LA13_0 <= ENTITY_REFERENCE\n || LA13_0 >= DISJUNCTION && LA13_0 <= NEGATED_EXPRESSION\n || LA13_0 >= SOME_RESTRICTION && LA13_0 <= ONE_OF\n || LA13_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n alt13 = 1;\n }\n switch (alt13) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:247:71:\n // filler= expression\n {\n pushFollow(FOLLOW_expression_in_cardinalityRestriction816);\n filler = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(filler == null ? p.node.getCompletions()\n : filler.node.getCompletions());\n }\n }\n break;\n }\n if (state.backtracking == 1) {\n retval.node = (ManchesterOWLSyntaxTree) retval.start;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "private boolean getDesignType(String[] _data) {\n\t\tif(_data != null && _data.length >1) {\n\t\t\tif(_data[1].trim().equalsIgnoreCase(\"Material Design\")) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "protected void initSpecSpecificConditions() {\r\n // THESE ARE ALL FOR MAF SPEC 1.0 ONLY\r\n\r\n //If variant_Type is \"ins\" Reference_Allele should always be \"-\",\r\n conditions.add(new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantInsSymbol(), FIELD_REFERENCE_ALLELE, Pattern.compile(\"[^\\\\-]\"), \"contain anything but '-' characters\", true));\r\n // and either of Tumor_Seq_Allele1 and Tumor_Seq_Allele2 should have \"-\".\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantInsSymbol(), FIELD_TUMOR_SEQ_ALLELE1, Pattern.compile(\"-\"), \"contain at least one '-'\", false),\r\n new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantInsSymbol(), FIELD_TUMOR_SEQ_ALLELE2, Pattern.compile(\"-\"), \"contain at least one '-'\", false)));\r\n //If variant_Type is \"del\", then Reference_Allele can't contain \"-\",\r\n conditions.add(new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantTypeDelSymbol(), FIELD_REFERENCE_ALLELE, Pattern.compile(\"-\"), \"contain any '-' characters\", true));\r\n // and either Tumor_Seq_Allele1 or Tumor_Seq_Allele2 should contain \"-\".\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantTypeDelSymbol(), FIELD_TUMOR_SEQ_ALLELE1, Pattern.compile(\"-\"), \"contain at least one '-'\", false),\r\n new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantTypeDelSymbol(), FIELD_TUMOR_SEQ_ALLELE2, Pattern.compile(\"-\"), \"contain at least one '-'\", false)));\r\n\r\n //If validation_status is \"wildtype\", then Tumor_Seq_Allele1=Tumor_Seq_Allele2\r\n //and Tumor_Seq_Allele1=Reference_Allele)\r\n conditions.add(new ConditionalRequirement(FIELD_VALIDATION_STATUS, VALIDATION_STATUS_WILDTYPE, FIELD_TUMOR_SEQ_ALLELE1, FIELD_TUMOR_SEQ_ALLELE2, false));\r\n conditions.add(new ConditionalRequirement(FIELD_VALIDATION_STATUS, VALIDATION_STATUS_WILDTYPE, FIELD_TUMOR_SEQ_ALLELE1, FIELD_REFERENCE_ALLELE, false));\r\n\r\n // if mutation_status is germline, tumor_seql_allele1 must be equal to match_norm_seq_allele1\r\n conditions.add(new ConditionalRequirement(FIELD_MUTATION_STATUS, MUTATION_STATUS_GERMLINE, FIELD_TUMOR_SEQ_ALLELE1,\r\n FIELD_MATCH_NORM_SEQ_ALLELE1, false));\r\n conditions.add(new ConditionalRequirement(FIELD_MUTATION_STATUS, MUTATION_STATUS_GERMLINE, FIELD_TUMOR_SEQ_ALLELE2,\r\n FIELD_MATCH_NORM_SEQ_ALLELE2, false));\r\n // if mutation_status is somatic and validation status is valid, then Match_Norm_Validation_Allele1 should equal Reference_Allele\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_SOMATIC, VALIDATION_STATUS_VALID}, FIELD_MATCH_NORM_VALIDATION_ALLELE1,\r\n FIELD_REFERENCE_ALLELE, false));\r\n // if mutation_status is somatic and validation status is valid, then Match_Norm_Validation_Allele2 should equal Reference_Allele\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_SOMATIC, VALIDATION_STATUS_VALID}, FIELD_MATCH_NORM_VALIDATION_ALLELE2,\r\n FIELD_REFERENCE_ALLELE, false));\r\n // if mutation_status is somatic and validation status is valid, then either Tumor_Seq_Allele1 or Tumor_Seq_Allele2 should NOT match Reference_Allele\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_SOMATIC, VALIDATION_STATUS_VALID}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_REFERENCE_ALLELE, true), // not\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_SOMATIC, VALIDATION_STATUS_VALID}, FIELD_TUMOR_SEQ_ALLELE2, FIELD_REFERENCE_ALLELE, true))); // not\r\n\r\n //If Mutation_Status == LOH AND Validation_Status==Unknown, then\r\n //Tumor_Seq_Allele1 == Tumor_Seq_Allele2 and\r\n //Match_Norm_Seq_Allele1 != Match_Norm_Seq_Allele2 and\r\n //Tumor_Seq_Allele1 = (Match_Norm_Seq_Allele1 or Match_Norm_Seq_Allele2)\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_UNKNOWN}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_TUMOR_SEQ_ALLELE2, false));\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_UNKNOWN}, FIELD_MATCH_NORM_SEQ_ALLELE1, FIELD_MATCH_NORM_SEQ_ALLELE2, true)); // not\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_UNKNOWN}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_MATCH_NORM_SEQ_ALLELE1, false),\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_UNKNOWN}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_MATCH_NORM_SEQ_ALLELE2, false)));\r\n //If Mutation_Status == LOH AND Validation_Status==Valid, then\r\n //Tumor_Validation_Allele1 == Tumor_Validation_Allele2 and\r\n //Match_Norm_Validation_Allele1 != Match_Norm_Validation_Allele2 and\r\n //Tumor_Validation_Allele1 == (Match_Norm_Validation_Allele1 or Match_Norm_Validation_Allele2).\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_VALID}, FIELD_TUMOR_VALIDATION_ALLELE1, FIELD_TUMOR_VALIDATION_ALLELE2, false));\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_VALID}, FIELD_MATCH_NORM_VALIDATION_ALLELE1, FIELD_MATCH_NORM_VALIDATION_ALLELE2, true)); // not\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_VALID}, FIELD_TUMOR_VALIDATION_ALLELE1, FIELD_MATCH_NORM_VALIDATION_ALLELE1, false),\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_VALID}, FIELD_TUMOR_VALIDATION_ALLELE1, FIELD_MATCH_NORM_VALIDATION_ALLELE2, false)));\r\n // Tumor_Seq_Allele1 != Reference_Allele OR Tumor_Seq_Allele2 != Reference_Allele\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(new String[]{}, new String[]{}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_REFERENCE_ALLELE, true),\r\n new ConditionalRequirement(new String[]{}, new String[]{}, FIELD_TUMOR_SEQ_ALLELE2, FIELD_REFERENCE_ALLELE, true)));\r\n\r\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void test_getTermsOfUse_agreeabilityTypeIdsEmpty() throws Exception {\r\n instance.getTermsOfUse(projectId, 1, new int[0]);\r\n }", "static int type_of_cmc(String passed){\n\t\treturn 1;\n\t}", "@Test\n public void normalCategorySecondRangeInKgAndCm() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"81\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"180\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Normal\",\n \"actual text is not: Your category is Normal\");\n }", "@Test(priority=2)\n\tpublic void validatePredictNiftyInContestPage1()\n\t{\n\t\th.contest.click();\n\t\tc=new ContestPage(driver);\n\t\tAssert.assertTrue(c.historyWinnings.getText().equalsIgnoreCase(\"History & Winnings\"));\n\t\tAssert.assertTrue(c.predictNifty.getAttribute(\"src\").contains(\"active\"));\n\t\tAssert.assertFalse(c.pickTopStock.getAttribute(\"src\").contains(\"active\"));\n\t\t\n\t}", "public void selectNCDPotectedClaim ()\r\n\t{\r\n\t\tWebDriverWait wait = new WebDriverWait (driver, GlobalWaitTime.getIntWaitTime ());\r\n\t\twait.until (ExpectedConditions.elementToBeClickable (orPolicyVehicleHub.ddlNCDProtected));\r\n\t\tSelect oNCDProtectedClaims = new Select (orPolicyVehicleHub.ddlNCDProtected);\r\n\t\tint intNCDProtectedIndex = RandomCount.selectRandomItem (oNCDProtectedClaims);\r\n\t\toNCDProtectedClaims.selectByIndex (intNCDProtectedIndex);\r\n\r\n\t}", "public void setNewValues_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localNewValues_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localNewValues_descriptionType=param;\n \n\n }", "@Test\n public void aminoCountsTest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n int[] expected = {1,3,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "private boolean validateType(int type)\n {\n return type >=0 && type < TYPE_ENUM.length;\n }", "@Test\n public void testClaimMbiSubmBeneInd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setMbiSubmBeneIndEnum,\n RdaFissClaim::getMbiSubmBeneInd,\n FissHealthInsuranceClaimNumberOrMedicareBeneficiaryIdentifier.FISS_HIC_OR_MBI_IS_HIC,\n \"H\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setMbiSubmBeneIndUnrecognized,\n RdaFissClaim::getMbiSubmBeneInd,\n RdaFissClaim.Fields.mbiSubmBeneInd,\n 1);\n }", "@Test\n public void testClaimFreqCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setFreqCdEnum,\n RdaFissClaim::getFreqCd,\n FissBillFrequency.BILL_FREQUENCY_ADJUSTMENT_CLAIM_F,\n \"F\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setFreqCdUnrecognized,\n RdaFissClaim::getFreqCd,\n RdaFissClaim.Fields.freqCd,\n 1);\n }", "public String getCollectCondition()\n\t{\n\t\tStringBuffer stbf = new StringBuffer(256) ;\n\t\tboolean existFlg = false ;\n\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableCollect() != null)\n\t\t\t{\n\n\t\t\t\t//#CM708969\n\t\t\t\t// Edit acquisition Condition + acquisition column when acquisition Condition is described clearly. \n\t\t\t\tif (!ky.getTableCollect().trim().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tstbf.append(ky.getTableCollect()) ;\n\t\t\t\t\tstbf.append(\"(\") ;\n\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\tstbf.append(\") \") ;\n\t\t\t\t\tint wPnt = ky.getTableColumn().indexOf(\".\") ;\n\n\t\t\t\t\tif (wPnt >= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tstbf.append(ky.getTableColumn().substring((wPnt + 1))) ;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\t}\n\t\t\t\t\tstbf.append(\", \") ;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\tstbf.append(\", \") ;\n\t\t\t\t}\n\n\t\t\t\tif (existFlg == false)\n\t\t\t\t\texistFlg = true ;\n\t\t\t}\n\t\t}\n\t\t//#CM708970\n\t\t// Return '*' as all item acquisition when data is not set in the key value. \n\t\tif (existFlg == false)\n\t\t\treturn null ;\n\n\t\t//#CM708971\n\t\t// The last \"\"is removed because it is extra. \n\t\tint ep = stbf.toString().lastIndexOf(\",\") ;\n\t\treturn stbf.toString().substring(0, ep) ;\n\t}", "@Test\n public void normalCategoryFirstRangeInKgAndCm() {\n\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"59.3\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"179\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Normal\",\n \"actual text is not: Your category is Normal\");\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder(763);\n SQLUtil.addRequiredCondition(\" cannot:crate islance, odle ignorwd.\", stringBuilder0);\n assertEquals(\" cannot:crate islance, odle ignorwd.\", stringBuilder0.toString());\n }", "@Test\n public void testValue() {\n System.out.println(\"value\");\n String[] expResults = {\"deleted\"};\n StatusType[] verbTypes = {StatusType.DELETED};\n for (int index1 = 0; index1 < verbTypes.length; index1++) {\n String result = verbTypes[index1].value();\n assertEquals(expResults[index1], result);\n }\n }", "public static boolean m37109aC(Activity activity) {\n AppMethodBeat.m2504i(49000);\n if (C24143a.m37112aE(activity) != null) {\n AppMethodBeat.m2505o(49000);\n return true;\n }\n AppMethodBeat.m2505o(49000);\n return false;\n }", "@Test\r\n\tpublic void testValuesMatchObjecType(){\r\n\t\t// Make sure we can get all of the values\r\n\t\tEntityType[] values = EntityType.values();\r\n\t\tassertNotNull(values);\r\n\t\tassertEquals(\"Expected one EntityType for each EntityType\",EntityType.values().length,values.length);\r\n\t}", "public static boolean m14539c(C44919o c44919o, C8235ad c8235ad, C8235ad c8235ad2) {\n AppMethodBeat.m2504i(122754);\n C25052j.m39376p(c44919o, \"context\");\n C25052j.m39376p(c8235ad, \"subType\");\n C25052j.m39376p(c8235ad2, \"superType\");\n boolean z = C8230j.m14537e(c8235ad) || C8230j.m14536d(c8235ad) || c44919o.mo72115e(c8235ad);\n Throwable assertionError;\n if (!C44847aa.AUz || z) {\n z = C8230j.m14536d(c8235ad2) || c44919o.mo72115e(c8235ad2);\n if (C44847aa.AUz && !z) {\n assertionError = new AssertionError(\"Not singleClassifierType superType: \".concat(String.valueOf(c8235ad2)));\n AppMethodBeat.m2505o(122754);\n throw assertionError;\n } else if (c8235ad2.eci()) {\n AppMethodBeat.m2505o(122754);\n return true;\n } else if (C41444ag.m72304ap(c8235ad)) {\n AppMethodBeat.m2505o(122754);\n return true;\n } else if (C8232l.m14538a(c44919o, c8235ad, C37047a.BKT)) {\n AppMethodBeat.m2505o(122754);\n return true;\n } else if (C41444ag.m72304ap(c8235ad2)) {\n AppMethodBeat.m2505o(122754);\n return false;\n } else if (C8232l.m14538a(c44919o, c8235ad2, C17311d.BKV)) {\n AppMethodBeat.m2505o(122754);\n return false;\n } else if (C8230j.m14535c(c8235ad)) {\n AppMethodBeat.m2505o(122754);\n return false;\n } else {\n boolean d = C8232l.m14540d(c44919o, c8235ad, c8235ad2.ejw());\n AppMethodBeat.m2505o(122754);\n return d;\n }\n }\n assertionError = new AssertionError(\"Not singleClassifierType superType: \".concat(String.valueOf(c8235ad2)));\n AppMethodBeat.m2505o(122754);\n throw assertionError;\n }", "public static TypeDictionaryDicoActionQualificatifActivite get(int value) {\n\t\tswitch (value) {\n\t\t\tcase UNIQUE_VALUE: return UNIQUE;\n\t\t\tcase MINIMAL_VALUE: return MINIMAL;\n\t\t\tcase MAXIMAL_VALUE: return MAXIMAL;\n\t\t\tcase POSSIBLE_VALUE: return POSSIBLE;\n\t\t}\n\t\treturn null;\n\t}", "@Test\n public void testClaimAdmDiagCode() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setAdmDiagCode,\n RdaFissClaim::getAdmitDiagCode,\n RdaFissClaim.Fields.admitDiagCode,\n 7);\n }", "@Test(suiteName = \"NowPlaying\", testName = \"DMCA Restricted\", description = \"Validating DMCA restricted\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-220\" })\n\tpublic void dmcaRestrictedChannelNumber() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"verifying DMCA restricted Channel Number MOBANDEVER-220\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickonMusic();\n\t\t\tcommon.scrollUntilTextExists(\"Dance/Electronic\");\n\t\t\tgetPageFactory().getEvehome().clickMucisSubRock();\n\t\t\tgetPageFactory().getEvehome().popChannel1();\n\t\t\tgetPageFactory().getCategory().nplChnumber();\n\t\t\tgetPageFactory().getEvehome().clickminimize();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}", "private void checkCreatingPendingIntentsWithIntentVariables(Source<CompilationUnit> java) {\n List<String> implicitIntentsVariables = java.getModel().findAll(ObjectCreationExpr.class).stream()\n .filter(expr -> expr.getType().getName().getIdentifier().equals(\"Intent\"))\n .filter(this::isCreatingImplicitIntent)\n .map(Node::getParentNode)\n .flatMap(Optional::stream)\n .filter(node -> node instanceof VariableDeclarator)\n .map(node -> (VariableDeclarator) node)\n .map(VariableDeclarator::getName)\n .map(SimpleName::getIdentifier)\n .collect(Collectors.toList());\n java.getModel().findAll(MethodCallExpr.class).stream()\n .filter(expr -> expr.getName().getIdentifier().matches(\"getActivity|getBroadcast|getService\"))\n .filter(expr -> expr.getArguments().size() >= 4)\n .filter(expr -> expr.getArguments().get(2).isNameExpr())\n .filter(expr -> implicitIntentsVariables.contains(expr.getArguments().get(2).asNameExpr().getName().getIdentifier()))\n .forEach(expr -> addJavaIssue(Severity.VULNERABILITY, \".PENDING_INTENT\", java.getFile(), expr));\n }", "private void addAOCAndCOCombinationError(Event event, Reporter reporter, Program program) {\n if (hasNoAttributeOptionComboSet(event)) {\n reporter.addError(\n event,\n ValidationCode.E1117,\n program.getCategoryCombo(),\n event.getAttributeCategoryOptions().stream()\n .map(MetadataIdentifier::getIdentifierOrAttributeValue)\n .collect(Collectors.toSet())\n .toString());\n } else {\n reporter.addError(\n event,\n ValidationCode.E1117,\n event.getAttributeOptionCombo(),\n event.getAttributeCategoryOptions().stream()\n .map(MetadataIdentifier::getIdentifierOrAttributeValue)\n .collect(Collectors.toSet())\n .toString());\n }\n }", "private boolean hasFailures(Map item){\n if(item.containsKey(\"code\") && item.get(\"code\").equals(\"ACCEPTED\"))\n return false;\n return ((Integer)item.get(\"failuresCount\")) > 0;\n }", "public void testSetAllFields_Behavior(String profileConf,String behaviorOfMandatory,String behaviorOfOptional) throws Exception{\r\n ProfileManagement instProfileManagement = new ProfileManagement(selenium);\r\n String arr[]={\"givenname\",\"lastname\",\"emailaddress\",\"nickname\",\"dob\",\"gender\",\"country\",\"streetaddress\",\"telephone\",\"mobile\",\"locality\",\"postalcode\",\"region\",\"role\",\"title\",\"url\",\"im\",\"organization\",\"otherphone\",\"fullname\",\"stateorprovince\"};\r\n int i=0;\r\n while(i<21){\r\n if((\"http://wso2.org/claims/\"+arr[i]).equals(\"http://wso2.org/claims/givenname\")||(\"http://wso2.org/claims/\"+arr[i]).equals(\"http://wso2.org/claims/lastname\")||(\"http://wso2.org/claims/\"+arr[i]).equals(\"http://wso2.org/claims/emailaddress\"))\r\n instProfileManagement.testUpdateDefaultProfile_Configuration(profileConf,\"http://wso2.org/claims/\"+arr[i],behaviorOfMandatory);\r\n else\r\n instProfileManagement.testUpdateDefaultProfile_Configuration(profileConf,\"http://wso2.org/claims/\"+arr[i],behaviorOfOptional);\r\n\r\n i=i+1;\r\n }\r\n }", "@Test\n public void testDiagnosisCodeDiagCd2() {\n new DiagnosisCodeFieldTester(false)\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissDiagnosisCode.Builder::setDiagCd2,\n RdaFissDiagnosisCode::getDiagCd2,\n RdaFissDiagnosisCode.Fields.diagCd2,\n 7);\n }", "@Test\n public void testDiffConstraint () throws IOException\n {\n CacheList clist = new CacheList(new Scanner(\n \"GCABCD\\tAs The World Turns\\tbunny\\t1\\t1\\tN40 45.875\\tW111 48.986\\nGCRQWK\\tOld Three Tooth\\tgeocadet\\t3.5\\t3\\tN40 45.850\\tW111 48.045\\n\"));\n clist.setDifficultyConstraints(2, 4);\n ArrayList<Cache> selected = clist.select();\n assertEquals(\"GCRQWK\", selected.get(0).getGcCode());\n }", "public net.explorys.samhat.z12.r837.X837Ins_2305_CR7_HomeHealthCarePlanInformation.Builder set2305CR701DisciplineTypeCode$1(java.lang.CharSequence value) {\n validate(fields()[0], value);\n this._2305CR701DisciplineTypeCode = value;\n fieldSetFlags()[0] = true;\n return this; \n }", "private void validateTransactionCode(ATMSparrowMessage atmSparrowMessage, BankFusionEnvironment env) {\n boolean result = isTransactionSupported(atmSparrowMessage.getMessageType() + atmSparrowMessage.getTransactionType(), env);\n if (result) {\n atmSparrowMessage.setAuthorisedFlag(ATMConstants.AUTHORIZED_MESSAGE_FLAG);\n // String ubTransCode =\n // atmHelper.getBankTransactionCode(atmSparrowMessage.getMessageType()\n // + atmSparrowMessage.getTransactionType(), env);\n // //UBTransaction type mapped or not?\n // try {\n // IBOMisTransactionCodes misTransactionCodes =\n // (IBOMisTransactionCodes)env.getFactory().findByPrimaryKey(IBOMisTransactionCodes.BONAME,\n // ubTransCode);\n // } catch (FinderException bfe) {\n // Object[] field = new Object[] { ubTransCode };\n // atmSparrowMessage.setAuthorisedFlag(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG);\n // if\n // (atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_0))\n // {\n // populateErrorDetails (ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG,\n // ATMConstants.WARNING, 7508, BankFusionMessages.ERROR_LEVEL,\n // atmSparrowMessage, field, env);\n // } else if\n // (atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_1)\n // ||\n // atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_2)\n // ||\n // atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_3)\n // ||\n // atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_7))\n // {\n // populateErrorDetails (ATMConstants.AUTHORIZED_MESSAGE_FLAG,\n // ATMConstants.CRITICAL, 7508, BankFusionMessages.ERROR_LEVEL,\n // atmSparrowMessage, field, env);\n // if (controlDetails != null) {\n // ubTransCode = controlDetails.getAtmTransactionType();\n // }\n // }\n // }\n }\n else {\n atmSparrowMessage.setAuthorisedFlag(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG);\n /*\n * String errorMessage = BankFusionMessages.getFormattedMessage(BankFusionMessages\n * .ERROR_LEVEL, 7506, env, new Object[] { atmSparrowMessage .getMessageType() +\n * atmSparrowMessage.getTransactionType() });\n */\n String errorMessage = BankFusionMessages.getInstance().getFormattedEventMessage(40407506,\n new Object[] { atmSparrowMessage.getMessageType() + atmSparrowMessage.getTransactionType() },\n BankFusionThreadLocal.getUserSession().getUserLocale());\n String errorStatus = null;\n if (atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_0)\n || atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_6)) {\n errorStatus = ATMConstants.WARNING;\n logger.warn(errorMessage);\n }\n else {\n errorStatus = ATMConstants.CRITICAL;\n logger.error(errorMessage);\n }\n atmSparrowMessage.setErrorCode(errorStatus);\n atmSparrowMessage.setErrorDescription(errorMessage);\n }\n }", "public org.LNDCDC_NCS_NCSAR.NCSAR_BUSINESS_UNITS.apache.nifi.LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS.Builder setCLAPPROVAL(java.lang.CharSequence value) {\n validate(fields()[5], value);\n this.CL_APPROVAL = value;\n fieldSetFlags()[5] = true;\n return this;\n }", "public void howToGetASubject(String cCode){\n\t\t//CODE HERE\n\t\t\n\t\tfor (RegCourse course:registeredCourses){\n\t\t\tif(course.getCourseCode().equals(cCode)){\n\t\t\t\t\n\t\t\t\tif(this.findAccum(course)+(1-this.findFullAccum(course))<0.8){\n\t\t\t\t\tSystem.out.println(\"You can't get A for this subject\");\n\t\t\t\t}else {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.printf(\"You need %.2f score more to get an A for this subject\\n\",(0.8-this.findAccum(course))*100);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static List<C4456g4> m15909a(JSONArray jSONArray) {\n if (jSONArray == null) {\n return null;\n }\n ArrayList arrayList = new ArrayList();\n for (int i = 0; i < jSONArray.length(); i++) {\n JSONObject optJSONObject = jSONArray.optJSONObject(i);\n if (optJSONObject == null) {\n C1557c.m7473e(f11398a, \"Received null or blank trigger condition Json. Not parsing.\");\n } else {\n String string = optJSONObject.getString(\"type\");\n if (string.equals(\"purchase\")) {\n arrayList.add(new C4490k4(optJSONObject));\n } else if (string.equals(\"custom_event\")) {\n arrayList.add(new C4416c4(optJSONObject));\n } else if (string.equals(\"push_click\")) {\n arrayList.add(new C4512m4(optJSONObject));\n } else if (string.equals(\"open\")) {\n arrayList.add(new C4473i4());\n } else if (string.equals(\"iam_click\")) {\n arrayList.add(new C4465h4(optJSONObject));\n } else if (string.equals(\"test\")) {\n arrayList.add(new C4523n4());\n } else if (string.equals(\"custom_event_property\")) {\n arrayList.add(new C4427d4(optJSONObject));\n } else if (string.equals(\"purchase_property\")) {\n arrayList.add(new C4502l4(optJSONObject));\n } else {\n String str = f11398a;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Received triggered condition Json with unknown type: \");\n sb.append(string);\n sb.append(\". Not parsing.\");\n C1557c.m7473e(str, sb.toString());\n }\n }\n }\n return arrayList;\n }", "private boolean contains(Object annotationType, Set allowed, Set configured) {\n \t\tif (allowed.contains(annotationType))\n \t\t\treturn true;\n \n \t\tboolean covered= isCovered(annotationType, configured);\n \t\tif (covered)\n \t\t\tallowed.add(annotationType);\n \n \t\treturn covered;\n \t}", "gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type.Value.Enum getValue();", "public String onChangeResidenceCode()\r\n {\r\n\ttry\r\n\t{\r\n\r\n\t SessionCO sessionCO = returnSessionObject();\r\n\t residenceTypesSC.setCompCode(sessionCO.getCompanyCode());\r\n\t residenceTypesSC.setPreferredLanguage(sessionCO.getPreferredLanguage());\r\n\t residenceTypesVO = residenceTypesBO.returnDependencyByCode(residenceTypesSC);\r\n\t if(residenceTypesVO == null)\r\n\t {\r\n\t\tthrow new BOException(MessageCodes.INVALID_MISSING_CODE);\r\n\t }\r\n\r\n\t}\r\n\tcatch(Exception e)\r\n\t{\r\n\t residenceTypesVO = new RESIDENCE_TYPESVO();\r\n\t handleException(e, null, null);\r\n\t}\r\n\treturn SUCCESS;\r\n }", "public void validateRpd15s1()\n {\n // This guideline cannot be automatically tested.\n }", "com.google.container.v1.StatusCondition.Code getCode();", "public void setAccidentCircumstance(typekey.AccidentCircumstancePEL value);", "@Test\n public void officeActionCreateWithMismatchingEviCaseNo77777778() {\n // This test case validate the understanding based on which the create\n // office-action api has been developed.\n // ie, while creating an office-action inside a given serial number the\n // incoming association of evidence file has to match\n // the serial number of office-action.\n // In-other words the incoming associated evidence files needs to exists\n // inside the same office-action case number.\n testCreateSampleEviOneForOffActn78();\n testCreateSampleEviTwoForOffActn78();\n testCreateOfficeAction77();\n }", "public boolean checkSeatTaken(int[] RC) {\n return seatPlan[RC[0] - 1][RC[1] - 1].getStatus();\n }", "@Override\n\tpublic boolean checkCourse(String code) {\n\t\treturn false;\n\t}", "public List<GLJournalApprovalVO> getActivityfromuniquecode(String OrgId, String ClientId,\n String actId) {\n String sqlQuery = \"\";\n PreparedStatement st = null;\n ResultSet rs = null;\n List<GLJournalApprovalVO> list = null;\n try {\n list = new ArrayList<GLJournalApprovalVO>();\n sqlQuery = \" select f.c_activity_id,act.name from fact_acct f join c_activity act on act.c_activity_id = f.c_activity_id WHERE f.AD_ORG_ID IN (\"\n + OrgId + \") \" + \" AND f.AD_CLIENT_ID IN (\" + ClientId\n + \") AND f.em_efin_uniquecode IN ('\" + actId\n + \"') and f.c_bpartner_id is not null and f.c_salesregion_id is not null and f.c_project_id is not null and f.c_campaign_id is not null and f.c_activity_id is not null and f.user1_id is not null and f.user2_id is not null limit 1\";\n st = conn.prepareStatement(sqlQuery);\n rs = st.executeQuery();\n while (rs.next()) {\n GLJournalApprovalVO VO = new GLJournalApprovalVO();\n VO.setId(rs.getString(1));\n VO.setName(rs.getString(2));\n list.add(VO);\n }\n } catch (Exception e) {\n log4j.error(\"Exception in getOrgs()\", e);\n }\n return list;\n }", "@java.lang.Override\n public boolean hasBasisValue() {\n return typeCase_ == 13;\n }", "static int type_of_aci(String passed){\n\t\treturn 1;\n\t}", "public boolean isSetCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(CODE$6) != 0;\n }\n }", "public void setNewCardinalityType(int param){\n \n // setting primitive attribute tracker to true\n localNewCardinalityTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localNewCardinalityType=param;\n \n\n }", "public void testAllMedicalConditionParametersPopulated() {\n Map<String, MedicalCondition> conditions = cache.getConditions(Service.NOTIFY);\n MedicalCondition condition = conditions.get(DIABETES_CONDITION);\n\n assertNotNull(condition);\n\n assertEquals(\"DIAB\", condition.getID());\n assertEquals(\"Diabetes\", condition.getTitle());\n assertEquals(\"diabetes\", condition.getName());\n assertEquals(EMPTY, condition.getType());\n assertEquals(\"DIAB1\", condition.getForm());\n assertEquals(DIABETES_CONDITION, condition.getDomain());\n assertEquals(\"diabetes-with-insulin\", condition.getStart());\n assertEquals(\"diabetes\", condition.getDomain());\n assertEquals(\"diabetes-driving\", condition.getInformation());\n assertTrue(condition.getSynonyms().isEmpty());\n assertEquals(1, condition.getCasp().size());\n assertTrue(condition.getCasp().contains(\"D01\"));\n assertEquals(condition.getCeg(), \"101\");\n assertEquals(Severity.NOTIFIABLE, condition.getSeverity());\n assertEquals(Boolean.TRUE, condition.getEnabled());\n\n assertNotNull(condition.toString());\n }", "private void generate_verification_code(StringBuffer Code, DataType ReturnType)\n {\n String TypeString = ReturnType.getDescriptor(m_Language);\n\n Code.append(\"\\tvoid verify_case(int Case, const \" + TypeString + \" &Expected, const \" + TypeString + \" &Received) { \");\n\n Code.append(\"cerr << \\\"Test Case #\\\" << Case << \\\"...\\\"; \");\n\n // Print \"PASSED\" or \"FAILED\" based on the result\n Code.append(\"if (Expected == Received) cerr << \\\"PASSED\\\" << endl; \");\n Code.append(\"else { cerr << \\\"FAILED\\\" << endl; \");\n\n if (ReturnType.getDimension() == 0)\n {\n Code.append(\"cerr << \\\"\\\\tExpected: \\\\\\\"\\\" << Expected << \\'\\\\\\\"\\' << endl; \");\n Code.append(\"cerr << \\\"\\\\tReceived: \\\\\\\"\\\" << Received << \\'\\\\\\\"\\' << endl; } }\\n\");\n }\n else\n {\n Code.append(\"cerr << \\\"\\\\tExpected: \\\" << print_array(Expected) << endl; \");\n Code.append(\"cerr << \\\"\\\\tReceived: \\\" << print_array(Received) << endl; } }\\n\");\n }\n // end if\n }", "private static boolean acceptsNominal(Automaton type, Automaton.Term tState, Automaton automaton,\n\t\t\tAutomaton.State aState, Schema schema, BinaryMatrix assumptions) {\n\t\tAutomaton.List l = (Automaton.List) type.get(tState.contents);\n\t\treturn accepts(type, l.get(1), automaton, aState, schema, assumptions);\n\t}", "@Test\n\tpublic void testSingleSetOnlyPositiveInteger()\n\t{\n\t\tcreateSingleValueSet(5);\n\t\tKeyedValues actual = DataUtilities.getCumulativePercentages(m_values);\n\t\t\n\t\tassertEquals(\"Cumulative percentage of a single positive integer should be 100%.\",\n\t\t\t\t1.0, actual.getValue(0).doubleValue(), 0.0000001);\n\t}", "public static boolean m71678a(Activity activity) {\n if (f57214d || activity == null) {\n return false;\n }\n Intent intent = new Intent(activity, MusLoginActivity.class);\n if (C22352y.m74025f()) {\n Keva.getRepo(\"compliance_setting\").storeBoolean(\"need_to_show_ftc_age_gate_but_no_showed\", true);\n if (C21886a.f58594a.mo58324c()) {\n intent = new Intent(activity, SignUpOrLoginActivity.class);\n intent.putExtra(\"next_page\", Step.AGE_GATE.getValue());\n } else {\n intent.putExtra(\"init_page\", 4);\n }\n intent.putExtra(\"enter_type\", \"click_login\");\n } else if (C22352y.m74022c()) {\n intent.putExtra(\"init_page\", 5);\n intent.putExtra(\"enter_type\", \"click_sign_up\");\n } else if (C22352y.m74023d()) {\n intent.putExtra(\"init_page\", 6);\n intent.putExtra(\"enter_type\", \"click_sign_up\");\n } else if (!C22352y.m74024e()) {\n return false;\n } else {\n Intent intent2 = new Intent(activity, DeleteVideoAlertActivity.class);\n intent2.putExtra(\"age_gate_response\", new AgeGateResponse(0, \"\", C22345t.m73968c(), C22345t.m73976g()));\n activity.startActivity(intent2);\n return true;\n }\n f57214d = true;\n activity.startActivity(intent);\n return true;\n }", "private boolean m43013b(int responseCode) {\n if (responseCode == 200 || responseCode == 202 || responseCode == 206) {\n return true;\n }\n return false;\n }", "public boolean isSetCode() {\n return this.code != null;\n }", "protected int canTargetCode()\r\n\t{\r\n\t\treturn 0;\r\n\t}", "@Test\n public void underweightCategoryFirstRangeInKgAndCm() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"47\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"177\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Underweight\",\n \"actual text is not: Your category is Underweight\");\n }", "public boolean testPredefinedtype(EIfccablecarrierfitting type) throws SdaiException;", "@Test\n public void testClaimCurrLoc1() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setCurrLoc1Enum,\n claim -> String.valueOf(claim.getCurrLoc1()),\n FissProcessingType.PROCESSING_TYPE_BATCH,\n \"B\")\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setCurrLoc1Unrecognized,\n claim -> String.valueOf(claim.getCurrLoc1()),\n RdaFissClaim.Fields.currLoc1,\n 1);\n }", "@java.lang.Override\n public boolean hasBasisValue() {\n return typeCase_ == 13;\n }", "public org.LNDCDC_NCS_NCSAR.NCSAR_BUSINESS_UNITS.apache.nifi.LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS.Builder setALLOWMISCINVCREATION(java.lang.CharSequence value) {\n validate(fields()[9], value);\n this.ALLOW_MISC_INV_CREATION = value;\n fieldSetFlags()[9] = true;\n return this;\n }", "public Integer[] abilitaAzioneSpecifica(TipoAzione tipoAzione){\n\n Integer[] celleDisattivate=null;\n if(tipoAzione == TipoAzione.TORRE_EDIFICIO) celleDisattivate = mantieniAbilitati(5, 8);\n else if(tipoAzione == TipoAzione.TORRE_TERRITORIO) celleDisattivate =mantieniAbilitati(1, 4);\n else if(tipoAzione == TipoAzione.TORRE_IMPRESA) celleDisattivate =mantieniAbilitati(13, 16);\n else if(tipoAzione == TipoAzione.TORRE_PERSONAGGIO) celleDisattivate =mantieniAbilitati(9, 12);\n else if(tipoAzione == TipoAzione.TORRE) celleDisattivate =mantieniAbilitati(1, 16);\n else if(tipoAzione == TipoAzione.PRODUZIONE) celleDisattivate =mantieniAbilitati(17, 18);\n else if(tipoAzione == TipoAzione.RACCOLTO) celleDisattivate =mantieniAbilitati(19, 20);\n return celleDisattivate;\n\n }" ]
[ "0.49441934", "0.48995245", "0.48747525", "0.48351726", "0.4744321", "0.46709278", "0.46601424", "0.45667908", "0.4563148", "0.45060813", "0.44968084", "0.4451945", "0.44515738", "0.44466016", "0.44426957", "0.4413501", "0.4409574", "0.43972355", "0.4394841", "0.43828863", "0.4371858", "0.43698838", "0.43697852", "0.43671077", "0.43617877", "0.43370155", "0.4335422", "0.43312594", "0.43295053", "0.43259886", "0.4323782", "0.43235907", "0.43201503", "0.4314511", "0.43136916", "0.4313336", "0.43106633", "0.43103716", "0.43037397", "0.42982537", "0.42941636", "0.42846054", "0.42809093", "0.42768103", "0.42718765", "0.42666203", "0.42625386", "0.42570427", "0.42563072", "0.42462236", "0.4237093", "0.4229833", "0.42265427", "0.42250782", "0.42237544", "0.4215496", "0.42152664", "0.42110655", "0.42095745", "0.4205741", "0.42045078", "0.41990164", "0.41973555", "0.4195919", "0.41910815", "0.41908485", "0.4184634", "0.4178522", "0.4168113", "0.41672823", "0.4165694", "0.415157", "0.41505456", "0.41499397", "0.41336775", "0.41305405", "0.41256133", "0.41196543", "0.41171405", "0.41164714", "0.41147935", "0.41144446", "0.41124052", "0.41113433", "0.4109569", "0.41076118", "0.4107349", "0.4105243", "0.4104225", "0.4101108", "0.40997347", "0.4099552", "0.40974346", "0.40960371", "0.4093463", "0.40899888", "0.40890133", "0.4087199", "0.40870175", "0.40865976", "0.4085911" ]
0.0
-1
ccd::PolicyActivity::payerEntity. self.getAssignedEntities()>select(assignedEntity : cda::AssignedEntity | not assignedEntity.oclIsUndefined() and assignedEntity.oclIsKindOf(domain::PayerEntity))>asSequence()>first().oclAsType(domain::PayerEntity)
IPayerEntity getPayerEntity();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<NeeqCompanyAccountingFirmOnline> selectByExample(NeeqCompanyAccountingFirmOnlineExample example);", "PiEntityType entityType();", "List<SupplyNeed> selectByExample(SupplyNeedExample example);", "List<RepaymentPlanInfoUn> selectByExample(RepaymentPlanInfoUnExample example);", "List<InspectionAgency> selectByExample(InspectionAgencyExample example);", "@NotNull\n/* 42 */ public PolicyType getType() { return this.myType; }", "List<MedicalOrdersExecutePlan> selectByExample(MedicalOrdersExecutePlanExample example);", "@Override\n\tpublic ElectricalCheck select(ElectricalCheck entity) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Entity SelectFirstOrDefault() {\n\t\treturn null;\n\t}", "IRequirement or(IRequirement constraint);", "public interface DlContTypeSetRepository extends JpaRepository<DlContTypeSet,Long> {\n\n @Query(\"select dlContTypeSet from DlContTypeSet dlContTypeSet where dlContTypeSet.name = :name\")\n Optional<DlContTypeSet> findOneByName(@Param(\"name\") String name);\n\n @Query(\"select dlContTypeSet from DlContTypeSet dlContTypeSet where dlContTypeSet.code = :code\")\n Optional<DlContTypeSet> findOneByCode(@Param(\"code\") String code);\n\n @Query(\"select dlContTypeSet from DlContTypeSet dlContTypeSet where dlContTypeSet.pStatus = 1 \")\n Page<DlContTypeSet> activecontenttypes(org.springframework.data.domain.Pageable pageable);\n\n\n}", "List<NjProductTaticsRelation> selectByExample(NjProductTaticsRelationExample example);", "@Query(\"\"\"\n select distinct pe from ProgrammingExercise pe\n where pe.releaseDate > :#{#now}\n or pe.buildAndTestStudentSubmissionsAfterDueDate > :#{#now}\n or (pe.assessmentType <> 'AUTOMATIC' and pe.dueDate > :#{#now})\n \"\"\")\n List<ProgrammingExercise> findAllToBeScheduled(@Param(\"now\") ZonedDateTime now);", "List<CommonQuestionStrategyType> selectByExample(CommonQuestionStrategyTypeExample example);", "com.microsoft.schemas.crm._2011.contracts.ArrayOfObjectiveRelation getObjectives();", "private Criteria createFindByEntity(int type, int id) {\n return null;\t\n }", "public interface PlanItemSet extends HasId, TypeStateEntity {\r\n\r\n /**\r\n * A description of the Learning Plan\r\n * @name Description\r\n */\r\n\r\n public RichText getDescr();\r\n\r\n /**\r\n * List of plan items that make up the set\r\n * @name\r\n */\r\n public List<String> getPlanItemIds();\r\n\r\n /**\r\n * N (number) of Items in the set that the student is planning for\r\n * @return\r\n */\r\n public Integer getInterestedInItemsCount();\r\n\r\n /**\r\n * True if student is interested in all of the items in the set\r\n * @return\r\n */\r\n public boolean isInterestedInAllItems();\r\n}", "List<IymDefAssignment> selectByExample(IymDefAssignmentExample example);", "List<CGcontractCredit> selectByExample(CGcontractCreditExample example);", "List<OpeningRequirement> selectAll();", "Entity determinePriorityTarget();", "@Repository\npublic interface ClClassificationSchemeConRepository extends AXBootJPAQueryDSLRepository<ClClassificationSchemeCon, ClClassificationSchemeCon.ClClassificationSchemeId>\n{\n\n}", "ErpOaLicKey selectByPrimaryKey(String licFlow);", "public EntityID getAssignedAgentID();", "List<ActivityHongbaoPrize> selectByExample(ActivityHongbaoPrizeExample example);", "ImmutableList<SchemaOrgType> getMainEntityList();", "List selectByExample(PaymentTradeExample example);", "ActivityHongbaoPrize selectByPrimaryKey(Integer actPrizeId);", "List<CompanyExtend> selectByExample(CompanyExtendExample example);", "private Pit getPit(List<Entity> entities) {\r\n for (Entity e : entities) {\r\n if (e instanceof Pit) return (Pit) e;\r\n }\r\n return null;\r\n }", "@Nullable\n @Secured({ \"IS_AUTHENTICATED_ANONYMOUSLY\", \"ACL_SECURABLE_READ\" })\n QuantitationType getPreferredQuantitationType( ExpressionExperiment ee );", "public void testFindByEstado() {\n// Iterable<Servico> servicos = repo.findByEstado(EstadoEspecificacao.INCOMPLETO, NrMecanografico.valueOf(\"1001\"));\n// servicos.forEach(s -> System.out.println(s.identity()));\n }", "List<TbJobProcessNodeRelationEntity> selectByExample(TbJobProcessNodeRelationEntityExample example);", "abstract protected Entity selectNextEntity();", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface LeLegalEntityTypesRepository extends JpaRepository<LeLegalEntityTypes, Long> {\n\n}", "public static void main(String[] args) {\n Employee employee = getEmployee(Identity.Code.TEST_CODE);\n for (Identity identity : employee.getIdentities()) {\n System.out.println(identity.getCode());\n }\n\n // This method doesn't give any exception, we need to figure out in next method what is breaking\n Employee employee2 = getEmployeeByIdentity1(Identity.Code.TEST_CODE);\n for (Identity identity : employee2.getIdentities()) {\n System.out.println(identity.getCode());\n }\n Identity identity1 = employee2.getIdentities().first();\n System.out.println(identity1.getCode());\n\n // This method gives the Exception :\n /**\n * Exception in thread \"main\" java.lang.ClassCastException: com.example.core.comparable.employeeidentity cannot\n * be cast to java.lang.Comparable\n */\n /*Employee employee1 = getEmployeeByIdentity(Identity.Code.TEST_CODE);\n for (Identity identity : employee1.getIdentities()) {\n System.out.println(identity.getCode());\n }*/\n\n\n\n }", "public interface ElgPlatformIdRepository extends JpaRepository<ElgPlatformId, String> {\n\n public ElgPlatformId findByPlatformId(String platFormId); \n \n @Query(value = \"select distinct(trim(p.platformId)) as platformId from ElgPlatformId p, ElgPlatformCarrierMap c, ElgEligProfileEpf pr \" +\n\t \"where p.platformId = c.platformId and c.carrierId = pr.carCarrierId order by platformId\") \n public List<String> getAllPlatforms();\n\n \n}", "List<CustomerOrderBroadbandASID> selectCustomerOrderBroadbandASID(CustomerOrderBroadbandASID cobasid);", "List<EcsSupplierRebate> selectAll();", "DrpCommissionRule selectByPrimaryKey(Long id);", "io.opencannabis.schema.commerce.CommercialOrder.OrderType getType();", "TypeAssociation getEstRapporteeParRapport();", "@Repository\npublic interface CUnitOfMeasureRepository extends JpaRepository<CUnitOfMeasure, Long>, JpaSpecificationExecutor<CUnitOfMeasure> {\n\n Optional<CUnitOfMeasure> findFirstByCodeAndAdOrganizationId(String code, Long orgId);\n}", "NeeqCompanyAccountingFirmOnline selectByPrimaryKey(Integer id);", "List<TestActivityEntity> selectByExample(TestActivityEntityExample example);", "ch.crif_online.www.webservices.crifsoapservice.v1_00.AuditingCompanyStatus.Enum getHasAuditingCompany();", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface BonusPriceRepository extends JpaRepository<BonusPrice, Long> {\n\n Optional<BonusPrice> findByActive(boolean b);\n}", "@Test\n public void test3() throws Exception {\n String jpql = \"SELECT c FROM Course c where SQL('course_mapped ->> ''?'' = ''Second one''',c.name) \";\n Query q = em.createQuery(jpql, Course.class);\n List<Course> courses = q.getResultList();\n Assert.assertEquals(1, courses.size());\n Assert.assertEquals(\"Second one\", courses.get(0).getCourseMapped().getName());\n\n }", "@OAMany(\n displayName = \"Available Award Types\", \n toClass = AwardType.class, \n isCalculated = true, \n reverseName = AwardType.P_AvailableItems, \n createMethod = false\n )\n private Hub<AwardType> getAvailableAwardTypes() {\n return null;\n }", "public interface FunctionalStatusObservation2 extends FunctionalStatusResultObservation {\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.templateId-&gt;exists(id : datatypes::II | id.root = \\'2.16.840.1.113883.10.20.22.4.67\\' and id.extension.oclIsUndefined())'\"\n\t * @generated\n\t */\n\tboolean validateFunctionalStatusObservation2TemplateId(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.author-&gt;exists(author : cda::Author | not author.oclIsUndefined() and author.oclIsKindOf(consol::AuthorParticipation))'\"\n\t * @generated\n\t */\n\tboolean validateFunctionalStatusObservation2AuthorParticipation(DiagnosticChain diagnostics,\n\t\t\tMap<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getSupplies()-&gt;select(supply : cda::Supply | not supply.oclIsUndefined() and supply.oclIsKindOf(consol::NonMedicinalSupplyActivity2))-&gt;asSequence()-&gt;any(true).oclAsType(consol::NonMedicinalSupplyActivity2)'\"\n\t * @generated\n\t */\n\tNonMedicinalSupplyActivity2 getConsolNonMedicinalSupplyActivity2();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tpublic FunctionalStatusObservation2 init();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tpublic FunctionalStatusObservation2 init(Iterable<? extends Initializer<? extends EObject>> initializers);\n}", "@Optional\n Association<GebaeudeArtStaBuComposite> gebaeudeArtStaBu();", "@Test\n public void testFindEntity_Person_TimeSlot() throws Exception {\n // check whether the database is set-up as expected.\n Person p = Manager.getPersonCollection().findEntity(1);\n assertNotNull(\"Bad test data?\", p);\n List<Allocation> pa = p.getAllocationList();\n assertFalse(\"Bad test data?\", pa.isEmpty());\n Allocation a = pa.get(0);\n Event e = a.getEvent();\n assertNotNull(\"Bad test data?\", e);\n TimeSlot t = e.getTimeSlot();\n assertNotNull(\"Bad test data?\", t);\n\n // Here is the statement that we want to test:\n Allocation result = Manager.getAllocationCollection().findEntity(p, t);\n assertNotNull(result);\n assertTrue(Objects.equals(result, a));\n\n }", "@Test\n\tpublic void testSelectByAssociationType() {\n\t\tmoduleAssociationRepo.insert(moduleAssociation);\n\t\tList<ModuleAssociation> moduleAssociations = moduleAssociationRepo\n\t\t\t\t.selectByAssociationType(moduleAssociation.getAssociationType());\n\t\tassertTrue(moduleAssociations.size() > 0);\n\t}", "List<CustomerDDPay> selectCustomerDDPay(CustomerDDPay cddp);", "ImmutableList<SchemaOrgType> getAccountablePersonList();", "public abstract EntitySelect<T> getEntitySelect();", "List<AdvertBundleEntity> findAllRequiredNewProforma();", "List<SellType> selectAll();", "List<CmGroupRelIndustry> selectByExample(CmGroupRelIndustryExample example);", "public interface PointsRuleRepository extends BaseRepository<PointsRule, String> {\n\n PointsRule findByOrganizationIdAndStatus(String loginUserFirstOrganizationId, int code);\n}", "List<PcQualificationInfo> selectByExample(PcQualificationInfoExample example);", "public LinkedList <AbsAttraction> filter(ISelect s){\r\n return new LinkedList <AbsAttraction>(); \r\n }", "public EntityImpl getPermitRuleEO() {\n return (EntityImpl)getEntity(0);\n }", "List<BusinessRepayment> selectAll();", "List<PurchasePayment> selectByExample(PurchasePaymentExample example);", "TypeAssociation getConcernePlanTraitementObjectifsPlanTraitementObjectifs();", "@Repository\npublic interface PatrolDeviceRepository extends JpaRepository<PatrolDevice, Long>, JpaSpecificationExecutor<PatrolDevice> {\n\n @Query(value = \"select distinct patrolDevice from PatrolDevice patrolDevice left join fetch patrolDevice.powerDevices\",\n countQuery = \"select count(distinct patrolDevice) from PatrolDevice patrolDevice\")\n Page<PatrolDevice> findAllWithEagerRelationships(Pageable pageable);\n\n @Query(\"select distinct patrolDevice from PatrolDevice patrolDevice left join fetch patrolDevice.powerDevices\")\n List<PatrolDevice> findAllWithEagerRelationships();\n\n @Query(\"select patrolDevice from PatrolDevice patrolDevice left join fetch patrolDevice.powerDevices where patrolDevice.id =:id\")\n Optional<PatrolDevice> findOneWithEagerRelationships(@Param(\"id\") Long id);\n}", "public abstract PaymentType getPaymentType();", "cb.Careerbuilder.Company.PhoneType getType();", "public String getPrimitiveEntity();", "public Relation select(Condition c) throws RelationException;", "List<BasicInfoPrecursorProcessType> selectByExample(BasicInfoPrecursorProcessTypeExample example);", "List<TModuleLo> selectSkillToLo();", "public interface AdCodeDetailRepository extends AXBootJPAQueryDSLRepository<AdCodeDetail, AdCodeDetail.AdCodeDetailId>\n{\n}", "public D orchestrate(GuardRailEntity<B,D> input){\n\t\tSystem.out.println(input.getBusinessUsecaseContext());\n\n\t\treturn null;\n\t}", "ImmutableList<SchemaOrgType> getEducationalUseList();", "List<Ltsprojectpo> selectByExample(LtsprojectpoExample example);", "public LegalValueSet getLogicalRepositoryChoices() {\n List logicalRepositories = LogicalRepositoryUtils.getAllLogicalRepositories();\n Iterator iterator = logicalRepositories.iterator();\n LegalValueSet lvs = new LegalValueSet();\n while (iterator.hasNext()) {\n LogicalRepository lr = (LogicalRepository)iterator.next();\n lvs.addLegalValue(lr.getId(), lr.getFullName());\n }\n return lvs;\n }", "public String buyOrgOrRet();", "@Override\n public Criteria getCriteria() {\n //region your codes 2\n return null;\n //endregion your codes 2\n }", "Collaboration getType();", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface ModeEvacuationEauUseeRepository\n extends JpaRepository<ModeEvacuationEauUsee, Long>, JpaSpecificationExecutor<ModeEvacuationEauUsee> {}", "@Override public JannotTreeJCExpression getLeftOperand()\n{\n return createTree(getNode().getLeftOperand()); \n}", "default List<Source> representativeTypicalityQuery(Set<Source> resultSet, Set<String> domain){\n return representativeTypicalityQuery(5/*optimization: 5 most typical are enough*/, resultSet, domain);\n }", "public String getTypeSpecification(){\n return productRelation.getTypeSpecification();\n }", "@Repository\npublic interface OperationRepository extends JpaRepository<Operation, Long> {\n\n\n @Query(value = \"select distinct operation from Operation operation left join fetch operation.labels\",\n countQuery = \"select count(distinct operation) from Operation operation\")\n public Page<Operation> findAllWithEagerRelationships(Pageable pageable);\n\n @Query(\"select distinct operation from Operation operation left join fetch operation.labels\")\n public List<Operation> findAllWithEagerRelationships();\n\n @Query(\"select operation from Operation operation left join fetch operation.labels where operation.id =:id\")\n public Optional<Operation> findOneWithEagerRelationships(Long id);\n}", "List selectByExample(DisproductExample example);", "Optional<Company> findById(long company_id);", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface ApplicantPersonalInfoRepository extends JpaRepository<ApplicantPersonalInfo, Long>, JpaSpecificationExecutor<ApplicantPersonalInfo> {\n}", "List<ReEducation> selectByExample(ReEducationExample example);", "List<OcCustContract> selectAll();", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface DisabilityTypeRepository extends JpaRepository<DisabilityType, Long>, JpaSpecificationExecutor<DisabilityType> {\n}", "List<ItoProduct> selectByExample(ItoProductCriteria example);", "public List<GLJournalApprovalVO> getEntityfromuniquecode(String OrgId, String ClientId,\n String bpId) {\n String sqlQuery = \"\";\n PreparedStatement st = null;\n ResultSet rs = null;\n List<GLJournalApprovalVO> list = null;\n try {\n list = new ArrayList<GLJournalApprovalVO>();\n sqlQuery = \"select bp.c_bpartner_id as id, bp.name from c_bpartner bp \"\n + \" join c_validcombination acc on acc.c_bpartner_id = bp.c_bpartner_id \"\n + \" where acc.em_efin_uniquecode ='\" + bpId + \"' and acc.ad_client_id = '\"\n + OBContext.getOBContext().getCurrentClient().getId() + \"'\";\n st = conn.prepareStatement(sqlQuery);\n rs = st.executeQuery();\n while (rs.next()) {\n GLJournalApprovalVO VO = new GLJournalApprovalVO();\n VO.setId(rs.getString(1));\n VO.setName(rs.getString(2));\n list.add(VO);\n }\n } catch (Exception e) {\n log4j.error(\"Exception in getEntityfromuniquecode()\", e);\n }\n return list;\n }", "CriteriaExpression<?> getLeftHandOperand();", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface MChallengeQuestAchievementRewardGroupRepository extends JpaRepository<MChallengeQuestAchievementRewardGroup, Long>, JpaSpecificationExecutor<MChallengeQuestAchievementRewardGroup> {\n\n}", "List<ErpOaLicKey> selectByExample(ErpOaLicKeyExample example);", "public int getC_POSDocType_ID() \n{\nInteger ii = (Integer)get_Value(COLUMNNAME_C_POSDocType_ID);\nif (ii == null) return 0;\nreturn ii.intValue();\n}", "List<TransactionType> listAgentTransactionTypes();", "@Test\n public void testJoinTypeLeftWhenParentEffectiveJoinTypeIsLeftEvenWhenOnlyIdSelected() {\n Person parent = query.from(Person.class);\n Relation relation = query.join(parent.getChildRelations(), JoinType.Left);\n \n query.select(relation.getChild().getId());\n \n validate(\"select hobj3.id from Person hobj1 left join hobj1.childRelations hobj2 left join hobj2.child hobj3\");\n }" ]
[ "0.5156903", "0.49208564", "0.4876711", "0.48196837", "0.48009714", "0.47959587", "0.47932366", "0.47895426", "0.4776319", "0.47682646", "0.4756835", "0.47453198", "0.47398886", "0.47335076", "0.4722395", "0.47188574", "0.46673524", "0.46562642", "0.46521923", "0.4627763", "0.4624211", "0.461209", "0.4609056", "0.45977584", "0.45844844", "0.45843056", "0.4577379", "0.45734555", "0.45651576", "0.45630816", "0.45353526", "0.45334697", "0.45313013", "0.45281783", "0.45212045", "0.4504789", "0.4483776", "0.4479675", "0.44713497", "0.44701108", "0.4469276", "0.44668955", "0.4455304", "0.44536677", "0.44526765", "0.44511724", "0.44485673", "0.44415188", "0.44175833", "0.44129986", "0.44089496", "0.44069389", "0.440611", "0.44045815", "0.43996805", "0.4399647", "0.43981302", "0.43980592", "0.43856496", "0.43851995", "0.43847647", "0.4374056", "0.43732867", "0.4368955", "0.43668258", "0.43647236", "0.4364491", "0.4360553", "0.4355067", "0.43535087", "0.43514594", "0.4342922", "0.4337293", "0.4336717", "0.4336488", "0.43340203", "0.43325248", "0.43318108", "0.43212077", "0.43190345", "0.4313602", "0.42972827", "0.42928815", "0.42926997", "0.42883366", "0.42854682", "0.42836115", "0.42820248", "0.4278895", "0.4267011", "0.42610633", "0.4260321", "0.42601097", "0.4255507", "0.42505872", "0.42490977", "0.42484462", "0.4246988", "0.42466104", "0.42449763" ]
0.43808562
61
CCD Policy Activity SHALL contain exactly one [1..1] performer (CONF56), such that.
IPayerEntity withPayerEntity();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int isPrivacyModelFulfilled(Transformation<?> transformation, HashGroupifyEntry entry) {\n \n // Check minimal group size\n if (minimalClassSize != Integer.MAX_VALUE && entry.count < minimalClassSize) {\n return 0;\n }\n \n // Check other criteria\n // Note: The d-presence criterion must be checked first to ensure correct handling of d-presence with tuple suppression.\n // This is currently ensured by convention. See ARXConfiguration.getCriteriaAsArray();\n for (int i = 0; i < classBasedCriteria.length; i++) {\n if (!classBasedCriteria[i].isAnonymous(transformation, entry)) {\n return i + 1;\n }\n }\n return -1;\n }", "public boolean affordCard() {\n \t\treturn (FREE_BUILD || getResources(Type.WOOL) >= 1\n \t\t\t\t&& getResources(Type.GRAIN) >= 1 && getResources(Type.ORE) >= 1);\n \t}", "@Test\n\tpublic void activeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfActiveHires() == 1);\n\t}", "public boolean isChiefCaptured(){\n Chief chief = establishChief();\n return chief == null;\n }", "@Test\n public void CardRequirement1() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(1);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.YELLOW, 0, null, null);\n DevelopmentCard card2 = new DevelopmentCard(2, Color.GREEN, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n p.getDevelopmentSlot().addCard(card2, 1);\n c.emptyQueue();\n\n assertTrue(am.activateLeaderCard(p, message));\n\n assertTrue(l2.isEnabled());\n\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_UPD_Player).count());\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_NOTIFICATION).count());\n assertEquals(2, c.messages.size());\n\n }", "void decideContinuity(Card curr_card) {\n if (curr_card.getTRIPS().size() != 0) { // if trips is not empty, then can get the last item and decide if continuous\n int last_index = curr_card.getTRIPS().size() - 1;\n WholeTrip last_whole_trip = (curr_card.getTRIPS().get(last_index));\n Trip last_trip = last_whole_trip.getWHOLE_TRIP().get(last_whole_trip.getWHOLE_TRIP().size() - 1); // get the last trip\n // evaluate if continuous\n this.isContinuous = START_TIME.timeInterval(last_trip.endTime) <= 120 &&\n last_trip.endStation.equals(START_STATION);\n }\n }", "if (charge == adhocTicket.getCharge()) {\n System.out.println(\"Charge is passed\");\n }", "public static int getCorrectConsicutiveOnes(int[] arr) {\n int count = 0;\n int maxCount = 0;\n for (int i = 0; i < arr.length; i++) {\n if (arr[i] == 1) {\n count++;\n } else {\n if (maxCount < count) {\n maxCount = count;\n }\n count = 0;\n }\n }\n return maxCount > count ? maxCount : count;\n }", "private void comprobarActividades(List<DetectedActivity> actividadesProvables){\n for( DetectedActivity activity : actividadesProvables) {\n //preguntamos por el tipo\n switch( activity.getType() ) {\n case DetectedActivity.IN_VEHICLE: {\n //preguntamos por la provabilidad de que sea esa actividad\n //si es mayor de 75 (de cien) mostramos un mensaje\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"En vehiculo\");\n }\n break;\n }\n case DetectedActivity.ON_BICYCLE: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"En bici\");\n }\n break;\n }\n case DetectedActivity.ON_FOOT: {\n //este lo dejamos vacio por que va implicito en correr y andar\n break;\n }\n case DetectedActivity.RUNNING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Corriendo\");\n }\n break;\n }\n case DetectedActivity.WALKING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Andando\");\n }\n break;\n }\n case DetectedActivity.STILL: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Quieto\");\n }\n break;\n }\n case DetectedActivity.TILTING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Tumbado\");\n }\n break;\n }\n\n case DetectedActivity.UNKNOWN: {\n //si es desconocida no decimos nada\n break;\n }\n }\n }\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT08() {\n\t\t// PRECONDITIONS\n\t\tArrayList<Integer> a = new ArrayList<Integer>();\n\t\ta.add(100);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<Collection<?>> singleElementCollection = new HashSet<Collection<?>>();\n\t\tsingleElementCollection.add(a);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean sizeIsOne = smc.sizeIsOne(singleElementCollection);\n\t\tassertTrue(sizeIsOne);\n\t}", "boolean hasIsPerformOf();", "private Bool checkCreditReviewDate(Person person) {\n\t\tBool holdProcessSwitch = Bool.FALSE;\n\t\tQuery<Date> query = createQuery(CmDelinquencyProcessConstant.PER_COL_FROM_PERSON_QUERY.toString(), \"CmHoldDelinquencyProcessCriteriaDueToCreditReviewDtAlgComp_Impl\");\n\t\tquery.bindEntity(\"person\", person);\n\t\tquery.addResult(\"postponeCreditRevieDate\", \"PERCOL.postponeCreditReviewUntil\");\n\t\tDate postponeCreditRevieDate = query.firstRow();\n\t\t\n\t\t// If credit review date is after process date time\n\t\tif (notNull(postponeCreditRevieDate) && postponeCreditRevieDate.isAfter(getProcessDateTime().getDate())) {\n\t\t\tholdProcessSwitch = Bool.TRUE;\n\t\t\n\t\t\t// Fetch existing delinquency process log for particular char value\n\t\t\tQuery<QueryResultRow> existingLogQuery = createQuery(CmHoldDelinquencyProcessConstants.FETCH_EXISTING_DEL_PROC_LOG.toString(), \"CmHoldDelinquencyProcessCriteriaDueToCreditReviewDtAlgComp_Impl\");\n\t\t\texistingLogQuery.bindId(\"delProcId\", delinquencyProcessId);\n\t\t\texistingLogQuery.bindStringProperty(\"boStatus\", CmDelinquencyProcess.properties.status, delinquencyProcessId.getEntity().getStatus());\n\t\t\texistingLogQuery.bindId(\"msgCategoryNumber\", MessageRepository.addDelProcLogForCharVal(getPostponeCreditReviewDateHoldReason()).getMessageId().getMessageCategoryId());\n\t\t\texistingLogQuery.bindBigInteger(\"msgNumber\", MessageRepository.addDelProcLogForCharVal(getPostponeCreditReviewDateHoldReason()).getMessageId().getMessageNumber());\n\t\t\texistingLogQuery.bindEntity(\"charType\", getHoldReasonCharacteristicType());\n\t\t\texistingLogQuery.bindStringProperty(\"charValue\", CmDelinquencyProcessCharacteristic.properties.characteristicValue, getPostponeCreditReviewDateHoldReason());\n\t\t\texistingLogQuery.addResult(\"delProcessId\", \"DPL.id.delinquencyProcess.id\");\n\t\t\texistingLogQuery.addResult(\"sequence\", \"DPL.id.sequence\");\n\t\t\t\n\t\t\t// If no existing log entry found\n\t\t\tif(existingLogQuery.list().isEmpty()){\n\t\t\t\t\n\t\t\t\t// No existing log entry add new log entry \n\t\t\t\tCharacteristicValue_Id charValId = new CharacteristicValue_Id(getHoldReasonCharacteristicType(), getPostponeCreditReviewDateHoldReason());\n\t\t\t\tMaintenanceObjectLogHelper<CmDelinquencyProcess, CmDelinquencyProcessLog> logHelper = new MaintenanceObjectLogHelper<CmDelinquencyProcess, CmDelinquencyProcessLog>(\n\t\t\t\t\t\tdelinquencyProcessId.getEntity().getBusinessObject().getMaintenanceObject(), delinquencyProcessId.getEntity());\n\t\t\t\tlogHelper.addLogEntry(LogEntryTypeLookup.constants.SYSTEM, MessageRepository.addDelProcLogForCharVal(charValId.getEntity().fetchLanguageDescription()), null, charValId.getEntity());\n\t\t\t} \n\t\t\t\n\t\t}\n\t\t\n\t\treturn holdProcessSwitch;\n\t}", "@Test\n public void minimumValidClaim() {\n claim.setClaimId(EXPECTED_CLAIM_ID);\n claim.setDcn(\"dcn\");\n claim.setIntermediaryNb(\"inter\");\n claim.setHicNo(\"hicn\");\n claim.setCurrStatus('T');\n claim.setCurrLoc1('M');\n claim.setCurrLoc2(\"9000\");\n claim.setLastUpdated(clock.instant());\n claimBuilder\n .setRdaClaimKey(\"claim_id\")\n .setDcn(\"dcn\")\n .setIntermediaryNb(\"inter\")\n .setHicNo(\"hicn\")\n .setCurrStatusEnum(FissClaimStatus.CLAIM_STATUS_RTP)\n .setCurrLoc1Enum(FissProcessingType.PROCESSING_TYPE_MANUAL)\n .setCurrLoc2Enum(FissCurrentLocation2.CURRENT_LOCATION_2_CABLE);\n changeBuilder\n .setSeq(MIN_SEQUENCE_NUM)\n .setChangeType(ChangeType.CHANGE_TYPE_INSERT)\n .setClaim(claimBuilder.build());\n assertChangeMatches(RdaChange.Type.INSERT);\n }", "@Test\n\tpublic void testCheckCoflictOneDay() {\n\t\tActivity a1 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"MWF\", 1330, 1445);\n\t\tActivity a2 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"TWH\", 1330, 1445);\n\t\ttry {\n\t\t a1.checkConflict(a2);\n\t\t fail(); //ConflictException should have been thrown, but was not.\n\t\t } catch (ConflictException e) {\n\t\t //Check that the internal state didn't change during method call.\n\t\t assertEquals(\"MWF 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"TWH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t }\n\t}", "@Test\n public void CardRequirement2() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(1);\n\n LeaderCard l3 = new LeaderCard(4,\n new CardRequirements(Map.of(Color.YELLOW, new ReqValue(1, 2))),\n new Production(Resource.SHIELD));\n ArrayList<LeaderCard> cards = new ArrayList<>();\n cards.add(l1);\n cards.add(l3);\n p.associateLeaderCards(cards);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.GREEN, 0, null, null);\n DevelopmentCard card2 = new DevelopmentCard(2, Color.YELLOW, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n p.getDevelopmentSlot().addCard(card2, 1);\n c.emptyQueue();\n\n assertTrue(am.activateLeaderCard(p, message));\n\n assertTrue(l3.isEnabled());\n\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_NOTIFICATION).count());\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_UPD_Player).count());\n assertEquals(2, c.messages.size());\n }", "org.hl7.fhir.ResourceReference[] getPerformerArray();", "@Test\n\tvoid attributeCardinality() {\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..*]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..0]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..1]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"{\" +\n\t\t\t\t\t\t\t\t\"[1..1]\" + FINDING_SITE + \" != <<\" + PULMONARY_VALVE_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS + \"\" +\n\t\t\t\t\t\t\t\t\"}\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + FINDING_SITE + \" != <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t}", "private List<CustStmtRecord> validateDuplicate (final List<CustStmtRecord> custStmtRecords) {\n\t\tlog.info(\"Entering {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\tfinal List<CustStmtRecord> duplicateReference = custStmtRecords\n\t\t\t\t.parallelStream()\n\t\t\t\t\t.filter(e -> Collections.frequency(custStmtRecords, e) > 1)\n\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\t\t;\n\t\t\t\n\t\tlog.info(\"duplicateReference {}\", duplicateReference);\n\t\t\t\n\t\tlog.info(\"Exiting {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\treturn duplicateReference;\n\t}", "private boolean estPlein() {\n return (nbAssoc == associations.length);\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.382 -0400\", hash_original_method = \"65C602B599F92E5ADD878013A9F7BBB1\", hash_generated_method = \"5F9E494B1283DBF2B118508DCA034E91\")\n \n public static boolean startSupplicant(){\n \tdouble taintDouble = 0;\n \n \treturn ((taintDouble) == 1);\n }", "final void checkForComodification() {\n\t}", "private boolean isExactlyOneCEO(List<Employee> employees) {\n //check if exactly one employee doesn't have a manager (The CEO)\n return employees.stream().filter(e -> e.getManagerId() == null).count() == 1;\n }", "int evaluate(ISeqActivity iThisActivity) {\n\n\t\tif (_Debug) {\n\t\t\tSystem.out.println(\" :: SeqConditionSet --> BEGIN - evaluate\");\n\t\t\tSystem.out.println(\" :: --> RETRY == \" + mRetry);\n\t\t}\n\n\t\tint result = EVALUATE_UNKNOWN;\n\n\t\t// Make sure we have a valid target activity \n\t\tif (iThisActivity != null) {\n\n\t\t\tif (_Debug) {\n\t\t\t\tSystem.out.println(\" ::--> Set - \" + mCombination);\n\n\t\t\t\tif (mConditions != null) {\n\t\t\t\t\tSystem.out.println(\" ::--> [\" + mConditions.size() + \"]\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\" ::--> NULL\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (mConditions != null) {\n\t\t\t\t// Evaluate this rule's conditions\n\t\t\t\tif (mCombination.equals(COMBINATION_ALL)) {\n\t\t\t\t\tresult = EVALUATE_TRUE;\n\n\t\t\t\t\tfor (int i = 0; i < mConditions.size(); i++) {\n\t\t\t\t\t\tint thisEval = evaluateCondition(i, (SeqActivity) iThisActivity);\n\n\t\t\t\t\t\tif (thisEval != EVALUATE_TRUE) {\n\t\t\t\t\t\t\tresult = thisEval;\n\n\t\t\t\t\t\t\t// done with this evaluation\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (mCombination.equals(COMBINATION_ANY)) {\n\t\t\t\t\t// Assume we have enought information to evaluate\n\t\t\t\t\tresult = EVALUATE_FALSE;\n\n\t\t\t\t\tfor (int i = 0; i < mConditions.size(); i++) {\n\t\t\t\t\t\tint thisEval = evaluateCondition(i, (SeqActivity) iThisActivity);\n\n\t\t\t\t\t\tif (thisEval == EVALUATE_TRUE) {\n\t\t\t\t\t\t\tresult = EVALUATE_TRUE;\n\n\t\t\t\t\t\t\t// done with this evaluation\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if (thisEval == EVALUATE_UNKNOWN) {\n\t\t\t\t\t\t\t// Something is missing...\n\t\t\t\t\t\t\tresult = EVALUATE_UNKNOWN;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Reset the 'retry' flag\n\t\tmRetry = false;\n\n\t\tif (_Debug) {\n\t\t\tSystem.out.println(\" ::--> \" + result);\n\t\t\tSystem.out.println(\" :: SeqConditionSet --> END - evaluate\");\n\t\t}\n\n\t\treturn result;\n\n\t}", "public static void findSingleElement(int[] arr) {\n int distinct = 0;\n for (int i = 0; i < arr.length; i++) {\n for (int j = 0; j < arr.length; j++) {\n if (arr[i] == arr[j] )\n distinct++;\n }\n if(distinct==1)\n System.out.println(\"Element which appears only once in array is : \"+arr[i]);\n distinct = 0;\n }\n }", "private boolean consistencyCheckC1Constraints(double[][] xResults) {\n\t\tint n = mExplicitMDP.getNumStates();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tdouble outxValue = GRBSolverUtils.getOutValue(i, xResults, mExplicitMDP);\n\t\t\tdouble inxValue = GRBSolverUtils.getInValue(i, xResults, mExplicitMDP);\n\t\t\tboolean satisfied = GRBSolverUtils.approximatelyEqual(outxValue, inxValue,\n\t\t\t\t\tmSettings.getFeasibilityTolerance());\n\n\t\t\tif (!satisfied) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public Participant getResolvedPerformer()\n {\n return null;\n }", "private boolean firstMilestoneAccomplished()\n {\n if(\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4)\n )\n return true;\n else\n return false;\n }", "public void testValidateSubjectPrimaryAssociationsDuplicate() throws Exception {\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n List subjectPrimaryAssociations = positionWrapperBean.getSubjectPrimaryAssociations();\n for (int i = 0; i < subjectPrimaryAssociations.size(); i++) {\n ArtefactAssociationWrapperBean artefactAssociationWrapperBean = (ArtefactAssociationWrapperBean) subjectPrimaryAssociations.get(i);\n artefactAssociationWrapperBean.setSourceId(new Long(12));\n artefactAssociationWrapperBean.setQualifierId(new Long(399));\n }\n // should produce a duplicate assocition error\n DataBinder binder = new DataBinder(positionWrapperBean, ZynapDefaultFormController.DEFAULT_COMMAND_NAME);\n Errors errors = binder.getBindingResult();\n positionValidator.validateSubjectPrimaryAssociations(positionWrapperBean, errors);\n assertEquals(1, errors.getErrorCount());\n FieldError error = errors.getFieldError(FIRST_PRIMARY_ASSOCIATION_SOURCE_FIELD);\n assertEquals(\"error.association.target.unique.required\", error.getCode());\n }", "@Override\n public boolean isUsableEffectOne() {\n return getEffectsEnable()[0] && getUsableEffect()[0] && ((TargetSquareRequestEvent) getTargetEffectOne()).getPossibleTargetsX().length != 0;\n }", "@Test\n public void testClaimPrimaryPayerCode() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setPrimaryPayerCodeEnum,\n RdaFissClaim::getPrimaryPayerCode,\n FissPayersCode.PAYERS_CODE_AUTO_NO_FAULT,\n \"D\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setPrimaryPayerCodeUnrecognized,\n RdaFissClaim::getPrimaryPayerCode,\n RdaFissClaim.Fields.primaryPayerCode,\n 1);\n }", "public void validateRpd15s1()\n {\n // This guideline cannot be automatically tested.\n }", "org.hl7.fhir.ResourceReference getPerformerArray(int i);", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.392 -0400\", hash_original_method = \"A08E67D255841067B3F35F55844EB68A\", hash_generated_method = \"A24C6CC15E92DDB51210D5F314E426E4\")\n \n public static boolean connectToSupplicant(){\n \tdouble taintDouble = 0;\n \n \treturn ((taintDouble) == 1);\n }", "private boolean isIllegalTokenCollectionForRuleOne(int elapsedTimeInSeconds) {\n int interval = elapsedTimeInSeconds / 10;\n int intervalModTwo = interval % 2;\n return intervalModTwo == 0;\n }", "public final ManchesterOWLSyntaxAutoComplete.cardinalityRestriction_return cardinalityRestriction() {\n ManchesterOWLSyntaxAutoComplete.cardinalityRestriction_return retval = new ManchesterOWLSyntaxAutoComplete.cardinalityRestriction_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxAutoComplete.unary_return p = null;\n ManchesterOWLSyntaxAutoComplete.expression_return filler = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:238:1:\n // ( ^( CARDINALITY_RESTRICTION MIN i= INTEGER p= unary (filler=\n // expression )? ) | ^( CARDINALITY_RESTRICTION MAX i= INTEGER p=\n // unary (filler= expression )? ) | ^( CARDINALITY_RESTRICTION\n // EXACTLY i= INTEGER p= unary (filler= expression )? ) )\n int alt14 = 3;\n int LA14_0 = input.LA(1);\n if (LA14_0 == CARDINALITY_RESTRICTION) {\n int LA14_1 = input.LA(2);\n if (LA14_1 == DOWN) {\n switch (input.LA(3)) {\n case MIN: {\n alt14 = 1;\n }\n break;\n case MAX: {\n alt14 = 2;\n }\n break;\n case EXACTLY: {\n alt14 = 3;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 14,\n 2, input);\n throw nvae;\n }\n } else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 14, 1, input);\n throw nvae;\n }\n } else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 14, 0, input);\n throw nvae;\n }\n switch (alt14) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:239:5:\n // ^( CARDINALITY_RESTRICTION MIN i= INTEGER p= unary (filler=\n // expression )? )\n {\n match(input, CARDINALITY_RESTRICTION,\n FOLLOW_CARDINALITY_RESTRICTION_in_cardinalityRestriction719);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, MIN, FOLLOW_MIN_in_cardinalityRestriction722);\n if (state.failed) {\n return retval;\n }\n match(input, INTEGER, FOLLOW_INTEGER_in_cardinalityRestriction727);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_cardinalityRestriction733);\n p = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:239:65:\n // (filler= expression )?\n int alt11 = 2;\n int LA11_0 = input.LA(1);\n if (LA11_0 >= IDENTIFIER && LA11_0 <= ENTITY_REFERENCE\n || LA11_0 >= DISJUNCTION && LA11_0 <= NEGATED_EXPRESSION\n || LA11_0 >= SOME_RESTRICTION && LA11_0 <= ONE_OF\n || LA11_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n alt11 = 1;\n }\n switch (alt11) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:239:65:\n // filler= expression\n {\n pushFollow(FOLLOW_expression_in_cardinalityRestriction740);\n filler = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(filler == null ? p.node.getCompletions()\n : filler.node.getCompletions());\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:243:6:\n // ^( CARDINALITY_RESTRICTION MAX i= INTEGER p= unary (filler=\n // expression )? )\n {\n match(input, CARDINALITY_RESTRICTION,\n FOLLOW_CARDINALITY_RESTRICTION_in_cardinalityRestriction755);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, MAX, FOLLOW_MAX_in_cardinalityRestriction758);\n if (state.failed) {\n return retval;\n }\n match(input, INTEGER, FOLLOW_INTEGER_in_cardinalityRestriction762);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_cardinalityRestriction768);\n p = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:243:65:\n // (filler= expression )?\n int alt12 = 2;\n int LA12_0 = input.LA(1);\n if (LA12_0 >= IDENTIFIER && LA12_0 <= ENTITY_REFERENCE\n || LA12_0 >= DISJUNCTION && LA12_0 <= NEGATED_EXPRESSION\n || LA12_0 >= SOME_RESTRICTION && LA12_0 <= ONE_OF\n || LA12_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n alt12 = 1;\n }\n switch (alt12) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:243:65:\n // filler= expression\n {\n pushFollow(FOLLOW_expression_in_cardinalityRestriction775);\n filler = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(filler == null ? p.node.getCompletions()\n : filler.node.getCompletions());\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:247:6:\n // ^( CARDINALITY_RESTRICTION EXACTLY i= INTEGER p= unary\n // (filler= expression )? )\n {\n match(input, CARDINALITY_RESTRICTION,\n FOLLOW_CARDINALITY_RESTRICTION_in_cardinalityRestriction794);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXACTLY, FOLLOW_EXACTLY_in_cardinalityRestriction797);\n if (state.failed) {\n return retval;\n }\n match(input, INTEGER, FOLLOW_INTEGER_in_cardinalityRestriction802);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_cardinalityRestriction809);\n p = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:247:71:\n // (filler= expression )?\n int alt13 = 2;\n int LA13_0 = input.LA(1);\n if (LA13_0 >= IDENTIFIER && LA13_0 <= ENTITY_REFERENCE\n || LA13_0 >= DISJUNCTION && LA13_0 <= NEGATED_EXPRESSION\n || LA13_0 >= SOME_RESTRICTION && LA13_0 <= ONE_OF\n || LA13_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n alt13 = 1;\n }\n switch (alt13) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:247:71:\n // filler= expression\n {\n pushFollow(FOLLOW_expression_in_cardinalityRestriction816);\n filler = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(filler == null ? p.node.getCompletions()\n : filler.node.getCompletions());\n }\n }\n break;\n }\n if (state.backtracking == 1) {\n retval.node = (ManchesterOWLSyntaxTree) retval.start;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "public Task createTask_OnePotentialOwner() throws HTException {\n Task task = services.createTask(\"Task1\", null, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><ClaimApprovalRequest><cust><firstname>witek</firstname></cust><amount>1</amount></ClaimApprovalRequest>\");\n org.junit.Assert.assertTrue(task.getPotentialOwners().size() == 1);\n return task;\n }", "public boolean action_allowed(){\r\n\t\treturn action_holds.size()==0;\r\n\t}", "@Test public void testPositive() {\n\t\tassertEquals(expected, new AtMostOne(data).process(getClass()));\n\t}", "public void verifyNoMatching(AcBatchFlight e)\n {\n }", "static final /* synthetic */ boolean m114833a(Activity activity) {\n if (!(activity instanceof C41387m) || !((C41387m) activity).mo88338b()) {\n return false;\n }\n return true;\n }", "@Override\n\tpublic boolean deviceHasActiveCoupons(String deviceUUID) throws ASException {\n\t\tDeviceInfo di = deviceInfoDao.get(deviceUUID, true);\n\t\tif(StringUtils.hasText(di.getUserId())) {\n\t\t\tDate now = new Date();\n\t\t\tList<Integer> redeemStatus = Arrays.asList(new Integer[] {CampaignActivity.REDEEM_STATUS_DELIVERED, CampaignActivity.REDEEM_STATUS_ACCEPTED});\n\t\t\tList<CampaignActivity> list = caDao.getUsingUserAndRedeemStatusAndRange(di.getUserId(), redeemStatus, null, null);\n\t\t\tfor( CampaignActivity obj : list ) {\n\t\t\t\tif( obj.getLimitDateTime().after(now)) return true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public void testAddRejectReasons_RejectReasonsContainsManyDuplicateElementsAccuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[4];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[1] = new ExpenseEntryRejectReason(3);\r\n rejectReasons[2] = new ExpenseEntryRejectReason(3);\r\n rejectReasons[3] = new ExpenseEntryRejectReason(2);\r\n entry.addRejectReason(new ExpenseEntryRejectReason(1));\r\n\r\n ExpenseEntryRejectReason[] duplicate = entry.addRejectReasons(rejectReasons);\r\n\r\n // check nothing is added into the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should not be added.\", 1, rejectReasonsMap.size());\r\n\r\n // check the duplicate result\r\n assertNotNull(\"The duplicate result should be correct.\", duplicate);\r\n V1Dot1TestHelper.assertEquals(\"The duplicate result should be correct.\",\r\n new ExpenseEntryRejectReason[] {rejectReasons[0], rejectReasons[1], rejectReasons[2]}, duplicate);\r\n }", "void setPerformerArray(org.hl7.fhir.ResourceReference[] performerArray);", "@Override\r\n public int build() throws CannotPerformAction {\r\n if(hand.getCards().size() > 1) throw new AmbigousAction(\"Choose the card you'd like to discard\");\r\n this.field.build();\r\n return 1;\r\n }", "boolean multiplicity(DiagnosticChain diagnostics, Map<Object, Object> context);", "private boolean isPrimaryTraitCheapened(Charm charm) {\n TraitType traitType = new TraitTypeUtils().getPrimaryTraitType(charm);\n if (AbilitiesModelFetcher.fetch(hero).contains(traitType)) {\n \treturn AbilitiesModelFetcher.fetch(hero).getState(traitType).isCheapened();\n }\n return false;\n }", "private Chief establishChief() {\n for(Piece piece : getActivePieces()){\n if(piece.getPieceType().isChief()){\n return (Chief)piece;\n }\n }\n return null;\n }", "@Test\n public void testDuplicateConditionsAndFulfillments() {\n final ThresholdSha256Condition condition = ThresholdSha256Condition.from(\n 2, Lists\n .newArrayList(subcondition1, subcondition1, subcondition2, subcondition3)\n );\n\n // Escrow Only (insufficient)\n ThresholdSha256Fulfillment fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition2, subcondition3),\n Lists.newArrayList(subfulfillment1)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(false));\n\n // Escrow Only (sufficient)\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition2, subcondition3),\n Lists.newArrayList(subfulfillment1, subfulfillment1)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Escrow+Party2\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition3),\n Lists.newArrayList(subfulfillment1, subfulfillment2)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Escrow+Party3\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition2),\n Lists.newArrayList(subfulfillment1, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Party2+Party3\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition1),\n Lists.newArrayList(subfulfillment2, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Party2+Party3 (w\\o escrow condition)\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(),\n Lists.newArrayList(subfulfillment2, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(false));\n }", "private AttestationOccurrence(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public boolean isContinuingEducationPassed(CapIDModel capID) throws AAException, RemoteException;", "public boolean isApplicable(DevelopmentCard card) {\n\t\treturn (this.familyMember.getActionValue()\n\t\t\t\t+ this.getPlayer().getBonuses().getActivationVariation(card.getCardType())\n\t\t\t\t+ paidServants >= card.getActivationCost());\n\t}", "private void checkAtLeastOneRuleIsSelected() {\n\t\tsufficientRulesSelected = false;\n\t\tint checked = 0;\n\t\tControl[] controlArray = rulesGroup.getChildren();\n\n\t\tfor (Control elem : controlArray) {\n\t\t\tif (elem instanceof Button) {\n\t\t\t\tif (((Button) elem).getSelection()) {\n\t\t\t\t\tchecked++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (checked >= 1)\n\t\t\tsufficientRulesSelected = true;\n\t\tupdateFinishButton();\n\t}", "int cardinality();", "private ShouldContainsOnlyOnce(Set<?> notOnlyOnce, Object actual, Object expected,\n ComparisonStrategy comparisonStrategy) {\n super(\"%nExpecting actual:%n %s%nto contain only once:%n %s%nbut some elements were found more than once:%n %s%n%s\",\n actual, expected, notOnlyOnce, comparisonStrategy);\n }", "private boolean isAppropriated(int[] arr) {\n boolean is_correct = false;\n for (int i : arr) {\n if (i > 9999) {\n is_correct = true;\n } else\n is_correct = false;\n }\n return is_correct;\n }", "@Override\n\tpublic int cardinality() {\n\t\treturn 2;\n\t}", "public static boolean m37109aC(Activity activity) {\n AppMethodBeat.m2504i(49000);\n if (C24143a.m37112aE(activity) != null) {\n AppMethodBeat.m2505o(49000);\n return true;\n }\n AppMethodBeat.m2505o(49000);\n return false;\n }", "public void buildEssentialPrimeImplicant(){ \n //int count = 0; \n // For loop ticks all the essential prime Implicants\n for(Entry<Integer, Boolean> mint: mintermList.entrySet()){\n //System.out.printf(\"\\n %d minterm inside buildEssential.\", mint.getKey());\n int count = 0; \n for(Implicant p:primeImp){\n if(p.contains(mint.getKey())){\n count++;\n }\n }\n \n if(count == 1){ // Prime Implicant occurs for only one minterm\n mint.setValue(true);\n for(Implicant x:primeImp){\n if(x.contains(mint.getKey())){\n if(!finalPrimeImp.contains(x))\n finalPrimeImp.add(x);\n \n //System.out.printf(\"\\n %s added to final Prime Implicant List.\",x.toString());\n }\n }\n \n }\n \n }\n \n /**\n * Remove Essential Prime Implicant from primeImpl\n */\n for (Implicant i:finalPrimeImp){\n primeImp.remove(i);\n for(Entry<Integer, Boolean> mint: mintermList.entrySet()){\n if(i.contains(mint.getKey()))\n mint.setValue(true); \n }\n primeImp.remove(i);\n } \n }", "@java.lang.Override\n public boolean hasPrimaryImpact() {\n return primaryImpact_ != null;\n }", "public static boolean m14539c(C44919o c44919o, C8235ad c8235ad, C8235ad c8235ad2) {\n AppMethodBeat.m2504i(122754);\n C25052j.m39376p(c44919o, \"context\");\n C25052j.m39376p(c8235ad, \"subType\");\n C25052j.m39376p(c8235ad2, \"superType\");\n boolean z = C8230j.m14537e(c8235ad) || C8230j.m14536d(c8235ad) || c44919o.mo72115e(c8235ad);\n Throwable assertionError;\n if (!C44847aa.AUz || z) {\n z = C8230j.m14536d(c8235ad2) || c44919o.mo72115e(c8235ad2);\n if (C44847aa.AUz && !z) {\n assertionError = new AssertionError(\"Not singleClassifierType superType: \".concat(String.valueOf(c8235ad2)));\n AppMethodBeat.m2505o(122754);\n throw assertionError;\n } else if (c8235ad2.eci()) {\n AppMethodBeat.m2505o(122754);\n return true;\n } else if (C41444ag.m72304ap(c8235ad)) {\n AppMethodBeat.m2505o(122754);\n return true;\n } else if (C8232l.m14538a(c44919o, c8235ad, C37047a.BKT)) {\n AppMethodBeat.m2505o(122754);\n return true;\n } else if (C41444ag.m72304ap(c8235ad2)) {\n AppMethodBeat.m2505o(122754);\n return false;\n } else if (C8232l.m14538a(c44919o, c8235ad2, C17311d.BKV)) {\n AppMethodBeat.m2505o(122754);\n return false;\n } else if (C8230j.m14535c(c8235ad)) {\n AppMethodBeat.m2505o(122754);\n return false;\n } else {\n boolean d = C8232l.m14540d(c44919o, c8235ad, c8235ad2.ejw());\n AppMethodBeat.m2505o(122754);\n return d;\n }\n }\n assertionError = new AssertionError(\"Not singleClassifierType superType: \".concat(String.valueOf(c8235ad2)));\n AppMethodBeat.m2505o(122754);\n throw assertionError;\n }", "@UpnpAction(out = {@UpnpOutputArgument(name = \"Result\", stateVariable = \"A_ARG_TYPE_Result\")})\n/* */ public int isValidated(@UpnpInputArgument(name = \"DeviceID\", stateVariable = \"A_ARG_TYPE_DeviceID\") String deviceID) {\n/* 128 */ return 1;\n/* */ }", "public CWE insertIndication(int rep) throws HL7Exception { \r\n return (CWE) super.insertRepetition(19, rep);\r\n }", "public boolean isApplied() {\n return selectedDatasetNumbers.size() > 1;\n }", "@Test\n public void ANDSearch_CareQualityComissionAdmission() throws Exception {\n\n final Set<String> searchResults = newsLineSearch.search(TEST_FILE, \"Care Quality Commission admission\",\n SearchType.AND);\n\n assertThat(searchResults).hasSize(1).contains(allLines.get(1));\n }", "private static boolean hasCapacityForMultiEvaluation() {\n // return true;\n int threshold = 3;\n int available = Runtime.getRuntime().availableProcessors() * ServerRunner.getProcessorMultiplier();\n return available >= threshold;\n }", "public static Boolean getAppositivePrs(PairInstance inst) {\n if (inst.getAnaphor().getSentId()!=inst.getAntecedent().getSentId()) \n return false;\n\n// exclude pairs where anaphor is an NE -- this might be a bad idea though..\n if (inst.getAnaphor().isEnamex()) \n return false;\n\n\n if (inst.getAntecedent().isEnamex() &&\n inst.getAnaphor().isEnamex()) {\n\n// exclude pairs of NE that have different type\n\n if (!(inst.getAntecedent().getEnamexType().equals(\n inst.getAnaphor().getEnamexType())))\n return false;\n\n// exclude pairs of LOC-ne\n if (inst.getAntecedent().getEnamexType().toLowerCase().startsWith(\"gpe\"))\n return false;\n if (inst.getAntecedent().getEnamexType().toLowerCase().startsWith(\"loc\"))\n return false;\n }\n\n// should have not-null maxnp-trees (otherwise -- problematic mentions)\n\nTree sentenceTree=inst.getAnaphor().getSentenceTree();\nTree AnaTree=inst.getAnaphor().getMaxNPParseTree();\nTree AnteTree=inst.getAntecedent().getMaxNPParseTree();\nif (sentenceTree==null) return false;\nif (AnaTree==null) return false;\nif (AnteTree==null) return false;\n\n\n// the structure should be ( * (,) (ANA)) or ( * (,) (ANTE)) -- depends on the ordering, annotation, mention extraction etc\n\n if (AnteTree.parent(sentenceTree)==AnaTree) {\n Tree[] chlds=AnaTree.children();\n Boolean lastcomma=false;\n for (int i=0; i<chlds.length && chlds[i]!=AnteTree; i++) {\n lastcomma=false;\n if (chlds[i].value().equalsIgnoreCase(\",\")) lastcomma=true;\n }\n return lastcomma;\n }\n if (AnaTree.parent(sentenceTree)==AnteTree) {\n\n Tree[] chlds=AnteTree.children();\n Boolean lastcomma=false;\n for (int i=0; i<chlds.length && chlds[i]!=AnaTree; i++) {\n lastcomma=false;\n if (chlds[i].value().equalsIgnoreCase(\",\")) lastcomma=true;\n }\n return lastcomma;\n\n }\n\n return false;\n\n }", "public VerifyAgreementResult checkAgreement(List<Message> store) {\n byte[] pubkey = null;\n String data = \"\";\n for (Message e : store){\n if (e instanceof PrevoteMessage) {\n data = new String(((PrevoteMessage) e).data);\n pubkey = ((PrevoteMessage) e).pubkey;\n } else if (e instanceof VoteMessage) {\n data = new String(((VoteMessage) e).data);\n pubkey = ((VoteMessage) e).pubkey;\n } else {\n logger.error(\"Needs type PrevoteMessage or VoteMessage.\");\n throw new IllegalArgumentException(\"Needs type PrevoteMessage or VoteMessage.\");\n }\n int count = 0;\n// logger.info(\"<<<< data: \" + data + \", \\n pubkey:\" + pubkey);\n for (Message i : store){\n if ( (i instanceof PrevoteMessage && data.equals(new String(((PrevoteMessage) i).data)))\n || (i instanceof VoteMessage && data.equals(new String(((VoteMessage) i).data))) ){\n count++;\n }\n }\n logger.info(\"need count more than \" + muchMoreThenHalf() + \", agreement count: \" + count);\n if (count > muchMoreThenHalf()){\n return new VerifyAgreementResult(true, data, pubkey);\n }\n }\n return new VerifyAgreementResult(false, data, pubkey);\n }", "public CWE getRxa18_SubstanceTreatmentRefusalReason(int rep) { \r\n\t\tCWE retVal = this.getTypedField(18, rep);\r\n\t\treturn retVal;\r\n }", "public void testAddRejectReasons_RejectReasonsContainsDuplicateElementsAccuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[4];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[1] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[2] = new ExpenseEntryRejectReason(2);\r\n rejectReasons[3] = new ExpenseEntryRejectReason(1);\r\n\r\n ExpenseEntryRejectReason[] duplicate = entry.addRejectReasons(rejectReasons);\r\n\r\n // check nothing is added into the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should not be added.\", 0, rejectReasonsMap.size());\r\n\r\n // check the duplicate result\r\n assertNotNull(\"The duplicate result should be correct.\", duplicate);\r\n V1Dot1TestHelper.assertEquals(\"The duplicate result should be correct.\",\r\n new ExpenseEntryRejectReason[] {rejectReasons[0], rejectReasons[1], rejectReasons[3]}, duplicate);\r\n }", "@Test\n public void testRepeatedMatch() {\n assertMetrics(\"fieldCompleteness:1 queryCompleteness:0.6667 segments:1 earliness:1 gaps:1\",\n \"pizza hut pizza\",\"pizza hut\");\n }", "@Test\n public void officeActionCreateWithMismatchingEviCaseNo77777778() {\n // This test case validate the understanding based on which the create\n // office-action api has been developed.\n // ie, while creating an office-action inside a given serial number the\n // incoming association of evidence file has to match\n // the serial number of office-action.\n // In-other words the incoming associated evidence files needs to exists\n // inside the same office-action case number.\n testCreateSampleEviOneForOffActn78();\n testCreateSampleEviTwoForOffActn78();\n testCreateOfficeAction77();\n }", "private boolean decideIfEventShouldBeReportedAsAFailure() {\n \tint value = new Random().nextInt(100);\n \tif (value < TARGET_SUCCESS_RATE) {\n \t\treturn false;\n \t} else {\n \treturn true;\n \t}\n }", "boolean acceptTeacherRecord(TeacherRecord record, String clientId) throws Exception;", "final int getShareOfOne() { return getPlayerId() == 0 ? 1 : 0; }", "protected abstract boolean isSatisfiedBy(Design design, AUndertaking t);", "private boolean useCurrentThread(List<String> dependedKeyList) {\n if (dependedKeyList.size() <= 0) {\n return false;\n }\n for (String deptKey : dependedKeyList) {\n if (dag.getFollowingKey(deptKey).size() > 1) {\n return false;\n }\n }\n return true;\n }", "private static UnaryPredicate bepred() {\n return new UnaryPredicate() {\n public boolean execute(Object o) {\n\tif (o instanceof BulkEstimate) {\n\t return ((BulkEstimate)o).isComplete();\n }\n\treturn false;\n }\n };\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT09() {\n\t\t// PRECONDITIONS\n\t\tArrayList<Integer> a1 = new ArrayList<Integer>();\n\t\ta1.add(100);\n\t\ta1.add(200);\n\t\t\n\t\tArrayList<Integer> a2 = new ArrayList<Integer>();\n\t\ta2.add(150);\n\t\ta2.add(250);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<Collection<?>> doubleElementCollection = new Vector<Collection<?>>();\n\t\tdoubleElementCollection.add(a1);\n\t\tdoubleElementCollection.add(a2);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean sizeIsOne = smc.sizeIsOne(doubleElementCollection);\n\t\tassertFalse(sizeIsOne);\n\t}", "public void checkChannel1(){\n\t\ttools.findAndReport(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.support.v4.view.ViewPager/android.view.View/android.widget.RelativeLayout/android.support.v7.widget.RecyclerView/android.widget.LinearLayout[1]/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.RelativeLayout\", \"No se encuentra el primer en vivo\");\r\n\t}", "@Override\r\n\tpublic int isMinimalCostToReach17Plus()\r\n\t{\r\n\t\treturn 1;\r\n\t}", "public List<Establishment> establishmentCanTrade() {\n List<Establishment> can_take = new ArrayList<> ();\n for(int i = 0; i < Establishments.size(); i++) {\n Establishment check = Establishments.get(i);\n if(check.getName().equals(\"Wheat Field\") || check.getName().equals(\"Bakery\")) {\n if (check.getAvailable() > 1) {\n can_take.add(check);\n }\n } else if(!check.getColor().equals(Card.Color.PURPLE)) {\n can_take.add(check);\n }\n }\n return can_take;\n }", "boolean hasReqardTypeFifteen();", "private void deleteUnwantedFsnAcceptability(Concept c) throws TermServerScriptException {\n\t\tList<Description> fsns = c.getDescriptions(Acceptability.BOTH, DescriptionType.FSN, ActiveState.ACTIVE);\n\t\tif (fsns.size() != 1) {\n\t\t\tString msg = \"Concept has \" + fsns.size() + \" active fsns\";\n\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t} else {\n\t\t\tString msg = \"[\" + fsns.get(0).getDescriptionId() + \"]: \";\n\t\t\tList<LangRefsetEntry> langRefEntries = fsns.get(0).getLangRefsetEntries(ActiveState.BOTH, US_ENG_LANG_REFSET);\n\t\t\tif (langRefEntries.size() != 1) {\n\t\t\t\tif (langRefEntries.size() == 2) {\n\t\t\t\t\tList<LangRefsetEntry> uslangRefEntries = fsns.get(0).getLangRefsetEntries(ActiveState.BOTH, refsets, SCTID_US_MODULE);\n\t\t\t\t\tList<LangRefsetEntry> corelangRefEntries = fsns.get(0).getLangRefsetEntries(ActiveState.BOTH, refsets, SCTID_CORE_MODULE);\n\t\t\t\t\tif (uslangRefEntries.size() > 1 || corelangRefEntries.size() >1) {\n\t\t\t\t\t\tmsg += \"Two acceptabilities in the same module\";\n\t\t\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!uslangRefEntries.get(0).isActive() && corelangRefEntries.get(0).isActive() ) {\n\t\t\t\t\t\t\tlong usET = Long.parseLong(uslangRefEntries.get(0).getEffectiveTime());\n\t\t\t\t\t\t\tlong coreET = Long.parseLong(corelangRefEntries.get(0).getEffectiveTime());\n\t\t\t\t\t\t\tmsg += \"US langrefset entry inactivated \" + (usET > coreET ? \"after\":\"before\") + \" core row activated - \" + usET;\n\t\t\t\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//If the US inactivated AFTER the core activated, then this is the case we need to fix\n\t\t\t\t\t\t\tuslangRefEntries.get(0).delete(deletionEffectiveTime);\n\t\t\t\t\t\t\tString action = \"Deleted US FSN LangRefset entry\";\n\t\t\t\t\t\t\treport(c, c.getFSNDescription(), Severity.MEDIUM, ReportActionType.DESCRIPTION_CHANGE_MADE, action);\n\t\t\t\t\t\t\tc.setModified();\n\t\t\t\t\t\t} if (uslangRefEntries.get(0).isActive() && corelangRefEntries.get(0).isActive() ) {\n\t\t\t\t\t\t\tmsg += \"Both US and Core module lang refset entries are inactive\";\n\t\t\t\t\t\t\treport(c, c.getFSNDescription(), Severity.LOW, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmsg += \"Unexpected configuration of us and core lang refset entries\";\n\t\t\t\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmsg += \"FSN has \" + langRefEntries.size() + \" US acceptability values.\";\n\t\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t\t}\n\t\t\t} else if (!langRefEntries.get(0).getAcceptabilityId().equals(SCTID_PREFERRED_TERM)) {\n\t\t\t\tmsg += \"FSN has an acceptability that is not Preferred.\";\n\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t} else if (!langRefEntries.get(0).isActive()) {\n\t\t\t\tmsg += \"FSN's US acceptability is inactive.\";\n\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t}\n\t\t}\n\t}", "@SuppressFBWarnings(\"BC_UNCONFIRMED_CAST\")\n protected void validateCombinationAny(Combination combination)\n throws SuiteBroken {\n Verifier hasAnyElementVerifier = omobilityIdVerifierFactory.expectResponseToBeNotEmpty();\n hasAnyElementVerifier.setCustomErrorMessage(\"However we received an empty response, no\"\n + \" omobility ids were returned. Some tests will be skipped. To perform more tests\"\n + \" provide parameters that will allow us to receive omobility-ids.\");\n testParameters200(\n combination,\n \"Request one known sending_hei_id, expect 200 OK.\",\n new ParameterList(\n new Parameter(\"sending_hei_id\", this.currentState.sendingHeiId)\n ),\n hasAnyElementVerifier,\n Status.FAILURE\n );\n\n final boolean noOMobilityIdReturned = !hasAnyElementVerifier.getVerificationResult();\n final String noOMobilitySkipReason = \"OMobilities list was empty.\";\n\n testsRequestingReceivingHeiIds(combination,\n \"receiving_hei_id\",\n this.currentState.receivingHeiId,\n \"sending_hei_id\",\n this.currentState.sendingHeiId,\n noOMobilityIdReturned,\n noOMobilitySkipReason,\n omobilityIdVerifierFactory,\n true\n );\n\n testReceivingAcademicYears(combination,\n \"sending_hei_id\",\n this.currentState.sendingHeiId,\n omobilityIdVerifierFactory\n );\n\n // Modified since\n modifiedSinceTests(combination,\n \"sending_hei_id\",\n this.currentState.sendingHeiId,\n true,\n noOMobilityIdReturned,\n noOMobilitySkipReason,\n omobilityIdVerifierFactory\n );\n\n // Permission tests\n // Am I allowed to see omobilities issued by others?\n testParameters200(\n combination,\n \"Request with known sending_hei_id and receiving_hei_id valid but not covered by\"\n + \" the validator, expect empty response.\",\n new ParameterList(\n new Parameter(\"sending_hei_id\", this.currentState.sendingHeiId),\n new Parameter(\"receiving_hei_id\", this.currentState.notPermittedHeiId)\n ),\n omobilityIdVerifierFactory.expectResponseToBeEmpty(),\n Status.WARNING,\n noOMobilityIdReturned,\n noOMobilitySkipReason\n );\n\n // Are others able to see omobilities issued by me?\n testParameters200AsOtherEwpParticipant(\n combination,\n \"Request one known sending_hei_id as other EWP participant, expect 200 OK and empty \"\n + \"response.\",\n new ParameterList(\n new Parameter(\"sending_hei_id\", this.currentState.sendingHeiId)\n ),\n omobilityIdVerifierFactory.expectResponseToBeEmpty(),\n Status.FAILURE,\n noOMobilityIdReturned,\n noOMobilitySkipReason\n );\n }", "public synchronized WebElement fabricCareAccordionLabel() throws Exception {\n\n\t\treturn utils.findElementByLocator(driver, \"PDP_FabricInfoLabel\",\n\t\t\t\t\"| PDP:Fabric Label Accordion Infomation div not present\");\n\t}", "public CWE insertRxa18_SubstanceTreatmentRefusalReason(int rep) throws HL7Exception { \r\n return (CWE) super.insertRepetition(18, rep);\r\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT07() {\n\t\t// PRECONDITIONS\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<Collection<?>> emptyCollection = new ArrayList<Collection<?>>();\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean sizeIsOne = smc.sizeIsOne(emptyCollection);\n\t\tassertFalse(sizeIsOne);\n\t}", "private void checkConditionsToInteroperate(AID client) {\r\n\t\tif (!client.equals(TRUSTED_AID_1))\r\n\t\t\tISOException.throwIt(SW_CLIENT_UNAUTHORISED);\r\n\t\tif (image.isActive())\r\n\t\t\tISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);\r\n\t}", "public void modifyQualifyCheck(Installation install, User user) throws Exception {\r\n // Start UOC\r\n if (install.getAffirmFlag() == 1) {\r\n if (!user.hasPermission(\"PR005_32\")) {\r\n errors.add(\"BSE01715\");\r\n }\r\n }\r\n // End UOC\r\n }", "@Test\n public void testPositiveAllocation() {\n Allocation allocation = new Allocation(\n doctors.get(0),\n surgeryRooms.get(0),\n (new Period(50, 10, 15))\n );\n boolean expected = true;\n boolean actual = hospital.allocate(allocation);\n assertEquals(expected, actual);\n }", "abstract void takeResposibilityForConnectionOfAssociation(com.webobjects.eointerface.EOAssociation association);", "public boolean checkSeatTaken(int[] RC) {\n return seatPlan[RC[0] - 1][RC[1] - 1].getStatus();\n }", "private boolean capacityController(Arrival newArrival) {\n int[] duration = calculateDuration(newArrival);\n for (int i = duration[0]; i <= duration[1]; i++) {\n if (this.parentTrainStation.getMaxCapacity() <= capacityArray[i]) {\n return false;\n }\n }\n for (int i = duration[0]; i <= duration[1]; i++) {\n capacityArray[i]++;\n }\n return true;\n }", "@Test\n\tpublic void testAppliedTargets(){\n\t\ttry{\n\t\t\tchord = new Chord(1, \"4/4\");\n\t\t\tassertEquals(7, chord.getRoot());\n\t\t\tassertEquals(4, chord.getAppliedTarget());\n\n\t\t\tchord = new Chord(1, \"5/5\");\n\t\t\tassertEquals(2, chord.getRoot());\n\t\t\tassertEquals(5, chord.getAppliedTarget());\n\n\t\t\tchord = new Chord(1, \"7/6\");\n\t\t\tassertEquals(5, chord.getRoot());\n\t\t\tassertEquals(6, chord.getAppliedTarget());\n\n\t\t\tchord = new Chord(1, \"4/2\");\n\t\t\tassertEquals(5, chord.getRoot());\n\t\t\tassertEquals(2, chord.getAppliedTarget());\n\n\t\t\tchord = new Chord(6, \"4/7\");\n\t\t\tassertEquals(5, chord.getRoot());\n\t\t\tassertEquals(2, chord.getAppliedTarget());\n\n\t\t\tchord = new Chord(1, \"1\");\n\t\t\tassertEquals(0, chord.getAppliedTarget());\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(e.getMessage());\n\t\t}\n\t}", "public boolean checkpermit(Bwfl_permit_tracking_action act) {\n\n\t\t\n\t\tConnection con = null;\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString selQr = null;\n\t\tString filter = \"\";\n\t\tboolean flag=false;\n\n\t\t\n\t\t\n\t\ttry \n\t\t\n\t\t{\n\t\t\tcon = ConnectionToDataBase.getConnection();\n\n\t\t selQr = \" SELECT a.id, a.district_id, a.bwfl_id, a.unit_id, a.bwfl_type, a.import_fee, a.duty, a.add_duty, a.login_type, \"+\n\t\t\t\t\t\" a.special_fee, a.cr_date, a.vch_approved, a.vch_status, a.deo_time, a.deo_remark, a.deo_user, a.deo_date, \"+\n\t\t\t\t\t\" a.lic_no, a.import_fee_challan_no, a.spcl_fee_challan_no, a.app_id, \"+\n\t\t\t\t\t\" CASE WHEN a.bwfl_type=1 THEN 'BWFL2A' \"+\n\t\t\t\t\t\" WHEN a.bwfl_type=2 THEN 'BWFL2B' \"+\n\t\t\t\t\t\" WHEN a.bwfl_type=3 THEN 'BWFL2C' \"+\n\t\t\t\t\t\" WHEN a.bwfl_type=4 THEN 'BWFL2D' \"+\n\t\t\t\t\t\" WHEN a.bwfl_type=99 THEN 'FL2D' end as type, \"+\n\t\t\t\t\t\" CASE WHEN a.login_type='FL2D' THEN \"+\n\t\t\t\t\t\" (SELECT d.vch_firm_name FROM licence.fl2_2b_2d_20_21 d WHERE a.bwfl_id=d.int_app_id) \"+\n\t\t\t\t\t\" WHEN a.login_type='BWFL' THEN \"+\n\t\t\t\t\t\" (SELECT d.vch_firm_name FROM bwfl.registration_of_bwfl_lic_holder_20_21 d WHERE a.bwfl_id=d.int_id) \"+\n\t\t\t\t\t\" end as vch_firm_name, a.consignor_nm_adrs, \"+\n\t\t\t\t\t\" c.description, a.bottlng_type, a.valid_upto, a.route_road_radio, a.route_detail, \"+\n\t\t\t\t\t\" e.vch_indus_name, e.vch_reg_office_add, a.digital_sign_time, a.digital_sign_date, \"+\n\t\t\t\t\t\" a.print_permit_dt, COALESCE(a.permit_nmbr,'NA')permit_nmbr, COALESCE(a.digital_sign_pdf_name,'NA')digital_sign_pdf_name, \"+\n\t\t\t\t\t\" (SELECT d.vch_state_name FROM public.state_ind d WHERE e.vch_reg_office_state=d.int_state_id::text)as vch_state_name, \"+\n\t\t\t\t\t\" (SELECT SUM(COALESCE(dtl.no_of_cases,0)) FROM bwfl_license.import_permit_dtl_20_21 dtl \"+\n\t\t\t\t\t\" WHERE a.id=dtl.fk_id AND a.app_id=dtl.app_id AND a.login_type=dtl.login_type AND a.district_id=dtl.district_id) as total_cases_detail \"+\n\t\t\t\t\t\" FROM bwfl_license.import_permit_20_21 a, public.district c, public.other_unit_registration_20_21 e \"+\n\t\t\t\t\t\" WHERE a.district_id=c.districtid AND a.unit_id=e.int_app_id_f and CASE WHEN a.bwfl_type=1 THEN vch_indus_type='OUPD' \" + \n\t\t\t\t\t\" WHEN a.bwfl_type=2 THEN vch_indus_type='OUPB' \\r\\n\" + \n\t\t\t\t\t\" WHEN a.bwfl_type=3 THEN vch_indus_type='OUPW' \\r\\n\" + \n\t\t\t\t\t\" WHEN a.bwfl_type=4 THEN vch_indus_type='OUPBU' \\r\\n\" + \n\t\t\t\t\t\" WHEN a.bwfl_type=99 THEN vch_indus_type='IU' end \"+\n\t\t\t\t\t\" and a.login_type='BWFL' \" +\n\t\t\t\t\t\" AND a.deo_date IS NOT NULL AND a.vch_approved='APPROVED' and a.permit_nmbr='\"+act.getPermit_no()+\"' \"+\n\t\t\t\t\t\" ORDER BY a.app_id \";\n\t\t\t\n\n \n\t\t // System.out.println(\"==========query============\"+selQr);\n\t\t \n\t\t\tps = con.prepareStatement(selQr);\n\t\t\t \n\t\t\trs = ps.executeQuery();\n\n\t\t\tif (rs.next()) {\n\n\t\t\t\tact.setAppId(rs.getInt(\"app_id\"));\n\t\t\t\tact.setRequestID(rs.getInt(\"id\"));\n\t\t\t\tact.setBwflId(rs.getInt(\"bwfl_id\"));\n\t\t\t\tact.setUnitID(rs.getInt(\"unit_id\"));\n\t\t\t\tact.setLicenseType(rs.getString(\"type\"));\n\t\t\t\tact.setLicenseNmbr(rs.getString(\"lic_no\"));\n\t\t\t\tact.setDistrictId(rs.getInt(\"district_id\"));\n\t\t\t\tact.setDistrictName(rs.getString(\"description\"));\n\t\t\t\tact.setBwflName(rs.getString(\"vch_firm_name\"));\n\t\t\t\tact.setParentUnitNm(rs.getString(\"vch_indus_name\"));\n\t\t\t\tact.setParentUnitAdrs(rs.getString(\"vch_reg_office_add\"));\n\t\t\t\tact.setParentUnitState(rs.getString(\"vch_state_name\"));\n\t\t\t\tact.setTotalBoxes(rs.getInt(\"total_cases_detail\"));\n\t\t\t\tact.setMapped_unmapped(rs.getString(\"bottlng_type\"));\n\t\t\t\tact.setByRoad_byRoute(rs.getString(\"route_road_radio\"));\n\t\t\t\tact.setRouteDetail(rs.getString(\"route_detail\"));\n\t\t\t\tact.setPermitDate(rs.getDate(\"print_permit_dt\"));\n\t\t\t\tact.setPermitNmbr(rs.getString(\"permit_nmbr\"));\n\t\t\t\tact.setLoginType(rs.getString(\"login_type\"));\n\t\t\t\tact.setCrDate(rs.getDate(\"cr_date\"));\n\t\t\t\tact.setApprovalDate(rs.getDate(\"deo_date\"));\n\t\t\t\tact.setApprovalTym(rs.getString(\"deo_time\"));\n\t\t\t\tact.setApprovalUser(rs.getString(\"deo_user\"));\n\t\t\t\tact.setImportFeeChalanNo(rs.getString(\"import_fee_challan_no\"));\n\t\t\t\tact.setSpclFeeChalanNo(rs.getString(\"spcl_fee_challan_no\"));\n\t\t\t\tact.setConsignorNmAdrs(rs.getString(\"consignor_nm_adrs\"));\n\t\t\t\tact.setPermit_no(rs.getString(\"permit_nmbr\"));\n\n\t\t\t\tSimpleDateFormat date = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t\t\tif (rs.getDate(\"cr_date\") != null) {\n\t\t\t\t\tString appDate = date.format(Utility.convertSqlDateToUtilDate(rs.getDate(\"cr_date\")));\n\t\t\t\t\tact.setAppDate(appDate);\n\t\t\t\t} else {\n\t\t\t\t\tact.setAppDate(\"\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (rs.getDate(\"valid_upto\") != null) {\n\t\t\t\t\tString validDate = date.format(Utility.convertSqlDateToUtilDate(rs.getDate(\"valid_upto\")));\n\t\t\t\t\tact.setValidUptoDt(validDate);\n\t\t\t\t} else {\n\t\t\t\t\tact.setValidUptoDt(\"Not Filled\");\n\t\t\t\t}\n\t\t\t\tflag=true ;\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t\n\t\t\t{\n\t\t\t\tact.reset();\n\t\t\t\tflag=false ;\n\t\t\t\t\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_ERROR,\n\t\t\t\t\t\t\" This is not a Valid Permit Number !!\",\" This is not a Valid Permit Number!!\"));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tFacesContext.getCurrentInstance().addMessage(null,new FacesMessage(e.getMessage(), e.getMessage()));\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (ps != null)\n\t\t\t\t\tps.close();\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t\tif (con != null)\n\t\t\t\t\tcon.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn flag;\n\n\t}", "public void testGetMultiplicity_1_accuracy() {\n instance.setMultiplicity(multiplicity);\n assertTrue(\"The multiplicity is not set properly.\", multiplicity == instance.getMultiplicity());\n }", "boolean hasCampaignExperiment();", "@Test\n public void testAssocOneWithNullAssoc() {\n\n Database server = DB.getDefault();\n\n final ProductConfiguration pc = new ProductConfiguration();\n pc.setName(\"PC1\");\n server.save(pc);\n\n CalculationResult r = new CalculationResult();\n final Double charge = 100.0;\n r.setCharge(charge);\n r.setProductConfiguration(pc);\n r.setGroupConfiguration(null);\n server.save(r);\n }", "public CWE getSubstanceTreatmentRefusalReason(int rep) { \r\n\t\tCWE retVal = this.getTypedField(18, rep);\r\n\t\treturn retVal;\r\n }", "@Override\n public boolean predicate2(Object dm, Designer dsgr) {\n if (!(Model.getFacade().isAClassifier(dm))) {\n return NO_PROBLEM;\n }\n if (!(Model.getFacade().isPrimaryObject(dm))) {\n return NO_PROBLEM;\n }\n\n // If the classifier does not have a name,\n // then no problem - the model is not finished anyhow.\n if ((Model.getFacade().getName(dm) == null)\n\t || (\"\".equals(Model.getFacade().getName(dm)))) {\n return NO_PROBLEM;\n\t}\n\n // Abstract elements do not necessarily require associations\n if (Model.getFacade().isAGeneralizableElement(dm)\n\t && Model.getFacade().isAbstract(dm)) {\n return NO_PROBLEM;\n }\n\n // Types can probably have associations, but we should not nag at them\n // not having any.\n // utility is a namespace collection - also not strictly required\n // to have associations.\n if (Model.getFacade().isType(dm)) {\n return NO_PROBLEM;\n }\n if (Model.getFacade().isUtility(dm)) {\n return NO_PROBLEM;\n }\n\n // See issue 1129: If the classifier has dependencies,\n // then mostly there is no problem. \n if (Model.getFacade().getClientDependencies(dm).size() > 0) {\n return NO_PROBLEM;\n }\n if (Model.getFacade().getSupplierDependencies(dm).size() > 0) {\n return NO_PROBLEM;\n }\n \n // special cases for use cases\n // Extending use cases and use case that are being included are\n // not required to have associations.\n if (Model.getFacade().isAUseCase(dm)) {\n Object usecase = dm;\n Collection includes = Model.getFacade().getIncludes(usecase);\n if (includes != null && includes.size() >= 1) {\n return NO_PROBLEM;\n }\n Collection extend = Model.getFacade().getExtends(usecase);\n if (extend != null && extend.size() >= 1) {\n return NO_PROBLEM;\n }\n }\n \n \n\n //TODO: different critic or special message for classes\n //that inherit all ops but define none of their own.\n\n if (findAssociation(dm, 0)) {\n return NO_PROBLEM;\n }\n return PROBLEM_FOUND;\n }", "boolean isCreditCardIsSingleAvailablePayment();" ]
[ "0.49127465", "0.45975965", "0.45736468", "0.45448095", "0.4443815", "0.44344574", "0.44329944", "0.44235283", "0.44119126", "0.44003266", "0.43972185", "0.43915725", "0.43562317", "0.43348405", "0.4331281", "0.43231145", "0.4318553", "0.43159977", "0.43062946", "0.43055588", "0.43045557", "0.4303439", "0.4300415", "0.42845324", "0.4273606", "0.42654777", "0.42642766", "0.42514718", "0.42358124", "0.42327783", "0.4224354", "0.4223165", "0.4221781", "0.42163813", "0.42159188", "0.42127454", "0.42091668", "0.41975313", "0.41973206", "0.41919464", "0.41887543", "0.41876832", "0.41851607", "0.4177764", "0.4172168", "0.41677815", "0.41671485", "0.41562247", "0.414314", "0.41417262", "0.4133632", "0.41310027", "0.41266572", "0.41179162", "0.41144788", "0.41094714", "0.4105946", "0.4102629", "0.40966055", "0.40951195", "0.40915683", "0.4090693", "0.40865174", "0.4085655", "0.40830448", "0.40819415", "0.4081576", "0.4081423", "0.40813714", "0.40812254", "0.4078431", "0.40775743", "0.40752083", "0.40721288", "0.40720436", "0.40713704", "0.4071233", "0.4067713", "0.40668023", "0.40664554", "0.4063523", "0.4061793", "0.4059389", "0.4057746", "0.4055925", "0.40544382", "0.40538067", "0.40527064", "0.40488762", "0.40485293", "0.4047228", "0.40435067", "0.4041866", "0.4039443", "0.4034075", "0.40337458", "0.4032335", "0.40294012", "0.40287802", "0.4025231", "0.40251908" ]
0.0
-1
CCD Policy Activity SHALL contain exactly one [1..1] performer (CONF56), such that.
IPayerEntry setPayerEntity(IPayerEntity value);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int isPrivacyModelFulfilled(Transformation<?> transformation, HashGroupifyEntry entry) {\n \n // Check minimal group size\n if (minimalClassSize != Integer.MAX_VALUE && entry.count < minimalClassSize) {\n return 0;\n }\n \n // Check other criteria\n // Note: The d-presence criterion must be checked first to ensure correct handling of d-presence with tuple suppression.\n // This is currently ensured by convention. See ARXConfiguration.getCriteriaAsArray();\n for (int i = 0; i < classBasedCriteria.length; i++) {\n if (!classBasedCriteria[i].isAnonymous(transformation, entry)) {\n return i + 1;\n }\n }\n return -1;\n }", "public boolean affordCard() {\n \t\treturn (FREE_BUILD || getResources(Type.WOOL) >= 1\n \t\t\t\t&& getResources(Type.GRAIN) >= 1 && getResources(Type.ORE) >= 1);\n \t}", "@Test\n\tpublic void activeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfActiveHires() == 1);\n\t}", "public boolean isChiefCaptured(){\n Chief chief = establishChief();\n return chief == null;\n }", "@Test\n public void CardRequirement1() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(1);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.YELLOW, 0, null, null);\n DevelopmentCard card2 = new DevelopmentCard(2, Color.GREEN, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n p.getDevelopmentSlot().addCard(card2, 1);\n c.emptyQueue();\n\n assertTrue(am.activateLeaderCard(p, message));\n\n assertTrue(l2.isEnabled());\n\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_UPD_Player).count());\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_NOTIFICATION).count());\n assertEquals(2, c.messages.size());\n\n }", "void decideContinuity(Card curr_card) {\n if (curr_card.getTRIPS().size() != 0) { // if trips is not empty, then can get the last item and decide if continuous\n int last_index = curr_card.getTRIPS().size() - 1;\n WholeTrip last_whole_trip = (curr_card.getTRIPS().get(last_index));\n Trip last_trip = last_whole_trip.getWHOLE_TRIP().get(last_whole_trip.getWHOLE_TRIP().size() - 1); // get the last trip\n // evaluate if continuous\n this.isContinuous = START_TIME.timeInterval(last_trip.endTime) <= 120 &&\n last_trip.endStation.equals(START_STATION);\n }\n }", "if (charge == adhocTicket.getCharge()) {\n System.out.println(\"Charge is passed\");\n }", "public static int getCorrectConsicutiveOnes(int[] arr) {\n int count = 0;\n int maxCount = 0;\n for (int i = 0; i < arr.length; i++) {\n if (arr[i] == 1) {\n count++;\n } else {\n if (maxCount < count) {\n maxCount = count;\n }\n count = 0;\n }\n }\n return maxCount > count ? maxCount : count;\n }", "private void comprobarActividades(List<DetectedActivity> actividadesProvables){\n for( DetectedActivity activity : actividadesProvables) {\n //preguntamos por el tipo\n switch( activity.getType() ) {\n case DetectedActivity.IN_VEHICLE: {\n //preguntamos por la provabilidad de que sea esa actividad\n //si es mayor de 75 (de cien) mostramos un mensaje\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"En vehiculo\");\n }\n break;\n }\n case DetectedActivity.ON_BICYCLE: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"En bici\");\n }\n break;\n }\n case DetectedActivity.ON_FOOT: {\n //este lo dejamos vacio por que va implicito en correr y andar\n break;\n }\n case DetectedActivity.RUNNING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Corriendo\");\n }\n break;\n }\n case DetectedActivity.WALKING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Andando\");\n }\n break;\n }\n case DetectedActivity.STILL: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Quieto\");\n }\n break;\n }\n case DetectedActivity.TILTING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Tumbado\");\n }\n break;\n }\n\n case DetectedActivity.UNKNOWN: {\n //si es desconocida no decimos nada\n break;\n }\n }\n }\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT08() {\n\t\t// PRECONDITIONS\n\t\tArrayList<Integer> a = new ArrayList<Integer>();\n\t\ta.add(100);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<Collection<?>> singleElementCollection = new HashSet<Collection<?>>();\n\t\tsingleElementCollection.add(a);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean sizeIsOne = smc.sizeIsOne(singleElementCollection);\n\t\tassertTrue(sizeIsOne);\n\t}", "boolean hasIsPerformOf();", "private Bool checkCreditReviewDate(Person person) {\n\t\tBool holdProcessSwitch = Bool.FALSE;\n\t\tQuery<Date> query = createQuery(CmDelinquencyProcessConstant.PER_COL_FROM_PERSON_QUERY.toString(), \"CmHoldDelinquencyProcessCriteriaDueToCreditReviewDtAlgComp_Impl\");\n\t\tquery.bindEntity(\"person\", person);\n\t\tquery.addResult(\"postponeCreditRevieDate\", \"PERCOL.postponeCreditReviewUntil\");\n\t\tDate postponeCreditRevieDate = query.firstRow();\n\t\t\n\t\t// If credit review date is after process date time\n\t\tif (notNull(postponeCreditRevieDate) && postponeCreditRevieDate.isAfter(getProcessDateTime().getDate())) {\n\t\t\tholdProcessSwitch = Bool.TRUE;\n\t\t\n\t\t\t// Fetch existing delinquency process log for particular char value\n\t\t\tQuery<QueryResultRow> existingLogQuery = createQuery(CmHoldDelinquencyProcessConstants.FETCH_EXISTING_DEL_PROC_LOG.toString(), \"CmHoldDelinquencyProcessCriteriaDueToCreditReviewDtAlgComp_Impl\");\n\t\t\texistingLogQuery.bindId(\"delProcId\", delinquencyProcessId);\n\t\t\texistingLogQuery.bindStringProperty(\"boStatus\", CmDelinquencyProcess.properties.status, delinquencyProcessId.getEntity().getStatus());\n\t\t\texistingLogQuery.bindId(\"msgCategoryNumber\", MessageRepository.addDelProcLogForCharVal(getPostponeCreditReviewDateHoldReason()).getMessageId().getMessageCategoryId());\n\t\t\texistingLogQuery.bindBigInteger(\"msgNumber\", MessageRepository.addDelProcLogForCharVal(getPostponeCreditReviewDateHoldReason()).getMessageId().getMessageNumber());\n\t\t\texistingLogQuery.bindEntity(\"charType\", getHoldReasonCharacteristicType());\n\t\t\texistingLogQuery.bindStringProperty(\"charValue\", CmDelinquencyProcessCharacteristic.properties.characteristicValue, getPostponeCreditReviewDateHoldReason());\n\t\t\texistingLogQuery.addResult(\"delProcessId\", \"DPL.id.delinquencyProcess.id\");\n\t\t\texistingLogQuery.addResult(\"sequence\", \"DPL.id.sequence\");\n\t\t\t\n\t\t\t// If no existing log entry found\n\t\t\tif(existingLogQuery.list().isEmpty()){\n\t\t\t\t\n\t\t\t\t// No existing log entry add new log entry \n\t\t\t\tCharacteristicValue_Id charValId = new CharacteristicValue_Id(getHoldReasonCharacteristicType(), getPostponeCreditReviewDateHoldReason());\n\t\t\t\tMaintenanceObjectLogHelper<CmDelinquencyProcess, CmDelinquencyProcessLog> logHelper = new MaintenanceObjectLogHelper<CmDelinquencyProcess, CmDelinquencyProcessLog>(\n\t\t\t\t\t\tdelinquencyProcessId.getEntity().getBusinessObject().getMaintenanceObject(), delinquencyProcessId.getEntity());\n\t\t\t\tlogHelper.addLogEntry(LogEntryTypeLookup.constants.SYSTEM, MessageRepository.addDelProcLogForCharVal(charValId.getEntity().fetchLanguageDescription()), null, charValId.getEntity());\n\t\t\t} \n\t\t\t\n\t\t}\n\t\t\n\t\treturn holdProcessSwitch;\n\t}", "@Test\n public void minimumValidClaim() {\n claim.setClaimId(EXPECTED_CLAIM_ID);\n claim.setDcn(\"dcn\");\n claim.setIntermediaryNb(\"inter\");\n claim.setHicNo(\"hicn\");\n claim.setCurrStatus('T');\n claim.setCurrLoc1('M');\n claim.setCurrLoc2(\"9000\");\n claim.setLastUpdated(clock.instant());\n claimBuilder\n .setRdaClaimKey(\"claim_id\")\n .setDcn(\"dcn\")\n .setIntermediaryNb(\"inter\")\n .setHicNo(\"hicn\")\n .setCurrStatusEnum(FissClaimStatus.CLAIM_STATUS_RTP)\n .setCurrLoc1Enum(FissProcessingType.PROCESSING_TYPE_MANUAL)\n .setCurrLoc2Enum(FissCurrentLocation2.CURRENT_LOCATION_2_CABLE);\n changeBuilder\n .setSeq(MIN_SEQUENCE_NUM)\n .setChangeType(ChangeType.CHANGE_TYPE_INSERT)\n .setClaim(claimBuilder.build());\n assertChangeMatches(RdaChange.Type.INSERT);\n }", "@Test\n\tpublic void testCheckCoflictOneDay() {\n\t\tActivity a1 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"MWF\", 1330, 1445);\n\t\tActivity a2 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"TWH\", 1330, 1445);\n\t\ttry {\n\t\t a1.checkConflict(a2);\n\t\t fail(); //ConflictException should have been thrown, but was not.\n\t\t } catch (ConflictException e) {\n\t\t //Check that the internal state didn't change during method call.\n\t\t assertEquals(\"MWF 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"TWH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t }\n\t}", "@Test\n public void CardRequirement2() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(1);\n\n LeaderCard l3 = new LeaderCard(4,\n new CardRequirements(Map.of(Color.YELLOW, new ReqValue(1, 2))),\n new Production(Resource.SHIELD));\n ArrayList<LeaderCard> cards = new ArrayList<>();\n cards.add(l1);\n cards.add(l3);\n p.associateLeaderCards(cards);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.GREEN, 0, null, null);\n DevelopmentCard card2 = new DevelopmentCard(2, Color.YELLOW, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n p.getDevelopmentSlot().addCard(card2, 1);\n c.emptyQueue();\n\n assertTrue(am.activateLeaderCard(p, message));\n\n assertTrue(l3.isEnabled());\n\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_NOTIFICATION).count());\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_UPD_Player).count());\n assertEquals(2, c.messages.size());\n }", "org.hl7.fhir.ResourceReference[] getPerformerArray();", "@Test\n\tvoid attributeCardinality() {\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..*]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..0]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..1]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"{\" +\n\t\t\t\t\t\t\t\t\"[1..1]\" + FINDING_SITE + \" != <<\" + PULMONARY_VALVE_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS + \"\" +\n\t\t\t\t\t\t\t\t\"}\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + FINDING_SITE + \" != <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t}", "private List<CustStmtRecord> validateDuplicate (final List<CustStmtRecord> custStmtRecords) {\n\t\tlog.info(\"Entering {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\tfinal List<CustStmtRecord> duplicateReference = custStmtRecords\n\t\t\t\t.parallelStream()\n\t\t\t\t\t.filter(e -> Collections.frequency(custStmtRecords, e) > 1)\n\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\t\t;\n\t\t\t\n\t\tlog.info(\"duplicateReference {}\", duplicateReference);\n\t\t\t\n\t\tlog.info(\"Exiting {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\treturn duplicateReference;\n\t}", "private boolean estPlein() {\n return (nbAssoc == associations.length);\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.382 -0400\", hash_original_method = \"65C602B599F92E5ADD878013A9F7BBB1\", hash_generated_method = \"5F9E494B1283DBF2B118508DCA034E91\")\n \n public static boolean startSupplicant(){\n \tdouble taintDouble = 0;\n \n \treturn ((taintDouble) == 1);\n }", "final void checkForComodification() {\n\t}", "int evaluate(ISeqActivity iThisActivity) {\n\n\t\tif (_Debug) {\n\t\t\tSystem.out.println(\" :: SeqConditionSet --> BEGIN - evaluate\");\n\t\t\tSystem.out.println(\" :: --> RETRY == \" + mRetry);\n\t\t}\n\n\t\tint result = EVALUATE_UNKNOWN;\n\n\t\t// Make sure we have a valid target activity \n\t\tif (iThisActivity != null) {\n\n\t\t\tif (_Debug) {\n\t\t\t\tSystem.out.println(\" ::--> Set - \" + mCombination);\n\n\t\t\t\tif (mConditions != null) {\n\t\t\t\t\tSystem.out.println(\" ::--> [\" + mConditions.size() + \"]\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\" ::--> NULL\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (mConditions != null) {\n\t\t\t\t// Evaluate this rule's conditions\n\t\t\t\tif (mCombination.equals(COMBINATION_ALL)) {\n\t\t\t\t\tresult = EVALUATE_TRUE;\n\n\t\t\t\t\tfor (int i = 0; i < mConditions.size(); i++) {\n\t\t\t\t\t\tint thisEval = evaluateCondition(i, (SeqActivity) iThisActivity);\n\n\t\t\t\t\t\tif (thisEval != EVALUATE_TRUE) {\n\t\t\t\t\t\t\tresult = thisEval;\n\n\t\t\t\t\t\t\t// done with this evaluation\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (mCombination.equals(COMBINATION_ANY)) {\n\t\t\t\t\t// Assume we have enought information to evaluate\n\t\t\t\t\tresult = EVALUATE_FALSE;\n\n\t\t\t\t\tfor (int i = 0; i < mConditions.size(); i++) {\n\t\t\t\t\t\tint thisEval = evaluateCondition(i, (SeqActivity) iThisActivity);\n\n\t\t\t\t\t\tif (thisEval == EVALUATE_TRUE) {\n\t\t\t\t\t\t\tresult = EVALUATE_TRUE;\n\n\t\t\t\t\t\t\t// done with this evaluation\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if (thisEval == EVALUATE_UNKNOWN) {\n\t\t\t\t\t\t\t// Something is missing...\n\t\t\t\t\t\t\tresult = EVALUATE_UNKNOWN;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Reset the 'retry' flag\n\t\tmRetry = false;\n\n\t\tif (_Debug) {\n\t\t\tSystem.out.println(\" ::--> \" + result);\n\t\t\tSystem.out.println(\" :: SeqConditionSet --> END - evaluate\");\n\t\t}\n\n\t\treturn result;\n\n\t}", "private boolean isExactlyOneCEO(List<Employee> employees) {\n //check if exactly one employee doesn't have a manager (The CEO)\n return employees.stream().filter(e -> e.getManagerId() == null).count() == 1;\n }", "public static void findSingleElement(int[] arr) {\n int distinct = 0;\n for (int i = 0; i < arr.length; i++) {\n for (int j = 0; j < arr.length; j++) {\n if (arr[i] == arr[j] )\n distinct++;\n }\n if(distinct==1)\n System.out.println(\"Element which appears only once in array is : \"+arr[i]);\n distinct = 0;\n }\n }", "private boolean consistencyCheckC1Constraints(double[][] xResults) {\n\t\tint n = mExplicitMDP.getNumStates();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tdouble outxValue = GRBSolverUtils.getOutValue(i, xResults, mExplicitMDP);\n\t\t\tdouble inxValue = GRBSolverUtils.getInValue(i, xResults, mExplicitMDP);\n\t\t\tboolean satisfied = GRBSolverUtils.approximatelyEqual(outxValue, inxValue,\n\t\t\t\t\tmSettings.getFeasibilityTolerance());\n\n\t\t\tif (!satisfied) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private boolean firstMilestoneAccomplished()\n {\n if(\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4)\n )\n return true;\n else\n return false;\n }", "public Participant getResolvedPerformer()\n {\n return null;\n }", "public void testValidateSubjectPrimaryAssociationsDuplicate() throws Exception {\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n List subjectPrimaryAssociations = positionWrapperBean.getSubjectPrimaryAssociations();\n for (int i = 0; i < subjectPrimaryAssociations.size(); i++) {\n ArtefactAssociationWrapperBean artefactAssociationWrapperBean = (ArtefactAssociationWrapperBean) subjectPrimaryAssociations.get(i);\n artefactAssociationWrapperBean.setSourceId(new Long(12));\n artefactAssociationWrapperBean.setQualifierId(new Long(399));\n }\n // should produce a duplicate assocition error\n DataBinder binder = new DataBinder(positionWrapperBean, ZynapDefaultFormController.DEFAULT_COMMAND_NAME);\n Errors errors = binder.getBindingResult();\n positionValidator.validateSubjectPrimaryAssociations(positionWrapperBean, errors);\n assertEquals(1, errors.getErrorCount());\n FieldError error = errors.getFieldError(FIRST_PRIMARY_ASSOCIATION_SOURCE_FIELD);\n assertEquals(\"error.association.target.unique.required\", error.getCode());\n }", "@Override\n public boolean isUsableEffectOne() {\n return getEffectsEnable()[0] && getUsableEffect()[0] && ((TargetSquareRequestEvent) getTargetEffectOne()).getPossibleTargetsX().length != 0;\n }", "@Test\n public void testClaimPrimaryPayerCode() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setPrimaryPayerCodeEnum,\n RdaFissClaim::getPrimaryPayerCode,\n FissPayersCode.PAYERS_CODE_AUTO_NO_FAULT,\n \"D\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setPrimaryPayerCodeUnrecognized,\n RdaFissClaim::getPrimaryPayerCode,\n RdaFissClaim.Fields.primaryPayerCode,\n 1);\n }", "public void validateRpd15s1()\n {\n // This guideline cannot be automatically tested.\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.392 -0400\", hash_original_method = \"A08E67D255841067B3F35F55844EB68A\", hash_generated_method = \"A24C6CC15E92DDB51210D5F314E426E4\")\n \n public static boolean connectToSupplicant(){\n \tdouble taintDouble = 0;\n \n \treturn ((taintDouble) == 1);\n }", "org.hl7.fhir.ResourceReference getPerformerArray(int i);", "private boolean isIllegalTokenCollectionForRuleOne(int elapsedTimeInSeconds) {\n int interval = elapsedTimeInSeconds / 10;\n int intervalModTwo = interval % 2;\n return intervalModTwo == 0;\n }", "public final ManchesterOWLSyntaxAutoComplete.cardinalityRestriction_return cardinalityRestriction() {\n ManchesterOWLSyntaxAutoComplete.cardinalityRestriction_return retval = new ManchesterOWLSyntaxAutoComplete.cardinalityRestriction_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxAutoComplete.unary_return p = null;\n ManchesterOWLSyntaxAutoComplete.expression_return filler = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:238:1:\n // ( ^( CARDINALITY_RESTRICTION MIN i= INTEGER p= unary (filler=\n // expression )? ) | ^( CARDINALITY_RESTRICTION MAX i= INTEGER p=\n // unary (filler= expression )? ) | ^( CARDINALITY_RESTRICTION\n // EXACTLY i= INTEGER p= unary (filler= expression )? ) )\n int alt14 = 3;\n int LA14_0 = input.LA(1);\n if (LA14_0 == CARDINALITY_RESTRICTION) {\n int LA14_1 = input.LA(2);\n if (LA14_1 == DOWN) {\n switch (input.LA(3)) {\n case MIN: {\n alt14 = 1;\n }\n break;\n case MAX: {\n alt14 = 2;\n }\n break;\n case EXACTLY: {\n alt14 = 3;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 14,\n 2, input);\n throw nvae;\n }\n } else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 14, 1, input);\n throw nvae;\n }\n } else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 14, 0, input);\n throw nvae;\n }\n switch (alt14) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:239:5:\n // ^( CARDINALITY_RESTRICTION MIN i= INTEGER p= unary (filler=\n // expression )? )\n {\n match(input, CARDINALITY_RESTRICTION,\n FOLLOW_CARDINALITY_RESTRICTION_in_cardinalityRestriction719);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, MIN, FOLLOW_MIN_in_cardinalityRestriction722);\n if (state.failed) {\n return retval;\n }\n match(input, INTEGER, FOLLOW_INTEGER_in_cardinalityRestriction727);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_cardinalityRestriction733);\n p = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:239:65:\n // (filler= expression )?\n int alt11 = 2;\n int LA11_0 = input.LA(1);\n if (LA11_0 >= IDENTIFIER && LA11_0 <= ENTITY_REFERENCE\n || LA11_0 >= DISJUNCTION && LA11_0 <= NEGATED_EXPRESSION\n || LA11_0 >= SOME_RESTRICTION && LA11_0 <= ONE_OF\n || LA11_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n alt11 = 1;\n }\n switch (alt11) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:239:65:\n // filler= expression\n {\n pushFollow(FOLLOW_expression_in_cardinalityRestriction740);\n filler = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(filler == null ? p.node.getCompletions()\n : filler.node.getCompletions());\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:243:6:\n // ^( CARDINALITY_RESTRICTION MAX i= INTEGER p= unary (filler=\n // expression )? )\n {\n match(input, CARDINALITY_RESTRICTION,\n FOLLOW_CARDINALITY_RESTRICTION_in_cardinalityRestriction755);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, MAX, FOLLOW_MAX_in_cardinalityRestriction758);\n if (state.failed) {\n return retval;\n }\n match(input, INTEGER, FOLLOW_INTEGER_in_cardinalityRestriction762);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_cardinalityRestriction768);\n p = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:243:65:\n // (filler= expression )?\n int alt12 = 2;\n int LA12_0 = input.LA(1);\n if (LA12_0 >= IDENTIFIER && LA12_0 <= ENTITY_REFERENCE\n || LA12_0 >= DISJUNCTION && LA12_0 <= NEGATED_EXPRESSION\n || LA12_0 >= SOME_RESTRICTION && LA12_0 <= ONE_OF\n || LA12_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n alt12 = 1;\n }\n switch (alt12) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:243:65:\n // filler= expression\n {\n pushFollow(FOLLOW_expression_in_cardinalityRestriction775);\n filler = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(filler == null ? p.node.getCompletions()\n : filler.node.getCompletions());\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:247:6:\n // ^( CARDINALITY_RESTRICTION EXACTLY i= INTEGER p= unary\n // (filler= expression )? )\n {\n match(input, CARDINALITY_RESTRICTION,\n FOLLOW_CARDINALITY_RESTRICTION_in_cardinalityRestriction794);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXACTLY, FOLLOW_EXACTLY_in_cardinalityRestriction797);\n if (state.failed) {\n return retval;\n }\n match(input, INTEGER, FOLLOW_INTEGER_in_cardinalityRestriction802);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_cardinalityRestriction809);\n p = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:247:71:\n // (filler= expression )?\n int alt13 = 2;\n int LA13_0 = input.LA(1);\n if (LA13_0 >= IDENTIFIER && LA13_0 <= ENTITY_REFERENCE\n || LA13_0 >= DISJUNCTION && LA13_0 <= NEGATED_EXPRESSION\n || LA13_0 >= SOME_RESTRICTION && LA13_0 <= ONE_OF\n || LA13_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n alt13 = 1;\n }\n switch (alt13) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:247:71:\n // filler= expression\n {\n pushFollow(FOLLOW_expression_in_cardinalityRestriction816);\n filler = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(filler == null ? p.node.getCompletions()\n : filler.node.getCompletions());\n }\n }\n break;\n }\n if (state.backtracking == 1) {\n retval.node = (ManchesterOWLSyntaxTree) retval.start;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "public Task createTask_OnePotentialOwner() throws HTException {\n Task task = services.createTask(\"Task1\", null, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><ClaimApprovalRequest><cust><firstname>witek</firstname></cust><amount>1</amount></ClaimApprovalRequest>\");\n org.junit.Assert.assertTrue(task.getPotentialOwners().size() == 1);\n return task;\n }", "public boolean action_allowed(){\r\n\t\treturn action_holds.size()==0;\r\n\t}", "public void verifyNoMatching(AcBatchFlight e)\n {\n }", "@Test public void testPositive() {\n\t\tassertEquals(expected, new AtMostOne(data).process(getClass()));\n\t}", "static final /* synthetic */ boolean m114833a(Activity activity) {\n if (!(activity instanceof C41387m) || !((C41387m) activity).mo88338b()) {\n return false;\n }\n return true;\n }", "@Override\n\tpublic boolean deviceHasActiveCoupons(String deviceUUID) throws ASException {\n\t\tDeviceInfo di = deviceInfoDao.get(deviceUUID, true);\n\t\tif(StringUtils.hasText(di.getUserId())) {\n\t\t\tDate now = new Date();\n\t\t\tList<Integer> redeemStatus = Arrays.asList(new Integer[] {CampaignActivity.REDEEM_STATUS_DELIVERED, CampaignActivity.REDEEM_STATUS_ACCEPTED});\n\t\t\tList<CampaignActivity> list = caDao.getUsingUserAndRedeemStatusAndRange(di.getUserId(), redeemStatus, null, null);\n\t\t\tfor( CampaignActivity obj : list ) {\n\t\t\t\tif( obj.getLimitDateTime().after(now)) return true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public void testAddRejectReasons_RejectReasonsContainsManyDuplicateElementsAccuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[4];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[1] = new ExpenseEntryRejectReason(3);\r\n rejectReasons[2] = new ExpenseEntryRejectReason(3);\r\n rejectReasons[3] = new ExpenseEntryRejectReason(2);\r\n entry.addRejectReason(new ExpenseEntryRejectReason(1));\r\n\r\n ExpenseEntryRejectReason[] duplicate = entry.addRejectReasons(rejectReasons);\r\n\r\n // check nothing is added into the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should not be added.\", 1, rejectReasonsMap.size());\r\n\r\n // check the duplicate result\r\n assertNotNull(\"The duplicate result should be correct.\", duplicate);\r\n V1Dot1TestHelper.assertEquals(\"The duplicate result should be correct.\",\r\n new ExpenseEntryRejectReason[] {rejectReasons[0], rejectReasons[1], rejectReasons[2]}, duplicate);\r\n }", "void setPerformerArray(org.hl7.fhir.ResourceReference[] performerArray);", "@Override\r\n public int build() throws CannotPerformAction {\r\n if(hand.getCards().size() > 1) throw new AmbigousAction(\"Choose the card you'd like to discard\");\r\n this.field.build();\r\n return 1;\r\n }", "boolean multiplicity(DiagnosticChain diagnostics, Map<Object, Object> context);", "private Chief establishChief() {\n for(Piece piece : getActivePieces()){\n if(piece.getPieceType().isChief()){\n return (Chief)piece;\n }\n }\n return null;\n }", "private boolean isPrimaryTraitCheapened(Charm charm) {\n TraitType traitType = new TraitTypeUtils().getPrimaryTraitType(charm);\n if (AbilitiesModelFetcher.fetch(hero).contains(traitType)) {\n \treturn AbilitiesModelFetcher.fetch(hero).getState(traitType).isCheapened();\n }\n return false;\n }", "@Test\n public void testDuplicateConditionsAndFulfillments() {\n final ThresholdSha256Condition condition = ThresholdSha256Condition.from(\n 2, Lists\n .newArrayList(subcondition1, subcondition1, subcondition2, subcondition3)\n );\n\n // Escrow Only (insufficient)\n ThresholdSha256Fulfillment fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition2, subcondition3),\n Lists.newArrayList(subfulfillment1)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(false));\n\n // Escrow Only (sufficient)\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition2, subcondition3),\n Lists.newArrayList(subfulfillment1, subfulfillment1)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Escrow+Party2\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition3),\n Lists.newArrayList(subfulfillment1, subfulfillment2)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Escrow+Party3\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition2),\n Lists.newArrayList(subfulfillment1, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Party2+Party3\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition1),\n Lists.newArrayList(subfulfillment2, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Party2+Party3 (w\\o escrow condition)\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(),\n Lists.newArrayList(subfulfillment2, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(false));\n }", "private AttestationOccurrence(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public boolean isContinuingEducationPassed(CapIDModel capID) throws AAException, RemoteException;", "public boolean isApplicable(DevelopmentCard card) {\n\t\treturn (this.familyMember.getActionValue()\n\t\t\t\t+ this.getPlayer().getBonuses().getActivationVariation(card.getCardType())\n\t\t\t\t+ paidServants >= card.getActivationCost());\n\t}", "private void checkAtLeastOneRuleIsSelected() {\n\t\tsufficientRulesSelected = false;\n\t\tint checked = 0;\n\t\tControl[] controlArray = rulesGroup.getChildren();\n\n\t\tfor (Control elem : controlArray) {\n\t\t\tif (elem instanceof Button) {\n\t\t\t\tif (((Button) elem).getSelection()) {\n\t\t\t\t\tchecked++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (checked >= 1)\n\t\t\tsufficientRulesSelected = true;\n\t\tupdateFinishButton();\n\t}", "int cardinality();", "private ShouldContainsOnlyOnce(Set<?> notOnlyOnce, Object actual, Object expected,\n ComparisonStrategy comparisonStrategy) {\n super(\"%nExpecting actual:%n %s%nto contain only once:%n %s%nbut some elements were found more than once:%n %s%n%s\",\n actual, expected, notOnlyOnce, comparisonStrategy);\n }", "private boolean isAppropriated(int[] arr) {\n boolean is_correct = false;\n for (int i : arr) {\n if (i > 9999) {\n is_correct = true;\n } else\n is_correct = false;\n }\n return is_correct;\n }", "@Override\n\tpublic int cardinality() {\n\t\treturn 2;\n\t}", "public static boolean m37109aC(Activity activity) {\n AppMethodBeat.m2504i(49000);\n if (C24143a.m37112aE(activity) != null) {\n AppMethodBeat.m2505o(49000);\n return true;\n }\n AppMethodBeat.m2505o(49000);\n return false;\n }", "public void buildEssentialPrimeImplicant(){ \n //int count = 0; \n // For loop ticks all the essential prime Implicants\n for(Entry<Integer, Boolean> mint: mintermList.entrySet()){\n //System.out.printf(\"\\n %d minterm inside buildEssential.\", mint.getKey());\n int count = 0; \n for(Implicant p:primeImp){\n if(p.contains(mint.getKey())){\n count++;\n }\n }\n \n if(count == 1){ // Prime Implicant occurs for only one minterm\n mint.setValue(true);\n for(Implicant x:primeImp){\n if(x.contains(mint.getKey())){\n if(!finalPrimeImp.contains(x))\n finalPrimeImp.add(x);\n \n //System.out.printf(\"\\n %s added to final Prime Implicant List.\",x.toString());\n }\n }\n \n }\n \n }\n \n /**\n * Remove Essential Prime Implicant from primeImpl\n */\n for (Implicant i:finalPrimeImp){\n primeImp.remove(i);\n for(Entry<Integer, Boolean> mint: mintermList.entrySet()){\n if(i.contains(mint.getKey()))\n mint.setValue(true); \n }\n primeImp.remove(i);\n } \n }", "public static boolean m14539c(C44919o c44919o, C8235ad c8235ad, C8235ad c8235ad2) {\n AppMethodBeat.m2504i(122754);\n C25052j.m39376p(c44919o, \"context\");\n C25052j.m39376p(c8235ad, \"subType\");\n C25052j.m39376p(c8235ad2, \"superType\");\n boolean z = C8230j.m14537e(c8235ad) || C8230j.m14536d(c8235ad) || c44919o.mo72115e(c8235ad);\n Throwable assertionError;\n if (!C44847aa.AUz || z) {\n z = C8230j.m14536d(c8235ad2) || c44919o.mo72115e(c8235ad2);\n if (C44847aa.AUz && !z) {\n assertionError = new AssertionError(\"Not singleClassifierType superType: \".concat(String.valueOf(c8235ad2)));\n AppMethodBeat.m2505o(122754);\n throw assertionError;\n } else if (c8235ad2.eci()) {\n AppMethodBeat.m2505o(122754);\n return true;\n } else if (C41444ag.m72304ap(c8235ad)) {\n AppMethodBeat.m2505o(122754);\n return true;\n } else if (C8232l.m14538a(c44919o, c8235ad, C37047a.BKT)) {\n AppMethodBeat.m2505o(122754);\n return true;\n } else if (C41444ag.m72304ap(c8235ad2)) {\n AppMethodBeat.m2505o(122754);\n return false;\n } else if (C8232l.m14538a(c44919o, c8235ad2, C17311d.BKV)) {\n AppMethodBeat.m2505o(122754);\n return false;\n } else if (C8230j.m14535c(c8235ad)) {\n AppMethodBeat.m2505o(122754);\n return false;\n } else {\n boolean d = C8232l.m14540d(c44919o, c8235ad, c8235ad2.ejw());\n AppMethodBeat.m2505o(122754);\n return d;\n }\n }\n assertionError = new AssertionError(\"Not singleClassifierType superType: \".concat(String.valueOf(c8235ad2)));\n AppMethodBeat.m2505o(122754);\n throw assertionError;\n }", "@java.lang.Override\n public boolean hasPrimaryImpact() {\n return primaryImpact_ != null;\n }", "@UpnpAction(out = {@UpnpOutputArgument(name = \"Result\", stateVariable = \"A_ARG_TYPE_Result\")})\n/* */ public int isValidated(@UpnpInputArgument(name = \"DeviceID\", stateVariable = \"A_ARG_TYPE_DeviceID\") String deviceID) {\n/* 128 */ return 1;\n/* */ }", "public CWE insertIndication(int rep) throws HL7Exception { \r\n return (CWE) super.insertRepetition(19, rep);\r\n }", "@Test\n public void ANDSearch_CareQualityComissionAdmission() throws Exception {\n\n final Set<String> searchResults = newsLineSearch.search(TEST_FILE, \"Care Quality Commission admission\",\n SearchType.AND);\n\n assertThat(searchResults).hasSize(1).contains(allLines.get(1));\n }", "public boolean isApplied() {\n return selectedDatasetNumbers.size() > 1;\n }", "@Test\n public void testRepeatedMatch() {\n assertMetrics(\"fieldCompleteness:1 queryCompleteness:0.6667 segments:1 earliness:1 gaps:1\",\n \"pizza hut pizza\",\"pizza hut\");\n }", "private static boolean hasCapacityForMultiEvaluation() {\n // return true;\n int threshold = 3;\n int available = Runtime.getRuntime().availableProcessors() * ServerRunner.getProcessorMultiplier();\n return available >= threshold;\n }", "public static Boolean getAppositivePrs(PairInstance inst) {\n if (inst.getAnaphor().getSentId()!=inst.getAntecedent().getSentId()) \n return false;\n\n// exclude pairs where anaphor is an NE -- this might be a bad idea though..\n if (inst.getAnaphor().isEnamex()) \n return false;\n\n\n if (inst.getAntecedent().isEnamex() &&\n inst.getAnaphor().isEnamex()) {\n\n// exclude pairs of NE that have different type\n\n if (!(inst.getAntecedent().getEnamexType().equals(\n inst.getAnaphor().getEnamexType())))\n return false;\n\n// exclude pairs of LOC-ne\n if (inst.getAntecedent().getEnamexType().toLowerCase().startsWith(\"gpe\"))\n return false;\n if (inst.getAntecedent().getEnamexType().toLowerCase().startsWith(\"loc\"))\n return false;\n }\n\n// should have not-null maxnp-trees (otherwise -- problematic mentions)\n\nTree sentenceTree=inst.getAnaphor().getSentenceTree();\nTree AnaTree=inst.getAnaphor().getMaxNPParseTree();\nTree AnteTree=inst.getAntecedent().getMaxNPParseTree();\nif (sentenceTree==null) return false;\nif (AnaTree==null) return false;\nif (AnteTree==null) return false;\n\n\n// the structure should be ( * (,) (ANA)) or ( * (,) (ANTE)) -- depends on the ordering, annotation, mention extraction etc\n\n if (AnteTree.parent(sentenceTree)==AnaTree) {\n Tree[] chlds=AnaTree.children();\n Boolean lastcomma=false;\n for (int i=0; i<chlds.length && chlds[i]!=AnteTree; i++) {\n lastcomma=false;\n if (chlds[i].value().equalsIgnoreCase(\",\")) lastcomma=true;\n }\n return lastcomma;\n }\n if (AnaTree.parent(sentenceTree)==AnteTree) {\n\n Tree[] chlds=AnteTree.children();\n Boolean lastcomma=false;\n for (int i=0; i<chlds.length && chlds[i]!=AnaTree; i++) {\n lastcomma=false;\n if (chlds[i].value().equalsIgnoreCase(\",\")) lastcomma=true;\n }\n return lastcomma;\n\n }\n\n return false;\n\n }", "public void testAddRejectReasons_RejectReasonsContainsDuplicateElementsAccuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[4];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[1] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[2] = new ExpenseEntryRejectReason(2);\r\n rejectReasons[3] = new ExpenseEntryRejectReason(1);\r\n\r\n ExpenseEntryRejectReason[] duplicate = entry.addRejectReasons(rejectReasons);\r\n\r\n // check nothing is added into the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should not be added.\", 0, rejectReasonsMap.size());\r\n\r\n // check the duplicate result\r\n assertNotNull(\"The duplicate result should be correct.\", duplicate);\r\n V1Dot1TestHelper.assertEquals(\"The duplicate result should be correct.\",\r\n new ExpenseEntryRejectReason[] {rejectReasons[0], rejectReasons[1], rejectReasons[3]}, duplicate);\r\n }", "public CWE getRxa18_SubstanceTreatmentRefusalReason(int rep) { \r\n\t\tCWE retVal = this.getTypedField(18, rep);\r\n\t\treturn retVal;\r\n }", "public VerifyAgreementResult checkAgreement(List<Message> store) {\n byte[] pubkey = null;\n String data = \"\";\n for (Message e : store){\n if (e instanceof PrevoteMessage) {\n data = new String(((PrevoteMessage) e).data);\n pubkey = ((PrevoteMessage) e).pubkey;\n } else if (e instanceof VoteMessage) {\n data = new String(((VoteMessage) e).data);\n pubkey = ((VoteMessage) e).pubkey;\n } else {\n logger.error(\"Needs type PrevoteMessage or VoteMessage.\");\n throw new IllegalArgumentException(\"Needs type PrevoteMessage or VoteMessage.\");\n }\n int count = 0;\n// logger.info(\"<<<< data: \" + data + \", \\n pubkey:\" + pubkey);\n for (Message i : store){\n if ( (i instanceof PrevoteMessage && data.equals(new String(((PrevoteMessage) i).data)))\n || (i instanceof VoteMessage && data.equals(new String(((VoteMessage) i).data))) ){\n count++;\n }\n }\n logger.info(\"need count more than \" + muchMoreThenHalf() + \", agreement count: \" + count);\n if (count > muchMoreThenHalf()){\n return new VerifyAgreementResult(true, data, pubkey);\n }\n }\n return new VerifyAgreementResult(false, data, pubkey);\n }", "@Test\n public void officeActionCreateWithMismatchingEviCaseNo77777778() {\n // This test case validate the understanding based on which the create\n // office-action api has been developed.\n // ie, while creating an office-action inside a given serial number the\n // incoming association of evidence file has to match\n // the serial number of office-action.\n // In-other words the incoming associated evidence files needs to exists\n // inside the same office-action case number.\n testCreateSampleEviOneForOffActn78();\n testCreateSampleEviTwoForOffActn78();\n testCreateOfficeAction77();\n }", "private boolean decideIfEventShouldBeReportedAsAFailure() {\n \tint value = new Random().nextInt(100);\n \tif (value < TARGET_SUCCESS_RATE) {\n \t\treturn false;\n \t} else {\n \treturn true;\n \t}\n }", "boolean acceptTeacherRecord(TeacherRecord record, String clientId) throws Exception;", "final int getShareOfOne() { return getPlayerId() == 0 ? 1 : 0; }", "private boolean useCurrentThread(List<String> dependedKeyList) {\n if (dependedKeyList.size() <= 0) {\n return false;\n }\n for (String deptKey : dependedKeyList) {\n if (dag.getFollowingKey(deptKey).size() > 1) {\n return false;\n }\n }\n return true;\n }", "protected abstract boolean isSatisfiedBy(Design design, AUndertaking t);", "@Test\n\tpublic void TEAM3_CONTROLLER_UT09() {\n\t\t// PRECONDITIONS\n\t\tArrayList<Integer> a1 = new ArrayList<Integer>();\n\t\ta1.add(100);\n\t\ta1.add(200);\n\t\t\n\t\tArrayList<Integer> a2 = new ArrayList<Integer>();\n\t\ta2.add(150);\n\t\ta2.add(250);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<Collection<?>> doubleElementCollection = new Vector<Collection<?>>();\n\t\tdoubleElementCollection.add(a1);\n\t\tdoubleElementCollection.add(a2);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean sizeIsOne = smc.sizeIsOne(doubleElementCollection);\n\t\tassertFalse(sizeIsOne);\n\t}", "public void checkChannel1(){\n\t\ttools.findAndReport(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.support.v4.view.ViewPager/android.view.View/android.widget.RelativeLayout/android.support.v7.widget.RecyclerView/android.widget.LinearLayout[1]/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.RelativeLayout\", \"No se encuentra el primer en vivo\");\r\n\t}", "private static UnaryPredicate bepred() {\n return new UnaryPredicate() {\n public boolean execute(Object o) {\n\tif (o instanceof BulkEstimate) {\n\t return ((BulkEstimate)o).isComplete();\n }\n\treturn false;\n }\n };\n }", "@Override\r\n\tpublic int isMinimalCostToReach17Plus()\r\n\t{\r\n\t\treturn 1;\r\n\t}", "public List<Establishment> establishmentCanTrade() {\n List<Establishment> can_take = new ArrayList<> ();\n for(int i = 0; i < Establishments.size(); i++) {\n Establishment check = Establishments.get(i);\n if(check.getName().equals(\"Wheat Field\") || check.getName().equals(\"Bakery\")) {\n if (check.getAvailable() > 1) {\n can_take.add(check);\n }\n } else if(!check.getColor().equals(Card.Color.PURPLE)) {\n can_take.add(check);\n }\n }\n return can_take;\n }", "boolean hasReqardTypeFifteen();", "private void deleteUnwantedFsnAcceptability(Concept c) throws TermServerScriptException {\n\t\tList<Description> fsns = c.getDescriptions(Acceptability.BOTH, DescriptionType.FSN, ActiveState.ACTIVE);\n\t\tif (fsns.size() != 1) {\n\t\t\tString msg = \"Concept has \" + fsns.size() + \" active fsns\";\n\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t} else {\n\t\t\tString msg = \"[\" + fsns.get(0).getDescriptionId() + \"]: \";\n\t\t\tList<LangRefsetEntry> langRefEntries = fsns.get(0).getLangRefsetEntries(ActiveState.BOTH, US_ENG_LANG_REFSET);\n\t\t\tif (langRefEntries.size() != 1) {\n\t\t\t\tif (langRefEntries.size() == 2) {\n\t\t\t\t\tList<LangRefsetEntry> uslangRefEntries = fsns.get(0).getLangRefsetEntries(ActiveState.BOTH, refsets, SCTID_US_MODULE);\n\t\t\t\t\tList<LangRefsetEntry> corelangRefEntries = fsns.get(0).getLangRefsetEntries(ActiveState.BOTH, refsets, SCTID_CORE_MODULE);\n\t\t\t\t\tif (uslangRefEntries.size() > 1 || corelangRefEntries.size() >1) {\n\t\t\t\t\t\tmsg += \"Two acceptabilities in the same module\";\n\t\t\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!uslangRefEntries.get(0).isActive() && corelangRefEntries.get(0).isActive() ) {\n\t\t\t\t\t\t\tlong usET = Long.parseLong(uslangRefEntries.get(0).getEffectiveTime());\n\t\t\t\t\t\t\tlong coreET = Long.parseLong(corelangRefEntries.get(0).getEffectiveTime());\n\t\t\t\t\t\t\tmsg += \"US langrefset entry inactivated \" + (usET > coreET ? \"after\":\"before\") + \" core row activated - \" + usET;\n\t\t\t\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//If the US inactivated AFTER the core activated, then this is the case we need to fix\n\t\t\t\t\t\t\tuslangRefEntries.get(0).delete(deletionEffectiveTime);\n\t\t\t\t\t\t\tString action = \"Deleted US FSN LangRefset entry\";\n\t\t\t\t\t\t\treport(c, c.getFSNDescription(), Severity.MEDIUM, ReportActionType.DESCRIPTION_CHANGE_MADE, action);\n\t\t\t\t\t\t\tc.setModified();\n\t\t\t\t\t\t} if (uslangRefEntries.get(0).isActive() && corelangRefEntries.get(0).isActive() ) {\n\t\t\t\t\t\t\tmsg += \"Both US and Core module lang refset entries are inactive\";\n\t\t\t\t\t\t\treport(c, c.getFSNDescription(), Severity.LOW, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmsg += \"Unexpected configuration of us and core lang refset entries\";\n\t\t\t\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmsg += \"FSN has \" + langRefEntries.size() + \" US acceptability values.\";\n\t\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t\t}\n\t\t\t} else if (!langRefEntries.get(0).getAcceptabilityId().equals(SCTID_PREFERRED_TERM)) {\n\t\t\t\tmsg += \"FSN has an acceptability that is not Preferred.\";\n\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t} else if (!langRefEntries.get(0).isActive()) {\n\t\t\t\tmsg += \"FSN's US acceptability is inactive.\";\n\t\t\t\treport(c, c.getFSNDescription(), Severity.HIGH, ReportActionType.VALIDATION_CHECK, msg);\n\t\t\t}\n\t\t}\n\t}", "@SuppressFBWarnings(\"BC_UNCONFIRMED_CAST\")\n protected void validateCombinationAny(Combination combination)\n throws SuiteBroken {\n Verifier hasAnyElementVerifier = omobilityIdVerifierFactory.expectResponseToBeNotEmpty();\n hasAnyElementVerifier.setCustomErrorMessage(\"However we received an empty response, no\"\n + \" omobility ids were returned. Some tests will be skipped. To perform more tests\"\n + \" provide parameters that will allow us to receive omobility-ids.\");\n testParameters200(\n combination,\n \"Request one known sending_hei_id, expect 200 OK.\",\n new ParameterList(\n new Parameter(\"sending_hei_id\", this.currentState.sendingHeiId)\n ),\n hasAnyElementVerifier,\n Status.FAILURE\n );\n\n final boolean noOMobilityIdReturned = !hasAnyElementVerifier.getVerificationResult();\n final String noOMobilitySkipReason = \"OMobilities list was empty.\";\n\n testsRequestingReceivingHeiIds(combination,\n \"receiving_hei_id\",\n this.currentState.receivingHeiId,\n \"sending_hei_id\",\n this.currentState.sendingHeiId,\n noOMobilityIdReturned,\n noOMobilitySkipReason,\n omobilityIdVerifierFactory,\n true\n );\n\n testReceivingAcademicYears(combination,\n \"sending_hei_id\",\n this.currentState.sendingHeiId,\n omobilityIdVerifierFactory\n );\n\n // Modified since\n modifiedSinceTests(combination,\n \"sending_hei_id\",\n this.currentState.sendingHeiId,\n true,\n noOMobilityIdReturned,\n noOMobilitySkipReason,\n omobilityIdVerifierFactory\n );\n\n // Permission tests\n // Am I allowed to see omobilities issued by others?\n testParameters200(\n combination,\n \"Request with known sending_hei_id and receiving_hei_id valid but not covered by\"\n + \" the validator, expect empty response.\",\n new ParameterList(\n new Parameter(\"sending_hei_id\", this.currentState.sendingHeiId),\n new Parameter(\"receiving_hei_id\", this.currentState.notPermittedHeiId)\n ),\n omobilityIdVerifierFactory.expectResponseToBeEmpty(),\n Status.WARNING,\n noOMobilityIdReturned,\n noOMobilitySkipReason\n );\n\n // Are others able to see omobilities issued by me?\n testParameters200AsOtherEwpParticipant(\n combination,\n \"Request one known sending_hei_id as other EWP participant, expect 200 OK and empty \"\n + \"response.\",\n new ParameterList(\n new Parameter(\"sending_hei_id\", this.currentState.sendingHeiId)\n ),\n omobilityIdVerifierFactory.expectResponseToBeEmpty(),\n Status.FAILURE,\n noOMobilityIdReturned,\n noOMobilitySkipReason\n );\n }", "public CWE insertRxa18_SubstanceTreatmentRefusalReason(int rep) throws HL7Exception { \r\n return (CWE) super.insertRepetition(18, rep);\r\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT07() {\n\t\t// PRECONDITIONS\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<Collection<?>> emptyCollection = new ArrayList<Collection<?>>();\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean sizeIsOne = smc.sizeIsOne(emptyCollection);\n\t\tassertFalse(sizeIsOne);\n\t}", "public synchronized WebElement fabricCareAccordionLabel() throws Exception {\n\n\t\treturn utils.findElementByLocator(driver, \"PDP_FabricInfoLabel\",\n\t\t\t\t\"| PDP:Fabric Label Accordion Infomation div not present\");\n\t}", "private void checkConditionsToInteroperate(AID client) {\r\n\t\tif (!client.equals(TRUSTED_AID_1))\r\n\t\t\tISOException.throwIt(SW_CLIENT_UNAUTHORISED);\r\n\t\tif (image.isActive())\r\n\t\t\tISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);\r\n\t}", "@Test\n public void testPositiveAllocation() {\n Allocation allocation = new Allocation(\n doctors.get(0),\n surgeryRooms.get(0),\n (new Period(50, 10, 15))\n );\n boolean expected = true;\n boolean actual = hospital.allocate(allocation);\n assertEquals(expected, actual);\n }", "abstract void takeResposibilityForConnectionOfAssociation(com.webobjects.eointerface.EOAssociation association);", "public void modifyQualifyCheck(Installation install, User user) throws Exception {\r\n // Start UOC\r\n if (install.getAffirmFlag() == 1) {\r\n if (!user.hasPermission(\"PR005_32\")) {\r\n errors.add(\"BSE01715\");\r\n }\r\n }\r\n // End UOC\r\n }", "private boolean capacityController(Arrival newArrival) {\n int[] duration = calculateDuration(newArrival);\n for (int i = duration[0]; i <= duration[1]; i++) {\n if (this.parentTrainStation.getMaxCapacity() <= capacityArray[i]) {\n return false;\n }\n }\n for (int i = duration[0]; i <= duration[1]; i++) {\n capacityArray[i]++;\n }\n return true;\n }", "public boolean checkSeatTaken(int[] RC) {\n return seatPlan[RC[0] - 1][RC[1] - 1].getStatus();\n }", "@Test\n\tpublic void testAppliedTargets(){\n\t\ttry{\n\t\t\tchord = new Chord(1, \"4/4\");\n\t\t\tassertEquals(7, chord.getRoot());\n\t\t\tassertEquals(4, chord.getAppliedTarget());\n\n\t\t\tchord = new Chord(1, \"5/5\");\n\t\t\tassertEquals(2, chord.getRoot());\n\t\t\tassertEquals(5, chord.getAppliedTarget());\n\n\t\t\tchord = new Chord(1, \"7/6\");\n\t\t\tassertEquals(5, chord.getRoot());\n\t\t\tassertEquals(6, chord.getAppliedTarget());\n\n\t\t\tchord = new Chord(1, \"4/2\");\n\t\t\tassertEquals(5, chord.getRoot());\n\t\t\tassertEquals(2, chord.getAppliedTarget());\n\n\t\t\tchord = new Chord(6, \"4/7\");\n\t\t\tassertEquals(5, chord.getRoot());\n\t\t\tassertEquals(2, chord.getAppliedTarget());\n\n\t\t\tchord = new Chord(1, \"1\");\n\t\t\tassertEquals(0, chord.getAppliedTarget());\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(e.getMessage());\n\t\t}\n\t}", "public boolean checkpermit(Bwfl_permit_tracking_action act) {\n\n\t\t\n\t\tConnection con = null;\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString selQr = null;\n\t\tString filter = \"\";\n\t\tboolean flag=false;\n\n\t\t\n\t\t\n\t\ttry \n\t\t\n\t\t{\n\t\t\tcon = ConnectionToDataBase.getConnection();\n\n\t\t selQr = \" SELECT a.id, a.district_id, a.bwfl_id, a.unit_id, a.bwfl_type, a.import_fee, a.duty, a.add_duty, a.login_type, \"+\n\t\t\t\t\t\" a.special_fee, a.cr_date, a.vch_approved, a.vch_status, a.deo_time, a.deo_remark, a.deo_user, a.deo_date, \"+\n\t\t\t\t\t\" a.lic_no, a.import_fee_challan_no, a.spcl_fee_challan_no, a.app_id, \"+\n\t\t\t\t\t\" CASE WHEN a.bwfl_type=1 THEN 'BWFL2A' \"+\n\t\t\t\t\t\" WHEN a.bwfl_type=2 THEN 'BWFL2B' \"+\n\t\t\t\t\t\" WHEN a.bwfl_type=3 THEN 'BWFL2C' \"+\n\t\t\t\t\t\" WHEN a.bwfl_type=4 THEN 'BWFL2D' \"+\n\t\t\t\t\t\" WHEN a.bwfl_type=99 THEN 'FL2D' end as type, \"+\n\t\t\t\t\t\" CASE WHEN a.login_type='FL2D' THEN \"+\n\t\t\t\t\t\" (SELECT d.vch_firm_name FROM licence.fl2_2b_2d_20_21 d WHERE a.bwfl_id=d.int_app_id) \"+\n\t\t\t\t\t\" WHEN a.login_type='BWFL' THEN \"+\n\t\t\t\t\t\" (SELECT d.vch_firm_name FROM bwfl.registration_of_bwfl_lic_holder_20_21 d WHERE a.bwfl_id=d.int_id) \"+\n\t\t\t\t\t\" end as vch_firm_name, a.consignor_nm_adrs, \"+\n\t\t\t\t\t\" c.description, a.bottlng_type, a.valid_upto, a.route_road_radio, a.route_detail, \"+\n\t\t\t\t\t\" e.vch_indus_name, e.vch_reg_office_add, a.digital_sign_time, a.digital_sign_date, \"+\n\t\t\t\t\t\" a.print_permit_dt, COALESCE(a.permit_nmbr,'NA')permit_nmbr, COALESCE(a.digital_sign_pdf_name,'NA')digital_sign_pdf_name, \"+\n\t\t\t\t\t\" (SELECT d.vch_state_name FROM public.state_ind d WHERE e.vch_reg_office_state=d.int_state_id::text)as vch_state_name, \"+\n\t\t\t\t\t\" (SELECT SUM(COALESCE(dtl.no_of_cases,0)) FROM bwfl_license.import_permit_dtl_20_21 dtl \"+\n\t\t\t\t\t\" WHERE a.id=dtl.fk_id AND a.app_id=dtl.app_id AND a.login_type=dtl.login_type AND a.district_id=dtl.district_id) as total_cases_detail \"+\n\t\t\t\t\t\" FROM bwfl_license.import_permit_20_21 a, public.district c, public.other_unit_registration_20_21 e \"+\n\t\t\t\t\t\" WHERE a.district_id=c.districtid AND a.unit_id=e.int_app_id_f and CASE WHEN a.bwfl_type=1 THEN vch_indus_type='OUPD' \" + \n\t\t\t\t\t\" WHEN a.bwfl_type=2 THEN vch_indus_type='OUPB' \\r\\n\" + \n\t\t\t\t\t\" WHEN a.bwfl_type=3 THEN vch_indus_type='OUPW' \\r\\n\" + \n\t\t\t\t\t\" WHEN a.bwfl_type=4 THEN vch_indus_type='OUPBU' \\r\\n\" + \n\t\t\t\t\t\" WHEN a.bwfl_type=99 THEN vch_indus_type='IU' end \"+\n\t\t\t\t\t\" and a.login_type='BWFL' \" +\n\t\t\t\t\t\" AND a.deo_date IS NOT NULL AND a.vch_approved='APPROVED' and a.permit_nmbr='\"+act.getPermit_no()+\"' \"+\n\t\t\t\t\t\" ORDER BY a.app_id \";\n\t\t\t\n\n \n\t\t // System.out.println(\"==========query============\"+selQr);\n\t\t \n\t\t\tps = con.prepareStatement(selQr);\n\t\t\t \n\t\t\trs = ps.executeQuery();\n\n\t\t\tif (rs.next()) {\n\n\t\t\t\tact.setAppId(rs.getInt(\"app_id\"));\n\t\t\t\tact.setRequestID(rs.getInt(\"id\"));\n\t\t\t\tact.setBwflId(rs.getInt(\"bwfl_id\"));\n\t\t\t\tact.setUnitID(rs.getInt(\"unit_id\"));\n\t\t\t\tact.setLicenseType(rs.getString(\"type\"));\n\t\t\t\tact.setLicenseNmbr(rs.getString(\"lic_no\"));\n\t\t\t\tact.setDistrictId(rs.getInt(\"district_id\"));\n\t\t\t\tact.setDistrictName(rs.getString(\"description\"));\n\t\t\t\tact.setBwflName(rs.getString(\"vch_firm_name\"));\n\t\t\t\tact.setParentUnitNm(rs.getString(\"vch_indus_name\"));\n\t\t\t\tact.setParentUnitAdrs(rs.getString(\"vch_reg_office_add\"));\n\t\t\t\tact.setParentUnitState(rs.getString(\"vch_state_name\"));\n\t\t\t\tact.setTotalBoxes(rs.getInt(\"total_cases_detail\"));\n\t\t\t\tact.setMapped_unmapped(rs.getString(\"bottlng_type\"));\n\t\t\t\tact.setByRoad_byRoute(rs.getString(\"route_road_radio\"));\n\t\t\t\tact.setRouteDetail(rs.getString(\"route_detail\"));\n\t\t\t\tact.setPermitDate(rs.getDate(\"print_permit_dt\"));\n\t\t\t\tact.setPermitNmbr(rs.getString(\"permit_nmbr\"));\n\t\t\t\tact.setLoginType(rs.getString(\"login_type\"));\n\t\t\t\tact.setCrDate(rs.getDate(\"cr_date\"));\n\t\t\t\tact.setApprovalDate(rs.getDate(\"deo_date\"));\n\t\t\t\tact.setApprovalTym(rs.getString(\"deo_time\"));\n\t\t\t\tact.setApprovalUser(rs.getString(\"deo_user\"));\n\t\t\t\tact.setImportFeeChalanNo(rs.getString(\"import_fee_challan_no\"));\n\t\t\t\tact.setSpclFeeChalanNo(rs.getString(\"spcl_fee_challan_no\"));\n\t\t\t\tact.setConsignorNmAdrs(rs.getString(\"consignor_nm_adrs\"));\n\t\t\t\tact.setPermit_no(rs.getString(\"permit_nmbr\"));\n\n\t\t\t\tSimpleDateFormat date = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t\t\tif (rs.getDate(\"cr_date\") != null) {\n\t\t\t\t\tString appDate = date.format(Utility.convertSqlDateToUtilDate(rs.getDate(\"cr_date\")));\n\t\t\t\t\tact.setAppDate(appDate);\n\t\t\t\t} else {\n\t\t\t\t\tact.setAppDate(\"\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (rs.getDate(\"valid_upto\") != null) {\n\t\t\t\t\tString validDate = date.format(Utility.convertSqlDateToUtilDate(rs.getDate(\"valid_upto\")));\n\t\t\t\t\tact.setValidUptoDt(validDate);\n\t\t\t\t} else {\n\t\t\t\t\tact.setValidUptoDt(\"Not Filled\");\n\t\t\t\t}\n\t\t\t\tflag=true ;\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t\n\t\t\t{\n\t\t\t\tact.reset();\n\t\t\t\tflag=false ;\n\t\t\t\t\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_ERROR,\n\t\t\t\t\t\t\" This is not a Valid Permit Number !!\",\" This is not a Valid Permit Number!!\"));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tFacesContext.getCurrentInstance().addMessage(null,new FacesMessage(e.getMessage(), e.getMessage()));\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (ps != null)\n\t\t\t\t\tps.close();\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t\tif (con != null)\n\t\t\t\t\tcon.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn flag;\n\n\t}", "public void testGetMultiplicity_1_accuracy() {\n instance.setMultiplicity(multiplicity);\n assertTrue(\"The multiplicity is not set properly.\", multiplicity == instance.getMultiplicity());\n }", "boolean hasCampaignExperiment();", "@Test\n public void testAssocOneWithNullAssoc() {\n\n Database server = DB.getDefault();\n\n final ProductConfiguration pc = new ProductConfiguration();\n pc.setName(\"PC1\");\n server.save(pc);\n\n CalculationResult r = new CalculationResult();\n final Double charge = 100.0;\n r.setCharge(charge);\n r.setProductConfiguration(pc);\n r.setGroupConfiguration(null);\n server.save(r);\n }", "public CWE getSubstanceTreatmentRefusalReason(int rep) { \r\n\t\tCWE retVal = this.getTypedField(18, rep);\r\n\t\treturn retVal;\r\n }", "boolean isCreditCardIsSingleAvailablePayment();", "@Override\n public boolean predicate2(Object dm, Designer dsgr) {\n if (!(Model.getFacade().isAClassifier(dm))) {\n return NO_PROBLEM;\n }\n if (!(Model.getFacade().isPrimaryObject(dm))) {\n return NO_PROBLEM;\n }\n\n // If the classifier does not have a name,\n // then no problem - the model is not finished anyhow.\n if ((Model.getFacade().getName(dm) == null)\n\t || (\"\".equals(Model.getFacade().getName(dm)))) {\n return NO_PROBLEM;\n\t}\n\n // Abstract elements do not necessarily require associations\n if (Model.getFacade().isAGeneralizableElement(dm)\n\t && Model.getFacade().isAbstract(dm)) {\n return NO_PROBLEM;\n }\n\n // Types can probably have associations, but we should not nag at them\n // not having any.\n // utility is a namespace collection - also not strictly required\n // to have associations.\n if (Model.getFacade().isType(dm)) {\n return NO_PROBLEM;\n }\n if (Model.getFacade().isUtility(dm)) {\n return NO_PROBLEM;\n }\n\n // See issue 1129: If the classifier has dependencies,\n // then mostly there is no problem. \n if (Model.getFacade().getClientDependencies(dm).size() > 0) {\n return NO_PROBLEM;\n }\n if (Model.getFacade().getSupplierDependencies(dm).size() > 0) {\n return NO_PROBLEM;\n }\n \n // special cases for use cases\n // Extending use cases and use case that are being included are\n // not required to have associations.\n if (Model.getFacade().isAUseCase(dm)) {\n Object usecase = dm;\n Collection includes = Model.getFacade().getIncludes(usecase);\n if (includes != null && includes.size() >= 1) {\n return NO_PROBLEM;\n }\n Collection extend = Model.getFacade().getExtends(usecase);\n if (extend != null && extend.size() >= 1) {\n return NO_PROBLEM;\n }\n }\n \n \n\n //TODO: different critic or special message for classes\n //that inherit all ops but define none of their own.\n\n if (findAssociation(dm, 0)) {\n return NO_PROBLEM;\n }\n return PROBLEM_FOUND;\n }" ]
[ "0.49139735", "0.4597155", "0.45758474", "0.4545362", "0.4445675", "0.4434702", "0.44345307", "0.44209397", "0.44128987", "0.44022277", "0.43939057", "0.4391393", "0.435752", "0.4336711", "0.43332258", "0.432088", "0.43205762", "0.43162075", "0.43068564", "0.43056712", "0.43041864", "0.43008104", "0.43006632", "0.42827907", "0.42732954", "0.42630002", "0.42626715", "0.42509776", "0.42331785", "0.4232164", "0.42259547", "0.4221792", "0.4221595", "0.4217721", "0.42153096", "0.42119673", "0.42090842", "0.41988775", "0.4197253", "0.41955525", "0.41904315", "0.4188347", "0.418136", "0.41760576", "0.41729257", "0.41679847", "0.4167515", "0.41565582", "0.41457415", "0.41419318", "0.41335943", "0.41290542", "0.4127514", "0.4117728", "0.41119805", "0.41107142", "0.4108565", "0.41048762", "0.40970117", "0.40959117", "0.4092124", "0.4090942", "0.40864307", "0.40846643", "0.40840468", "0.4083827", "0.4083787", "0.40819085", "0.40814248", "0.40806854", "0.40791658", "0.40768376", "0.40734655", "0.4073113", "0.40720627", "0.40713978", "0.40696672", "0.40689713", "0.40688482", "0.40679544", "0.4063251", "0.4062537", "0.40596217", "0.40585732", "0.405517", "0.405497", "0.40546823", "0.40513307", "0.40512002", "0.40478006", "0.40475", "0.40438417", "0.40433478", "0.40368834", "0.40350515", "0.40344945", "0.40332505", "0.4030232", "0.40276784", "0.40254825", "0.40244853" ]
0.0
-1
ccd::PolicyActivity::coveredParty. self.getParticipantRoles()>select(participantRole : cda::ParticipantRole | not participantRole.oclIsUndefined() and participantRole.oclIsKindOf(domain::CoveredParty))>asSequence()>first().oclAsType(domain::CoveredParty)
ICoveredParty getCoveredParty();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Optional<RoleType> getToRoleType(PartyRelationship partyRelationship) {\n\t\tList<RoleType> entityList = null;\n\t\tIn in = new In();\n\t\tin.setEntityName(RoleType.NAME);\n\t\tin.setEntityConditionList(new EntityConditionList<>(Arrays\n\t\t\t\t.asList(new EntityExpr(\"roleTypeId\", EntityOperator.EQUALS,\n\t\t\t\t\t\tpartyRelationship.getRoleTypeIdTo())),\n\t\t\t\tEntityOperator.AND));\n\t\tOut out = executeFindService.runSync(in);\n\t\ttry {\n\t\t\tif (out.getListIt() != null) {\n\t\t\t\tentityList = RoleType.fromValues(out.getListIt()\n\t\t\t\t\t\t.getCompleteList());\n\t\t\t\tout.getListIt().close();\n\t\t\t}\n\t\t} catch (GenericEntityException e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t}\n\t\tif (CollectionUtils.isNotEmpty(entityList)) {\n\t\t\treturn Optional.of(entityList.get(0));\n\t\t}\n\t\treturn Optional.empty();\n\t}", "List<RoleSystemauthority> selectByExample(RoleSystemauthorityExample example);", "public Optional<PartyRole> getToPartyRole(\n\t\t\tPartyRelationship partyRelationship) {\n\t\tList<PartyRole> entityList = null;\n\t\tIn in = new In();\n\t\tin.setEntityName(PartyRole.NAME);\n\t\tin.setEntityConditionList(new EntityConditionList<>(Arrays.asList(\n\t\t\t\tnew EntityExpr(\"partyId\", EntityOperator.EQUALS,\n\t\t\t\t\t\tpartyRelationship.getPartyIdTo()),\n\t\t\t\tnew EntityExpr(\"roleTypeId\", EntityOperator.EQUALS,\n\t\t\t\t\t\tpartyRelationship.getRoleTypeIdTo())),\n\t\t\t\tEntityOperator.AND));\n\t\tOut out = executeFindService.runSync(in);\n\t\ttry {\n\t\t\tif (out.getListIt() != null) {\n\t\t\t\tentityList = PartyRole.fromValues(out.getListIt()\n\t\t\t\t\t\t.getCompleteList());\n\t\t\t\tout.getListIt().close();\n\t\t\t}\n\t\t} catch (GenericEntityException e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t}\n\t\tif (CollectionUtils.isNotEmpty(entityList)) {\n\t\t\treturn Optional.of(entityList.get(0));\n\t\t}\n\t\treturn Optional.empty();\n\t}", "com.message.MessageInfo.RoleVO getRole();", "List<UsercontrollerRole> selectByExample(UsercontrollerRoleExample example);", "public Optional<RoleType> getFromRoleType(\n\t\t\tPartyRelationship partyRelationship) {\n\t\tList<RoleType> entityList = null;\n\t\tIn in = new In();\n\t\tin.setEntityName(RoleType.NAME);\n\t\tin.setEntityConditionList(new EntityConditionList<>(Arrays\n\t\t\t\t.asList(new EntityExpr(\"roleTypeId\", EntityOperator.EQUALS,\n\t\t\t\t\t\tpartyRelationship.getRoleTypeIdFrom())),\n\t\t\t\tEntityOperator.AND));\n\t\tOut out = executeFindService.runSync(in);\n\t\ttry {\n\t\t\tif (out.getListIt() != null) {\n\t\t\t\tentityList = RoleType.fromValues(out.getListIt()\n\t\t\t\t\t\t.getCompleteList());\n\t\t\t\tout.getListIt().close();\n\t\t\t}\n\t\t} catch (GenericEntityException e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t}\n\t\tif (CollectionUtils.isNotEmpty(entityList)) {\n\t\t\treturn Optional.of(entityList.get(0));\n\t\t}\n\t\treturn Optional.empty();\n\t}", "public Optional<PartyRole> getFromPartyRole(\n\t\t\tPartyRelationship partyRelationship) {\n\t\tList<PartyRole> entityList = null;\n\t\tIn in = new In();\n\t\tin.setEntityName(PartyRole.NAME);\n\t\tin.setEntityConditionList(new EntityConditionList<>(Arrays.asList(\n\t\t\t\tnew EntityExpr(\"partyId\", EntityOperator.EQUALS,\n\t\t\t\t\t\tpartyRelationship.getPartyIdFrom()),\n\t\t\t\tnew EntityExpr(\"roleTypeId\", EntityOperator.EQUALS,\n\t\t\t\t\t\tpartyRelationship.getRoleTypeIdFrom())),\n\t\t\t\tEntityOperator.AND));\n\t\tOut out = executeFindService.runSync(in);\n\t\ttry {\n\t\t\tif (out.getListIt() != null) {\n\t\t\t\tentityList = PartyRole.fromValues(out.getListIt()\n\t\t\t\t\t\t.getCompleteList());\n\t\t\t\tout.getListIt().close();\n\t\t\t}\n\t\t} catch (GenericEntityException e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t}\n\t\tif (CollectionUtils.isNotEmpty(entityList)) {\n\t\t\treturn Optional.of(entityList.get(0));\n\t\t}\n\t\treturn Optional.empty();\n\t}", "List<JindouyunRole> selectByExample(JindouyunRoleExample example);", "PartyType getConsignorParty();", "List<AgentLevel> selectByExample(AgentLevelExample example);", "int getParticipantRoleValue();", "List<? extends AutomaticEarlyTerminationElection> getPartyElection();", "List<UUserRole> selectByExample(UUserRoleExample example);", "com.google.cloud.dialogflow.v2beta1.Participant.Role getParticipantRole();", "List<UserRole> selectByExample(UserRoleExample example);", "List<UserRole> selectByExample(UserRoleExample example);", "List<ScPartyMember> selectAll();", "List<BachAlarmRole> selectByExample(BachAlarmRoleExample example);", "List<TawRoleDomain> selectByExample(TawRoleDomainExample example);", "PartyType getConsigneeParty();", "List<SysRoleDO> selectByExample(SysRoleDOExample example);", "String getVacmRole();", "ObjectType getProtoRole();", "List<PensionRoleMenu> selectByExample(PensionRoleMenuExample example);", "List<MyUserRoleRelation> selectByExample(MyUserRoleRelationExample example);", "List<CommonQuestionStrategyType> selectByExample(CommonQuestionStrategyTypeExample example);", "public RoleCQ queryRole() {\n return xdfgetConditionQueryRole();\n }", "com.message.MessageInfo.RoleVOOrBuilder getRoleOrBuilder();", "List<NeeqCompanyAccountingFirmOnline> selectByExample(NeeqCompanyAccountingFirmOnlineExample example);", "@Test\n public void findByAgreementAndPartyAndTypeAndContainsDate() throws Exception {\n Party party = parties.findPartyByReference(\"TOPMODEL\");\n AgreementRole role = agreementRoles.findByAgreementAndPartyAndTypeAndContainsDate(leaseTopModel, party, artTenant, LocalDate.now());\n Assert.assertNotNull(role);\n }", "public String chooseRole() {\n String[] roles = currentPlayer.getLocation().getRoleStrings();\n String result;\n if (currentPlayer.isComputer()) {\n // choose random role\n Random rand = new Random();\n int randInt = rand.nextInt(roles.length);\n result = roles[randInt];\n }\n else { // if current player is human\n // choose upgrade manually\n if(roles.length <= 0){\n view.showPopUp(currentPlayer.isComputer(), \"There are no more available roles on this card!\");\n result = \"\";\n }\n else{\n result = view.showRolePopUp(roles);\n }\n }\n\n\n return result;\n }", "List<BsUserRole> selectByExample(BsUserRoleExample example);", "IfcActorRole getActingRole();", "String computeRole();", "RoleType getRoleType();", "private FinancialTransactionPartyVO getAndValidateParty(FinancialTransactionVO ft, FinancialTransactionPartyRoleType roleType) throws CTConverterException {\n FinancialTransactionPartyVO party = UserUtils.getParty(ft.getParties(), roleType);\n if (party != null &&\n party.getUserIdentifier() != null &&\n party.getUserIdentifier().getAccountNumber() != null) {\n return party;\n }\n\n throw new CTConverterException(String.format(\"FinancialTransaction(%s).parties[] does not contain a valid %s\", ft.getFtHandle(), roleType.toString()));\n }", "Role findByType(RoleType type);", "List<SystemRoleUserMapperMo> selectByExample(SystemRoleUserMapperExample example);", "PartyType getOriginalDespatchParty();", "private Role getProjectParticipantRole(Project project, RoleAuthority authority) {\n return roleRepository.findOneByProjectIdAndAuthorityName(project.getId(),\n authority.authority())\n .orElseGet(() -> {\n Role subjectRole = new Role();\n Authority auth = authorityRepository.findByAuthorityName(authority.authority())\n .orElseGet(() -> authorityRepository.save(new Authority(authority)));\n subjectRole.setAuthority(auth);\n subjectRole.setProject(project);\n return roleRepository.save(subjectRole);\n });\n }", "public LitemallTypeRoleExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "List<GroupRoleUserRel> selectByExample(GroupRoleUserRelExample example);", "JindouyunRole selectOneByExample(JindouyunRoleExample example);", "List<User_Role> selectAll();", "public Set<Individual> getUnspecifiedFiller(Role role, Individual ind) {\n\t\tTList<T> current = this.getRoot();\n\t\t//Map<TList<T>, List<Individual>> allCases = new HashMap<>();\n\t\tSet<Individual> candidateRoles = new HashSet<>();\n\t\t//search up\n\t\twhile (current != null) {\n\t\t\tAssertion aValue = current.getValue();\n\t\t\tif (aValue instanceof RoleAssertion) {\n\t\t\t\tRoleAssertion ra = (RoleAssertion) aValue;\n\t\t\t\tDLElement el = ra.getElement();\n\t\t\t\tif (role.equals(el) && ind.equals(ra.getIndividualA()))\n\t\t\t\t\tcandidateRoles.add(ra.getIndividualB());\n\t\t\t} \n\t\t\tcurrent = current.getNext();\n\t\t}\n\t\treturn candidateRoles;\n\t}", "@Override\n public ParticipationRole getParticipationRole() { return participationRole; }", "List<CourseParticipant> getCourseParticListByRepresentativeUuid(UUID representativeUserUuid);", "List<TModuleLo> selectSkillToLo();", "List<ActivityHongbaoPrize> selectByExample(ActivityHongbaoPrizeExample example);", "List<Online> selectByExample(OnlineExample example);", "CourseParticipant getCourseParticInOneCourse(UUID courseCourseParticUuid);", "List<InspectionAgency> selectByExample(InspectionAgencyExample example);", "String getRole();", "String getRole();", "public com.a9.spec.opensearch.x11.QueryType.Role.Enum getRole()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ROLE$0);\n if (target == null)\n {\n return null;\n }\n return (com.a9.spec.opensearch.x11.QueryType.Role.Enum)target.getEnumValue();\n }\n }", "@Override\n public Role getRole(InheritedAccessEnabled access) {\n Preference preference = (Preference) access;\n if (preference.getVisibleAtRole() == null) {\n return null;\n }\n String roleId = preference.getVisibleAtRole().getId();\n return OBDal.getInstance().get(Role.class, roleId);\n }", "public com.a9.spec.opensearch.x11.QueryType.Role xgetRole()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.Role target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.Role)get_store().find_attribute_user(ROLE$0);\n return target;\n }\n }", "Set<Role> getRoleSet(RoleType type);", "ICoveredParty withCoveredParty();", "List<ReEducation> selectByExample(ReEducationExample example);", "@Test\n @IfProfileValue(name=\"dept-test-group\", values={\"all\",\"role\"})\n public void _4_2_3_findRoleByOccupant() throws Exception {\n /*c_1---r_1-occupant-s_2*/\n this.mockMvc.perform(get(\"/api/v1.0/companies/\"+\n c_1.getId()+\"/departments/**/roles?occupant=\"+\n s_2.getId())\n .header(AUTHORIZATION, ACCESS_TOKEN))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$._embedded.roles\",hasSize(1)))\n .andExpect(jsonPath(\"$._embedded.roles[0].id\",is(r_1.getId().toString())))\n .andExpect(jsonPath(\"$._embedded.roles[0].department\",is(d_1.getId().toString())));\n }", "List<QtActivitytype> selectByExample(QtActivitytypeExample example);", "Collection<? extends Role> getIsPerformOf();", "Party getParty();", "private TopLevelComplexType createRoleEnumerationComplexType(TLCoreObject source) {\n SchemaDependency enumExtension = SchemaDependency.getEnumExtension();\n TopLevelComplexType complexType = new TopLevelComplexType();\n SimpleContent simpleContent = new SimpleContent();\n SimpleExtensionType extension = new SimpleExtensionType();\n Attribute attribute = new Attribute();\n\n complexType.setName( source.getRoleEnumeration().getLocalName() );\n complexType.setSimpleContent( simpleContent );\n XsdCodegenUtils.addAppInfo( source, complexType );\n simpleContent.setExtension( extension );\n extension.setBase( new QName( source.getNamespace(), source.getRoleEnumeration().getLocalName() + OPEN ) );\n extension.getAttributeOrAttributeGroup().add( attribute );\n attribute.setName( \"extension\" );\n attribute.setType( enumExtension.toQName() );\n addCompileTimeDependency( enumExtension );\n return complexType;\n }", "Role getRole(InheritedAccessEnabled access, String className) {\n AccessTypeInjector injector = getInjector(className);\n if (injector == null) {\n return null;\n }\n return injector.getRole(access);\n }", "private static SystemRole getRequiredRoleForMeasurable(Operation op, EntityKind additionalKind) {\n return Optional\n .ofNullable(additionalKind)\n .map(k -> SystemRole.CAPABILITY_EDITOR)\n .orElse(SystemRole.TAXONOMY_EDITOR);\n }", "Party getOrganizationParty();", "public com.message.MessageInfo.RoleVO getRole() {\n if (roleBuilder_ == null) {\n return role_ == null ? com.message.MessageInfo.RoleVO.getDefaultInstance() : role_;\n } else {\n return roleBuilder_.getMessage();\n }\n }", "List<CmGroupRelIndustry> selectByExample(CmGroupRelIndustryExample example);", "public T caseRole(Role object) {\n\t\treturn null;\n\t}", "public List<Agent> listAgentNotMappedwithDevice();", "public PageRoleMstExample() {\n oredCriteria = new ArrayList<>();\n }", "UsercontrollerRole selectByPrimaryKey(Integer roleId);", "public interface Role {\n int getId();\n int getPerson();\n int getType();\n String getName();\n int getRole();\n String getCode();\n int getPosition();\n String getPosition_name();\n}", "private static ArrayList<NameId> getAgentroles() {\n\t\tArrayList<NameId> modelList = new ArrayList<NameId>();\n\t\tif (CONSTANTS.agentroleNames().length != AccessControl.AGENT_ROLES.length) {Window.alert(\"AgentPopup getAgentroles()\");}\n\t\tfor (int i = 0; i < AccessControl.AGENT_ROLES.length; i++) {modelList.add(new NameId(CONSTANTS.agentroleNames()[i], String.valueOf(AccessControl.AGENT_ROLES[i])));}\n\t\treturn modelList;\n\t}", "public List<Agent> findAgentsActifs() {\n Query q = getEntityManager().createQuery(\"select A from Agent A WHERE A.etat NOT IN('RET','DEM') ORDER BY A.personne.name\");\n List<Agent> list = q.getResultList();\n return list;\n }", "BachAlarmRole selectByPrimaryKey(Integer roleId);", "List<Agent> listEnrollmentAgentsHaveCredential();", "public String getRoleType() {\n return roleType;\n }", "public String getRoleType() {\n return roleType;\n }", "List<Agent> listPOSAgentsHaveCredential();", "List<PrefecturesMt> selectByExample(PrefecturesMtExample example);", "List<RepaymentPlanInfoUn> selectByExample(RepaymentPlanInfoUnExample example);", "@gw.internal.gosu.parser.ExtendedProperty\n public typekey.ECFParticipantFunction_Ext getRole() {\n return (typekey.ECFParticipantFunction_Ext)__getInternalInterface().getFieldValue(ROLE_PROP.get());\n }", "@Override\n\tpublic List<Role> getPeopleInTheBuilding() {\n\t\treturn null;\n\t}", "int countByExample(RoleSystemauthorityExample example);", "void example(org.linlinjava.litemall.db.domain.LitemallTypeRoleExample example);", "java.lang.String getParticipant();", "List<Role> getRoleInheritancesInheritFromList(Role role, Role excludedInheritFrom,\n boolean seqNoAscending) {\n List<RoleInheritance> inheritancesList = getRoleInheritancesList(role, excludedInheritFrom,\n seqNoAscending);\n final List<Role> inheritFromList = new ArrayList<Role>();\n for (RoleInheritance ri : inheritancesList) {\n inheritFromList.add(ri.getInheritFrom());\n }\n return inheritFromList;\n }", "List<Ltsprojectpo> selectByExample(LtsprojectpoExample example);", "List<SpecialCircumstance> selectByExample(SpecialCircumstanceExample example);", "public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearRole() {\n role = null;\n fieldSetFlags()[6] = false;\n return this;\n }", "TypeAssociation getEstRapporteeParRapport();", "public List<Agent> listAgentByAgentType(String code);", "List<RoleEntity> getSystemRoles();", "List<UcMembers> selectByExample(UcMembersExample example);", "@Override\n\tpublic List<Role> selectRoleForAdd() {\n\t\treturn rd.selectRoleForAdd();\n\t}", "public Optional<PartyRelationshipType> getPartyRelationshipType(\n\t\t\tPartyRelationship partyRelationship) {\n\t\tList<PartyRelationshipType> entityList = null;\n\t\tIn in = new In();\n\t\tin.setEntityName(PartyRelationshipType.NAME);\n\t\tin.setEntityConditionList(new EntityConditionList<>(Arrays\n\t\t\t\t.asList(new EntityExpr(\"partyRelationshipTypeId\",\n\t\t\t\t\t\tEntityOperator.EQUALS, partyRelationship\n\t\t\t\t\t\t\t\t.getPartyRelationshipTypeId())),\n\t\t\t\tEntityOperator.AND));\n\t\tOut out = executeFindService.runSync(in);\n\t\ttry {\n\t\t\tif (out.getListIt() != null) {\n\t\t\t\tentityList = PartyRelationshipType.fromValues(out.getListIt()\n\t\t\t\t\t\t.getCompleteList());\n\t\t\t\tout.getListIt().close();\n\t\t\t}\n\t\t} catch (GenericEntityException e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t}\n\t\tif (CollectionUtils.isNotEmpty(entityList)) {\n\t\t\treturn Optional.of(entityList.get(0));\n\t\t}\n\t\treturn Optional.empty();\n\t}", "public List<Agent> listOfAgentByArea(String servicePointCode);" ]
[ "0.5835029", "0.5751541", "0.56228846", "0.55548453", "0.5477501", "0.5472343", "0.5471086", "0.52795434", "0.52771664", "0.5271669", "0.52692753", "0.5257153", "0.5233184", "0.522563", "0.5200178", "0.5200178", "0.5188058", "0.5180018", "0.51782805", "0.51501274", "0.5132548", "0.5130601", "0.51040876", "0.5068803", "0.50676453", "0.5060311", "0.5039691", "0.5023182", "0.49719486", "0.49698383", "0.4964592", "0.49541152", "0.49466538", "0.49431378", "0.49206072", "0.48842344", "0.48825642", "0.4873186", "0.48519972", "0.48458087", "0.48401615", "0.48387668", "0.48246577", "0.4813678", "0.4806686", "0.480425", "0.47880322", "0.47842017", "0.47726646", "0.47601217", "0.47562507", "0.4740484", "0.47256958", "0.47256958", "0.4668712", "0.4659869", "0.46591455", "0.46405", "0.4637613", "0.46258864", "0.46221003", "0.46101657", "0.46062613", "0.4599499", "0.45983106", "0.4580913", "0.4578202", "0.45766252", "0.45746174", "0.45389956", "0.4535692", "0.45259717", "0.45257673", "0.4525354", "0.45127693", "0.450616", "0.44944674", "0.44897988", "0.44670027", "0.4459745", "0.4459745", "0.44580364", "0.44577664", "0.44552395", "0.44367108", "0.4436171", "0.44228598", "0.44214612", "0.44175252", "0.44169235", "0.44165388", "0.44162768", "0.44090405", "0.44074777", "0.44068396", "0.4403821", "0.4398569", "0.43963647", "0.43920705", "0.43909818" ]
0.49607217
31
CCD Policy Activity SHALL contain exactly one [1..1] participant (CONF58), such that.
ICoveredParty withCoveredParty();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testRemoveOnlyOneConference() throws Exception {\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n deltaEvent.setConferences(Collections.singletonList(createdEvent.getConferences().get(0)));\n updateEventAsOrganizer(deltaEvent);\n\n EventData updatedEvent = eventManager.getEvent(defaultFolderId, createdEvent.getId());\n assertThat(\"Should be one conference!\", I(updatedEvent.getConferences().size()), is(I(1)));\n\n /*\n * Check that mails has been send, but for changed conferences not removed all\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.ACCEPTED, CustomConsumers.ALL, 1);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"access information was changed\");\n }", "public boolean isContinuingEducationPassed(CapIDModel capID) throws AAException, RemoteException;", "@Test\n public void minimumValidClaim() {\n claim.setClaimId(EXPECTED_CLAIM_ID);\n claim.setDcn(\"dcn\");\n claim.setIntermediaryNb(\"inter\");\n claim.setHicNo(\"hicn\");\n claim.setCurrStatus('T');\n claim.setCurrLoc1('M');\n claim.setCurrLoc2(\"9000\");\n claim.setLastUpdated(clock.instant());\n claimBuilder\n .setRdaClaimKey(\"claim_id\")\n .setDcn(\"dcn\")\n .setIntermediaryNb(\"inter\")\n .setHicNo(\"hicn\")\n .setCurrStatusEnum(FissClaimStatus.CLAIM_STATUS_RTP)\n .setCurrLoc1Enum(FissProcessingType.PROCESSING_TYPE_MANUAL)\n .setCurrLoc2Enum(FissCurrentLocation2.CURRENT_LOCATION_2_CABLE);\n changeBuilder\n .setSeq(MIN_SEQUENCE_NUM)\n .setChangeType(ChangeType.CHANGE_TYPE_INSERT)\n .setClaim(claimBuilder.build());\n assertChangeMatches(RdaChange.Type.INSERT);\n }", "private int isPrivacyModelFulfilled(Transformation<?> transformation, HashGroupifyEntry entry) {\n \n // Check minimal group size\n if (minimalClassSize != Integer.MAX_VALUE && entry.count < minimalClassSize) {\n return 0;\n }\n \n // Check other criteria\n // Note: The d-presence criterion must be checked first to ensure correct handling of d-presence with tuple suppression.\n // This is currently ensured by convention. See ARXConfiguration.getCriteriaAsArray();\n for (int i = 0; i < classBasedCriteria.length; i++) {\n if (!classBasedCriteria[i].isAnonymous(transformation, entry)) {\n return i + 1;\n }\n }\n return -1;\n }", "@Test\r\n public void testCommissionPallets() throws Exception\r\n {\r\n String epcToCheck = \"urn:epc:id:sscc:0614141.0000000001\";\r\n XmlObjectEventType event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNull(event);\r\n\r\n runCaptureTest(COMMISSION_PALLETS_XML);\r\n\r\n event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNotNull(event);\r\n }", "@Test\n public void CardRequirement1() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(1);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.YELLOW, 0, null, null);\n DevelopmentCard card2 = new DevelopmentCard(2, Color.GREEN, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n p.getDevelopmentSlot().addCard(card2, 1);\n c.emptyQueue();\n\n assertTrue(am.activateLeaderCard(p, message));\n\n assertTrue(l2.isEnabled());\n\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_UPD_Player).count());\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_NOTIFICATION).count());\n assertEquals(2, c.messages.size());\n\n }", "public void test1_CheckUniqueParticipant() {\n if (!ParticipantController.checkUniqueParticipant(\"ControllerTest\")) {\n assertTrue(true);\n } else {\n assertTrue(\"Fail\", false);\n }\n\n // should not find participant else fail\n if (ParticipantController.checkUniqueParticipant(\"ControllerTestDummy\")) {\n assertTrue(true);\n } else {\n assertTrue(\"Fail\", false);\n }\n }", "@Test\r\n public void testCommissionCases() throws Exception\r\n {\r\n String epcToCheck = \"urn:epc:id:sgtin:0614141.107340.1\";\r\n XmlObjectEventType event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNull(event);\r\n\r\n runCaptureTest(COMMISSION_CASES_XML);\r\n\r\n event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNotNull(event);\r\n }", "public void testValidateSubjectPrimaryAssociationsDuplicate() throws Exception {\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n List subjectPrimaryAssociations = positionWrapperBean.getSubjectPrimaryAssociations();\n for (int i = 0; i < subjectPrimaryAssociations.size(); i++) {\n ArtefactAssociationWrapperBean artefactAssociationWrapperBean = (ArtefactAssociationWrapperBean) subjectPrimaryAssociations.get(i);\n artefactAssociationWrapperBean.setSourceId(new Long(12));\n artefactAssociationWrapperBean.setQualifierId(new Long(399));\n }\n // should produce a duplicate assocition error\n DataBinder binder = new DataBinder(positionWrapperBean, ZynapDefaultFormController.DEFAULT_COMMAND_NAME);\n Errors errors = binder.getBindingResult();\n positionValidator.validateSubjectPrimaryAssociations(positionWrapperBean, errors);\n assertEquals(1, errors.getErrorCount());\n FieldError error = errors.getFieldError(FIRST_PRIMARY_ASSOCIATION_SOURCE_FIELD);\n assertEquals(\"error.association.target.unique.required\", error.getCode());\n }", "@Test\n\tpublic void testCheckCoflictOneDay() {\n\t\tActivity a1 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"MWF\", 1330, 1445);\n\t\tActivity a2 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"TWH\", 1330, 1445);\n\t\ttry {\n\t\t a1.checkConflict(a2);\n\t\t fail(); //ConflictException should have been thrown, but was not.\n\t\t } catch (ConflictException e) {\n\t\t //Check that the internal state didn't change during method call.\n\t\t assertEquals(\"MWF 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"TWH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t }\n\t}", "private boolean consistencyCheckC1Constraints(double[][] xResults) {\n\t\tint n = mExplicitMDP.getNumStates();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tdouble outxValue = GRBSolverUtils.getOutValue(i, xResults, mExplicitMDP);\n\t\t\tdouble inxValue = GRBSolverUtils.getInValue(i, xResults, mExplicitMDP);\n\t\t\tboolean satisfied = GRBSolverUtils.approximatelyEqual(outxValue, inxValue,\n\t\t\t\t\tmSettings.getFeasibilityTolerance());\n\n\t\t\tif (!satisfied) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "CourseParticipant getCourseParticInOneCourse(UUID courseCourseParticUuid);", "private static int getContinuedPartnerBonus(FriendMiniGameHistory history, String game, String p1, String p2) {\n final int gameCount = history.getGamesPlayed(game, p1, p2);\n if (gameCount > 0) {\n return 0;\n }\n // At this point, this is definitely a new game.\n final int uniqueCount = history.getTotalGamesPlayed(p1, p2, true);\n if (uniqueCount == 0) {\n // Not a CONTINUED partner, since they have never played any game together before.\n return 0;\n }\n // Minus 1 just so we can start the bonuses array at index 0.\n return CONTINUED_PARTNER_BONUSES[uniqueCount - 1];\n }", "void decideContinuity(Card curr_card) {\n if (curr_card.getTRIPS().size() != 0) { // if trips is not empty, then can get the last item and decide if continuous\n int last_index = curr_card.getTRIPS().size() - 1;\n WholeTrip last_whole_trip = (curr_card.getTRIPS().get(last_index));\n Trip last_trip = last_whole_trip.getWHOLE_TRIP().get(last_whole_trip.getWHOLE_TRIP().size() - 1); // get the last trip\n // evaluate if continuous\n this.isContinuous = START_TIME.timeInterval(last_trip.endTime) <= 120 &&\n last_trip.endStation.equals(START_STATION);\n }\n }", "public boolean singleConstraintExist(SingleConstraint c) {\n for (SingleConstraint constr : singleConstraints) {\n if (constr.getGame() == c.getGame()) {\n return true;\n }\n }\n return false;\n }", "public void testAddRejectReasons_RejectReasonsContainsManyDuplicateElementsAccuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[4];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[1] = new ExpenseEntryRejectReason(3);\r\n rejectReasons[2] = new ExpenseEntryRejectReason(3);\r\n rejectReasons[3] = new ExpenseEntryRejectReason(2);\r\n entry.addRejectReason(new ExpenseEntryRejectReason(1));\r\n\r\n ExpenseEntryRejectReason[] duplicate = entry.addRejectReasons(rejectReasons);\r\n\r\n // check nothing is added into the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should not be added.\", 1, rejectReasonsMap.size());\r\n\r\n // check the duplicate result\r\n assertNotNull(\"The duplicate result should be correct.\", duplicate);\r\n V1Dot1TestHelper.assertEquals(\"The duplicate result should be correct.\",\r\n new ExpenseEntryRejectReason[] {rejectReasons[0], rejectReasons[1], rejectReasons[2]}, duplicate);\r\n }", "boolean hasHas_consequence();", "public void setParticipant(Integer participant) {\n this.participant = participant;\n }", "static final /* synthetic */ boolean m114833a(Activity activity) {\n if (!(activity instanceof C41387m) || !((C41387m) activity).mo88338b()) {\n return false;\n }\n return true;\n }", "private List<Conference> allocateTrackOneAm() {\r\n\t\tint sum = 0;\r\n\t\tList<Conference> listTemp = new LinkedList<Conference>();\r\n\t\tlistTemp.addAll(INITIAL_CONFERENCE_LIST);\r\n\t\twhile (sum != AM_MINUTES) {\r\n\t\t\tInteger index = random.nextInt(listTemp.size());\r\n\t\t\tConference ele = listTemp.get(index);\r\n\t\t\tsuper.trackOneAm.add(ele);\r\n\t\t\tlistTemp.remove((int)index);\r\n\t\t\tif ((sum += ele.getTimeDuration()) > AM_MINUTES) {\r\n\t\t\t\tsum = 0;\r\n\t\t\t\tsuper.trackOneAm.clear();\r\n\t\t\t\tlistTemp.clear();\r\n\t\t\t\tlistTemp.addAll(INITIAL_CONFERENCE_LIST);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listTemp;\r\n\t}", "private static boolean isAtLeastOneActiveCallPeer(\n Iterator<? extends CallPeer> callPeers)\n {\n CallPeer callPeer;\n \n while(callPeers.hasNext())\n {\n callPeer = callPeers.next();\n if(!CallPeerState.isOnHold(callPeer.getState()))\n {\n // If at least one peer is active, then the call is active.\n return true;\n }\n }\n return false;\n }", "public void testAddRejectReasons_RejectReasonsContainsDuplicateElementsAccuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[4];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[1] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[2] = new ExpenseEntryRejectReason(2);\r\n rejectReasons[3] = new ExpenseEntryRejectReason(1);\r\n\r\n ExpenseEntryRejectReason[] duplicate = entry.addRejectReasons(rejectReasons);\r\n\r\n // check nothing is added into the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should not be added.\", 0, rejectReasonsMap.size());\r\n\r\n // check the duplicate result\r\n assertNotNull(\"The duplicate result should be correct.\", duplicate);\r\n V1Dot1TestHelper.assertEquals(\"The duplicate result should be correct.\",\r\n new ExpenseEntryRejectReason[] {rejectReasons[0], rejectReasons[1], rejectReasons[3]}, duplicate);\r\n }", "@Test\r\n void B6007089_test_SecMustNotBeNull() {\r\n System.out.println(\"\\n=======================================\");\r\n System.out.println(\"\\nTest Sec Must Not Be Null\");\r\n System.out.println(\"\\n=======================================\\n\");\r\n Section section = new Section();\r\n section.setSec(null);\r\n section.setTime(\"Tu13:00-15:00 B1231 -- We13:00-15:00 B1125\");\r\n\r\n\r\n Set<ConstraintViolation<Section>> result = validator.validate(section);\r\n assertEquals(1, result.size());\r\n\r\n ConstraintViolation<Section> v = result.iterator().next();\r\n assertEquals(\"must not be null\", v.getMessage());\r\n assertEquals(\"sec\", v.getPropertyPath().toString());\r\n }", "@Test\n public void CardRequirement2() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(1);\n\n LeaderCard l3 = new LeaderCard(4,\n new CardRequirements(Map.of(Color.YELLOW, new ReqValue(1, 2))),\n new Production(Resource.SHIELD));\n ArrayList<LeaderCard> cards = new ArrayList<>();\n cards.add(l1);\n cards.add(l3);\n p.associateLeaderCards(cards);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.GREEN, 0, null, null);\n DevelopmentCard card2 = new DevelopmentCard(2, Color.YELLOW, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n p.getDevelopmentSlot().addCard(card2, 1);\n c.emptyQueue();\n\n assertTrue(am.activateLeaderCard(p, message));\n\n assertTrue(l3.isEnabled());\n\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_NOTIFICATION).count());\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_UPD_Player).count());\n assertEquals(2, c.messages.size());\n }", "public LearningResultHasActivity[] findWhereCompetitionCodeEquals(String competitionCode) throws LearningResultHasActivityDaoException;", "public static HashSet<ParticipantContext> GetCurrentValidParticipant(String rtid) {\n HashSet<ParticipantContext> retSet = new HashSet<>();\n Session session = HibernateUtil.GetLocalSession();\n Transaction transaction = session.beginTransaction();\n boolean cmtFlag = false;\n try {\n RenRuntimerecordEntity runtimeCtx = session.get(RenRuntimerecordEntity.class, rtid);\n String participants = runtimeCtx.getParticipantCache();\n transaction.commit();\n cmtFlag = true;\n if (CommonUtil.IsNullOrEmpty(participants)) {\n return retSet;\n }\n String[] participantPairItem = participants.split(\",\");\n for (String workerIdBRolePair : participantPairItem) {\n String[] workerItem = workerIdBRolePair.split(\":\");\n retSet.add(ParticipantContext.GetContext(rtid, workerItem[0]));\n }\n return retSet;\n }\n catch (Exception ex) {\n if (!cmtFlag) {\n transaction.rollback();\n }\n throw ex;\n }\n finally {\n HibernateUtil.CloseLocalSession();\n }\n }", "public boolean isActive(){\n return (registeredParticipants.size() == connections().size());\n }", "public MergingPrerequisites withOneConnectionIdMustBePresent(List<String> oneConnectionIdMustBePresent) {\n this.oneConnectionIdMustBePresent = oneConnectionIdMustBePresent;\n return this;\n }", "public static boolean m37109aC(Activity activity) {\n AppMethodBeat.m2504i(49000);\n if (C24143a.m37112aE(activity) != null) {\n AppMethodBeat.m2505o(49000);\n return true;\n }\n AppMethodBeat.m2505o(49000);\n return false;\n }", "public void validateRpd15s1()\n {\n // This guideline cannot be automatically tested.\n }", "final void checkForComodification() {\n\t}", "@Test\n public void testClaimAdjReqCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setAdjReqCdEnum,\n RdaFissClaim::getAdjReqCd,\n FissAdjustmentRequestorCode.ADJUSTMENT_REQUESTOR_CODE_FISCAL_INTERMEDIARY,\n \"F\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setAdjReqCdUnrecognized,\n RdaFissClaim::getAdjReqCd,\n RdaFissClaim.Fields.adjReqCd,\n 1);\n }", "@Override\n\tpublic boolean deviceHasActiveCoupons(String deviceUUID) throws ASException {\n\t\tDeviceInfo di = deviceInfoDao.get(deviceUUID, true);\n\t\tif(StringUtils.hasText(di.getUserId())) {\n\t\t\tDate now = new Date();\n\t\t\tList<Integer> redeemStatus = Arrays.asList(new Integer[] {CampaignActivity.REDEEM_STATUS_DELIVERED, CampaignActivity.REDEEM_STATUS_ACCEPTED});\n\t\t\tList<CampaignActivity> list = caDao.getUsingUserAndRedeemStatusAndRange(di.getUserId(), redeemStatus, null, null);\n\t\t\tfor( CampaignActivity obj : list ) {\n\t\t\t\tif( obj.getLimitDateTime().after(now)) return true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static String regParticipantsWithCP(String fileName) {\n\t\t\n\t\tlogger.info(\"ParticipantRegistrationPlus:regParticipantsWithCP \" + fileName);\t\n\t\tClientSession cs = ClientSession.getInstance();\n\t\t\n\t\ttry {\n\t\t\tcs.startSession(userName, password);\n\t\t} catch (ApplicationException e1) {\n\t\t\tlogger.info(\"ApplicationException in ParticipantRegistrationPlus:regParticipantsWithCP\");\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tboolean isError=false;\n\t\tString errorMsg=\"\";\n\t\t\n\t\ttry\n\t\t{\t\t\t\n\t\t\tFile fXmlFile = new File(fileName);\n\t\t\tSAXBuilder builder = new SAXBuilder();\n\t\t\tDocument document = builder.build(new ByteArrayInputStream(getFileAsString(fXmlFile).getBytes()));\n\t\t\tElement root = document.getRootElement();\n\t\t\n\t\t\tList rows = root.getChild(\"patient_set\").getChildren(\"patient\");\n\t\t\tfor (int i = 0; i < rows.size(); i++) {\n\t\t\t\tElement row = (Element) rows.get(i);\n\t\t\t\tElement patientElement = row.getChild(\"patient_id\");\n\t\t\t\tElement cpElement = row.getChild(\"study_name\");\n\t\t\t\tHashMap<String, String> hashMap = new HashMap<String, String>();\n\t\t\t\tString gender = \"Unknown\", def_vital_status_cd = \"Unknown\", sex_cd=\"\";\n\n\t\t\t\tList params = row.getChildren(\"param\");\n\t\t\t\tfor (int j = 0; j < params.size(); j++) {\n\t\t\t\t\tElement column = (Element) params.get(j);\n\t\t\t\t\tString value = column.getText();\n\t\t\t\t\thashMap.put(j+\"\", value);\n\t\t\t\t}\n\t\t\t\tParticipant p = new Participant();\n\t\t\t\tp.setLastName(patientElement.getText());\n\t\t\t\tp.setFirstName(\"\");\n\t\t\t\t//p.setMiddleName(cpElement.getText());\n\t\t\t\tp.setActivityStatus(\"Active\");\n\t\t\t\tp.setBirthDate(dateFormat(hashMap.get(\"1\")));\n\t\t\t\tsex_cd=hashMap.get(\"4\");\n\n\t\t\t\tif(sex_cd.equalsIgnoreCase(\"MALE\"))\n\t\t\t\t\tgender=\"Male Gender\";\n\t\t\t\telse if(sex_cd.equalsIgnoreCase(\"FEMALE\"))\n\t\t\t\t\tgender=\"Female Gender\";\n\n\t\t\t\tp.setGender(gender);\n\n\t\t\t\tp.setVitalStatus(def_vital_status_cd);\n\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tp = (Participant) appService.createObject(p);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tString getCPQuery = \"select cp from edu.wustl.catissuecore.domain.CollectionProtocol cp where cp.shortTitle='\" + cpElement.getText() + \"'\";\n\t\t\t\t\tHQLCriteria hql = new HQLCriteria(getCPQuery);\t\t\t\t\t\n\t\t\t\t\tList<CollectionProtocol> resultList =appService.query(hql,CollectionProtocol.class.getName());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif (resultList.size() == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tCollectionProtocol cp = resultList.get(0);\t\t\t\t\t\t\n\t\t\t\t\t\tCollectionProtocolRegistration collectionProtocolRegistration = new CollectionProtocolRegistration();\t\t\t\t\t\n\t\t\t\t\t\tcollectionProtocolRegistration.setActivityStatus(\"Active\");\n\t\t\t\t\t\tcollectionProtocolRegistration.setCollectionProtocol(cp);\n\t\t\t\t\t\tcollectionProtocolRegistration.setParticipant(p);\n\t\t\t\t\t\tcollectionProtocolRegistration = (CollectionProtocolRegistration) appService.createObject(collectionProtocolRegistration);\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t \te.printStackTrace();\n\t\t \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Participant created successfully\");\n\t\t\t}\n\t\t} catch (JDOMException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t}\n\t\tif(isError)\n\t\t\treturn \"Participant registration failed because of an error [\"+errorMsg+\"]\";\n\t\telse\n\t\t\treturn \"success\";\n\t}", "public boolean contient(Couple assoc) {\n for (int i = 0; i < nbAssoc; i++)\n if (associations[i].equals(assoc))\n return true;\n return false;\n }", "FeedbackConsequence getConsequence();", "@Test\n public void testMatchesStatusNonNullStatus() {\n BgpSessionCompatibilityQuestion q =\n new BgpSessionCompatibilityQuestion(\n null, null, ConfiguredSessionStatus.UNIQUE_MATCH.toString(), null);\n\n for (ConfiguredSessionStatus status : ConfiguredSessionStatus.values()) {\n if (status == ConfiguredSessionStatus.UNIQUE_MATCH) {\n assertTrue(status.toString(), q.matchesStatus(status));\n } else {\n assertFalse(status.toString(), q.matchesStatus(status));\n }\n }\n }", "public List<String> oneConnectionIdMustBePresent() {\n return this.oneConnectionIdMustBePresent;\n }", "boolean hasDidcommInvitation();", "public void validateRpd11s1()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT08() {\n\t\t// PRECONDITIONS\n\t\tArrayList<Integer> a = new ArrayList<Integer>();\n\t\ta.add(100);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<Collection<?>> singleElementCollection = new HashSet<Collection<?>>();\n\t\tsingleElementCollection.add(a);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean sizeIsOne = smc.sizeIsOne(singleElementCollection);\n\t\tassertTrue(sizeIsOne);\n\t}", "boolean hasCampaignSharedSet();", "@Test\n void deve_retornar_o_periodo_first_period_in() {\n List<LocalTime> localTimes = new ArrayList<>();\n TimeCourseEnum response = timeService.addPeriod(localTimes);\n Assert.assertEquals(TimeCourseEnum.FIRST_PERIOD_IN, response);\n }", "protected CompletableFuture<Boolean> prepare(Set<TransactionParticipant> transactionParticipants) {\n log.trace(\"Preparing transaction {} via {}\", transactionId, transactionParticipants);\n return Tools.allOf(transactionParticipants.stream()\n .map(TransactionParticipant::prepare)\n .collect(Collectors.toList()))\n .thenApply(list -> list.stream().reduce(Boolean::logicalAnd).orElse(true));\n }", "final int getShareOfOne() { return getPlayerId() == 0 ? 1 : 0; }", "abstract void takeResposibilityForConnectionOfAssociation(com.webobjects.eointerface.EOAssociation association);", "@Test\r\n\tpublic void shouldReturn1PairsWhen11() {\n\t\tA = new ArrayList<Integer>(Arrays.asList(1, 1));\r\n\t\tassertEquals(1, Coins.countPairs(A));\r\n\t}", "public boolean conjectureSeenAlready(Conjecture conj)\n {\n String conj_string = conj.writeConjecture(\"tptp\");\n if (conj instanceof Implication)\n {\n if (previous_implications.containsKey(conj_string))\n return true;\n return false;\n }\n if (conj instanceof Equivalence)\n {\n if (previous_equivalences.containsKey(conj_string))\n return true;\n return false;\n }\n if (conj instanceof NonExists)\n {\n if (previous_non_exists.containsKey(conj_string))\n return true;\n return false;\n }\n\n if (conj instanceof Implicate)\n {\n if (previous_implicates.containsKey(conj_string))\n return true;\n return false;\n }\n return false;\n }", "public Integer getParticipant() {\n return participant;\n }", "@Test\n public void testClaimCancAdjCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setCancAdjCdEnum,\n RdaFissClaim::getCancAdjCd,\n FissCancelAdjustmentCode.CANCEL_ADJUSTMENT_CODE_COVERAGE,\n \"C\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setCancAdjCdUnrecognized,\n RdaFissClaim::getCancAdjCd,\n RdaFissClaim.Fields.cancAdjCd,\n 1);\n }", "@Test\n public void CardRequirementError() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(0);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.GREEN, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n c.emptyQueue();\n assertFalse(am.activateLeaderCard(p, message));\n assertEquals(MessageType.MSG_ERROR, c.messages.get(0).getMessageType());\n assertEquals(1, c.messages.size());\n }", "@Test\n public void ANDSearch_CareQualityComissionAdmission() throws Exception {\n\n final Set<String> searchResults = newsLineSearch.search(TEST_FILE, \"Care Quality Commission admission\",\n SearchType.AND);\n\n assertThat(searchResults).hasSize(1).contains(allLines.get(1));\n }", "boolean isOnePair();", "@Override\n public void checkActivityUnique(ActivityWrapper newActivity) throws RecordAlreadyExistsException {\n Activity[] filtered = filterList(a -> {\n Activity activity = (Activity) a;\n return activity.getEndTime().equals(newActivity.getEndTime())\n && activity.getStartTime().equals(newActivity.getStartTime())\n && activity.getTitle().equalsIgnoreCase(newActivity.getTitle());\n });\n\n if (filtered.length > 0) {\n throw new RecordAlreadyExistsException(\"activities\",\n \"title '\" + filtered[0].getTitle() + \"' and times '\" + filtered[0].getStartTime() + \" - \" + filtered[0].getEndTime() +\n \"'\");\n }\n }", "@Test\n public void test01ConfRespSignedByRecepient() throws Exception {\n log.trace(\">test01ConfRespSignedByRecepient\");\n\n this.cmpConfiguration.setResponseProtection(cmpAlias, \"signature\");\n this.cmpConfiguration.setCMPDefaultCA(cmpAlias, \"\");\n this.globalConfigurationSession.saveConfiguration(ADMIN, this.cmpConfiguration);\n\n byte[] nonce = CmpMessageHelper.createSenderNonce();\n byte[] transid = CmpMessageHelper.createSenderNonce();\n\n // Send a confirm message to the CA\n String hash = \"foo123\";\n PKIMessage confirm = genCertConfirm(userDN, this.cacert, nonce, transid, hash, 0, null);\n assertNotNull(confirm);\n ByteArrayOutputStream bao = new ByteArrayOutputStream();\n ASN1OutputStream dOut = ASN1OutputStream.create(bao, ASN1Encoding.DER);\n dOut.writeObject(confirm);\n byte[] ba = bao.toByteArray();\n // Send request and receive response\n byte[] resp = sendCmpHttp(ba, 200, cmpAlias);\n checkCmpResponseGeneral(resp, this.testx509ca.getSubjectDN(), userDN, this.cacert, nonce, transid, true, null, PKCSObjectIdentifiers.sha256WithRSAEncryption.getId());\n checkCmpPKIConfirmMessage(userDN, this.cacert, resp);\n\n log.trace(\"<test01ConfRespSignedByRecepient\");\n }", "boolean isActivityNotValid(ExoSocialActivity activity, ExoSocialActivity comment) throws Exception;", "@Test\n public void testDuplicateConditionsAndFulfillments() {\n final ThresholdSha256Condition condition = ThresholdSha256Condition.from(\n 2, Lists\n .newArrayList(subcondition1, subcondition1, subcondition2, subcondition3)\n );\n\n // Escrow Only (insufficient)\n ThresholdSha256Fulfillment fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition2, subcondition3),\n Lists.newArrayList(subfulfillment1)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(false));\n\n // Escrow Only (sufficient)\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition2, subcondition3),\n Lists.newArrayList(subfulfillment1, subfulfillment1)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Escrow+Party2\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition3),\n Lists.newArrayList(subfulfillment1, subfulfillment2)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Escrow+Party3\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition2),\n Lists.newArrayList(subfulfillment1, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Party2+Party3\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition1),\n Lists.newArrayList(subfulfillment2, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Party2+Party3 (w\\o escrow condition)\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(),\n Lists.newArrayList(subfulfillment2, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(false));\n }", "@Override\n\tpublic void test00400Add_DuplicateRecord() throws Exception\n\t{\n\t\t// This method will not fail with Generate card numbers set to Y\n\t}", "public static Boolean getAppositivePrs(PairInstance inst) {\n if (inst.getAnaphor().getSentId()!=inst.getAntecedent().getSentId()) \n return false;\n\n// exclude pairs where anaphor is an NE -- this might be a bad idea though..\n if (inst.getAnaphor().isEnamex()) \n return false;\n\n\n if (inst.getAntecedent().isEnamex() &&\n inst.getAnaphor().isEnamex()) {\n\n// exclude pairs of NE that have different type\n\n if (!(inst.getAntecedent().getEnamexType().equals(\n inst.getAnaphor().getEnamexType())))\n return false;\n\n// exclude pairs of LOC-ne\n if (inst.getAntecedent().getEnamexType().toLowerCase().startsWith(\"gpe\"))\n return false;\n if (inst.getAntecedent().getEnamexType().toLowerCase().startsWith(\"loc\"))\n return false;\n }\n\n// should have not-null maxnp-trees (otherwise -- problematic mentions)\n\nTree sentenceTree=inst.getAnaphor().getSentenceTree();\nTree AnaTree=inst.getAnaphor().getMaxNPParseTree();\nTree AnteTree=inst.getAntecedent().getMaxNPParseTree();\nif (sentenceTree==null) return false;\nif (AnaTree==null) return false;\nif (AnteTree==null) return false;\n\n\n// the structure should be ( * (,) (ANA)) or ( * (,) (ANTE)) -- depends on the ordering, annotation, mention extraction etc\n\n if (AnteTree.parent(sentenceTree)==AnaTree) {\n Tree[] chlds=AnaTree.children();\n Boolean lastcomma=false;\n for (int i=0; i<chlds.length && chlds[i]!=AnteTree; i++) {\n lastcomma=false;\n if (chlds[i].value().equalsIgnoreCase(\",\")) lastcomma=true;\n }\n return lastcomma;\n }\n if (AnaTree.parent(sentenceTree)==AnteTree) {\n\n Tree[] chlds=AnteTree.children();\n Boolean lastcomma=false;\n for (int i=0; i<chlds.length && chlds[i]!=AnaTree; i++) {\n lastcomma=false;\n if (chlds[i].value().equalsIgnoreCase(\",\")) lastcomma=true;\n }\n return lastcomma;\n\n }\n\n return false;\n\n }", "public boolean isSetParticipantID() {\n return this.participantID != null;\n }", "@Test\n public void testAddConference() throws Exception {\n ConferenceBuilder builder = ConferenceBuilder.newBuilder() //@formatter:off\n .setDefaultFeatures()\n .setLable(\"Random lable\")\n .setVideoChatUri(); //@formatter:on\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n deltaEvent.setConferences(createdEvent.getConferences());\n deltaEvent.addConferencesItem(builder.build());\n updateEventAsOrganizer(deltaEvent);\n\n EventData updatedEvent = eventManager.getEvent(defaultFolderId, createdEvent.getId());\n assertThat(\"Should be three conferences!\", I(updatedEvent.getConferences().size()), is(I(3)));\n\n /*\n * Check that the conference item has been added\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.ACCEPTED, CustomConsumers.ALL, 1);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"access information was changed\");\n }", "public void jointAcc()\n {\n int c=0;\n response=RestAssured.get(\"http://18.222.188.206:3333/accounts\");\n Holdertype=response.jsonPath().getList(\"'Holder type'\");\n System.out.println(Holdertype);\n for(int i=0;i<Holdertype.size();i++)\n {\n if(Holdertype.get(i)!=null)\n {\n if(Holdertype.get(i).equalsIgnoreCase(\"joint\"))\n {\n c++;\n }\n }\n }\n System.out.println(\"The total number of accounts that are of the type joint = \"+c);\n \n \n }", "int isProduitFormateUniteUniqueInPointvente(ProduitFormate produitFormate, Uniteproduit uniteproduit);", "List<CourseParticipant> getCourseParticListByRepresentativeUuid(UUID representativeUserUuid);", "boolean hasCampaignId();", "boolean hasCampaignId();", "public boolean isAuMoinsUneCompetenceAutrefEstEnCoursDeModification() {\n\t\tboolean result = false;\n\t\tint i = 0;\n\t\twhile (!result && i < tosRepartFdpCompetencesAutres().count()) {\n\t\t\tEORepartFdpAutre repart = (EORepartFdpAutre) tosRepartFdpCompetencesAutres().objectAtIndex(i);\n\t\t\tif (repart.isEnCoursDeModification()) {\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn result;\n\t}", "public Task createTask_OnePotentialOwner() throws HTException {\n Task task = services.createTask(\"Task1\", null, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><ClaimApprovalRequest><cust><firstname>witek</firstname></cust><amount>1</amount></ClaimApprovalRequest>\");\n org.junit.Assert.assertTrue(task.getPotentialOwners().size() == 1);\n return task;\n }", "@Test\n public void testHealthcareFacilityInRequestIsChanged() {\n MessageContentsList messageContentsList = TestDataUtil.createRequest(LOGISK_ADRESS, testDataGenerator.createRequest(\n TEST_RR_ID_MANY_HITS_NO_ERRORS, \"NotUsedInThisService\"));\n\n FindContentResponseType eiResponse = eiResponseDataHelper.getResponseForPatient(TEST_RR_ID_MANY_HITS_NO_ERRORS);\n\n List<MessageContentsList> requestList = agpServiceFactory.createRequestList(messageContentsList, eiResponse);\n\n assertEquals(3, requestList.size());\n\n final List<String> healthCareFacilities = requestList.stream()\n .map(mcl -> ((GetSubjectOfCareScheduleType) mcl.get(2)).getHealthcareFacility()).collect(Collectors.toList());\n\n assertTrue(\"HealtCareFacility not updated correctly\", healthCareFacilities.contains(TEST_LOGICAL_ADDRESS_4));\n assertTrue(\"HealtCareFacility not updated correctly\", healthCareFacilities.contains(TEST_LOGICAL_ADDRESS_5));\n assertTrue(\"HealtCareFacility not updated correctly\", healthCareFacilities.contains(TEST_LOGICAL_ADDRESS_6));\n }", "@Before\n\tpublic void incoporacionDeCandidatosYProvinciasHabilitadasALaJuntaElectoral(){\n\t\tmendoza.agregarPartido(pro);\n\t\tbuenosaires.agregarPartido(pro);\n\t\trionegro.agregarPartido(pro);\n\t\tentrerios.agregarPartido(pro);\n\t\tmendoza.agregarPartido(renovador);\n\t\tbuenosaires.agregarPartido(renovador);\n\t\trionegro.agregarPartido(renovador);\n\t\tentrerios.agregarPartido(renovador);\n\t\tmendoza.agregarPartido(fpv);\n\t\tbuenosaires.agregarPartido(fpv);\n\t\trionegro.agregarPartido(fpv);\n\t\tentrerios.agregarPartido(fpv);\n\n\t\t//Incorporacion de los candidatos habilitados al centro de computos\n\t\tjuntaElectoral.agregarCandidato(macri);\t\t\n\t\tjuntaElectoral.agregarCandidato(massa);\t\t\n\t\tjuntaElectoral.agregarCandidato(scioli);\n\n\t\t//Incorporacion de las provincias habilitadas al centro de computos\n\t\tjuntaElectoral.agregarProvincia(mendoza);\n\t\tjuntaElectoral.agregarProvincia(buenosaires);\n\t\tjuntaElectoral.agregarProvincia(rionegro);\n\t\tjuntaElectoral.agregarProvincia(entrerios);\n\t}", "@Test\r\n\tpublic void shouldReturn0PairsWhen1() {\n\t\tA = new ArrayList<Integer>(Arrays.asList(1));\r\n\t\tassertEquals(0, Coins.countPairs(A));\r\n\t}", "public static int getCorrectConsicutiveOnes(int[] arr) {\n int count = 0;\n int maxCount = 0;\n for (int i = 0; i < arr.length; i++) {\n if (arr[i] == 1) {\n count++;\n } else {\n if (maxCount < count) {\n maxCount = count;\n }\n count = 0;\n }\n }\n return maxCount > count ? maxCount : count;\n }", "boolean hasCampaignExperiment();", "pb4server.CheckAllianceCompetitionAskReq getCheckAllianceCompetitionAskReq();", "@Test\n void test50IdsAllowed() throws Exception {\n setEppInput(\"host_check_50.xml\");\n runFlow();\n }", "private void checkForJudgeAndTeam(IInternalContest contest) {\n Account account = contest.getAccounts(ClientType.Type.TEAM).firstElement();\n assertFalse(\"Team account not generated\", account == null);\n assertFalse(\"Team account not generated\", account.getClientId().equals(Type.TEAM));\n \n account = contest.getAccounts(ClientType.Type.JUDGE).firstElement();\n assertFalse(\"Judge account not generated\", account == null);\n assertFalse(\"Team account not generated\", account.getClientId().equals(Type.TEAM));\n\n }", "@Test\r\n public void Criterio60NoCumpleTest()\r\n {\r\n CriterioDeCorreccion criterio = new SesentaPorcientoCriterioDeCorreccion();\r\n ExamenCorregido corregido = generarExamenCorregidoNoAprobado(criterio);\r\n \r\n assertFalse(criterio.cumple(corregido.getNotasPregunta()));\r\n assertEquals(corregido.getNota(), 0);\r\n }", "@Test\n\tpublic void testcheckConflict() {\n\t\tActivity a1 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"MW\", 1330, 1445);\n\t\tActivity a2 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"TH\", 1330, 1445);\n\t\t try {\n\t\t a1.checkConflict(a2);\n\t\t assertEquals(\"Incorrect meeting string for this Activity.\", \"MW 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"Incorrect meeting string for possibleConflictingActivity.\", \"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t a2.checkConflict(a1);\n\t\t assertEquals(\"Incorrect meeting string for this Activity.\", \"MW 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"Incorrect meeting string for possibleConflictingActivity.\", \"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t } catch (ConflictException e) {\n\t\t fail(\"A ConflictException was thrown when two Activities at the same time on completely distinct days were compared.\");\n\t\t }\n\t\t a1.setMeetingDays(\"TH\");\n\t\t a1.setActivityTime(1445, 1530);\n\t\t try {\n\t\t a1.checkConflict(a2);\n\t\t fail(); //ConflictException should have been thrown, but was not.\n\t\t } catch (ConflictException e) {\n\t\t //Check that the internal state didn't change during method call.\n\t\t assertEquals(\"TH 2:45PM-3:30PM\", a1.getMeetingString());\n\t\t assertEquals(\"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t }\n\t}", "private List<CustStmtRecord> validateDuplicate (final List<CustStmtRecord> custStmtRecords) {\n\t\tlog.info(\"Entering {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\tfinal List<CustStmtRecord> duplicateReference = custStmtRecords\n\t\t\t\t.parallelStream()\n\t\t\t\t\t.filter(e -> Collections.frequency(custStmtRecords, e) > 1)\n\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\t\t;\n\t\t\t\n\t\tlog.info(\"duplicateReference {}\", duplicateReference);\n\t\t\t\n\t\tlog.info(\"Exiting {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\treturn duplicateReference;\n\t}", "@RequestMapping(value = \"/acl_presencerequests\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Presencerequest> createPresencerequest(@RequestBody Communicativeaction communicativeaction) throws URISyntaxException {\n communicativeaction.setActionTime(new DateTime());\n communicativeactionRepository.save(communicativeaction);\n String [] presenceReqInfo = communicativeaction.getContent().split(\",\");\n DateTime time = new DateTime();\n Presencestatus presenceStatus = null;\n Agent agent = communicativeaction.getAction_sender();\n for(String info : presenceReqInfo){\n String [] presencePair = info.split(\":\");\n switch(presencePair[0]){\n case \"presenceStatus\":{\n presenceStatus = presencestatusRepository.findByPresenceStatusName(presencePair[1]);\n break;\n }\n }\n }\n if(presenceStatus != null){\n Presencerequest presence = new Presencerequest(presenceStatus, time, agent);\n Presencerequest result = presencerequestRepository.save(presence);\n return ResponseEntity.created(new URI(\"/api/presencerequests/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"presencerequest\", result.getId().toString()))\n .body(result);\n }\n return ResponseEntity.created(new URI(\"/api/presencerequests/\"))\n .headers(HeaderUtil.createEntityCreationAlert(\"Failure\", \"Not a valid presence request status\"))\n .body(null);\n }", "public void howToGetASubject(String cCode){\n\t\t//CODE HERE\n\t\t\n\t\tfor (RegCourse course:registeredCourses){\n\t\t\tif(course.getCourseCode().equals(cCode)){\n\t\t\t\t\n\t\t\t\tif(this.findAccum(course)+(1-this.findFullAccum(course))<0.8){\n\t\t\t\t\tSystem.out.println(\"You can't get A for this subject\");\n\t\t\t\t}else {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.printf(\"You need %.2f score more to get an A for this subject\\n\",(0.8-this.findAccum(course))*100);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Test\r\n public void Criterio60SiCumpleTest()\r\n {\r\n CriterioDeCorreccion criterio = new SesentaPorcientoCriterioDeCorreccion();\r\n ExamenCorregido corregido = generarExamenCorregidoAprobado(criterio);\r\n \r\n assertTrue(criterio.cumple(corregido.getNotasPregunta()));\r\n assertEquals(corregido.getNota(), 4);\r\n }", "public Competence() {\r\n\t\tsuper();\r\n\t}", "public void setParticipantCount (byte p) {\n\t\tParticipants = p;\n\t}", "private boolean estPlein() {\n return (nbAssoc == associations.length);\n }", "boolean isCreditCardIsSingleAvailablePayment();", "@Test(priority=21)\n\tpublic void campaign_user_with_valid_filter_for_camp_ext_id() throws URISyntaxException, ClientProtocolException, IOException, ParseException{\n\t\ttest = extent.startTest(\"campaign_user_with_valid_filter_for_camp_ext_id\", \"To validate whether user is able to get campaign through campaign/user api with valid filter for campaign_ext_id\");\n\t\ttest.assignCategory(\"CFA GET /campaign/user API\");\n\t\tString camp_ext_id = yamlReader.readCampaignInfo(Constants.GroupHierarchy.AGENCY)\n\t\t\t.get(TestDataYamlConstants.CampaignConstants.CAMPAIGN_EXT_ID).toString();\n\t\tList<NameValuePair> list = new ArrayList<NameValuePair>();\n\t\tlist.add(new BasicNameValuePair(\"filter\", \"campaign_ext_id%3d\"+camp_ext_id));\n\t\tCloseableHttpResponse response = HelperClass.make_get_request(\"/v2/campaign/user\", access_token, list);\n\t\tAssert.assertTrue(!(response.getStatusLine().getStatusCode() == 500 || response.getStatusLine().getStatusCode() == 401), \"Invalid status code is displayed. \"+ \"Returned Status: \"+response.getStatusLine().getStatusCode()+\" \"+response.getStatusLine().getReasonPhrase());\n\t\ttest.log(LogStatus.INFO, \"Execute campaign/user api method with valid filter for campaign_ext_id field.\");\n\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n\t\tString line = \"\";\n\t\twhile ((line = rd.readLine()) != null) {\n\t\t // Convert response to JSON object\t\n\t\t JSONParser parser = new JSONParser();\n\t\t JSONObject json = (JSONObject) parser.parse(line);\n\t\t JSONArray array = (JSONArray)json.get(\"data\");\n\t\t // Get the first campaign from the campaign user\n\t\t JSONObject first_campaign = (JSONObject)array.get(0);\n\t\t // Check whether campaign user returns 1 record valid campaign_ext_id is passed for filter\n\t\t Assert.assertEquals(array.size(), 1, \"Campaign user does not return 1 record when valid campaign_ext_id is passed for filter.\");\n\t\t Assert.assertEquals(first_campaign.get(\"campaign_ext_id\").toString(), camp_ext_id, \"campaign/user api does not return searched campaign when valid campaign_ext_id is passed for filter.\");\n\t\t}\n\t}", "private void validateCardIssuerId(ATMSparrowMessage atmSparrowMessage, BankFusionEnvironment env) {\n\n ArrayList params = new ArrayList();\n params.add(atmSparrowMessage.getCardDestBranchCode());\n params.add(atmSparrowMessage.getCardDestCountryCode());\n params.add(atmSparrowMessage.getCardDestinationIMD());\n List branchBO = null;\n try {\n branchBO = env.getFactory().findByQuery(IBOATMCIB.BONAME, atmSourceWhereClause, params, null);\n }\n catch (BankFusionException bfe) {\n logger.error(\"Error while find by query for Branch for bmbranch: \" + atmSparrowMessage.getCardDestBranchCode(), bfe);\n }\n if (branchBO == null || branchBO.isEmpty()) {\n atmSparrowMessage.setAuthorisedFlag(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG);\n Object[] field = new Object[] { atmSparrowMessage.getCardDestCountryCode(), atmSparrowMessage.getCardDestinationIMD(),\n atmSparrowMessage.getCardDestBranchCode() };\n if (atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_0)) {\n // populateErrorDetails(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG,\n // ATMConstants.WARNING, 7502, BankFusionMessages.ERROR_LEVEL,\n populateErrorDetails(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG, ATMConstants.WARNING,\n ChannelsEventCodes.E_DEST_COUNTRY_IMD_BRANCH_NOT_MAPPED, BankFusionMessages.ERROR_LEVEL, atmSparrowMessage,\n field, env);\n }\n else if (atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_1)\n || atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_2)\n || atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_3)) {\n // populateErrorDetails(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG,\n // ATMConstants.CRITICAL, 7503, BankFusionMessages.ERROR_LEVEL,\n populateErrorDetails(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG, ATMConstants.CRITICAL,\n ChannelsEventCodes.E_DEST_COUNTRY_IMD_BRANCH_UNMAPPED_POST_NOT_POSTED, BankFusionMessages.ERROR_LEVEL,\n atmSparrowMessage, field, env);\n }\n }\n else {\n atmSparrowMessage.setAuthorisedFlag(ATMConstants.AUTHORIZED_MESSAGE_FLAG);\n }\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Participation)) {\n return false;\n }\n Participation other = (Participation) object;\n if ((this.participationPK == null && other.participationPK != null) || (this.participationPK != null && !this.participationPK.equals(other.participationPK))) {\n return false;\n }\n return true;\n }", "private boolean check813_913(Schedule sched)\n\t{\n\t\tboolean has313 = false;\n\t\tboolean has413 = false;\n\t\tCourse workingCourse;\n\t\tLab workingLab;\n\t\t\n\t\t//Traverses the list and finds out if we have CPSC313 or CPSC413\n\t\t//COuld probably be added to something else and have has313/has412 a field.\n\t\t//of a schedule\nC:\t\tfor(int i = 0;i<sched.getCourses().size();i++)\n\t\t{\n\t\t\tworkingCourse = sched.getCourses().get(i);\n\t\t\t\n\t\t\t//If CPSC 313 exists in our courses list\n\t\t\tif((workingCourse.getDepartment().equals(\"CPSC\")) && \n\t\t\t\t\t(workingCourse.getNumber() == 313))\n\t\t\t{\n\t\t\t\thas313 = true;\n\t\t\t}\n\t\t\t\n\t\t\t//If CPSC 413 exists in our courses list\n\t\t\tif((workingCourse.getDepartment().equals(\"CPSC\")) && \n\t\t\t\t\t(workingCourse.getNumber() == 413))\n\t\t\t{\n\t\t\t\thas413 = true;\n\t\t\t}\n\t\t\t\n\t\t\tif(has313 && has413)\n\t\t\t\tbreak C;\n\t\t}//End of for-loop\n\t\t\n\t\t//At this point we know if we have cpsc313 or cpsc413 in the schedule\n\t\tif(has313)\n\t\t{\n\t\t\t//Checking that all the requirements for cpsc813 are met\n\t\t\t\n\t\t\t//Go through labs to find cpsc813\n\t\t\tfor(int i = 0; i<sched.getLabs().size();i++)\n\t\t\t{\n\t\t\t\tworkingLab = sched.getLabs().get(i);\n\t\t\t\t\n\t\t\t\tif((workingLab.getDepartment().equals(\"CPSC\")) &&\n\t\t\t\t\t\t(workingLab.getNumber() == 813) &&\n\t\t\t\t\t\t(workingLab.getSlot() != null))\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t//If it's not schedule on tuesday at 1800 and it's not null \n\t\t\t\t\tif((!workingLab.getSlot().getDay().equals(ScheduleDay.TU) || \n\t\t\t\t\t\t\tworkingLab.getSlot().getStartTime() != 1800) &&\n\t\t\t\t\t\t\tworkingLab.getSlot() != null)\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(has413)\n\t\t{\n\t\t\t//Checking that all the requirements for cpsc913 are met\n\t\t\t\n\t\t\t//Go through labs to find cpsc913\n\t\t\tfor(int i = 0; i<sched.getLabs().size();i++)\n\t\t\t{\n\t\t\t\tworkingLab = sched.getLabs().get(i);\n\t\t\t\t\n\t\t\t\tif((workingLab.getDepartment().equals(\"CPSC\")) &&\n\t\t\t\t\t\t(workingLab.getNumber() == 913) &&\n\t\t\t\t\t\t(workingLab.getSlot() != null))\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t//If it's not schedule on tuesday at 1800 and it's not null \n\t\t\t\t\tif((!workingLab.getSlot().getDay().equals(ScheduleDay.TU) || \n\t\t\t\t\t\t\tworkingLab.getSlot().getStartTime() != 1800) &&\n\t\t\t\t\t\t\tworkingLab.getSlot() != null)\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "@Test\n public void testClaimPrimaryPayerCode() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setPrimaryPayerCodeEnum,\n RdaFissClaim::getPrimaryPayerCode,\n FissPayersCode.PAYERS_CODE_AUTO_NO_FAULT,\n \"D\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setPrimaryPayerCodeUnrecognized,\n RdaFissClaim::getPrimaryPayerCode,\n RdaFissClaim.Fields.primaryPayerCode,\n 1);\n }", "public static C40931c m37112aE(Activity activity) {\n AppMethodBeat.m2504i(49003);\n if (activity == null) {\n C4990ab.m7420w(\"MicroMsg.ProcessManager\", \"hy: ac is null\");\n AppMethodBeat.m2505o(49003);\n return null;\n } else if (activity.getIntent() == null) {\n C4990ab.m7420w(\"MicroMsg.ProcessManager\", \"hy: get intent is null\");\n AppMethodBeat.m2505o(49003);\n return null;\n } else {\n C40931c c40931c = (C40931c) AeR.get(activity.getIntent().getIntExtra(\"process_id\", 0));\n AppMethodBeat.m2505o(49003);\n return c40931c;\n }\n }", "public boolean canAddThreePid() {\n return (supportStage(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY) && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY))\n || (supportStage(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN) && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN));\n }", "private boolean mustAddElement(int element, List<Integer> featuresCombination)\n\t{\n\t\treturn featuresCombination.size() < maxRuleSize && featuresCombination.get(featuresCombination.size() - 1) < element;\n\t}", "public boolean checkParticipate(Authentication auth, Integer ctId) throws NoSuchPageException {\n //check if participator\n ContestEntity contestEntity = getContestById(ctId);\n Date currentTime = new Date();\n Date startTime = contestEntity.getStartTime();\n Date endTime = DateUtils.addMinutes(startTime, contestEntity.getDuration());\n List<AuthorityDTO> lstAuthority = authorityMapper.getContestAuthority(ctId, auth.getName());\n for (AuthorityDTO curAuth : lstAuthority) {\n if (curAuth.getId().equals(Constants.AUTH_PARTICIPATE_CONTEST_ID)) {\n //if so then check conditions mentioned above\n if (currentTime.compareTo(startTime) >= 0\n && currentTime.compareTo(endTime) <= 0){\n return true;\n }else if(currentTime.compareTo(endTime) > 0\n && contestEntity.getCanPractice().equals(1)){\n return true;\n }\n }\n }\n //not participator\n return false;\n }", "private Boolean playerHasOneInitialCountry(List<Country> countries, String player) {\n return countries.stream()\n .filter(c -> Objects.nonNull(c.getOwner()) && c.getOwner().equals(player))\n .collect(Collectors.toList())\n .size() == 1;\n }", "if (charge == adhocTicket.getCharge()) {\n System.out.println(\"Charge is passed\");\n }", "Activite getActiviteCourante();", "public boolean checkSeatTaken(int[] RC) {\n return seatPlan[RC[0] - 1][RC[1] - 1].getStatus();\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n DBSchema dBSchema0 = new DBSchema(\"Er\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"Er\", dBSchema0);\n String[] stringArray0 = new String[0];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"e/ \", false, stringArray0);\n boolean boolean0 = DBUtil.containsMandatoryColumn(dBUniqueConstraint0);\n assertFalse(boolean0);\n }", "public boolean hasCLAPPROVAL() {\n return fieldSetFlags()[5];\n }" ]
[ "0.50040483", "0.48897263", "0.48009148", "0.4702605", "0.468145", "0.46574417", "0.46454233", "0.46360862", "0.46269584", "0.46013868", "0.45980343", "0.45934063", "0.45587957", "0.45548445", "0.45104662", "0.4507063", "0.4503205", "0.44997132", "0.4492254", "0.44801888", "0.4472261", "0.4467089", "0.44259927", "0.4424563", "0.4420599", "0.44138485", "0.43899786", "0.4385754", "0.4369466", "0.43601716", "0.43541032", "0.4338202", "0.43256378", "0.43255004", "0.43226045", "0.4320756", "0.4306609", "0.4299173", "0.4294845", "0.42873207", "0.42830232", "0.426685", "0.42651477", "0.42516026", "0.42505935", "0.42500672", "0.4243398", "0.42423525", "0.42418534", "0.42346025", "0.42299354", "0.42294863", "0.42280167", "0.42252254", "0.42243987", "0.42236266", "0.42196223", "0.42161202", "0.42150706", "0.42093876", "0.42078847", "0.42078215", "0.4205394", "0.41955194", "0.41905293", "0.41905293", "0.4190439", "0.419001", "0.41837892", "0.41815603", "0.41807956", "0.4176325", "0.41738293", "0.41671735", "0.41595802", "0.4157154", "0.41570446", "0.41561007", "0.4154136", "0.41534972", "0.41517198", "0.41516733", "0.4148139", "0.414481", "0.4136308", "0.4134839", "0.41334328", "0.41330862", "0.41253537", "0.4122051", "0.4118426", "0.411777", "0.41163614", "0.4111723", "0.41091308", "0.41037983", "0.40988332", "0.4094973", "0.40934077", "0.4093086", "0.40917626" ]
0.0
-1
CCD Policy Activity SHALL contain exactly one [1..1] participant (CONF58), such that.
IPayerEntry setCoveredParty(ICoveredParty value);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testRemoveOnlyOneConference() throws Exception {\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n deltaEvent.setConferences(Collections.singletonList(createdEvent.getConferences().get(0)));\n updateEventAsOrganizer(deltaEvent);\n\n EventData updatedEvent = eventManager.getEvent(defaultFolderId, createdEvent.getId());\n assertThat(\"Should be one conference!\", I(updatedEvent.getConferences().size()), is(I(1)));\n\n /*\n * Check that mails has been send, but for changed conferences not removed all\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.ACCEPTED, CustomConsumers.ALL, 1);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"access information was changed\");\n }", "public boolean isContinuingEducationPassed(CapIDModel capID) throws AAException, RemoteException;", "@Test\n public void minimumValidClaim() {\n claim.setClaimId(EXPECTED_CLAIM_ID);\n claim.setDcn(\"dcn\");\n claim.setIntermediaryNb(\"inter\");\n claim.setHicNo(\"hicn\");\n claim.setCurrStatus('T');\n claim.setCurrLoc1('M');\n claim.setCurrLoc2(\"9000\");\n claim.setLastUpdated(clock.instant());\n claimBuilder\n .setRdaClaimKey(\"claim_id\")\n .setDcn(\"dcn\")\n .setIntermediaryNb(\"inter\")\n .setHicNo(\"hicn\")\n .setCurrStatusEnum(FissClaimStatus.CLAIM_STATUS_RTP)\n .setCurrLoc1Enum(FissProcessingType.PROCESSING_TYPE_MANUAL)\n .setCurrLoc2Enum(FissCurrentLocation2.CURRENT_LOCATION_2_CABLE);\n changeBuilder\n .setSeq(MIN_SEQUENCE_NUM)\n .setChangeType(ChangeType.CHANGE_TYPE_INSERT)\n .setClaim(claimBuilder.build());\n assertChangeMatches(RdaChange.Type.INSERT);\n }", "private int isPrivacyModelFulfilled(Transformation<?> transformation, HashGroupifyEntry entry) {\n \n // Check minimal group size\n if (minimalClassSize != Integer.MAX_VALUE && entry.count < minimalClassSize) {\n return 0;\n }\n \n // Check other criteria\n // Note: The d-presence criterion must be checked first to ensure correct handling of d-presence with tuple suppression.\n // This is currently ensured by convention. See ARXConfiguration.getCriteriaAsArray();\n for (int i = 0; i < classBasedCriteria.length; i++) {\n if (!classBasedCriteria[i].isAnonymous(transformation, entry)) {\n return i + 1;\n }\n }\n return -1;\n }", "@Test\r\n public void testCommissionPallets() throws Exception\r\n {\r\n String epcToCheck = \"urn:epc:id:sscc:0614141.0000000001\";\r\n XmlObjectEventType event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNull(event);\r\n\r\n runCaptureTest(COMMISSION_PALLETS_XML);\r\n\r\n event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNotNull(event);\r\n }", "@Test\n public void CardRequirement1() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(1);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.YELLOW, 0, null, null);\n DevelopmentCard card2 = new DevelopmentCard(2, Color.GREEN, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n p.getDevelopmentSlot().addCard(card2, 1);\n c.emptyQueue();\n\n assertTrue(am.activateLeaderCard(p, message));\n\n assertTrue(l2.isEnabled());\n\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_UPD_Player).count());\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_NOTIFICATION).count());\n assertEquals(2, c.messages.size());\n\n }", "public void test1_CheckUniqueParticipant() {\n if (!ParticipantController.checkUniqueParticipant(\"ControllerTest\")) {\n assertTrue(true);\n } else {\n assertTrue(\"Fail\", false);\n }\n\n // should not find participant else fail\n if (ParticipantController.checkUniqueParticipant(\"ControllerTestDummy\")) {\n assertTrue(true);\n } else {\n assertTrue(\"Fail\", false);\n }\n }", "@Test\r\n public void testCommissionCases() throws Exception\r\n {\r\n String epcToCheck = \"urn:epc:id:sgtin:0614141.107340.1\";\r\n XmlObjectEventType event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNull(event);\r\n\r\n runCaptureTest(COMMISSION_CASES_XML);\r\n\r\n event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNotNull(event);\r\n }", "public void testValidateSubjectPrimaryAssociationsDuplicate() throws Exception {\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n List subjectPrimaryAssociations = positionWrapperBean.getSubjectPrimaryAssociations();\n for (int i = 0; i < subjectPrimaryAssociations.size(); i++) {\n ArtefactAssociationWrapperBean artefactAssociationWrapperBean = (ArtefactAssociationWrapperBean) subjectPrimaryAssociations.get(i);\n artefactAssociationWrapperBean.setSourceId(new Long(12));\n artefactAssociationWrapperBean.setQualifierId(new Long(399));\n }\n // should produce a duplicate assocition error\n DataBinder binder = new DataBinder(positionWrapperBean, ZynapDefaultFormController.DEFAULT_COMMAND_NAME);\n Errors errors = binder.getBindingResult();\n positionValidator.validateSubjectPrimaryAssociations(positionWrapperBean, errors);\n assertEquals(1, errors.getErrorCount());\n FieldError error = errors.getFieldError(FIRST_PRIMARY_ASSOCIATION_SOURCE_FIELD);\n assertEquals(\"error.association.target.unique.required\", error.getCode());\n }", "@Test\n\tpublic void testCheckCoflictOneDay() {\n\t\tActivity a1 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"MWF\", 1330, 1445);\n\t\tActivity a2 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"TWH\", 1330, 1445);\n\t\ttry {\n\t\t a1.checkConflict(a2);\n\t\t fail(); //ConflictException should have been thrown, but was not.\n\t\t } catch (ConflictException e) {\n\t\t //Check that the internal state didn't change during method call.\n\t\t assertEquals(\"MWF 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"TWH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t }\n\t}", "private boolean consistencyCheckC1Constraints(double[][] xResults) {\n\t\tint n = mExplicitMDP.getNumStates();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tdouble outxValue = GRBSolverUtils.getOutValue(i, xResults, mExplicitMDP);\n\t\t\tdouble inxValue = GRBSolverUtils.getInValue(i, xResults, mExplicitMDP);\n\t\t\tboolean satisfied = GRBSolverUtils.approximatelyEqual(outxValue, inxValue,\n\t\t\t\t\tmSettings.getFeasibilityTolerance());\n\n\t\t\tif (!satisfied) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "CourseParticipant getCourseParticInOneCourse(UUID courseCourseParticUuid);", "private static int getContinuedPartnerBonus(FriendMiniGameHistory history, String game, String p1, String p2) {\n final int gameCount = history.getGamesPlayed(game, p1, p2);\n if (gameCount > 0) {\n return 0;\n }\n // At this point, this is definitely a new game.\n final int uniqueCount = history.getTotalGamesPlayed(p1, p2, true);\n if (uniqueCount == 0) {\n // Not a CONTINUED partner, since they have never played any game together before.\n return 0;\n }\n // Minus 1 just so we can start the bonuses array at index 0.\n return CONTINUED_PARTNER_BONUSES[uniqueCount - 1];\n }", "void decideContinuity(Card curr_card) {\n if (curr_card.getTRIPS().size() != 0) { // if trips is not empty, then can get the last item and decide if continuous\n int last_index = curr_card.getTRIPS().size() - 1;\n WholeTrip last_whole_trip = (curr_card.getTRIPS().get(last_index));\n Trip last_trip = last_whole_trip.getWHOLE_TRIP().get(last_whole_trip.getWHOLE_TRIP().size() - 1); // get the last trip\n // evaluate if continuous\n this.isContinuous = START_TIME.timeInterval(last_trip.endTime) <= 120 &&\n last_trip.endStation.equals(START_STATION);\n }\n }", "public boolean singleConstraintExist(SingleConstraint c) {\n for (SingleConstraint constr : singleConstraints) {\n if (constr.getGame() == c.getGame()) {\n return true;\n }\n }\n return false;\n }", "public void testAddRejectReasons_RejectReasonsContainsManyDuplicateElementsAccuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[4];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[1] = new ExpenseEntryRejectReason(3);\r\n rejectReasons[2] = new ExpenseEntryRejectReason(3);\r\n rejectReasons[3] = new ExpenseEntryRejectReason(2);\r\n entry.addRejectReason(new ExpenseEntryRejectReason(1));\r\n\r\n ExpenseEntryRejectReason[] duplicate = entry.addRejectReasons(rejectReasons);\r\n\r\n // check nothing is added into the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should not be added.\", 1, rejectReasonsMap.size());\r\n\r\n // check the duplicate result\r\n assertNotNull(\"The duplicate result should be correct.\", duplicate);\r\n V1Dot1TestHelper.assertEquals(\"The duplicate result should be correct.\",\r\n new ExpenseEntryRejectReason[] {rejectReasons[0], rejectReasons[1], rejectReasons[2]}, duplicate);\r\n }", "boolean hasHas_consequence();", "public void setParticipant(Integer participant) {\n this.participant = participant;\n }", "static final /* synthetic */ boolean m114833a(Activity activity) {\n if (!(activity instanceof C41387m) || !((C41387m) activity).mo88338b()) {\n return false;\n }\n return true;\n }", "private List<Conference> allocateTrackOneAm() {\r\n\t\tint sum = 0;\r\n\t\tList<Conference> listTemp = new LinkedList<Conference>();\r\n\t\tlistTemp.addAll(INITIAL_CONFERENCE_LIST);\r\n\t\twhile (sum != AM_MINUTES) {\r\n\t\t\tInteger index = random.nextInt(listTemp.size());\r\n\t\t\tConference ele = listTemp.get(index);\r\n\t\t\tsuper.trackOneAm.add(ele);\r\n\t\t\tlistTemp.remove((int)index);\r\n\t\t\tif ((sum += ele.getTimeDuration()) > AM_MINUTES) {\r\n\t\t\t\tsum = 0;\r\n\t\t\t\tsuper.trackOneAm.clear();\r\n\t\t\t\tlistTemp.clear();\r\n\t\t\t\tlistTemp.addAll(INITIAL_CONFERENCE_LIST);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listTemp;\r\n\t}", "private static boolean isAtLeastOneActiveCallPeer(\n Iterator<? extends CallPeer> callPeers)\n {\n CallPeer callPeer;\n \n while(callPeers.hasNext())\n {\n callPeer = callPeers.next();\n if(!CallPeerState.isOnHold(callPeer.getState()))\n {\n // If at least one peer is active, then the call is active.\n return true;\n }\n }\n return false;\n }", "public void testAddRejectReasons_RejectReasonsContainsDuplicateElementsAccuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[4];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[1] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[2] = new ExpenseEntryRejectReason(2);\r\n rejectReasons[3] = new ExpenseEntryRejectReason(1);\r\n\r\n ExpenseEntryRejectReason[] duplicate = entry.addRejectReasons(rejectReasons);\r\n\r\n // check nothing is added into the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should not be added.\", 0, rejectReasonsMap.size());\r\n\r\n // check the duplicate result\r\n assertNotNull(\"The duplicate result should be correct.\", duplicate);\r\n V1Dot1TestHelper.assertEquals(\"The duplicate result should be correct.\",\r\n new ExpenseEntryRejectReason[] {rejectReasons[0], rejectReasons[1], rejectReasons[3]}, duplicate);\r\n }", "@Test\r\n void B6007089_test_SecMustNotBeNull() {\r\n System.out.println(\"\\n=======================================\");\r\n System.out.println(\"\\nTest Sec Must Not Be Null\");\r\n System.out.println(\"\\n=======================================\\n\");\r\n Section section = new Section();\r\n section.setSec(null);\r\n section.setTime(\"Tu13:00-15:00 B1231 -- We13:00-15:00 B1125\");\r\n\r\n\r\n Set<ConstraintViolation<Section>> result = validator.validate(section);\r\n assertEquals(1, result.size());\r\n\r\n ConstraintViolation<Section> v = result.iterator().next();\r\n assertEquals(\"must not be null\", v.getMessage());\r\n assertEquals(\"sec\", v.getPropertyPath().toString());\r\n }", "@Test\n public void CardRequirement2() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(1);\n\n LeaderCard l3 = new LeaderCard(4,\n new CardRequirements(Map.of(Color.YELLOW, new ReqValue(1, 2))),\n new Production(Resource.SHIELD));\n ArrayList<LeaderCard> cards = new ArrayList<>();\n cards.add(l1);\n cards.add(l3);\n p.associateLeaderCards(cards);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.GREEN, 0, null, null);\n DevelopmentCard card2 = new DevelopmentCard(2, Color.YELLOW, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n p.getDevelopmentSlot().addCard(card2, 1);\n c.emptyQueue();\n\n assertTrue(am.activateLeaderCard(p, message));\n\n assertTrue(l3.isEnabled());\n\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_NOTIFICATION).count());\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_UPD_Player).count());\n assertEquals(2, c.messages.size());\n }", "public LearningResultHasActivity[] findWhereCompetitionCodeEquals(String competitionCode) throws LearningResultHasActivityDaoException;", "public static HashSet<ParticipantContext> GetCurrentValidParticipant(String rtid) {\n HashSet<ParticipantContext> retSet = new HashSet<>();\n Session session = HibernateUtil.GetLocalSession();\n Transaction transaction = session.beginTransaction();\n boolean cmtFlag = false;\n try {\n RenRuntimerecordEntity runtimeCtx = session.get(RenRuntimerecordEntity.class, rtid);\n String participants = runtimeCtx.getParticipantCache();\n transaction.commit();\n cmtFlag = true;\n if (CommonUtil.IsNullOrEmpty(participants)) {\n return retSet;\n }\n String[] participantPairItem = participants.split(\",\");\n for (String workerIdBRolePair : participantPairItem) {\n String[] workerItem = workerIdBRolePair.split(\":\");\n retSet.add(ParticipantContext.GetContext(rtid, workerItem[0]));\n }\n return retSet;\n }\n catch (Exception ex) {\n if (!cmtFlag) {\n transaction.rollback();\n }\n throw ex;\n }\n finally {\n HibernateUtil.CloseLocalSession();\n }\n }", "public boolean isActive(){\n return (registeredParticipants.size() == connections().size());\n }", "public MergingPrerequisites withOneConnectionIdMustBePresent(List<String> oneConnectionIdMustBePresent) {\n this.oneConnectionIdMustBePresent = oneConnectionIdMustBePresent;\n return this;\n }", "public static boolean m37109aC(Activity activity) {\n AppMethodBeat.m2504i(49000);\n if (C24143a.m37112aE(activity) != null) {\n AppMethodBeat.m2505o(49000);\n return true;\n }\n AppMethodBeat.m2505o(49000);\n return false;\n }", "public void validateRpd15s1()\n {\n // This guideline cannot be automatically tested.\n }", "final void checkForComodification() {\n\t}", "@Test\n public void testClaimAdjReqCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setAdjReqCdEnum,\n RdaFissClaim::getAdjReqCd,\n FissAdjustmentRequestorCode.ADJUSTMENT_REQUESTOR_CODE_FISCAL_INTERMEDIARY,\n \"F\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setAdjReqCdUnrecognized,\n RdaFissClaim::getAdjReqCd,\n RdaFissClaim.Fields.adjReqCd,\n 1);\n }", "@Override\n\tpublic boolean deviceHasActiveCoupons(String deviceUUID) throws ASException {\n\t\tDeviceInfo di = deviceInfoDao.get(deviceUUID, true);\n\t\tif(StringUtils.hasText(di.getUserId())) {\n\t\t\tDate now = new Date();\n\t\t\tList<Integer> redeemStatus = Arrays.asList(new Integer[] {CampaignActivity.REDEEM_STATUS_DELIVERED, CampaignActivity.REDEEM_STATUS_ACCEPTED});\n\t\t\tList<CampaignActivity> list = caDao.getUsingUserAndRedeemStatusAndRange(di.getUserId(), redeemStatus, null, null);\n\t\t\tfor( CampaignActivity obj : list ) {\n\t\t\t\tif( obj.getLimitDateTime().after(now)) return true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static String regParticipantsWithCP(String fileName) {\n\t\t\n\t\tlogger.info(\"ParticipantRegistrationPlus:regParticipantsWithCP \" + fileName);\t\n\t\tClientSession cs = ClientSession.getInstance();\n\t\t\n\t\ttry {\n\t\t\tcs.startSession(userName, password);\n\t\t} catch (ApplicationException e1) {\n\t\t\tlogger.info(\"ApplicationException in ParticipantRegistrationPlus:regParticipantsWithCP\");\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tboolean isError=false;\n\t\tString errorMsg=\"\";\n\t\t\n\t\ttry\n\t\t{\t\t\t\n\t\t\tFile fXmlFile = new File(fileName);\n\t\t\tSAXBuilder builder = new SAXBuilder();\n\t\t\tDocument document = builder.build(new ByteArrayInputStream(getFileAsString(fXmlFile).getBytes()));\n\t\t\tElement root = document.getRootElement();\n\t\t\n\t\t\tList rows = root.getChild(\"patient_set\").getChildren(\"patient\");\n\t\t\tfor (int i = 0; i < rows.size(); i++) {\n\t\t\t\tElement row = (Element) rows.get(i);\n\t\t\t\tElement patientElement = row.getChild(\"patient_id\");\n\t\t\t\tElement cpElement = row.getChild(\"study_name\");\n\t\t\t\tHashMap<String, String> hashMap = new HashMap<String, String>();\n\t\t\t\tString gender = \"Unknown\", def_vital_status_cd = \"Unknown\", sex_cd=\"\";\n\n\t\t\t\tList params = row.getChildren(\"param\");\n\t\t\t\tfor (int j = 0; j < params.size(); j++) {\n\t\t\t\t\tElement column = (Element) params.get(j);\n\t\t\t\t\tString value = column.getText();\n\t\t\t\t\thashMap.put(j+\"\", value);\n\t\t\t\t}\n\t\t\t\tParticipant p = new Participant();\n\t\t\t\tp.setLastName(patientElement.getText());\n\t\t\t\tp.setFirstName(\"\");\n\t\t\t\t//p.setMiddleName(cpElement.getText());\n\t\t\t\tp.setActivityStatus(\"Active\");\n\t\t\t\tp.setBirthDate(dateFormat(hashMap.get(\"1\")));\n\t\t\t\tsex_cd=hashMap.get(\"4\");\n\n\t\t\t\tif(sex_cd.equalsIgnoreCase(\"MALE\"))\n\t\t\t\t\tgender=\"Male Gender\";\n\t\t\t\telse if(sex_cd.equalsIgnoreCase(\"FEMALE\"))\n\t\t\t\t\tgender=\"Female Gender\";\n\n\t\t\t\tp.setGender(gender);\n\n\t\t\t\tp.setVitalStatus(def_vital_status_cd);\n\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tp = (Participant) appService.createObject(p);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tString getCPQuery = \"select cp from edu.wustl.catissuecore.domain.CollectionProtocol cp where cp.shortTitle='\" + cpElement.getText() + \"'\";\n\t\t\t\t\tHQLCriteria hql = new HQLCriteria(getCPQuery);\t\t\t\t\t\n\t\t\t\t\tList<CollectionProtocol> resultList =appService.query(hql,CollectionProtocol.class.getName());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif (resultList.size() == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tCollectionProtocol cp = resultList.get(0);\t\t\t\t\t\t\n\t\t\t\t\t\tCollectionProtocolRegistration collectionProtocolRegistration = new CollectionProtocolRegistration();\t\t\t\t\t\n\t\t\t\t\t\tcollectionProtocolRegistration.setActivityStatus(\"Active\");\n\t\t\t\t\t\tcollectionProtocolRegistration.setCollectionProtocol(cp);\n\t\t\t\t\t\tcollectionProtocolRegistration.setParticipant(p);\n\t\t\t\t\t\tcollectionProtocolRegistration = (CollectionProtocolRegistration) appService.createObject(collectionProtocolRegistration);\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t \te.printStackTrace();\n\t\t \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Participant created successfully\");\n\t\t\t}\n\t\t} catch (JDOMException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t}\n\t\tif(isError)\n\t\t\treturn \"Participant registration failed because of an error [\"+errorMsg+\"]\";\n\t\telse\n\t\t\treturn \"success\";\n\t}", "public boolean contient(Couple assoc) {\n for (int i = 0; i < nbAssoc; i++)\n if (associations[i].equals(assoc))\n return true;\n return false;\n }", "FeedbackConsequence getConsequence();", "@Test\n public void testMatchesStatusNonNullStatus() {\n BgpSessionCompatibilityQuestion q =\n new BgpSessionCompatibilityQuestion(\n null, null, ConfiguredSessionStatus.UNIQUE_MATCH.toString(), null);\n\n for (ConfiguredSessionStatus status : ConfiguredSessionStatus.values()) {\n if (status == ConfiguredSessionStatus.UNIQUE_MATCH) {\n assertTrue(status.toString(), q.matchesStatus(status));\n } else {\n assertFalse(status.toString(), q.matchesStatus(status));\n }\n }\n }", "public List<String> oneConnectionIdMustBePresent() {\n return this.oneConnectionIdMustBePresent;\n }", "boolean hasDidcommInvitation();", "public void validateRpd11s1()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT08() {\n\t\t// PRECONDITIONS\n\t\tArrayList<Integer> a = new ArrayList<Integer>();\n\t\ta.add(100);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<Collection<?>> singleElementCollection = new HashSet<Collection<?>>();\n\t\tsingleElementCollection.add(a);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean sizeIsOne = smc.sizeIsOne(singleElementCollection);\n\t\tassertTrue(sizeIsOne);\n\t}", "boolean hasCampaignSharedSet();", "@Test\n void deve_retornar_o_periodo_first_period_in() {\n List<LocalTime> localTimes = new ArrayList<>();\n TimeCourseEnum response = timeService.addPeriod(localTimes);\n Assert.assertEquals(TimeCourseEnum.FIRST_PERIOD_IN, response);\n }", "protected CompletableFuture<Boolean> prepare(Set<TransactionParticipant> transactionParticipants) {\n log.trace(\"Preparing transaction {} via {}\", transactionId, transactionParticipants);\n return Tools.allOf(transactionParticipants.stream()\n .map(TransactionParticipant::prepare)\n .collect(Collectors.toList()))\n .thenApply(list -> list.stream().reduce(Boolean::logicalAnd).orElse(true));\n }", "abstract void takeResposibilityForConnectionOfAssociation(com.webobjects.eointerface.EOAssociation association);", "final int getShareOfOne() { return getPlayerId() == 0 ? 1 : 0; }", "@Test\r\n\tpublic void shouldReturn1PairsWhen11() {\n\t\tA = new ArrayList<Integer>(Arrays.asList(1, 1));\r\n\t\tassertEquals(1, Coins.countPairs(A));\r\n\t}", "public boolean conjectureSeenAlready(Conjecture conj)\n {\n String conj_string = conj.writeConjecture(\"tptp\");\n if (conj instanceof Implication)\n {\n if (previous_implications.containsKey(conj_string))\n return true;\n return false;\n }\n if (conj instanceof Equivalence)\n {\n if (previous_equivalences.containsKey(conj_string))\n return true;\n return false;\n }\n if (conj instanceof NonExists)\n {\n if (previous_non_exists.containsKey(conj_string))\n return true;\n return false;\n }\n\n if (conj instanceof Implicate)\n {\n if (previous_implicates.containsKey(conj_string))\n return true;\n return false;\n }\n return false;\n }", "public Integer getParticipant() {\n return participant;\n }", "@Test\n public void testClaimCancAdjCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setCancAdjCdEnum,\n RdaFissClaim::getCancAdjCd,\n FissCancelAdjustmentCode.CANCEL_ADJUSTMENT_CODE_COVERAGE,\n \"C\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setCancAdjCdUnrecognized,\n RdaFissClaim::getCancAdjCd,\n RdaFissClaim.Fields.cancAdjCd,\n 1);\n }", "@Test\n public void CardRequirementError() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(0);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.GREEN, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n c.emptyQueue();\n assertFalse(am.activateLeaderCard(p, message));\n assertEquals(MessageType.MSG_ERROR, c.messages.get(0).getMessageType());\n assertEquals(1, c.messages.size());\n }", "@Test\n public void ANDSearch_CareQualityComissionAdmission() throws Exception {\n\n final Set<String> searchResults = newsLineSearch.search(TEST_FILE, \"Care Quality Commission admission\",\n SearchType.AND);\n\n assertThat(searchResults).hasSize(1).contains(allLines.get(1));\n }", "boolean isOnePair();", "@Override\n public void checkActivityUnique(ActivityWrapper newActivity) throws RecordAlreadyExistsException {\n Activity[] filtered = filterList(a -> {\n Activity activity = (Activity) a;\n return activity.getEndTime().equals(newActivity.getEndTime())\n && activity.getStartTime().equals(newActivity.getStartTime())\n && activity.getTitle().equalsIgnoreCase(newActivity.getTitle());\n });\n\n if (filtered.length > 0) {\n throw new RecordAlreadyExistsException(\"activities\",\n \"title '\" + filtered[0].getTitle() + \"' and times '\" + filtered[0].getStartTime() + \" - \" + filtered[0].getEndTime() +\n \"'\");\n }\n }", "boolean isActivityNotValid(ExoSocialActivity activity, ExoSocialActivity comment) throws Exception;", "@Test\n public void test01ConfRespSignedByRecepient() throws Exception {\n log.trace(\">test01ConfRespSignedByRecepient\");\n\n this.cmpConfiguration.setResponseProtection(cmpAlias, \"signature\");\n this.cmpConfiguration.setCMPDefaultCA(cmpAlias, \"\");\n this.globalConfigurationSession.saveConfiguration(ADMIN, this.cmpConfiguration);\n\n byte[] nonce = CmpMessageHelper.createSenderNonce();\n byte[] transid = CmpMessageHelper.createSenderNonce();\n\n // Send a confirm message to the CA\n String hash = \"foo123\";\n PKIMessage confirm = genCertConfirm(userDN, this.cacert, nonce, transid, hash, 0, null);\n assertNotNull(confirm);\n ByteArrayOutputStream bao = new ByteArrayOutputStream();\n ASN1OutputStream dOut = ASN1OutputStream.create(bao, ASN1Encoding.DER);\n dOut.writeObject(confirm);\n byte[] ba = bao.toByteArray();\n // Send request and receive response\n byte[] resp = sendCmpHttp(ba, 200, cmpAlias);\n checkCmpResponseGeneral(resp, this.testx509ca.getSubjectDN(), userDN, this.cacert, nonce, transid, true, null, PKCSObjectIdentifiers.sha256WithRSAEncryption.getId());\n checkCmpPKIConfirmMessage(userDN, this.cacert, resp);\n\n log.trace(\"<test01ConfRespSignedByRecepient\");\n }", "@Test\n public void testDuplicateConditionsAndFulfillments() {\n final ThresholdSha256Condition condition = ThresholdSha256Condition.from(\n 2, Lists\n .newArrayList(subcondition1, subcondition1, subcondition2, subcondition3)\n );\n\n // Escrow Only (insufficient)\n ThresholdSha256Fulfillment fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition2, subcondition3),\n Lists.newArrayList(subfulfillment1)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(false));\n\n // Escrow Only (sufficient)\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition2, subcondition3),\n Lists.newArrayList(subfulfillment1, subfulfillment1)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Escrow+Party2\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition3),\n Lists.newArrayList(subfulfillment1, subfulfillment2)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Escrow+Party3\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition2),\n Lists.newArrayList(subfulfillment1, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Party2+Party3\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition1),\n Lists.newArrayList(subfulfillment2, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Party2+Party3 (w\\o escrow condition)\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(),\n Lists.newArrayList(subfulfillment2, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(false));\n }", "@Override\n\tpublic void test00400Add_DuplicateRecord() throws Exception\n\t{\n\t\t// This method will not fail with Generate card numbers set to Y\n\t}", "public static Boolean getAppositivePrs(PairInstance inst) {\n if (inst.getAnaphor().getSentId()!=inst.getAntecedent().getSentId()) \n return false;\n\n// exclude pairs where anaphor is an NE -- this might be a bad idea though..\n if (inst.getAnaphor().isEnamex()) \n return false;\n\n\n if (inst.getAntecedent().isEnamex() &&\n inst.getAnaphor().isEnamex()) {\n\n// exclude pairs of NE that have different type\n\n if (!(inst.getAntecedent().getEnamexType().equals(\n inst.getAnaphor().getEnamexType())))\n return false;\n\n// exclude pairs of LOC-ne\n if (inst.getAntecedent().getEnamexType().toLowerCase().startsWith(\"gpe\"))\n return false;\n if (inst.getAntecedent().getEnamexType().toLowerCase().startsWith(\"loc\"))\n return false;\n }\n\n// should have not-null maxnp-trees (otherwise -- problematic mentions)\n\nTree sentenceTree=inst.getAnaphor().getSentenceTree();\nTree AnaTree=inst.getAnaphor().getMaxNPParseTree();\nTree AnteTree=inst.getAntecedent().getMaxNPParseTree();\nif (sentenceTree==null) return false;\nif (AnaTree==null) return false;\nif (AnteTree==null) return false;\n\n\n// the structure should be ( * (,) (ANA)) or ( * (,) (ANTE)) -- depends on the ordering, annotation, mention extraction etc\n\n if (AnteTree.parent(sentenceTree)==AnaTree) {\n Tree[] chlds=AnaTree.children();\n Boolean lastcomma=false;\n for (int i=0; i<chlds.length && chlds[i]!=AnteTree; i++) {\n lastcomma=false;\n if (chlds[i].value().equalsIgnoreCase(\",\")) lastcomma=true;\n }\n return lastcomma;\n }\n if (AnaTree.parent(sentenceTree)==AnteTree) {\n\n Tree[] chlds=AnteTree.children();\n Boolean lastcomma=false;\n for (int i=0; i<chlds.length && chlds[i]!=AnaTree; i++) {\n lastcomma=false;\n if (chlds[i].value().equalsIgnoreCase(\",\")) lastcomma=true;\n }\n return lastcomma;\n\n }\n\n return false;\n\n }", "public boolean isSetParticipantID() {\n return this.participantID != null;\n }", "@Test\n public void testAddConference() throws Exception {\n ConferenceBuilder builder = ConferenceBuilder.newBuilder() //@formatter:off\n .setDefaultFeatures()\n .setLable(\"Random lable\")\n .setVideoChatUri(); //@formatter:on\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n deltaEvent.setConferences(createdEvent.getConferences());\n deltaEvent.addConferencesItem(builder.build());\n updateEventAsOrganizer(deltaEvent);\n\n EventData updatedEvent = eventManager.getEvent(defaultFolderId, createdEvent.getId());\n assertThat(\"Should be three conferences!\", I(updatedEvent.getConferences().size()), is(I(3)));\n\n /*\n * Check that the conference item has been added\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.ACCEPTED, CustomConsumers.ALL, 1);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"access information was changed\");\n }", "public void jointAcc()\n {\n int c=0;\n response=RestAssured.get(\"http://18.222.188.206:3333/accounts\");\n Holdertype=response.jsonPath().getList(\"'Holder type'\");\n System.out.println(Holdertype);\n for(int i=0;i<Holdertype.size();i++)\n {\n if(Holdertype.get(i)!=null)\n {\n if(Holdertype.get(i).equalsIgnoreCase(\"joint\"))\n {\n c++;\n }\n }\n }\n System.out.println(\"The total number of accounts that are of the type joint = \"+c);\n \n \n }", "int isProduitFormateUniteUniqueInPointvente(ProduitFormate produitFormate, Uniteproduit uniteproduit);", "List<CourseParticipant> getCourseParticListByRepresentativeUuid(UUID representativeUserUuid);", "boolean hasCampaignId();", "boolean hasCampaignId();", "public boolean isAuMoinsUneCompetenceAutrefEstEnCoursDeModification() {\n\t\tboolean result = false;\n\t\tint i = 0;\n\t\twhile (!result && i < tosRepartFdpCompetencesAutres().count()) {\n\t\t\tEORepartFdpAutre repart = (EORepartFdpAutre) tosRepartFdpCompetencesAutres().objectAtIndex(i);\n\t\t\tif (repart.isEnCoursDeModification()) {\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn result;\n\t}", "public Task createTask_OnePotentialOwner() throws HTException {\n Task task = services.createTask(\"Task1\", null, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><ClaimApprovalRequest><cust><firstname>witek</firstname></cust><amount>1</amount></ClaimApprovalRequest>\");\n org.junit.Assert.assertTrue(task.getPotentialOwners().size() == 1);\n return task;\n }", "@Before\n\tpublic void incoporacionDeCandidatosYProvinciasHabilitadasALaJuntaElectoral(){\n\t\tmendoza.agregarPartido(pro);\n\t\tbuenosaires.agregarPartido(pro);\n\t\trionegro.agregarPartido(pro);\n\t\tentrerios.agregarPartido(pro);\n\t\tmendoza.agregarPartido(renovador);\n\t\tbuenosaires.agregarPartido(renovador);\n\t\trionegro.agregarPartido(renovador);\n\t\tentrerios.agregarPartido(renovador);\n\t\tmendoza.agregarPartido(fpv);\n\t\tbuenosaires.agregarPartido(fpv);\n\t\trionegro.agregarPartido(fpv);\n\t\tentrerios.agregarPartido(fpv);\n\n\t\t//Incorporacion de los candidatos habilitados al centro de computos\n\t\tjuntaElectoral.agregarCandidato(macri);\t\t\n\t\tjuntaElectoral.agregarCandidato(massa);\t\t\n\t\tjuntaElectoral.agregarCandidato(scioli);\n\n\t\t//Incorporacion de las provincias habilitadas al centro de computos\n\t\tjuntaElectoral.agregarProvincia(mendoza);\n\t\tjuntaElectoral.agregarProvincia(buenosaires);\n\t\tjuntaElectoral.agregarProvincia(rionegro);\n\t\tjuntaElectoral.agregarProvincia(entrerios);\n\t}", "@Test\n public void testHealthcareFacilityInRequestIsChanged() {\n MessageContentsList messageContentsList = TestDataUtil.createRequest(LOGISK_ADRESS, testDataGenerator.createRequest(\n TEST_RR_ID_MANY_HITS_NO_ERRORS, \"NotUsedInThisService\"));\n\n FindContentResponseType eiResponse = eiResponseDataHelper.getResponseForPatient(TEST_RR_ID_MANY_HITS_NO_ERRORS);\n\n List<MessageContentsList> requestList = agpServiceFactory.createRequestList(messageContentsList, eiResponse);\n\n assertEquals(3, requestList.size());\n\n final List<String> healthCareFacilities = requestList.stream()\n .map(mcl -> ((GetSubjectOfCareScheduleType) mcl.get(2)).getHealthcareFacility()).collect(Collectors.toList());\n\n assertTrue(\"HealtCareFacility not updated correctly\", healthCareFacilities.contains(TEST_LOGICAL_ADDRESS_4));\n assertTrue(\"HealtCareFacility not updated correctly\", healthCareFacilities.contains(TEST_LOGICAL_ADDRESS_5));\n assertTrue(\"HealtCareFacility not updated correctly\", healthCareFacilities.contains(TEST_LOGICAL_ADDRESS_6));\n }", "@Test\r\n\tpublic void shouldReturn0PairsWhen1() {\n\t\tA = new ArrayList<Integer>(Arrays.asList(1));\r\n\t\tassertEquals(0, Coins.countPairs(A));\r\n\t}", "public static int getCorrectConsicutiveOnes(int[] arr) {\n int count = 0;\n int maxCount = 0;\n for (int i = 0; i < arr.length; i++) {\n if (arr[i] == 1) {\n count++;\n } else {\n if (maxCount < count) {\n maxCount = count;\n }\n count = 0;\n }\n }\n return maxCount > count ? maxCount : count;\n }", "boolean hasCampaignExperiment();", "pb4server.CheckAllianceCompetitionAskReq getCheckAllianceCompetitionAskReq();", "@Test\n void test50IdsAllowed() throws Exception {\n setEppInput(\"host_check_50.xml\");\n runFlow();\n }", "private void checkForJudgeAndTeam(IInternalContest contest) {\n Account account = contest.getAccounts(ClientType.Type.TEAM).firstElement();\n assertFalse(\"Team account not generated\", account == null);\n assertFalse(\"Team account not generated\", account.getClientId().equals(Type.TEAM));\n \n account = contest.getAccounts(ClientType.Type.JUDGE).firstElement();\n assertFalse(\"Judge account not generated\", account == null);\n assertFalse(\"Team account not generated\", account.getClientId().equals(Type.TEAM));\n\n }", "@Test\r\n public void Criterio60NoCumpleTest()\r\n {\r\n CriterioDeCorreccion criterio = new SesentaPorcientoCriterioDeCorreccion();\r\n ExamenCorregido corregido = generarExamenCorregidoNoAprobado(criterio);\r\n \r\n assertFalse(criterio.cumple(corregido.getNotasPregunta()));\r\n assertEquals(corregido.getNota(), 0);\r\n }", "@Test\n\tpublic void testcheckConflict() {\n\t\tActivity a1 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"MW\", 1330, 1445);\n\t\tActivity a2 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"TH\", 1330, 1445);\n\t\t try {\n\t\t a1.checkConflict(a2);\n\t\t assertEquals(\"Incorrect meeting string for this Activity.\", \"MW 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"Incorrect meeting string for possibleConflictingActivity.\", \"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t a2.checkConflict(a1);\n\t\t assertEquals(\"Incorrect meeting string for this Activity.\", \"MW 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"Incorrect meeting string for possibleConflictingActivity.\", \"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t } catch (ConflictException e) {\n\t\t fail(\"A ConflictException was thrown when two Activities at the same time on completely distinct days were compared.\");\n\t\t }\n\t\t a1.setMeetingDays(\"TH\");\n\t\t a1.setActivityTime(1445, 1530);\n\t\t try {\n\t\t a1.checkConflict(a2);\n\t\t fail(); //ConflictException should have been thrown, but was not.\n\t\t } catch (ConflictException e) {\n\t\t //Check that the internal state didn't change during method call.\n\t\t assertEquals(\"TH 2:45PM-3:30PM\", a1.getMeetingString());\n\t\t assertEquals(\"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t }\n\t}", "private List<CustStmtRecord> validateDuplicate (final List<CustStmtRecord> custStmtRecords) {\n\t\tlog.info(\"Entering {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\tfinal List<CustStmtRecord> duplicateReference = custStmtRecords\n\t\t\t\t.parallelStream()\n\t\t\t\t\t.filter(e -> Collections.frequency(custStmtRecords, e) > 1)\n\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\t\t;\n\t\t\t\n\t\tlog.info(\"duplicateReference {}\", duplicateReference);\n\t\t\t\n\t\tlog.info(\"Exiting {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\treturn duplicateReference;\n\t}", "@RequestMapping(value = \"/acl_presencerequests\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Presencerequest> createPresencerequest(@RequestBody Communicativeaction communicativeaction) throws URISyntaxException {\n communicativeaction.setActionTime(new DateTime());\n communicativeactionRepository.save(communicativeaction);\n String [] presenceReqInfo = communicativeaction.getContent().split(\",\");\n DateTime time = new DateTime();\n Presencestatus presenceStatus = null;\n Agent agent = communicativeaction.getAction_sender();\n for(String info : presenceReqInfo){\n String [] presencePair = info.split(\":\");\n switch(presencePair[0]){\n case \"presenceStatus\":{\n presenceStatus = presencestatusRepository.findByPresenceStatusName(presencePair[1]);\n break;\n }\n }\n }\n if(presenceStatus != null){\n Presencerequest presence = new Presencerequest(presenceStatus, time, agent);\n Presencerequest result = presencerequestRepository.save(presence);\n return ResponseEntity.created(new URI(\"/api/presencerequests/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"presencerequest\", result.getId().toString()))\n .body(result);\n }\n return ResponseEntity.created(new URI(\"/api/presencerequests/\"))\n .headers(HeaderUtil.createEntityCreationAlert(\"Failure\", \"Not a valid presence request status\"))\n .body(null);\n }", "@Test\r\n public void Criterio60SiCumpleTest()\r\n {\r\n CriterioDeCorreccion criterio = new SesentaPorcientoCriterioDeCorreccion();\r\n ExamenCorregido corregido = generarExamenCorregidoAprobado(criterio);\r\n \r\n assertTrue(criterio.cumple(corregido.getNotasPregunta()));\r\n assertEquals(corregido.getNota(), 4);\r\n }", "public void howToGetASubject(String cCode){\n\t\t//CODE HERE\n\t\t\n\t\tfor (RegCourse course:registeredCourses){\n\t\t\tif(course.getCourseCode().equals(cCode)){\n\t\t\t\t\n\t\t\t\tif(this.findAccum(course)+(1-this.findFullAccum(course))<0.8){\n\t\t\t\t\tSystem.out.println(\"You can't get A for this subject\");\n\t\t\t\t}else {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.printf(\"You need %.2f score more to get an A for this subject\\n\",(0.8-this.findAccum(course))*100);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public Competence() {\r\n\t\tsuper();\r\n\t}", "public void setParticipantCount (byte p) {\n\t\tParticipants = p;\n\t}", "boolean isCreditCardIsSingleAvailablePayment();", "private boolean estPlein() {\n return (nbAssoc == associations.length);\n }", "@Test(priority=21)\n\tpublic void campaign_user_with_valid_filter_for_camp_ext_id() throws URISyntaxException, ClientProtocolException, IOException, ParseException{\n\t\ttest = extent.startTest(\"campaign_user_with_valid_filter_for_camp_ext_id\", \"To validate whether user is able to get campaign through campaign/user api with valid filter for campaign_ext_id\");\n\t\ttest.assignCategory(\"CFA GET /campaign/user API\");\n\t\tString camp_ext_id = yamlReader.readCampaignInfo(Constants.GroupHierarchy.AGENCY)\n\t\t\t.get(TestDataYamlConstants.CampaignConstants.CAMPAIGN_EXT_ID).toString();\n\t\tList<NameValuePair> list = new ArrayList<NameValuePair>();\n\t\tlist.add(new BasicNameValuePair(\"filter\", \"campaign_ext_id%3d\"+camp_ext_id));\n\t\tCloseableHttpResponse response = HelperClass.make_get_request(\"/v2/campaign/user\", access_token, list);\n\t\tAssert.assertTrue(!(response.getStatusLine().getStatusCode() == 500 || response.getStatusLine().getStatusCode() == 401), \"Invalid status code is displayed. \"+ \"Returned Status: \"+response.getStatusLine().getStatusCode()+\" \"+response.getStatusLine().getReasonPhrase());\n\t\ttest.log(LogStatus.INFO, \"Execute campaign/user api method with valid filter for campaign_ext_id field.\");\n\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n\t\tString line = \"\";\n\t\twhile ((line = rd.readLine()) != null) {\n\t\t // Convert response to JSON object\t\n\t\t JSONParser parser = new JSONParser();\n\t\t JSONObject json = (JSONObject) parser.parse(line);\n\t\t JSONArray array = (JSONArray)json.get(\"data\");\n\t\t // Get the first campaign from the campaign user\n\t\t JSONObject first_campaign = (JSONObject)array.get(0);\n\t\t // Check whether campaign user returns 1 record valid campaign_ext_id is passed for filter\n\t\t Assert.assertEquals(array.size(), 1, \"Campaign user does not return 1 record when valid campaign_ext_id is passed for filter.\");\n\t\t Assert.assertEquals(first_campaign.get(\"campaign_ext_id\").toString(), camp_ext_id, \"campaign/user api does not return searched campaign when valid campaign_ext_id is passed for filter.\");\n\t\t}\n\t}", "private void validateCardIssuerId(ATMSparrowMessage atmSparrowMessage, BankFusionEnvironment env) {\n\n ArrayList params = new ArrayList();\n params.add(atmSparrowMessage.getCardDestBranchCode());\n params.add(atmSparrowMessage.getCardDestCountryCode());\n params.add(atmSparrowMessage.getCardDestinationIMD());\n List branchBO = null;\n try {\n branchBO = env.getFactory().findByQuery(IBOATMCIB.BONAME, atmSourceWhereClause, params, null);\n }\n catch (BankFusionException bfe) {\n logger.error(\"Error while find by query for Branch for bmbranch: \" + atmSparrowMessage.getCardDestBranchCode(), bfe);\n }\n if (branchBO == null || branchBO.isEmpty()) {\n atmSparrowMessage.setAuthorisedFlag(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG);\n Object[] field = new Object[] { atmSparrowMessage.getCardDestCountryCode(), atmSparrowMessage.getCardDestinationIMD(),\n atmSparrowMessage.getCardDestBranchCode() };\n if (atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_0)) {\n // populateErrorDetails(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG,\n // ATMConstants.WARNING, 7502, BankFusionMessages.ERROR_LEVEL,\n populateErrorDetails(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG, ATMConstants.WARNING,\n ChannelsEventCodes.E_DEST_COUNTRY_IMD_BRANCH_NOT_MAPPED, BankFusionMessages.ERROR_LEVEL, atmSparrowMessage,\n field, env);\n }\n else if (atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_1)\n || atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_2)\n || atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_3)) {\n // populateErrorDetails(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG,\n // ATMConstants.CRITICAL, 7503, BankFusionMessages.ERROR_LEVEL,\n populateErrorDetails(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG, ATMConstants.CRITICAL,\n ChannelsEventCodes.E_DEST_COUNTRY_IMD_BRANCH_UNMAPPED_POST_NOT_POSTED, BankFusionMessages.ERROR_LEVEL,\n atmSparrowMessage, field, env);\n }\n }\n else {\n atmSparrowMessage.setAuthorisedFlag(ATMConstants.AUTHORIZED_MESSAGE_FLAG);\n }\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Participation)) {\n return false;\n }\n Participation other = (Participation) object;\n if ((this.participationPK == null && other.participationPK != null) || (this.participationPK != null && !this.participationPK.equals(other.participationPK))) {\n return false;\n }\n return true;\n }", "private boolean check813_913(Schedule sched)\n\t{\n\t\tboolean has313 = false;\n\t\tboolean has413 = false;\n\t\tCourse workingCourse;\n\t\tLab workingLab;\n\t\t\n\t\t//Traverses the list and finds out if we have CPSC313 or CPSC413\n\t\t//COuld probably be added to something else and have has313/has412 a field.\n\t\t//of a schedule\nC:\t\tfor(int i = 0;i<sched.getCourses().size();i++)\n\t\t{\n\t\t\tworkingCourse = sched.getCourses().get(i);\n\t\t\t\n\t\t\t//If CPSC 313 exists in our courses list\n\t\t\tif((workingCourse.getDepartment().equals(\"CPSC\")) && \n\t\t\t\t\t(workingCourse.getNumber() == 313))\n\t\t\t{\n\t\t\t\thas313 = true;\n\t\t\t}\n\t\t\t\n\t\t\t//If CPSC 413 exists in our courses list\n\t\t\tif((workingCourse.getDepartment().equals(\"CPSC\")) && \n\t\t\t\t\t(workingCourse.getNumber() == 413))\n\t\t\t{\n\t\t\t\thas413 = true;\n\t\t\t}\n\t\t\t\n\t\t\tif(has313 && has413)\n\t\t\t\tbreak C;\n\t\t}//End of for-loop\n\t\t\n\t\t//At this point we know if we have cpsc313 or cpsc413 in the schedule\n\t\tif(has313)\n\t\t{\n\t\t\t//Checking that all the requirements for cpsc813 are met\n\t\t\t\n\t\t\t//Go through labs to find cpsc813\n\t\t\tfor(int i = 0; i<sched.getLabs().size();i++)\n\t\t\t{\n\t\t\t\tworkingLab = sched.getLabs().get(i);\n\t\t\t\t\n\t\t\t\tif((workingLab.getDepartment().equals(\"CPSC\")) &&\n\t\t\t\t\t\t(workingLab.getNumber() == 813) &&\n\t\t\t\t\t\t(workingLab.getSlot() != null))\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t//If it's not schedule on tuesday at 1800 and it's not null \n\t\t\t\t\tif((!workingLab.getSlot().getDay().equals(ScheduleDay.TU) || \n\t\t\t\t\t\t\tworkingLab.getSlot().getStartTime() != 1800) &&\n\t\t\t\t\t\t\tworkingLab.getSlot() != null)\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(has413)\n\t\t{\n\t\t\t//Checking that all the requirements for cpsc913 are met\n\t\t\t\n\t\t\t//Go through labs to find cpsc913\n\t\t\tfor(int i = 0; i<sched.getLabs().size();i++)\n\t\t\t{\n\t\t\t\tworkingLab = sched.getLabs().get(i);\n\t\t\t\t\n\t\t\t\tif((workingLab.getDepartment().equals(\"CPSC\")) &&\n\t\t\t\t\t\t(workingLab.getNumber() == 913) &&\n\t\t\t\t\t\t(workingLab.getSlot() != null))\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t//If it's not schedule on tuesday at 1800 and it's not null \n\t\t\t\t\tif((!workingLab.getSlot().getDay().equals(ScheduleDay.TU) || \n\t\t\t\t\t\t\tworkingLab.getSlot().getStartTime() != 1800) &&\n\t\t\t\t\t\t\tworkingLab.getSlot() != null)\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public static C40931c m37112aE(Activity activity) {\n AppMethodBeat.m2504i(49003);\n if (activity == null) {\n C4990ab.m7420w(\"MicroMsg.ProcessManager\", \"hy: ac is null\");\n AppMethodBeat.m2505o(49003);\n return null;\n } else if (activity.getIntent() == null) {\n C4990ab.m7420w(\"MicroMsg.ProcessManager\", \"hy: get intent is null\");\n AppMethodBeat.m2505o(49003);\n return null;\n } else {\n C40931c c40931c = (C40931c) AeR.get(activity.getIntent().getIntExtra(\"process_id\", 0));\n AppMethodBeat.m2505o(49003);\n return c40931c;\n }\n }", "@Test\n public void testClaimPrimaryPayerCode() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setPrimaryPayerCodeEnum,\n RdaFissClaim::getPrimaryPayerCode,\n FissPayersCode.PAYERS_CODE_AUTO_NO_FAULT,\n \"D\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setPrimaryPayerCodeUnrecognized,\n RdaFissClaim::getPrimaryPayerCode,\n RdaFissClaim.Fields.primaryPayerCode,\n 1);\n }", "public boolean canAddThreePid() {\n return (supportStage(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY) && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY))\n || (supportStage(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN) && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN));\n }", "private boolean mustAddElement(int element, List<Integer> featuresCombination)\n\t{\n\t\treturn featuresCombination.size() < maxRuleSize && featuresCombination.get(featuresCombination.size() - 1) < element;\n\t}", "public boolean checkParticipate(Authentication auth, Integer ctId) throws NoSuchPageException {\n //check if participator\n ContestEntity contestEntity = getContestById(ctId);\n Date currentTime = new Date();\n Date startTime = contestEntity.getStartTime();\n Date endTime = DateUtils.addMinutes(startTime, contestEntity.getDuration());\n List<AuthorityDTO> lstAuthority = authorityMapper.getContestAuthority(ctId, auth.getName());\n for (AuthorityDTO curAuth : lstAuthority) {\n if (curAuth.getId().equals(Constants.AUTH_PARTICIPATE_CONTEST_ID)) {\n //if so then check conditions mentioned above\n if (currentTime.compareTo(startTime) >= 0\n && currentTime.compareTo(endTime) <= 0){\n return true;\n }else if(currentTime.compareTo(endTime) > 0\n && contestEntity.getCanPractice().equals(1)){\n return true;\n }\n }\n }\n //not participator\n return false;\n }", "private Boolean playerHasOneInitialCountry(List<Country> countries, String player) {\n return countries.stream()\n .filter(c -> Objects.nonNull(c.getOwner()) && c.getOwner().equals(player))\n .collect(Collectors.toList())\n .size() == 1;\n }", "if (charge == adhocTicket.getCharge()) {\n System.out.println(\"Charge is passed\");\n }", "Activite getActiviteCourante();", "public boolean checkSeatTaken(int[] RC) {\n return seatPlan[RC[0] - 1][RC[1] - 1].getStatus();\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n DBSchema dBSchema0 = new DBSchema(\"Er\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"Er\", dBSchema0);\n String[] stringArray0 = new String[0];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"e/ \", false, stringArray0);\n boolean boolean0 = DBUtil.containsMandatoryColumn(dBUniqueConstraint0);\n assertFalse(boolean0);\n }", "public boolean hasCLAPPROVAL() {\n return fieldSetFlags()[5];\n }" ]
[ "0.50033104", "0.4890275", "0.48006576", "0.47025025", "0.46816483", "0.4657146", "0.46450305", "0.4637209", "0.46255496", "0.46020338", "0.45974642", "0.45928583", "0.45588174", "0.455498", "0.45096216", "0.4505314", "0.4502965", "0.45015016", "0.4493577", "0.44814268", "0.4473225", "0.44655502", "0.442593", "0.44241008", "0.44206238", "0.4413987", "0.4392084", "0.43843794", "0.43723974", "0.43604368", "0.43551278", "0.43386686", "0.4327735", "0.43275735", "0.43221217", "0.4320794", "0.43063816", "0.42988878", "0.42950514", "0.42874187", "0.42810282", "0.4266504", "0.42652902", "0.42525357", "0.42506543", "0.42502135", "0.42432252", "0.42427057", "0.42425203", "0.42354015", "0.42300776", "0.42282468", "0.42266265", "0.42262217", "0.42256427", "0.42249066", "0.42180935", "0.42165554", "0.42143273", "0.42093137", "0.4208485", "0.42072272", "0.42039472", "0.41957298", "0.4191174", "0.4191174", "0.41901857", "0.41900763", "0.41824624", "0.41821402", "0.41799667", "0.4174653", "0.4174595", "0.41664603", "0.4159002", "0.41582268", "0.41570464", "0.41565233", "0.41530567", "0.41528562", "0.41518024", "0.41514817", "0.41497618", "0.4145643", "0.4136059", "0.41358095", "0.41347605", "0.41325718", "0.4124474", "0.4121261", "0.41203544", "0.41186976", "0.4114801", "0.41101104", "0.41084775", "0.41040397", "0.40996522", "0.40977105", "0.4093213", "0.40932077", "0.40916428" ]
0.0
-1
ccd::PolicyActivity::subscriber. self.getParticipantRoles()>select(participantRole : cda::ParticipantRole | not participantRole.oclIsUndefined() and participantRole.oclIsKindOf(domain::PolicySubscriber))>asSequence()>first().oclAsType(domain::PolicySubscriber)
IPolicySubscriber getSubscriber();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<RoleSystemauthority> selectByExample(RoleSystemauthorityExample example);", "com.message.MessageInfo.RoleVO getRole();", "List<UsercontrollerRole> selectByExample(UsercontrollerRoleExample example);", "int getParticipantRoleValue();", "List<TawRoleDomain> selectByExample(TawRoleDomainExample example);", "ObjectType getProtoRole();", "com.message.MessageInfo.RoleVOOrBuilder getRoleOrBuilder();", "List<MyUserRoleRelation> selectByExample(MyUserRoleRelationExample example);", "List<SysRoleDO> selectByExample(SysRoleDOExample example);", "List<UUserRole> selectByExample(UUserRoleExample example);", "List<JindouyunRole> selectByExample(JindouyunRoleExample example);", "String getVacmRole();", "List<UserRole> selectByExample(UserRoleExample example);", "List<UserRole> selectByExample(UserRoleExample example);", "List<BachAlarmRole> selectByExample(BachAlarmRoleExample example);", "List<SystemRoleUserMapperMo> selectByExample(SystemRoleUserMapperExample example);", "List<BsUserRole> selectByExample(BsUserRoleExample example);", "RoleType getRoleType();", "private Role getProjectParticipantRole(Project project, RoleAuthority authority) {\n return roleRepository.findOneByProjectIdAndAuthorityName(project.getId(),\n authority.authority())\n .orElseGet(() -> {\n Role subjectRole = new Role();\n Authority auth = authorityRepository.findByAuthorityName(authority.authority())\n .orElseGet(() -> authorityRepository.save(new Authority(authority)));\n subjectRole.setAuthority(auth);\n subjectRole.setProject(project);\n return roleRepository.save(subjectRole);\n });\n }", "public LitemallTypeRoleExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "List<PensionRoleMenu> selectByExample(PensionRoleMenuExample example);", "public Optional<RoleType> getToRoleType(PartyRelationship partyRelationship) {\n\t\tList<RoleType> entityList = null;\n\t\tIn in = new In();\n\t\tin.setEntityName(RoleType.NAME);\n\t\tin.setEntityConditionList(new EntityConditionList<>(Arrays\n\t\t\t\t.asList(new EntityExpr(\"roleTypeId\", EntityOperator.EQUALS,\n\t\t\t\t\t\tpartyRelationship.getRoleTypeIdTo())),\n\t\t\t\tEntityOperator.AND));\n\t\tOut out = executeFindService.runSync(in);\n\t\ttry {\n\t\t\tif (out.getListIt() != null) {\n\t\t\t\tentityList = RoleType.fromValues(out.getListIt()\n\t\t\t\t\t\t.getCompleteList());\n\t\t\t\tout.getListIt().close();\n\t\t\t}\n\t\t} catch (GenericEntityException e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t}\n\t\tif (CollectionUtils.isNotEmpty(entityList)) {\n\t\t\treturn Optional.of(entityList.get(0));\n\t\t}\n\t\treturn Optional.empty();\n\t}", "com.google.cloud.dialogflow.v2beta1.Participant.Role getParticipantRole();", "List<GroupRoleUserRel> selectByExample(GroupRoleUserRelExample example);", "String computeRole();", "public RoleCQ queryRole() {\n return xdfgetConditionQueryRole();\n }", "List<User_Role> selectAll();", "List<CommonQuestionStrategyType> selectByExample(CommonQuestionStrategyTypeExample example);", "String getRole();", "String getRole();", "Role findByType(RoleType type);", "JindouyunRole selectOneByExample(JindouyunRoleExample example);", "List<AgentLevel> selectByExample(AgentLevelExample example);", "List<QtActivitytype> selectByExample(QtActivitytypeExample example);", "int countByExample(RoleSystemauthorityExample example);", "void example(org.linlinjava.litemall.db.domain.LitemallTypeRoleExample example);", "public com.message.MessageInfo.RoleVO getRole() {\n if (roleBuilder_ == null) {\n return role_ == null ? com.message.MessageInfo.RoleVO.getDefaultInstance() : role_;\n } else {\n return roleBuilder_.getMessage();\n }\n }", "public String getRoleType() {\n return roleType;\n }", "public String getRoleType() {\n return roleType;\n }", "@Override\n public ParticipationRole getParticipationRole() { return participationRole; }", "public static HashSet<ParticipantContext> GetParticipantByBRole(String rtid, String brole) {\n HashSet<ParticipantContext> retSet = new HashSet<>();\n Session session = HibernateUtil.GetLocalSession();\n Transaction transaction = session.beginTransaction();\n boolean cmtFlag = false;\n try {\n RenRuntimerecordEntity runtimeCtx = session.get(RenRuntimerecordEntity.class, rtid);\n String participants = runtimeCtx.getParticipantCache();\n transaction.commit();\n cmtFlag = true;\n if (CommonUtil.IsNullOrEmpty(participants)) {\n return retSet;\n }\n String[] participantPairItem = participants.split(\",\");\n for (String workerIdBRolePair : participantPairItem) {\n String[] workerItem = workerIdBRolePair.split(\":\");\n if (workerItem[1].equals(brole)) {\n retSet.add(ParticipantContext.GetContext(rtid, workerItem[0]));\n }\n }\n return retSet;\n }\n catch (Exception ex) {\n if (!cmtFlag) {\n transaction.rollback();\n }\n throw ex;\n }\n finally {\n HibernateUtil.CloseLocalSession();\n }\n }", "Set<Role> getRoleSet(RoleType type);", "public interface Role {\n int getId();\n int getPerson();\n int getType();\n String getName();\n int getRole();\n String getCode();\n int getPosition();\n String getPosition_name();\n}", "public interface Activity extends RUP_Core_Elements {\n\n /* ***************************************************\n * Property http://www.semanticweb.org/morningstar/ontologies/2019/9/untitled-ontology-9#hasRecommendation\n */\n \n /**\n * Gets all property values for the hasRecommendation property.<p>\n * \n * @returns a collection of values for the hasRecommendation property.\n */\n Collection<? extends PM_Learning_Material> getHasRecommendation();\n\n /**\n * Checks if the class has a hasRecommendation property value.<p>\n * \n * @return true if there is a hasRecommendation property value.\n */\n boolean hasHasRecommendation();\n\n /**\n * Adds a hasRecommendation property value.<p>\n * \n * @param newHasRecommendation the hasRecommendation property value to be added\n */\n void addHasRecommendation(PM_Learning_Material newHasRecommendation);\n\n /**\n * Removes a hasRecommendation property value.<p>\n * \n * @param oldHasRecommendation the hasRecommendation property value to be removed.\n */\n void removeHasRecommendation(PM_Learning_Material oldHasRecommendation);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/morningstar/ontologies/2019/9/untitled-ontology-9#isPerformOf\n */\n \n /**\n * Gets all property values for the isPerformOf property.<p>\n * \n * @returns a collection of values for the isPerformOf property.\n */\n Collection<? extends Role> getIsPerformOf();\n\n /**\n * Checks if the class has a isPerformOf property value.<p>\n * \n * @return true if there is a isPerformOf property value.\n */\n boolean hasIsPerformOf();\n\n /**\n * Adds a isPerformOf property value.<p>\n * \n * @param newIsPerformOf the isPerformOf property value to be added\n */\n void addIsPerformOf(Role newIsPerformOf);\n\n /**\n * Removes a isPerformOf property value.<p>\n * \n * @param oldIsPerformOf the isPerformOf property value to be removed.\n */\n void removeIsPerformOf(Role oldIsPerformOf);\n\n\n /* ***************************************************\n * Common interfaces\n */\n\n OWLNamedIndividual getOwlIndividual();\n\n OWLOntology getOwlOntology();\n\n void delete();\n\n}", "IfcActorRole getActingRole();", "public com.a9.spec.opensearch.x11.QueryType.Role xgetRole()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.Role target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.Role)get_store().find_attribute_user(ROLE$0);\n return target;\n }\n }", "public Page<RoleUtilisateur> quelRole(String pseudo, int p, int s);", "public T caseRole(Role object) {\n\t\treturn null;\n\t}", "List<TModuleLo> selectSkillToLo();", "public PageRoleMstExample() {\n oredCriteria = new ArrayList<>();\n }", "List<ActivityHongbaoPrize> selectByExample(ActivityHongbaoPrizeExample example);", "public Optional<PartyRole> getToPartyRole(\n\t\t\tPartyRelationship partyRelationship) {\n\t\tList<PartyRole> entityList = null;\n\t\tIn in = new In();\n\t\tin.setEntityName(PartyRole.NAME);\n\t\tin.setEntityConditionList(new EntityConditionList<>(Arrays.asList(\n\t\t\t\tnew EntityExpr(\"partyId\", EntityOperator.EQUALS,\n\t\t\t\t\t\tpartyRelationship.getPartyIdTo()),\n\t\t\t\tnew EntityExpr(\"roleTypeId\", EntityOperator.EQUALS,\n\t\t\t\t\t\tpartyRelationship.getRoleTypeIdTo())),\n\t\t\t\tEntityOperator.AND));\n\t\tOut out = executeFindService.runSync(in);\n\t\ttry {\n\t\t\tif (out.getListIt() != null) {\n\t\t\t\tentityList = PartyRole.fromValues(out.getListIt()\n\t\t\t\t\t\t.getCompleteList());\n\t\t\t\tout.getListIt().close();\n\t\t\t}\n\t\t} catch (GenericEntityException e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t}\n\t\tif (CollectionUtils.isNotEmpty(entityList)) {\n\t\t\treturn Optional.of(entityList.get(0));\n\t\t}\n\t\treturn Optional.empty();\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public typekey.ECFParticipantFunction_Ext getRole() {\n return (typekey.ECFParticipantFunction_Ext)__getInternalInterface().getFieldValue(ROLE_PROP.get());\n }", "UsercontrollerRole selectByPrimaryKey(Integer roleId);", "private TopLevelComplexType createRoleEnumerationComplexType(TLCoreObject source) {\n SchemaDependency enumExtension = SchemaDependency.getEnumExtension();\n TopLevelComplexType complexType = new TopLevelComplexType();\n SimpleContent simpleContent = new SimpleContent();\n SimpleExtensionType extension = new SimpleExtensionType();\n Attribute attribute = new Attribute();\n\n complexType.setName( source.getRoleEnumeration().getLocalName() );\n complexType.setSimpleContent( simpleContent );\n XsdCodegenUtils.addAppInfo( source, complexType );\n simpleContent.setExtension( extension );\n extension.setBase( new QName( source.getNamespace(), source.getRoleEnumeration().getLocalName() + OPEN ) );\n extension.getAttributeOrAttributeGroup().add( attribute );\n attribute.setName( \"extension\" );\n attribute.setType( enumExtension.toQName() );\n addCompileTimeDependency( enumExtension );\n return complexType;\n }", "Collection<? extends Role> getIsPerformOf();", "List<ScPartyMember> selectAll();", "List<RoleEntity> getSystemRoles();", "private static ArrayList<NameId> getAgentroles() {\n\t\tArrayList<NameId> modelList = new ArrayList<NameId>();\n\t\tif (CONSTANTS.agentroleNames().length != AccessControl.AGENT_ROLES.length) {Window.alert(\"AgentPopup getAgentroles()\");}\n\t\tfor (int i = 0; i < AccessControl.AGENT_ROLES.length; i++) {modelList.add(new NameId(CONSTANTS.agentroleNames()[i], String.valueOf(AccessControl.AGENT_ROLES[i])));}\n\t\treturn modelList;\n\t}", "public String getRole() { return this.role; }", "TypeAssociation getEstRapporteeParRapport();", "public com.a9.spec.opensearch.x11.QueryType.Role.Enum getRole()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ROLE$0);\n if (target == null)\n {\n return null;\n }\n return (com.a9.spec.opensearch.x11.QueryType.Role.Enum)target.getEnumValue();\n }\n }", "@Override\n public String getRoleProperty() {\n return \"visibleAtRole.id\";\n }", "public UserRoleExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "List<NeeqCompanyAccountingFirmOnline> selectByExample(NeeqCompanyAccountingFirmOnlineExample example);", "long countByExample(SysRoleDOExample example);", "private static SystemRole getRequiredRoleForMeasurable(Operation op, EntityKind additionalKind) {\n return Optional\n .ofNullable(additionalKind)\n .map(k -> SystemRole.CAPABILITY_EDITOR)\n .orElse(SystemRole.TAXONOMY_EDITOR);\n }", "@Override\n\tpublic Role selectRoleByName(String ro_name) {\n\t\treturn rd.selectRoleByName(ro_name);\n\t}", "@Override\n\tpublic List<Role> selectRoleForAdd() {\n\t\treturn rd.selectRoleForAdd();\n\t}", "java.lang.String getParticipant();", "public String chooseRole() {\n String[] roles = currentPlayer.getLocation().getRoleStrings();\n String result;\n if (currentPlayer.isComputer()) {\n // choose random role\n Random rand = new Random();\n int randInt = rand.nextInt(roles.length);\n result = roles[randInt];\n }\n else { // if current player is human\n // choose upgrade manually\n if(roles.length <= 0){\n view.showPopUp(currentPlayer.isComputer(), \"There are no more available roles on this card!\");\n result = \"\";\n }\n else{\n result = view.showRolePopUp(roles);\n }\n }\n\n\n return result;\n }", "public Optional<RoleType> getFromRoleType(\n\t\t\tPartyRelationship partyRelationship) {\n\t\tList<RoleType> entityList = null;\n\t\tIn in = new In();\n\t\tin.setEntityName(RoleType.NAME);\n\t\tin.setEntityConditionList(new EntityConditionList<>(Arrays\n\t\t\t\t.asList(new EntityExpr(\"roleTypeId\", EntityOperator.EQUALS,\n\t\t\t\t\t\tpartyRelationship.getRoleTypeIdFrom())),\n\t\t\t\tEntityOperator.AND));\n\t\tOut out = executeFindService.runSync(in);\n\t\ttry {\n\t\t\tif (out.getListIt() != null) {\n\t\t\t\tentityList = RoleType.fromValues(out.getListIt()\n\t\t\t\t\t\t.getCompleteList());\n\t\t\t\tout.getListIt().close();\n\t\t\t}\n\t\t} catch (GenericEntityException e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t}\n\t\tif (CollectionUtils.isNotEmpty(entityList)) {\n\t\t\treturn Optional.of(entityList.get(0));\n\t\t}\n\t\treturn Optional.empty();\n\t}", "SysRoleDO selectByPrimaryKey(Long id);", "public interface ISysRoleService {\n Set<String> selectRolePermissionByUserId(Long userId);\n}", "List<NjProductTaticsRelation> selectByExample(NjProductTaticsRelationExample example);", "public com.message.MessageInfo.RoleVO getRole() {\n return role_ == null ? com.message.MessageInfo.RoleVO.getDefaultInstance() : role_;\n }", "Role getRole(InheritedAccessEnabled access, String className) {\n AccessTypeInjector injector = getInjector(className);\n if (injector == null) {\n return null;\n }\n return injector.getRole(access);\n }", "@Override\n\tpublic List<UserRole> buscarUserRoleSemPermissoes() {\n\t\t// TODO Auto-generated method stub\n\t\tQuery query = getCurrentSession().createQuery(\"select ur from UserRole ur where ur.permissions\");\n\t\treturn query.list();\n\t}", "@Override\n public Role getRole(InheritedAccessEnabled access) {\n Preference preference = (Preference) access;\n if (preference.getVisibleAtRole() == null) {\n return null;\n }\n String roleId = preference.getVisibleAtRole().getId();\n return OBDal.getInstance().get(Role.class, roleId);\n }", "int countByExample(TawRoleDomainExample example);", "private static ArrayList<NameId> getOrganizationroles() {\n\t\tArrayList<NameId> modelList = new ArrayList<NameId>();\n\t\tif (CONSTANTS.organizationroleNames().length != AccessControl.ORGANIZATION_ROLES.length) {Window.alert(\"AgentPopup getOrganizationroles()\");}\n\t\tfor (int i = 0; i < AccessControl.ORGANIZATION_ROLES.length; i++) {modelList.add(new NameId(CONSTANTS.organizationroleNames()[i], String.valueOf(AccessControl.ORGANIZATION_ROLES[i])));}\n\t\treturn modelList;\n\t}", "List<Agent> listPOSAgentsHaveCredential();", "List<RepaymentPlanInfoUn> selectByExample(RepaymentPlanInfoUnExample example);", "@gw.internal.gosu.parser.ExtendedProperty\n public typekey.ECFParticipantFunction_Ext getRole() {\n return (typekey.ECFParticipantFunction_Ext)__getInternalInterface().getFieldValue(ROLE_PROP.get());\n }", "public Optional<String> getRole() {\n return Optional.ofNullable(properties.getProperty(MESOS_ROLE));\n }", "public com.message.MessageInfo.RoleVOOrBuilder getRoleOrBuilder() {\n if (roleBuilder_ != null) {\n return roleBuilder_.getMessageOrBuilder();\n } else {\n return role_ == null ?\n com.message.MessageInfo.RoleVO.getDefaultInstance() : role_;\n }\n }", "public static HashSet<ParticipantContext> GetCurrentValidParticipant(String rtid) {\n HashSet<ParticipantContext> retSet = new HashSet<>();\n Session session = HibernateUtil.GetLocalSession();\n Transaction transaction = session.beginTransaction();\n boolean cmtFlag = false;\n try {\n RenRuntimerecordEntity runtimeCtx = session.get(RenRuntimerecordEntity.class, rtid);\n String participants = runtimeCtx.getParticipantCache();\n transaction.commit();\n cmtFlag = true;\n if (CommonUtil.IsNullOrEmpty(participants)) {\n return retSet;\n }\n String[] participantPairItem = participants.split(\",\");\n for (String workerIdBRolePair : participantPairItem) {\n String[] workerItem = workerIdBRolePair.split(\":\");\n retSet.add(ParticipantContext.GetContext(rtid, workerItem[0]));\n }\n return retSet;\n }\n catch (Exception ex) {\n if (!cmtFlag) {\n transaction.rollback();\n }\n throw ex;\n }\n finally {\n HibernateUtil.CloseLocalSession();\n }\n }", "java.util.List<? extends com.example.grpc.SimpleServiceOuterClass.AoisOrBuilder> \n getAoisOrBuilderList();", "@GET\n @Path(\"/roles\")\n @Produces(MediaType.TEXT_PLAIN)\n @RolesAllowed(\"Subscriber\")\n public String helloRoles() {\n return sub;\n }", "TypeAssociation getConcerneZoneAutreElementControle();", "public AXValue getRole() {\n return role;\n }", "@Override\n public String toString(){\n return role;\n }", "@Override\n FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {\n\t\treturn new ConstantFieldOptions(\n\t\t \"\", \"Select type\", \n\t\t \"http://purl.org/ontology/bibo/AcademicArticle\", \"Academic Article\",\n \"http://purl.org/ontology/bibo/Article\", \"Article\",\n \"http://purl.org/ontology/bibo/AudioDocument\", \"Audio Document\",\n \"http://purl.org/ontology/bibo/AudioVisualDocument\", \"Audio-Visual Document\",\n \"http://purl.org/ontology/bibo/Bill\", \"Bill\",\n \"http://vivoweb.org/ontology/core#Blog\", \"Blog\",\n \"http://vivoweb.org/ontology/core#BlogPosting\", \"Blog Posting\",\n \"http://purl.org/ontology/bibo/Book\", \"Book\",\n \"http://purl.org/ontology/bibo/BookSection\", \"Book Section\",\n \"http://purl.org/ontology/bibo/Brief\", \"Brief\",\n \"http://vivoweb.org/ontology/core#CaseStudy\", \"Case Study\",\n \"http://vivoweb.org/ontology/core#Catalog\", \"Catalog\",\n \"http://purl.org/ontology/bibo/Chapter\", \"Chapter\",\n \"http://purl.org/spar/fabio/ClinicalGuideline\", \"Clinical Guideline\",\n \"http://purl.org/ontology/bibo/Code\", \"Code\",\n \"http://purl.org/ontology/bibo/CollectedDocument\", \"Collected Document\",\n \"http://purl.org/spar/fabio/Comment\", \"Comment\",\n \"http://vivoweb.org/ontology/core#ConferencePaper\", \"Conference Paper\",\n \"http://vivoweb.org/ontology/core#ConferencePoster\", \"Conference Poster\",\n \"http://purl.org/ontology/bibo/CourtReporter\", \"Court Reporter\",\n \"http://vivoweb.org/ontology/core#Database\", \"Database\",\n \"http://purl.org/ontology/bibo/LegalDecision\", \"Decision\",\n \"http://purl.org/ontology/bibo/DocumentPart\", \"Document Part\",\n \"http://purl.org/ontology/bibo/EditedBook\", \"Edited Book\",\n \"http://vivoweb.org/ontology/core#EditorialArticle\", \"Editorial Article\",\n \"http://purl.org/spar/fabio/Erratum\", \"Erratum\",\n \"http://purl.org/ontology/bibo/Excerpt\", \"Excerpt\",\n \"http://purl.org/ontology/bibo/Film\", \"Film\",\n \"http://purl.org/ontology/bibo/Image\", \"Image\",\n \"http://purl.org/ontology/bibo/Issue\", \"Issue\",\n \"http://purl.org/ontology/bibo/Journal\", \"Journal\",\n \"http://purl.obolibrary.org/obo/IAO_0000013\", \"Journal Article\",\n \"http://purl.org/ontology/bibo/LegalCaseDocument\", \"Legal Case Document\",\n \"http://purl.org/ontology/bibo/LegalDocument\", \"Legal Document\",\n \"http://purl.org/ontology/bibo/Legislation\", \"Legislation\",\n \"http://purl.org/ontology/bibo/Letter\", \"Letter\",\n \"http://purl.org/ontology/bibo/Magazine\", \"Magazine\",\n \"http://purl.org/ontology/bibo/Manual\", \"Manual\",\n \"http://purl.org/ontology/bibo/Manuscript\", \"Manuscript\",\n \"http://purl.org/ontology/bibo/Map\", \"Map\",\n \"http://vivoweb.org/ontology/core#Newsletter\", \"Newsletter\",\n \"http://purl.org/ontology/bibo/Newspaper\", \"Newspaper\",\n \"http://vivoweb.org/ontology/core#NewsRelease\", \"News Release\",\n \"http://purl.org/ontology/bibo/Note\", \"Note\",\n \"http://purl.org/ontology/bibo/Patent\", \"Patent\",\n \"http://purl.org/ontology/bibo/Periodical\", \"Periodical\",\n \"http://purl.org/ontology/bibo/PersonalCommunicationDocument\", \"Personal Communication Document\",\n \"http://purl.org/ontology/bibo/Proceedings\", \"Proceedings\",\n \"http://purl.obolibrary.org/obo/OBI_0000272\", \"protocol\",\n \"http://purl.org/ontology/bibo/Quote\", \"Quote\",\n \"http://purl.org/ontology/bibo/ReferenceSource\", \"Reference Source\",\n \"http://purl.org/ontology/bibo/Report\", \"Report\",\n \"http://vivoweb.org/ontology/core#ResearchProposal\", \"Research Proposal\",\n \"http://vivoweb.org/ontology/core#Review\", \"Review\",\n \"http://vivoweb.org/ontology/core#Score\", \"Score\",\n \"http://vivoweb.org/ontology/core#Screenplay\", \"Screenplay\",\n \"http://purl.org/ontology/bibo/Series\", \"Series\",\n \"http://purl.org/ontology/bibo/Slide\", \"Slide\",\n \"http://purl.org/ontology/bibo/Slideshow\", \"Slideshow\",\n \"http://vivoweb.org/ontology/core#Speech\", \"Speech\",\n \"http://purl.org/ontology/bibo/Standard\", \"Standard\",\n \"http://purl.org/ontology/bibo/Statute\", \"Statute\",\n \"http://purl.org/ontology/bibo/Thesis\", \"Thesis\",\n \"http://vivoweb.org/ontology/core#Translation\", \"Translation\",\n \"http://vivoweb.org/ontology/core#Video\", \"Video\",\n \"http://purl.org/ontology/bibo/Webpage\", \"Webpage\",\n \"http://purl.org/ontology/bibo/Website\", \"Website\",\n \"http://vivoweb.org/ontology/core#WorkingPaper\", \"Working Paper\"\n );\n }", "public Role getRole()\n {\n return role;\n }", "private String getChangedOrExistingRole(SharedRolePermissionsDTO sharedRolePermissionsDTO) {\n\t\tString roleToWhomPermissionIsAssigned;\n\t\tString changedRole = sharedRolePermissionsDTO.getIfRoleChanged();\n\t\tString selectedRole = sharedRolePermissionsDTO.getRoleNameSelected();\n\t\tif (changedRole == null || changedRole.equals(selectedRole))\n\t\t\troleToWhomPermissionIsAssigned = selectedRole;\n\t\telse\n\t\t\troleToWhomPermissionIsAssigned = changedRole;\n\n\t\treturn roleToWhomPermissionIsAssigned;\n\t}", "public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearRole() {\n role = null;\n fieldSetFlags()[6] = false;\n return this;\n }", "PartyType getConsignorParty();", "public interface ISingleRoleAccount extends IAccount {\n\n ITreeRole getRole();\n\n void setRole(ITreeRole role);\n\n public List<IPermission> getPermisions();\n\n public List<String> getPermisionString();\n\n}", "@Test\r\n public void findUserRoleValid() {\r\n\r\n UserRoleEto userRole = this.usermanagement.findUserRole(0L);\r\n\r\n assertThat(userRole).isNotNull();\r\n assertThat(userRole.getName()).isEqualTo(\"Customer\");\r\n }", "List<UserRole> searchUserRole(UserRole userRole);", "@Override\n\tpublic UserRole get(UserRole vo) {\n\t\treturn null;\n\t}" ]
[ "0.58699673", "0.5734993", "0.5541848", "0.5436662", "0.5389874", "0.5342785", "0.5332003", "0.5309305", "0.5306532", "0.5294173", "0.5280139", "0.5262564", "0.5234774", "0.5234774", "0.51330405", "0.5130688", "0.51140404", "0.5109798", "0.49559963", "0.49409473", "0.49376813", "0.49320346", "0.49206835", "0.49175593", "0.4913227", "0.4872952", "0.4872193", "0.48700073", "0.48689088", "0.48689088", "0.48427224", "0.4812004", "0.47707388", "0.47608417", "0.47466755", "0.47427678", "0.47425085", "0.4724416", "0.4724416", "0.47166553", "0.4678059", "0.46650735", "0.4643432", "0.46382108", "0.4634315", "0.46196857", "0.46184275", "0.46069512", "0.4605904", "0.45979857", "0.4589852", "0.45895895", "0.4586718", "0.45778763", "0.4574817", "0.45744464", "0.45701012", "0.4566963", "0.4560435", "0.45602748", "0.45553958", "0.4554657", "0.45544562", "0.45496503", "0.45449287", "0.4525004", "0.45225948", "0.45127952", "0.45126614", "0.45033202", "0.4502906", "0.45021427", "0.44989306", "0.44886497", "0.44863436", "0.44814935", "0.4478283", "0.44764468", "0.4473462", "0.4471556", "0.44711685", "0.44657725", "0.44610742", "0.44523063", "0.44508457", "0.44493166", "0.44424793", "0.44376734", "0.44374052", "0.44358623", "0.44319674", "0.44294202", "0.44186658", "0.44113892", "0.44105017", "0.44091737", "0.44070742", "0.44006264", "0.43970075", "0.43948585", "0.4391468" ]
0.0
-1
CCD Policy Activity MAY contain exactly one [1..1] participant (CONF63), such that.
IPolicySubscriber withSubscriber();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testRemoveOnlyOneConference() throws Exception {\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n deltaEvent.setConferences(Collections.singletonList(createdEvent.getConferences().get(0)));\n updateEventAsOrganizer(deltaEvent);\n\n EventData updatedEvent = eventManager.getEvent(defaultFolderId, createdEvent.getId());\n assertThat(\"Should be one conference!\", I(updatedEvent.getConferences().size()), is(I(1)));\n\n /*\n * Check that mails has been send, but for changed conferences not removed all\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.ACCEPTED, CustomConsumers.ALL, 1);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"access information was changed\");\n }", "@Test\n public void minimumValidClaim() {\n claim.setClaimId(EXPECTED_CLAIM_ID);\n claim.setDcn(\"dcn\");\n claim.setIntermediaryNb(\"inter\");\n claim.setHicNo(\"hicn\");\n claim.setCurrStatus('T');\n claim.setCurrLoc1('M');\n claim.setCurrLoc2(\"9000\");\n claim.setLastUpdated(clock.instant());\n claimBuilder\n .setRdaClaimKey(\"claim_id\")\n .setDcn(\"dcn\")\n .setIntermediaryNb(\"inter\")\n .setHicNo(\"hicn\")\n .setCurrStatusEnum(FissClaimStatus.CLAIM_STATUS_RTP)\n .setCurrLoc1Enum(FissProcessingType.PROCESSING_TYPE_MANUAL)\n .setCurrLoc2Enum(FissCurrentLocation2.CURRENT_LOCATION_2_CABLE);\n changeBuilder\n .setSeq(MIN_SEQUENCE_NUM)\n .setChangeType(ChangeType.CHANGE_TYPE_INSERT)\n .setClaim(claimBuilder.build());\n assertChangeMatches(RdaChange.Type.INSERT);\n }", "public void test1_CheckUniqueParticipant() {\n if (!ParticipantController.checkUniqueParticipant(\"ControllerTest\")) {\n assertTrue(true);\n } else {\n assertTrue(\"Fail\", false);\n }\n\n // should not find participant else fail\n if (ParticipantController.checkUniqueParticipant(\"ControllerTestDummy\")) {\n assertTrue(true);\n } else {\n assertTrue(\"Fail\", false);\n }\n }", "public void testValidateSubjectPrimaryAssociationsDuplicate() throws Exception {\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n List subjectPrimaryAssociations = positionWrapperBean.getSubjectPrimaryAssociations();\n for (int i = 0; i < subjectPrimaryAssociations.size(); i++) {\n ArtefactAssociationWrapperBean artefactAssociationWrapperBean = (ArtefactAssociationWrapperBean) subjectPrimaryAssociations.get(i);\n artefactAssociationWrapperBean.setSourceId(new Long(12));\n artefactAssociationWrapperBean.setQualifierId(new Long(399));\n }\n // should produce a duplicate assocition error\n DataBinder binder = new DataBinder(positionWrapperBean, ZynapDefaultFormController.DEFAULT_COMMAND_NAME);\n Errors errors = binder.getBindingResult();\n positionValidator.validateSubjectPrimaryAssociations(positionWrapperBean, errors);\n assertEquals(1, errors.getErrorCount());\n FieldError error = errors.getFieldError(FIRST_PRIMARY_ASSOCIATION_SOURCE_FIELD);\n assertEquals(\"error.association.target.unique.required\", error.getCode());\n }", "public void setParticipant(Integer participant) {\n this.participant = participant;\n }", "@Test\n\tpublic void testCheckCoflictOneDay() {\n\t\tActivity a1 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"MWF\", 1330, 1445);\n\t\tActivity a2 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"TWH\", 1330, 1445);\n\t\ttry {\n\t\t a1.checkConflict(a2);\n\t\t fail(); //ConflictException should have been thrown, but was not.\n\t\t } catch (ConflictException e) {\n\t\t //Check that the internal state didn't change during method call.\n\t\t assertEquals(\"MWF 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"TWH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t }\n\t}", "public void setParticipantCount (byte p) {\n\t\tParticipants = p;\n\t}", "public boolean isSetParticipantID() {\n return this.participantID != null;\n }", "public boolean isContinuingEducationPassed(CapIDModel capID) throws AAException, RemoteException;", "@Test\r\n void B6007089_test_SecMustNotBeNull() {\r\n System.out.println(\"\\n=======================================\");\r\n System.out.println(\"\\nTest Sec Must Not Be Null\");\r\n System.out.println(\"\\n=======================================\\n\");\r\n Section section = new Section();\r\n section.setSec(null);\r\n section.setTime(\"Tu13:00-15:00 B1231 -- We13:00-15:00 B1125\");\r\n\r\n\r\n Set<ConstraintViolation<Section>> result = validator.validate(section);\r\n assertEquals(1, result.size());\r\n\r\n ConstraintViolation<Section> v = result.iterator().next();\r\n assertEquals(\"must not be null\", v.getMessage());\r\n assertEquals(\"sec\", v.getPropertyPath().toString());\r\n }", "public boolean canAddThreePid() {\n return (supportStage(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY) && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY))\n || (supportStage(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN) && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN));\n }", "@Test\n public void testAddConference() throws Exception {\n ConferenceBuilder builder = ConferenceBuilder.newBuilder() //@formatter:off\n .setDefaultFeatures()\n .setLable(\"Random lable\")\n .setVideoChatUri(); //@formatter:on\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n deltaEvent.setConferences(createdEvent.getConferences());\n deltaEvent.addConferencesItem(builder.build());\n updateEventAsOrganizer(deltaEvent);\n\n EventData updatedEvent = eventManager.getEvent(defaultFolderId, createdEvent.getId());\n assertThat(\"Should be three conferences!\", I(updatedEvent.getConferences().size()), is(I(3)));\n\n /*\n * Check that the conference item has been added\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.ACCEPTED, CustomConsumers.ALL, 1);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"access information was changed\");\n }", "@Test\r\n public void testCommissionCases() throws Exception\r\n {\r\n String epcToCheck = \"urn:epc:id:sgtin:0614141.107340.1\";\r\n XmlObjectEventType event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNull(event);\r\n\r\n runCaptureTest(COMMISSION_CASES_XML);\r\n\r\n event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNotNull(event);\r\n }", "CourseParticipant getCourseParticInOneCourse(UUID courseCourseParticUuid);", "private boolean consistencyCheckC1Constraints(double[][] xResults) {\n\t\tint n = mExplicitMDP.getNumStates();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tdouble outxValue = GRBSolverUtils.getOutValue(i, xResults, mExplicitMDP);\n\t\t\tdouble inxValue = GRBSolverUtils.getInValue(i, xResults, mExplicitMDP);\n\t\t\tboolean satisfied = GRBSolverUtils.approximatelyEqual(outxValue, inxValue,\n\t\t\t\t\tmSettings.getFeasibilityTolerance());\n\n\t\t\tif (!satisfied) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private int isPrivacyModelFulfilled(Transformation<?> transformation, HashGroupifyEntry entry) {\n \n // Check minimal group size\n if (minimalClassSize != Integer.MAX_VALUE && entry.count < minimalClassSize) {\n return 0;\n }\n \n // Check other criteria\n // Note: The d-presence criterion must be checked first to ensure correct handling of d-presence with tuple suppression.\n // This is currently ensured by convention. See ARXConfiguration.getCriteriaAsArray();\n for (int i = 0; i < classBasedCriteria.length; i++) {\n if (!classBasedCriteria[i].isAnonymous(transformation, entry)) {\n return i + 1;\n }\n }\n return -1;\n }", "@Test\r\n public void testCommissionPallets() throws Exception\r\n {\r\n String epcToCheck = \"urn:epc:id:sscc:0614141.0000000001\";\r\n XmlObjectEventType event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNull(event);\r\n\r\n runCaptureTest(COMMISSION_PALLETS_XML);\r\n\r\n event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNotNull(event);\r\n }", "public static String regParticipantsWithCP(String fileName) {\n\t\t\n\t\tlogger.info(\"ParticipantRegistrationPlus:regParticipantsWithCP \" + fileName);\t\n\t\tClientSession cs = ClientSession.getInstance();\n\t\t\n\t\ttry {\n\t\t\tcs.startSession(userName, password);\n\t\t} catch (ApplicationException e1) {\n\t\t\tlogger.info(\"ApplicationException in ParticipantRegistrationPlus:regParticipantsWithCP\");\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tboolean isError=false;\n\t\tString errorMsg=\"\";\n\t\t\n\t\ttry\n\t\t{\t\t\t\n\t\t\tFile fXmlFile = new File(fileName);\n\t\t\tSAXBuilder builder = new SAXBuilder();\n\t\t\tDocument document = builder.build(new ByteArrayInputStream(getFileAsString(fXmlFile).getBytes()));\n\t\t\tElement root = document.getRootElement();\n\t\t\n\t\t\tList rows = root.getChild(\"patient_set\").getChildren(\"patient\");\n\t\t\tfor (int i = 0; i < rows.size(); i++) {\n\t\t\t\tElement row = (Element) rows.get(i);\n\t\t\t\tElement patientElement = row.getChild(\"patient_id\");\n\t\t\t\tElement cpElement = row.getChild(\"study_name\");\n\t\t\t\tHashMap<String, String> hashMap = new HashMap<String, String>();\n\t\t\t\tString gender = \"Unknown\", def_vital_status_cd = \"Unknown\", sex_cd=\"\";\n\n\t\t\t\tList params = row.getChildren(\"param\");\n\t\t\t\tfor (int j = 0; j < params.size(); j++) {\n\t\t\t\t\tElement column = (Element) params.get(j);\n\t\t\t\t\tString value = column.getText();\n\t\t\t\t\thashMap.put(j+\"\", value);\n\t\t\t\t}\n\t\t\t\tParticipant p = new Participant();\n\t\t\t\tp.setLastName(patientElement.getText());\n\t\t\t\tp.setFirstName(\"\");\n\t\t\t\t//p.setMiddleName(cpElement.getText());\n\t\t\t\tp.setActivityStatus(\"Active\");\n\t\t\t\tp.setBirthDate(dateFormat(hashMap.get(\"1\")));\n\t\t\t\tsex_cd=hashMap.get(\"4\");\n\n\t\t\t\tif(sex_cd.equalsIgnoreCase(\"MALE\"))\n\t\t\t\t\tgender=\"Male Gender\";\n\t\t\t\telse if(sex_cd.equalsIgnoreCase(\"FEMALE\"))\n\t\t\t\t\tgender=\"Female Gender\";\n\n\t\t\t\tp.setGender(gender);\n\n\t\t\t\tp.setVitalStatus(def_vital_status_cd);\n\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tp = (Participant) appService.createObject(p);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tString getCPQuery = \"select cp from edu.wustl.catissuecore.domain.CollectionProtocol cp where cp.shortTitle='\" + cpElement.getText() + \"'\";\n\t\t\t\t\tHQLCriteria hql = new HQLCriteria(getCPQuery);\t\t\t\t\t\n\t\t\t\t\tList<CollectionProtocol> resultList =appService.query(hql,CollectionProtocol.class.getName());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif (resultList.size() == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tCollectionProtocol cp = resultList.get(0);\t\t\t\t\t\t\n\t\t\t\t\t\tCollectionProtocolRegistration collectionProtocolRegistration = new CollectionProtocolRegistration();\t\t\t\t\t\n\t\t\t\t\t\tcollectionProtocolRegistration.setActivityStatus(\"Active\");\n\t\t\t\t\t\tcollectionProtocolRegistration.setCollectionProtocol(cp);\n\t\t\t\t\t\tcollectionProtocolRegistration.setParticipant(p);\n\t\t\t\t\t\tcollectionProtocolRegistration = (CollectionProtocolRegistration) appService.createObject(collectionProtocolRegistration);\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t \te.printStackTrace();\n\t\t \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Participant created successfully\");\n\t\t\t}\n\t\t} catch (JDOMException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t}\n\t\tif(isError)\n\t\t\treturn \"Participant registration failed because of an error [\"+errorMsg+\"]\";\n\t\telse\n\t\t\treturn \"success\";\n\t}", "public void validateRpd15s1()\n {\n // This guideline cannot be automatically tested.\n }", "public boolean singleConstraintExist(SingleConstraint c) {\n for (SingleConstraint constr : singleConstraints) {\n if (constr.getGame() == c.getGame()) {\n return true;\n }\n }\n return false;\n }", "public Task createTask_OnePotentialOwner() throws HTException {\n Task task = services.createTask(\"Task1\", null, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><ClaimApprovalRequest><cust><firstname>witek</firstname></cust><amount>1</amount></ClaimApprovalRequest>\");\n org.junit.Assert.assertTrue(task.getPotentialOwners().size() == 1);\n return task;\n }", "public Integer getParticipant() {\n return participant;\n }", "boolean hasCampaignId();", "boolean hasCampaignId();", "@Test\n public void testClaimAttendPhysId() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setAttendPhysId,\n RdaFissClaim::getAttendPhysId,\n RdaFissClaim.Fields.attendPhysId,\n 16);\n }", "com.google.protobuf.ByteString getParticipantBytes();", "public boolean validateRequirement_OnlyOneRequirementSubtype(Requirement requirement, DiagnosticChain diagnostics, Map<Object, Object> context) {\n\t\treturn requirement.OnlyOneRequirementSubtype(diagnostics, context);\n\t}", "@Test\n public void CardRequirement1() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(1);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.YELLOW, 0, null, null);\n DevelopmentCard card2 = new DevelopmentCard(2, Color.GREEN, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n p.getDevelopmentSlot().addCard(card2, 1);\n c.emptyQueue();\n\n assertTrue(am.activateLeaderCard(p, message));\n\n assertTrue(l2.isEnabled());\n\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_UPD_Player).count());\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_NOTIFICATION).count());\n assertEquals(2, c.messages.size());\n\n }", "private static boolean particleValidRestriction(XSParticleDecl dParticle, SubstitutionGroupHandler dSGHandler, XSParticleDecl bParticle, SubstitutionGroupHandler bSGHandler) throws XMLSchemaException {\n/* 605 */ return particleValidRestriction(dParticle, dSGHandler, bParticle, bSGHandler, true);\n/* */ }", "@Test\n public void testRemoveConference() throws Exception {\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n deltaEvent.setConferences(Collections.emptyList());\n updateEventAsOrganizer(deltaEvent);\n\n EventData updatedEvent = eventManager.getEvent(defaultFolderId, createdEvent.getId());\n assertThat(\"Should be no conferences!\", updatedEvent.getConferences(), empty());\n\n /*\n * Check that mails has been send\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.ACCEPTED, CustomConsumers.ALL, 1);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"access information was removed\");\n }", "abstract void takeResposibilityForConnectionOfAssociation(com.webobjects.eointerface.EOAssociation association);", "@Test\n public void test01ConfRespSignedByRecepient() throws Exception {\n log.trace(\">test01ConfRespSignedByRecepient\");\n\n this.cmpConfiguration.setResponseProtection(cmpAlias, \"signature\");\n this.cmpConfiguration.setCMPDefaultCA(cmpAlias, \"\");\n this.globalConfigurationSession.saveConfiguration(ADMIN, this.cmpConfiguration);\n\n byte[] nonce = CmpMessageHelper.createSenderNonce();\n byte[] transid = CmpMessageHelper.createSenderNonce();\n\n // Send a confirm message to the CA\n String hash = \"foo123\";\n PKIMessage confirm = genCertConfirm(userDN, this.cacert, nonce, transid, hash, 0, null);\n assertNotNull(confirm);\n ByteArrayOutputStream bao = new ByteArrayOutputStream();\n ASN1OutputStream dOut = ASN1OutputStream.create(bao, ASN1Encoding.DER);\n dOut.writeObject(confirm);\n byte[] ba = bao.toByteArray();\n // Send request and receive response\n byte[] resp = sendCmpHttp(ba, 200, cmpAlias);\n checkCmpResponseGeneral(resp, this.testx509ca.getSubjectDN(), userDN, this.cacert, nonce, transid, true, null, PKCSObjectIdentifiers.sha256WithRSAEncryption.getId());\n checkCmpPKIConfirmMessage(userDN, this.cacert, resp);\n\n log.trace(\"<test01ConfRespSignedByRecepient\");\n }", "private static int getContinuedPartnerBonus(FriendMiniGameHistory history, String game, String p1, String p2) {\n final int gameCount = history.getGamesPlayed(game, p1, p2);\n if (gameCount > 0) {\n return 0;\n }\n // At this point, this is definitely a new game.\n final int uniqueCount = history.getTotalGamesPlayed(p1, p2, true);\n if (uniqueCount == 0) {\n // Not a CONTINUED partner, since they have never played any game together before.\n return 0;\n }\n // Minus 1 just so we can start the bonuses array at index 0.\n return CONTINUED_PARTNER_BONUSES[uniqueCount - 1];\n }", "static final /* synthetic */ boolean m114833a(Activity activity) {\n if (!(activity instanceof C41387m) || !((C41387m) activity).mo88338b()) {\n return false;\n }\n return true;\n }", "public void setIntroducerCommission(String introducerCommission) {\r\n this.introducerCommission = introducerCommission == null ? null : introducerCommission.trim();\r\n }", "boolean hasCombinedAudience();", "private ClaimOrConcession(int proposal) {\n this.proposal = proposal;\n }", "public void requirePatientId() {\n hasPatientIdParam = true;\n }", "public static HashSet<ParticipantContext> GetCurrentValidParticipant(String rtid) {\n HashSet<ParticipantContext> retSet = new HashSet<>();\n Session session = HibernateUtil.GetLocalSession();\n Transaction transaction = session.beginTransaction();\n boolean cmtFlag = false;\n try {\n RenRuntimerecordEntity runtimeCtx = session.get(RenRuntimerecordEntity.class, rtid);\n String participants = runtimeCtx.getParticipantCache();\n transaction.commit();\n cmtFlag = true;\n if (CommonUtil.IsNullOrEmpty(participants)) {\n return retSet;\n }\n String[] participantPairItem = participants.split(\",\");\n for (String workerIdBRolePair : participantPairItem) {\n String[] workerItem = workerIdBRolePair.split(\":\");\n retSet.add(ParticipantContext.GetContext(rtid, workerItem[0]));\n }\n return retSet;\n }\n catch (Exception ex) {\n if (!cmtFlag) {\n transaction.rollback();\n }\n throw ex;\n }\n finally {\n HibernateUtil.CloseLocalSession();\n }\n }", "public MergingPrerequisites withOneConnectionIdMustBePresent(List<String> oneConnectionIdMustBePresent) {\n this.oneConnectionIdMustBePresent = oneConnectionIdMustBePresent;\n return this;\n }", "@Test\n public void test02ConfRespSignedByDefaultCA() throws Exception {\n log.trace(\">test02ConfRespSignedByDefaultCA\");\n\n this.cmpConfiguration.setResponseProtection(cmpAlias, \"signature\");\n this.cmpConfiguration.setCMPDefaultCA(cmpAlias, this.testx509ca.getSubjectDN());\n this.globalConfigurationSession.saveConfiguration(ADMIN, this.cmpConfiguration);\n\n byte[] nonce = CmpMessageHelper.createSenderNonce();\n byte[] transid = CmpMessageHelper.createSenderNonce();\n\n // Send a confirm message to the CA\n String hash = \"foo123\";\n // the parameter 'null' is to generate a confirm request for a recipient that does not exist\n PKIMessage confirm = genCertConfirm(userDN, null, nonce, transid, hash, 0, PKCSObjectIdentifiers.sha1WithRSAEncryption);\n assertNotNull(confirm);\n ByteArrayOutputStream bao = new ByteArrayOutputStream();\n ASN1OutputStream dOut = ASN1OutputStream.create(bao, ASN1Encoding.DER);\n dOut.writeObject(confirm);\n byte[] ba = bao.toByteArray();\n // Send request and receive response\n byte[] resp = sendCmpHttp(ba, 200, cmpAlias);\n checkCmpResponseGeneral(resp, this.testx509ca.getSubjectDN(), userDN, this.cacert, nonce, transid, true, null, PKCSObjectIdentifiers.sha1WithRSAEncryption.getId());\n checkCmpPKIConfirmMessage(userDN, this.cacert, resp);\n\n log.trace(\"<test02ConfRespSignedByDefaultCA\");\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n @Test\n public void updateParticipantRegistrationGetParticipantFailure() throws IntegrationException, SOAPFaultException,\n MalformedURLException, JAXBException, DatatypeConfigurationException {\n final Date stTime = new Date(new java.util.Date().getTime()); \n\n xsltTransformer.transform(null, null, null);\n EasyMock.expectLastCall().andAnswer(new IAnswer() {\n\n public Object answer() {\n return getParticipantXMLString();\n }\n }).anyTimes();\n\n final CaaersServiceResponse updateResponse = getUpdateParticipantResponse(SUCCESS);\n final CaaersServiceResponse getResponse = getParticipantResponse(FAILURE);\n EasyMock.expect(wsClient.updateParticipant((String) EasyMock.anyObject())).andReturn(updateResponse).anyTimes();\n EasyMock.expect(wsClient.getParticipant((String) EasyMock.anyObject())).andReturn(getResponse);\n EasyMock.replay(wsClient);\n\n final ServiceInvocationMessage serviceInvocationMessage = prepareServiceInvocationMessage(REFMSGID,\n getParticipantInterimMessage(), stTime,\n caAERSUpdateRegistrationServiceInvocationStrategy.getStrategyIdentifier());\n\n final ServiceInvocationResult result = caAERSUpdateRegistrationServiceInvocationStrategy\n .invoke(serviceInvocationMessage);\n\n Assert.assertNotNull(result);\n }", "public boolean isAuMoinsUneCompetenceAutrefEstEnCoursDeModification() {\n\t\tboolean result = false;\n\t\tint i = 0;\n\t\twhile (!result && i < tosRepartFdpCompetencesAutres().count()) {\n\t\t\tEORepartFdpAutre repart = (EORepartFdpAutre) tosRepartFdpCompetencesAutres().objectAtIndex(i);\n\t\t\tif (repart.isEnCoursDeModification()) {\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn result;\n\t}", "public boolean checkParticipate(Authentication auth, Integer ctId) throws NoSuchPageException {\n //check if participator\n ContestEntity contestEntity = getContestById(ctId);\n Date currentTime = new Date();\n Date startTime = contestEntity.getStartTime();\n Date endTime = DateUtils.addMinutes(startTime, contestEntity.getDuration());\n List<AuthorityDTO> lstAuthority = authorityMapper.getContestAuthority(ctId, auth.getName());\n for (AuthorityDTO curAuth : lstAuthority) {\n if (curAuth.getId().equals(Constants.AUTH_PARTICIPATE_CONTEST_ID)) {\n //if so then check conditions mentioned above\n if (currentTime.compareTo(startTime) >= 0\n && currentTime.compareTo(endTime) <= 0){\n return true;\n }else if(currentTime.compareTo(endTime) > 0\n && contestEntity.getCanPractice().equals(1)){\n return true;\n }\n }\n }\n //not participator\n return false;\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n @Test\n public void registerParticipantFailure() throws IntegrationException, SOAPFaultException, MalformedURLException,\n JAXBException {\n final Date stTime = new Date(new java.util.Date().getTime()); \n\n xsltTransformer.transform(null, null, null);\n EasyMock.expectLastCall().andAnswer(new IAnswer() {\n\n public Object answer() {\n return getParticipantXMLString();\n }\n }).anyTimes();\n\n final CaaersServiceResponse caaersServiceResponse = getRegisterParticipantResponse(FAILURE);\n EasyMock.expect(wsClient.createParticipant((String) EasyMock.anyObject())).andReturn(caaersServiceResponse);\n EasyMock.replay(wsClient);\n\n final ServiceInvocationMessage serviceInvocationMessage = prepareServiceInvocationMessage(REFMSGID,\n getParticipantInterimMessage(), stTime,\n caAERSRegistrationServiceInvocationStrategy.getStrategyIdentifier());\n\n final ServiceInvocationResult result = caAERSRegistrationServiceInvocationStrategy\n .invoke(serviceInvocationMessage);\n\n Assert.assertNotNull(result);\n }", "FeedbackConsequence getConsequence();", "@Test\n\tpublic void testcheckConflict() {\n\t\tActivity a1 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"MW\", 1330, 1445);\n\t\tActivity a2 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"TH\", 1330, 1445);\n\t\t try {\n\t\t a1.checkConflict(a2);\n\t\t assertEquals(\"Incorrect meeting string for this Activity.\", \"MW 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"Incorrect meeting string for possibleConflictingActivity.\", \"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t a2.checkConflict(a1);\n\t\t assertEquals(\"Incorrect meeting string for this Activity.\", \"MW 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"Incorrect meeting string for possibleConflictingActivity.\", \"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t } catch (ConflictException e) {\n\t\t fail(\"A ConflictException was thrown when two Activities at the same time on completely distinct days were compared.\");\n\t\t }\n\t\t a1.setMeetingDays(\"TH\");\n\t\t a1.setActivityTime(1445, 1530);\n\t\t try {\n\t\t a1.checkConflict(a2);\n\t\t fail(); //ConflictException should have been thrown, but was not.\n\t\t } catch (ConflictException e) {\n\t\t //Check that the internal state didn't change during method call.\n\t\t assertEquals(\"TH 2:45PM-3:30PM\", a1.getMeetingString());\n\t\t assertEquals(\"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t }\n\t}", "public void testAddRejectReasons_RejectReasonsContainsManyDuplicateElementsAccuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[4];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[1] = new ExpenseEntryRejectReason(3);\r\n rejectReasons[2] = new ExpenseEntryRejectReason(3);\r\n rejectReasons[3] = new ExpenseEntryRejectReason(2);\r\n entry.addRejectReason(new ExpenseEntryRejectReason(1));\r\n\r\n ExpenseEntryRejectReason[] duplicate = entry.addRejectReasons(rejectReasons);\r\n\r\n // check nothing is added into the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should not be added.\", 1, rejectReasonsMap.size());\r\n\r\n // check the duplicate result\r\n assertNotNull(\"The duplicate result should be correct.\", duplicate);\r\n V1Dot1TestHelper.assertEquals(\"The duplicate result should be correct.\",\r\n new ExpenseEntryRejectReason[] {rejectReasons[0], rejectReasons[1], rejectReasons[2]}, duplicate);\r\n }", "private void createQueryMsg(String patientId, String namespaceId, String universalId, String universalIdType, boolean useCPAssigningAuthority) throws PixConsumerException {\n\t\t\t\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"PixConsumerQuery: createQueryMsg - Entry \");\n\t\t}\n\t\t\n\t\tif ((patientId == null) || (patientId.length() <= 0)) {\n\t\t\tlogger.error(\"PixConsumerQuery: createQueryMsg - required patientId empty\");\n\t\t\tthrow new PixConsumerException(\"PixConsumerQuery: createQueryMsg - required patientId empty\");\n\t\t}\n\n\t\ttry {\n\t\t\t\n\t\t\t//initialize message object\n\t\t\tclear();\n\t\t\tif (globalFactory != null) {\n\t\t\t\tsetDefinitions(globalFactory.getVersionDefinitions());\n\t\t\t}\n\t\t\tsetVersion(version);\n\t\t\tsetEvent(MSH_9_1_PIXC);\n\t\t\tsetMessageType(MSH_9_2_PIXC);\n\t\t\tsetStructId(MSH_9_3_PIXC);\n\t\t\taddMSHFromFields();\n\t\t\t\n\t\t\t//define message segments (MSH added with earlier set statements)\n\t\t\tgetSegments().add(QPD);\n\t\t\tgetSegments().add(RCP);\n\t\t\t\n\t\t\t//Setup \"custom\" QPD fields\n\t\t\t//forceField(2) uses 0 based index to create QPD-{1..3}\n\t\t\t//forceComponent(3) uses 0 based index to create QPD-3-{1..4} \n\t\t\t//forceComponent(2) uses 0 based to create QPD-3-4-{1..3}\n\t\t\tgetSegments().getByCodeAndIndex(QPD, 1).forceField(2).forceComponent(3);\n\t\t\tgetSegments().getByCodeAndIndex(QPD, 1).forceField(2).getComponents().item(3).forceComponent(2);\n\t\t\t\n\t\t\t//Default constant values from conformance profile as a config file\n\t\t\tif (cpProfile != null) {\n\t\t\t\tCPMessageBuilder builder = new CPMessageBuilder();\n\t\t\t\tbuilder.build(version, cpProfile.getInteractions().itemInteraction(0).getStaticDefinition(), true, this);\n\t\t\t\t\n\t\t\t\t// validate assigning authority if coming from conformance profile\n\t\t\t\tString cpNamespaceId = this.getField(QPD_3_4_1);\n\t\t\t\tString cpUniversalId = this.getField(QPD_3_4_2);\n\t\t\t\tString cpUniversalIdType = this.getField(QPD_3_4_3);\n\t\t\t\tlogger.debug(\"PixFeedMsg: cp assigningAuthority \" + cpNamespaceId + \", \" + cpUniversalId + \", \" + cpUniversalIdType);\n\t\t\t\t\n\t\t\t\tif (useCPAssigningAuthority) {\n\t\t\t\t\tif (PixPdqMessageUtilities.isHDParamValid(cpNamespaceId, cpUniversalId, cpUniversalIdType) == false) {\n\t\t\t\t\t\tthrow new PixConsumerException(\"PixConsumerQuery: createQueryMsg - patientId cp assigning authority invalid\");\n\t\t\t\t\t}\n\t\t\t\t\tsetField(QPD_3_1, patientId);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// support user override of conformance profile\n\t\t\t\tif (((namespaceId != null) && (namespaceId.length() > 0)) ||\n\t\t\t\t\t\t((universalId != null) && (universalId.length() > 0)) ||\n\t\t\t\t\t\t((universalIdType != null) && (universalIdType.length() > 0))) {\n\t\t\t\t\tif (PixPdqMessageUtilities.isHDParamValid(namespaceId, universalId, universalIdType) == false) {\n\t\t\t\t\t\tthrow new PixConsumerException(\"PixConsumerQuery: createQueryMsg - patientId assigning authority invalid\");\n\t\t\t\t\t}\n\t\t\t\t\tsetField(QPD_3_1, patientId);\n\t\t\t\t\tsetField(QPD_3_4_1, namespaceId);\n\t\t\t\t\tsetField(QPD_3_4_2, universalId);\n\t\t\t\t\tsetField(QPD_3_4_3, universalIdType);\n\t\t\t\t\t\n\t\t\t\t\tlogger.debug(\"PixConsumerQuery: createQueryMsg - patientId cp assigning authority overridden with local parameters\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (PixPdqMessageUtilities.isHDParamValid(namespaceId, universalId, universalIdType) == false) {\n\t\t\t\t\tthrow new PixConsumerException(\"PixConsumerQuery: createQueryMsg - required patient namespace parameters invalid\");\n\t\t\t\t}\n\t\t\t\tsetField(QPD_3_1, patientId);\n\t\t\t\tsetField(QPD_3_4_1, namespaceId);\n\t\t\t\tsetField(QPD_3_4_2, universalId);\n\t\t\t\tsetField(QPD_3_4_3, universalIdType);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//field fixed for pix consumer query\n\t\t\tsetField(MSH_12, VersionDefnList.display(version));\n\t\t\tsetField(RCP_1, RCP_1_IMMEDIATE); //immediate response\n\n\t\t\tsetField(MSH_7, PixPdqMessageUtilities.getCurrentDateTimeString());\n\t\t\tsetNonNullElement(MSH_10, PixPdqMessageUtilities.getRandomFieldValue(20));\n\t\t\tsetNonNullElement(MSH_11_1, MSH_11_1_PRODUCTION);\n\t\t\tsetNonNullElement(MSH_18_1, MSH_18_1_ASCII);\n\t\t\tsetNonNullElement(QPD_1_1, QPD_1_1_PIXC); //query name - identifier\n\t\t\tsetNonNullElement(QPD_1_2, QPD_1_2_PIXC); //query name - text\n\t\t\tsetNonNullElement(QPD_1_3, QPD_1_3_PIXC);\n\t\t\tsetNonNullElement(QPD_2, PixPdqMessageUtilities.getRandomFieldValue(32));\t\n\t\t\t\t\n\t\t} catch (HL7V2Exception e) {\n\t\t\tlogger.error(\"PixConsumerQuery: createQueryMsg - HL7V2Exception \" + e.getLocalizedMessage());\n\t\t\tthrow new PixConsumerException(e);\n\t\t} catch (PixPdqMessageException e) {\n\t\t\tthrow new PixConsumerException(e);\n\t\t}\n\t\t\n\t\tif (logger.isDebugEnabled()) {\n\t\t\ttry {\n\t\t\t\tlogger.debug(\"PixConsumerQuery: createQueryMsg \\r\" + PixPdqMessageUtilities.msgToString(this));\n\t\t\t} catch (PixPdqMessageException e) {\n\t\t\t\tlogger.debug(\"PixConsumerQuery: createQueryMsg \\r\");\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void TEAM3_CONTROLLER_UT08() {\n\t\t// PRECONDITIONS\n\t\tArrayList<Integer> a = new ArrayList<Integer>();\n\t\ta.add(100);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<Collection<?>> singleElementCollection = new HashSet<Collection<?>>();\n\t\tsingleElementCollection.add(a);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean sizeIsOne = smc.sizeIsOne(singleElementCollection);\n\t\tassertTrue(sizeIsOne);\n\t}", "public void m9130p() throws cf {\r\n if (this.f6007a == null) {\r\n throw new cz(\"Required field 'domain' was not present! Struct: \" + toString());\r\n } else if (this.f6009c == null) {\r\n throw new cz(\"Required field 'new_id' was not present! Struct: \" + toString());\r\n }\r\n }", "public Boolean addActivity(String client, String cisId, AActivity activity);", "public boolean isAssocId();", "public boolean requireAllPresenceValues() throws android.os.RemoteException;", "public boolean hasConversation() {\n return typeCase_ == 2;\n }", "@Test\n\tpublic void testCheckConflictOverlappingTimes() {\n\t\tActivity a1 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"MW\", 1330, 1445);\n\t\tActivity a2 = new Course(\"CSC226\", \"Discrete Math\", \"001\", 3, \"sesmith5\", 12, \"MW\", 1445, 1545);\n\t\ttry {\n\t\t a1.checkConflict(a2);\n\t\t fail(); //ConflictException should have been thrown, but was not.\n\t\t } catch (ConflictException e) {\n\t\t //Check that the internal state didn't change during method call.\n\t\t assertEquals(\"MW 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"MW 2:45PM-3:45PM\", a2.getMeetingString());\n\t\t }\n\t}", "public boolean contient(Couple assoc) {\n for (int i = 0; i < nbAssoc; i++)\n if (associations[i].equals(assoc))\n return true;\n return false;\n }", "public void testGetMultiplicity_1_accuracy() {\n instance.setMultiplicity(multiplicity);\n assertTrue(\"The multiplicity is not set properly.\", multiplicity == instance.getMultiplicity());\n }", "boolean hasHas_consequence();", "public void testAddRejectReasons_RejectReasonsContainsDuplicateElementsAccuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[4];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[1] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[2] = new ExpenseEntryRejectReason(2);\r\n rejectReasons[3] = new ExpenseEntryRejectReason(1);\r\n\r\n ExpenseEntryRejectReason[] duplicate = entry.addRejectReasons(rejectReasons);\r\n\r\n // check nothing is added into the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should not be added.\", 0, rejectReasonsMap.size());\r\n\r\n // check the duplicate result\r\n assertNotNull(\"The duplicate result should be correct.\", duplicate);\r\n V1Dot1TestHelper.assertEquals(\"The duplicate result should be correct.\",\r\n new ExpenseEntryRejectReason[] {rejectReasons[0], rejectReasons[1], rejectReasons[3]}, duplicate);\r\n }", "boolean hasPersonCharacteristicIds();", "@Override\n\tpublic int cardinality() {\n\t\treturn 2;\n\t}", "@Test\n public void testASSY1HasNoSubComponents() {\n assertThat( hasSubComponents( ASSY1_WITHOT_SUB_COMP ), is( false ) );\n }", "public void setParticipantId(int participantId) {\r\n\t\tthis.participantId = participantId;\r\n\t}", "boolean hasDidcommInvitation();", "public void addParticipant(String uid) {\n\r\n if (!participants.contains(uid))\r\n participants.add(uid);\r\n }", "public void validateRpd11s1()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\r\n void B6007089_test_SemeterMustNotBeNull() {\r\n System.out.println(\"\\n=======================================\");\r\n System.out.println(\"\\nTest Time Must Not Be Null\");\r\n System.out.println(\"\\n=======================================\\n\");\r\n Section section = new Section();\r\n section.setSec(\"1\");\r\n section.setTime(null);\r\n\r\n\r\n Set<ConstraintViolation<Section>> result = validator.validate(section);\r\n assertEquals(1, result.size());\r\n\r\n ConstraintViolation<Section> v = result.iterator().next();\r\n assertEquals(\"must not be null\", v.getMessage());\r\n assertEquals(\"time\", v.getPropertyPath().toString());\r\n }", "@RequestMapping(value = \"/acl_presencerequests\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Presencerequest> createPresencerequest(@RequestBody Communicativeaction communicativeaction) throws URISyntaxException {\n communicativeaction.setActionTime(new DateTime());\n communicativeactionRepository.save(communicativeaction);\n String [] presenceReqInfo = communicativeaction.getContent().split(\",\");\n DateTime time = new DateTime();\n Presencestatus presenceStatus = null;\n Agent agent = communicativeaction.getAction_sender();\n for(String info : presenceReqInfo){\n String [] presencePair = info.split(\":\");\n switch(presencePair[0]){\n case \"presenceStatus\":{\n presenceStatus = presencestatusRepository.findByPresenceStatusName(presencePair[1]);\n break;\n }\n }\n }\n if(presenceStatus != null){\n Presencerequest presence = new Presencerequest(presenceStatus, time, agent);\n Presencerequest result = presencerequestRepository.save(presence);\n return ResponseEntity.created(new URI(\"/api/presencerequests/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"presencerequest\", result.getId().toString()))\n .body(result);\n }\n return ResponseEntity.created(new URI(\"/api/presencerequests/\"))\n .headers(HeaderUtil.createEntityCreationAlert(\"Failure\", \"Not a valid presence request status\"))\n .body(null);\n }", "public Audience() {\n members = new HashSet<Person>();\n }", "public void testAllMedicalQuestionParametersPopulated() {\n final String QUESTION_ID = \"hypoglycaemia-blood-sugar\";\n\n Map<String, MedicalCondition> conditions = cache.getConditions(Service.NOTIFY);\n MedicalCondition condition = conditions.get(DIABETES_CONDITION);\n\n assertNotNull(condition);\n\n MedicalQuestion question = condition.getQuestions().get(QUESTION_ID);\n assertNotNull(question);\n\n assertEquals(QUESTION_ID, question.getID());\n assertEquals(\"22\", question.getStep());\n assertEquals(Page.VERIFIED.getName(), question.getPage());\n assertEquals(9, question.getOrder().intValue());\n assertEquals(Format.RADIO.getName(), question.getType());\n assertEquals(Boolean.TRUE, question.getValidate());\n assertEquals(Boolean.FALSE, question.getLogout());\n assertEquals(EMPTY, question.getOptions());\n\n assertNotNull(question.getAnswers());\n assertEquals(question.getAnswers().size(), 0);\n\n assertNotNull(question.getConfiguration());\n assertTrue(question.getConfiguration().trim().length() > 0);\n\n assertNotNull(question.toString());\n }", "public static String regParticipants(String fileName) {\n\t\t\n\t\tlogger.info(\"ParticipantRegistrationPlus:regParticipants \" + fileName);\t\n\t\tClientSession cs = ClientSession.getInstance();\n\t\t\t\t\n\t\ttry {\n\t\t\tcs.startSession(userName, password);\n\t\t} catch (ApplicationException e1) {\n\t\t\tlogger.info(\"ApplicationException in ParticipantRegistrationPlus:regParticipants\");\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tboolean isError=false;\n\t\tString errorMsg=\"\";\n\t\t\n\t\ttry\n\t\t{\n\t\t\tFile fXmlFile = new File(fileName);\n\t\t\tSAXBuilder builder = new SAXBuilder();\n\t\t\tDocument document = builder.build(new ByteArrayInputStream(getFileAsString(fXmlFile).getBytes()));\n\t\t\tElement root = document.getRootElement();\n\n\t\t\tList rows = root.getChild(\"patient_set\").getChildren(\"patient\");\n\t\t\tfor (int i = 0; i < rows.size(); i++) {\n\t\t\t\tElement row = (Element) rows.get(i);\n\t\t\t\tElement patientElement = row.getChild(\"patient_id\");\n\t\t\t\tElement cpElement = row.getChild(\"study_name\");\n\t\t\t\tHashMap<String, String> hashMap = new HashMap<String, String>();\n\t\t\t\tString gender = \"Unknown\", def_vital_status_cd = \"Unknown\", sex_cd=\"\";\n\n\t\t\t\tList params = row.getChildren(\"param\");\n\t\t\t\tfor (int j = 0; j < params.size(); j++) {\n\t\t\t\t\tElement column = (Element) params.get(j);\n\t\t\t\t\tString value = column.getText();\n\t\t\t\t\thashMap.put(j+\"\", value);\n\t\t\t\t}\n\t\t\t\tParticipant p = new Participant();\n\t\t\t\tp.setLastName(patientElement.getText());\n\t\t\t\tp.setFirstName(\"\");\n\t\t\t\tp.setMiddleName(cpElement.getText());\n\t\t\t\tp.setActivityStatus(\"Active\");\n\t\t\t\tp.setBirthDate(dateFormat(hashMap.get(\"1\")));\n\t\t\t\tsex_cd=hashMap.get(\"4\");\n\n\t\t\t\tif(sex_cd.equalsIgnoreCase(\"MALE\"))\n\t\t\t\t\tgender=\"Male Gender\";\n\t\t\t\telse if(sex_cd.equalsIgnoreCase(\"FEMALE\"))\n\t\t\t\t\tgender=\"Female Gender\";\n\n\t\t\t\tp.setGender(gender);\n\t\t\t\tp.setVitalStatus(def_vital_status_cd);\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tp = (Participant) appService.createObject(p);\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t \te.printStackTrace();\t\t \n\t\t\t\t}\t\t\t\t\n\t\t\t\tlogger.info(\"ParticipantRegistrationPlus:regParticipants - Participant created successfully\");\t\t\t\t\t\n\t\t\t}\n\t\t} catch (JDOMException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t}\n\t\t\n\t\tif(isError)\n\t\t\treturn \"Participant registration failed because of an error [\"+errorMsg+\"]\";\n\t\telse\n\t\t\treturn \"success\";\n\t}", "boolean hasCampaignSharedSet();", "boolean hasCampaignExperiment();", "boolean isActivityNotValid(ExoSocialActivity activity, ExoSocialActivity comment) throws Exception;", "@Test\n public void testMatchesStatusNonNullStatus() {\n BgpSessionCompatibilityQuestion q =\n new BgpSessionCompatibilityQuestion(\n null, null, ConfiguredSessionStatus.UNIQUE_MATCH.toString(), null);\n\n for (ConfiguredSessionStatus status : ConfiguredSessionStatus.values()) {\n if (status == ConfiguredSessionStatus.UNIQUE_MATCH) {\n assertTrue(status.toString(), q.matchesStatus(status));\n } else {\n assertFalse(status.toString(), q.matchesStatus(status));\n }\n }\n }", "public boolean hasCampaignId() {\n return campaignIdBuilder_ != null || campaignId_ != null;\n }", "public boolean hasCampaignId() {\n return campaignIdBuilder_ != null || campaignId_ != null;\n }", "boolean hasCampaignAudienceView();", "public boolean isActive(){\n return (registeredParticipants.size() == connections().size());\n }", "public boolean hasConversation() {\n return typeCase_ == 2;\n }", "public void validateRpd13s17()\n {\n // This guideline cannot be automatically tested.\n }", "final int getShareOfOne() { return getPlayerId() == 0 ? 1 : 0; }", "public List<String> oneConnectionIdMustBePresent() {\n return this.oneConnectionIdMustBePresent;\n }", "public ParticipantBehaviorDescription(){\n\t\t\n\t}", "@javax.annotation.Nonnull\n @ApiModelProperty(required = true, value = \"ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result.\")\n\n public String getConferenceId() {\n return conferenceId;\n }", "public Participant getParticipant ()\r\n {\r\n return participant_;\r\n }", "public void verifyNoMatching(AcBatchFlight e)\n {\n }", "public static String regParticipantsTest() {\n\t\t\t\n\t\t\tlogger.info(\"ParticipantRegistrationPlus:regParticipantsTest\");\t\n\t\t\t\n\t\t\tClientSession cs = ClientSession.getInstance();\n\t\t\t\t\t\t\n\t\t\ttry {\n\t\t\t\tcs.startSession(userName, password);\n\t\t\t} catch (ApplicationException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tboolean isError=false;\n\t\t\tString errorMsg=\"\";\n\t\t\tProperties prop = new Properties();\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\tParticipant p = new Participant();\n\t\t\t\t\tp.setLastName(\"patientElement\");\n\t\t\t\t\tp.setFirstName(\"\");\n\t\t\t\t\tp.setMiddleName(\"cpElement\");\n\t\t\t\t\tp.setActivityStatus(\"Active\");\n\t\t\t\t\tp.setBirthDate(dateFormat(\"0000-00-00\"));\n\t\t\t\t\tString gender=\"Male Gender\";\n\t\t\t\t\tp.setGender(gender);\n\t\t\t\t\tp.setVitalStatus(\"Unknown\");\n\t\t\t\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\tp = (Participant) appService.createObject(p);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\tlogger.info(\"while creating participant\");\n\t\t\t\t \te.printStackTrace();\n\t\t\t \n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Participant created successfully\");\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tisError = true;\n\t\t\t\terrorMsg=e.getMessage();\n\t\t\t}\n\t\t\tif(isError)\n\t\t\t\treturn \"Participant registration failed because of an error [\"+errorMsg+\"]\";\n\t\t\telse\n\t\t\t\treturn \"success\";\n\t\t}", "@Test(priority = 2)\n public void testVerifyQuestionOne() {\n\t\tassertTrue(true);\n }", "public String getIntroducerCommission() {\r\n return introducerCommission;\r\n }", "@When(\"^clicks request$\")\n public void patient_clicks_request() throws Throwable {\n \t//appt request has been saved and is pending...\n \tAssert.assertTrue(appt.getApptType() != null);\n \tAssert.assertTrue(appt.getDate() != null);\n \tAssert.assertTrue(appt.getComment() != null);\n \t//check if the above items have been set correctly from the previous method\n }", "final void checkForComodification() {\n\t}", "public void validateRpd12s1()\n {\n // Usage of iframes is forbidden\n // frameset and frame tags are checked in RPD2.5.\n assertFalse(Type.ERROR, \"rpd12s1.iframe\", containsElement(ELEM_IFRAME));\n }", "public boolean hasCLAPPROVAL() {\n return fieldSetFlags()[5];\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n DBSchema dBSchema0 = new DBSchema(\"Er\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"Er\", dBSchema0);\n String[] stringArray0 = new String[0];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"e/ \", false, stringArray0);\n boolean boolean0 = DBUtil.containsMandatoryColumn(dBUniqueConstraint0);\n assertFalse(boolean0);\n }", "@Test\n public void testClaimAdjReqCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setAdjReqCdEnum,\n RdaFissClaim::getAdjReqCd,\n FissAdjustmentRequestorCode.ADJUSTMENT_REQUESTOR_CODE_FISCAL_INTERMEDIARY,\n \"F\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setAdjReqCdUnrecognized,\n RdaFissClaim::getAdjReqCd,\n RdaFissClaim.Fields.adjReqCd,\n 1);\n }", "@Test\n public void testClaimCancAdjCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setCancAdjCdEnum,\n RdaFissClaim::getCancAdjCd,\n FissCancelAdjustmentCode.CANCEL_ADJUSTMENT_CODE_COVERAGE,\n \"C\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setCancAdjCdUnrecognized,\n RdaFissClaim::getCancAdjCd,\n RdaFissClaim.Fields.cancAdjCd,\n 1);\n }", "void claim(@Nonnull Client client, @Nonnull List<Set<TCSResource<?>>> resourceSequence)\n throws IllegalArgumentException;", "@Test\n\tpublic void TC1060_ObserveActiveAndInactiveEQSurvey() throws Exception{\n\t\tLog.info(\"\\nTestcase - TC1060_ObserveActiveAndInactiveEQSurvey\\n\");\n\t\tfinal int userDataRowID = 16;\n\t\tfinal int analyzerDb3DataRowID = 78;\n\t\tfinal int surveyDataRowID = 65;\n\t\tgetLoginPageAction().open(EMPTY, NOTSET);\n\t\tgetLoginPageAction().login(EMPTY, userDataRowID); /* Picarro Driver */\n\n\t\t\n\t\tLog.info(\"Starting Analyzer...\");\n\t\ttestEnvironmentAction.startAnalyzer(EMPTY, analyzerDb3DataRowID); \t// start analyzer.\n\t\tdriverViewPageAction.open(EMPTY,NOTSET);\n\t\tdriverViewPageAction.waitForConnectionToComplete(EMPTY,NOTSET);\n\n\t\tLog.info(\"Starting Replay...\");\n\t\tgetTestEnvironmentAction().startReplay(EMPTY, analyzerDb3DataRowID);\n\t\t// start survey.\n\t\tdriverViewPageAction.clickOnModeButton(EMPTY, NOTSET);\n\t\tdriverViewPageAction.startEQDrivingSurvey(EMPTY, surveyDataRowID);\n\n\t\tloginAsObserver(USER_ROW_ID_PICARRO_DRIVER);\n\n\t\tString analyzer = getTestEnvironmentAction().getWorkingAnalyzerSerialNumber();\n\t\thomePageActionList.get(0).clickOnFirstMatchingOnlineSurveyorLink(analyzer, NOTSET);\n\t\tobserverViewPageActionList.get(0).getObserverViewPage().waitForPageLoad();\n\t\tobserverViewPageActionList.get(0).waitForConnectionToComplete(EMPTY, NOTSET);\n\t\tassertTrue(observerViewPageActionList.get(0).verifyObserverViewPageIsOpened(EMPTY, NOTSET));\n\n\t\tobserverViewPageActionList.get(0).getObserverViewPage().waitForAJAXCallsToComplete();\n\t\tobserverViewPageActionList.get(0).clickOnMapButton(EMPTY, NOTSET);\n\t\tobserverViewPageActionList.get(0).turnOnMapView(EMPTY, NOTSET);\n\t\t\n\t\tobserverViewPageActionList.get(0).clickOnDisplayButton(EMPTY, NOTSET);\n\t\n\t\t// Check availability of toggle buttons\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchIndicationsButtonIsVisible(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchLisasButtonIsVisible(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchFovsButtonIsVisible(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchConcentrationChartButtonIsVisible(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchWindroseButtonIsVisible(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchIsotopicAnalysisButtonIsNotVisible(EMPTY, NOTSET));\n\n\t\t// Check Survey information displayed\n\t\tobserverViewPageActionList.get(0).clickOnHeaderInfoBox(EMPTY, NOTSET);\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTagLabelEquals(DriverViewPageActions.workingDataRow.get().surveyTag, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoModeLabelEquals(SURVEY_INFO_MODE_PREFIX + DriverViewPageActions.workingDataRow.get().surveyType, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTimeLabelStartsWith(SURVEY_INFO_TIME_PREFIX + String.valueOf(getHourOfDay()), NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTimeElapsedLabelStartsWith(SURVEY_INFO_ELAPSED_TIME_00, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTimeRemainingLabelStartsWith(SURVEY_INFO_REMAINING_TIME_07, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoZoomLevelLabelEquals(String.format(SURVEY_INFO_ZOOM_LEVEL_X, 19), NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTimeElapsedIsTickingForward(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTimeRemainingLabelIsTickingBackward(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoAnalyzerLabelEquals(SURVEY_INFO_SURVEY_STATUS_ACTIVE, NOTSET));\n\t\t\n\t\tassertTrue(observerViewPageActionList.get(0).verifyCrossHairIconIsShownOnMap(\"Red\", NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyBreadcrumbIsShownOnMap(\"Blue\", NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyCorrectSurveyActiveMessageIsShownOnMap(\"EQ\", NOTSET));\n\n\t\t// Check Inactive information displayed\n\t\tdriverViewPageAction.clickOnModeButton(EMPTY, NOTSET);\n\t\tFunctionUtil.warnOnError(() -> driverViewPageAction.stopDrivingSurvey(EMPTY, NOTSET));\n\t\tgetTestEnvironmentAction().idleForSeconds(\"5\", NOTSET);\n\t\t\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoAnalyzerLabelEquals(SURVEY_INFO_SURVEY_STATUS_INACTIVE, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyCrossHairIconIsShownOnMap(\"Gray\", NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyBreadcrumbIsShownOnMap(\"Black\", NOTSET));\n\t\t\n\t\t// stop simulator and PSA.\n\t\tLog.info(\"Stopping Analyzer...\");\n\t\tgetTestEnvironmentAction().stopReplay(EMPTY, NOTSET);\n\t\tgetTestEnvironmentAction().stopAnalyzer(EMPTY, NOTSET);\n\t}", "int updateParticipant(TccTransaction tccTransaction);" ]
[ "0.52758265", "0.5047301", "0.48256385", "0.48255357", "0.47758403", "0.46195734", "0.461783", "0.4585361", "0.45768017", "0.45604512", "0.45418698", "0.4540436", "0.45205384", "0.44936758", "0.4459361", "0.44534877", "0.44054452", "0.43884733", "0.43716776", "0.43703744", "0.43699872", "0.43461558", "0.43372983", "0.43372983", "0.4335543", "0.42924514", "0.42902127", "0.42811733", "0.42772305", "0.42757726", "0.42706177", "0.4264358", "0.4260581", "0.42452732", "0.424378", "0.42436212", "0.42435098", "0.42387262", "0.42363164", "0.42302856", "0.42280248", "0.42277187", "0.42223352", "0.4217293", "0.4213106", "0.4209327", "0.4206396", "0.420533", "0.42047158", "0.42014986", "0.4198518", "0.41971374", "0.41970053", "0.41904077", "0.41898274", "0.4189569", "0.41807863", "0.41800854", "0.41742373", "0.41727957", "0.41710886", "0.41702697", "0.4163273", "0.41596717", "0.41555884", "0.41513157", "0.41511086", "0.4144761", "0.41407692", "0.41397557", "0.41381848", "0.41332278", "0.4132595", "0.4130681", "0.41276512", "0.4126074", "0.4123618", "0.4123618", "0.4121721", "0.4121192", "0.4119099", "0.41187975", "0.41178113", "0.40943632", "0.40909746", "0.40896544", "0.4088941", "0.40883037", "0.40859255", "0.4079841", "0.4076893", "0.4074087", "0.4074066", "0.40715173", "0.40686977", "0.40648776", "0.4064168", "0.40640038", "0.40629372", "0.4059492", "0.40593845" ]
0.0
-1
CCD Policy Activity MAY contain exactly one [1..1] participant (CONF63), such that.
IPayerEntry setSubscriber(IPolicySubscriber value);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testRemoveOnlyOneConference() throws Exception {\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n deltaEvent.setConferences(Collections.singletonList(createdEvent.getConferences().get(0)));\n updateEventAsOrganizer(deltaEvent);\n\n EventData updatedEvent = eventManager.getEvent(defaultFolderId, createdEvent.getId());\n assertThat(\"Should be one conference!\", I(updatedEvent.getConferences().size()), is(I(1)));\n\n /*\n * Check that mails has been send, but for changed conferences not removed all\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.ACCEPTED, CustomConsumers.ALL, 1);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"access information was changed\");\n }", "@Test\n public void minimumValidClaim() {\n claim.setClaimId(EXPECTED_CLAIM_ID);\n claim.setDcn(\"dcn\");\n claim.setIntermediaryNb(\"inter\");\n claim.setHicNo(\"hicn\");\n claim.setCurrStatus('T');\n claim.setCurrLoc1('M');\n claim.setCurrLoc2(\"9000\");\n claim.setLastUpdated(clock.instant());\n claimBuilder\n .setRdaClaimKey(\"claim_id\")\n .setDcn(\"dcn\")\n .setIntermediaryNb(\"inter\")\n .setHicNo(\"hicn\")\n .setCurrStatusEnum(FissClaimStatus.CLAIM_STATUS_RTP)\n .setCurrLoc1Enum(FissProcessingType.PROCESSING_TYPE_MANUAL)\n .setCurrLoc2Enum(FissCurrentLocation2.CURRENT_LOCATION_2_CABLE);\n changeBuilder\n .setSeq(MIN_SEQUENCE_NUM)\n .setChangeType(ChangeType.CHANGE_TYPE_INSERT)\n .setClaim(claimBuilder.build());\n assertChangeMatches(RdaChange.Type.INSERT);\n }", "public void test1_CheckUniqueParticipant() {\n if (!ParticipantController.checkUniqueParticipant(\"ControllerTest\")) {\n assertTrue(true);\n } else {\n assertTrue(\"Fail\", false);\n }\n\n // should not find participant else fail\n if (ParticipantController.checkUniqueParticipant(\"ControllerTestDummy\")) {\n assertTrue(true);\n } else {\n assertTrue(\"Fail\", false);\n }\n }", "public void testValidateSubjectPrimaryAssociationsDuplicate() throws Exception {\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n List subjectPrimaryAssociations = positionWrapperBean.getSubjectPrimaryAssociations();\n for (int i = 0; i < subjectPrimaryAssociations.size(); i++) {\n ArtefactAssociationWrapperBean artefactAssociationWrapperBean = (ArtefactAssociationWrapperBean) subjectPrimaryAssociations.get(i);\n artefactAssociationWrapperBean.setSourceId(new Long(12));\n artefactAssociationWrapperBean.setQualifierId(new Long(399));\n }\n // should produce a duplicate assocition error\n DataBinder binder = new DataBinder(positionWrapperBean, ZynapDefaultFormController.DEFAULT_COMMAND_NAME);\n Errors errors = binder.getBindingResult();\n positionValidator.validateSubjectPrimaryAssociations(positionWrapperBean, errors);\n assertEquals(1, errors.getErrorCount());\n FieldError error = errors.getFieldError(FIRST_PRIMARY_ASSOCIATION_SOURCE_FIELD);\n assertEquals(\"error.association.target.unique.required\", error.getCode());\n }", "public void setParticipant(Integer participant) {\n this.participant = participant;\n }", "public void setParticipantCount (byte p) {\n\t\tParticipants = p;\n\t}", "@Test\n\tpublic void testCheckCoflictOneDay() {\n\t\tActivity a1 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"MWF\", 1330, 1445);\n\t\tActivity a2 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"TWH\", 1330, 1445);\n\t\ttry {\n\t\t a1.checkConflict(a2);\n\t\t fail(); //ConflictException should have been thrown, but was not.\n\t\t } catch (ConflictException e) {\n\t\t //Check that the internal state didn't change during method call.\n\t\t assertEquals(\"MWF 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"TWH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t }\n\t}", "public boolean isSetParticipantID() {\n return this.participantID != null;\n }", "public boolean isContinuingEducationPassed(CapIDModel capID) throws AAException, RemoteException;", "@Test\r\n void B6007089_test_SecMustNotBeNull() {\r\n System.out.println(\"\\n=======================================\");\r\n System.out.println(\"\\nTest Sec Must Not Be Null\");\r\n System.out.println(\"\\n=======================================\\n\");\r\n Section section = new Section();\r\n section.setSec(null);\r\n section.setTime(\"Tu13:00-15:00 B1231 -- We13:00-15:00 B1125\");\r\n\r\n\r\n Set<ConstraintViolation<Section>> result = validator.validate(section);\r\n assertEquals(1, result.size());\r\n\r\n ConstraintViolation<Section> v = result.iterator().next();\r\n assertEquals(\"must not be null\", v.getMessage());\r\n assertEquals(\"sec\", v.getPropertyPath().toString());\r\n }", "public boolean canAddThreePid() {\n return (supportStage(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY) && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY))\n || (supportStage(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN) && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN));\n }", "@Test\n public void testAddConference() throws Exception {\n ConferenceBuilder builder = ConferenceBuilder.newBuilder() //@formatter:off\n .setDefaultFeatures()\n .setLable(\"Random lable\")\n .setVideoChatUri(); //@formatter:on\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n deltaEvent.setConferences(createdEvent.getConferences());\n deltaEvent.addConferencesItem(builder.build());\n updateEventAsOrganizer(deltaEvent);\n\n EventData updatedEvent = eventManager.getEvent(defaultFolderId, createdEvent.getId());\n assertThat(\"Should be three conferences!\", I(updatedEvent.getConferences().size()), is(I(3)));\n\n /*\n * Check that the conference item has been added\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.ACCEPTED, CustomConsumers.ALL, 1);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"access information was changed\");\n }", "@Test\r\n public void testCommissionCases() throws Exception\r\n {\r\n String epcToCheck = \"urn:epc:id:sgtin:0614141.107340.1\";\r\n XmlObjectEventType event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNull(event);\r\n\r\n runCaptureTest(COMMISSION_CASES_XML);\r\n\r\n event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNotNull(event);\r\n }", "CourseParticipant getCourseParticInOneCourse(UUID courseCourseParticUuid);", "private boolean consistencyCheckC1Constraints(double[][] xResults) {\n\t\tint n = mExplicitMDP.getNumStates();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tdouble outxValue = GRBSolverUtils.getOutValue(i, xResults, mExplicitMDP);\n\t\t\tdouble inxValue = GRBSolverUtils.getInValue(i, xResults, mExplicitMDP);\n\t\t\tboolean satisfied = GRBSolverUtils.approximatelyEqual(outxValue, inxValue,\n\t\t\t\t\tmSettings.getFeasibilityTolerance());\n\n\t\t\tif (!satisfied) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private int isPrivacyModelFulfilled(Transformation<?> transformation, HashGroupifyEntry entry) {\n \n // Check minimal group size\n if (minimalClassSize != Integer.MAX_VALUE && entry.count < minimalClassSize) {\n return 0;\n }\n \n // Check other criteria\n // Note: The d-presence criterion must be checked first to ensure correct handling of d-presence with tuple suppression.\n // This is currently ensured by convention. See ARXConfiguration.getCriteriaAsArray();\n for (int i = 0; i < classBasedCriteria.length; i++) {\n if (!classBasedCriteria[i].isAnonymous(transformation, entry)) {\n return i + 1;\n }\n }\n return -1;\n }", "@Test\r\n public void testCommissionPallets() throws Exception\r\n {\r\n String epcToCheck = \"urn:epc:id:sscc:0614141.0000000001\";\r\n XmlObjectEventType event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNull(event);\r\n\r\n runCaptureTest(COMMISSION_PALLETS_XML);\r\n\r\n event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNotNull(event);\r\n }", "public static String regParticipantsWithCP(String fileName) {\n\t\t\n\t\tlogger.info(\"ParticipantRegistrationPlus:regParticipantsWithCP \" + fileName);\t\n\t\tClientSession cs = ClientSession.getInstance();\n\t\t\n\t\ttry {\n\t\t\tcs.startSession(userName, password);\n\t\t} catch (ApplicationException e1) {\n\t\t\tlogger.info(\"ApplicationException in ParticipantRegistrationPlus:regParticipantsWithCP\");\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tboolean isError=false;\n\t\tString errorMsg=\"\";\n\t\t\n\t\ttry\n\t\t{\t\t\t\n\t\t\tFile fXmlFile = new File(fileName);\n\t\t\tSAXBuilder builder = new SAXBuilder();\n\t\t\tDocument document = builder.build(new ByteArrayInputStream(getFileAsString(fXmlFile).getBytes()));\n\t\t\tElement root = document.getRootElement();\n\t\t\n\t\t\tList rows = root.getChild(\"patient_set\").getChildren(\"patient\");\n\t\t\tfor (int i = 0; i < rows.size(); i++) {\n\t\t\t\tElement row = (Element) rows.get(i);\n\t\t\t\tElement patientElement = row.getChild(\"patient_id\");\n\t\t\t\tElement cpElement = row.getChild(\"study_name\");\n\t\t\t\tHashMap<String, String> hashMap = new HashMap<String, String>();\n\t\t\t\tString gender = \"Unknown\", def_vital_status_cd = \"Unknown\", sex_cd=\"\";\n\n\t\t\t\tList params = row.getChildren(\"param\");\n\t\t\t\tfor (int j = 0; j < params.size(); j++) {\n\t\t\t\t\tElement column = (Element) params.get(j);\n\t\t\t\t\tString value = column.getText();\n\t\t\t\t\thashMap.put(j+\"\", value);\n\t\t\t\t}\n\t\t\t\tParticipant p = new Participant();\n\t\t\t\tp.setLastName(patientElement.getText());\n\t\t\t\tp.setFirstName(\"\");\n\t\t\t\t//p.setMiddleName(cpElement.getText());\n\t\t\t\tp.setActivityStatus(\"Active\");\n\t\t\t\tp.setBirthDate(dateFormat(hashMap.get(\"1\")));\n\t\t\t\tsex_cd=hashMap.get(\"4\");\n\n\t\t\t\tif(sex_cd.equalsIgnoreCase(\"MALE\"))\n\t\t\t\t\tgender=\"Male Gender\";\n\t\t\t\telse if(sex_cd.equalsIgnoreCase(\"FEMALE\"))\n\t\t\t\t\tgender=\"Female Gender\";\n\n\t\t\t\tp.setGender(gender);\n\n\t\t\t\tp.setVitalStatus(def_vital_status_cd);\n\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tp = (Participant) appService.createObject(p);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tString getCPQuery = \"select cp from edu.wustl.catissuecore.domain.CollectionProtocol cp where cp.shortTitle='\" + cpElement.getText() + \"'\";\n\t\t\t\t\tHQLCriteria hql = new HQLCriteria(getCPQuery);\t\t\t\t\t\n\t\t\t\t\tList<CollectionProtocol> resultList =appService.query(hql,CollectionProtocol.class.getName());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif (resultList.size() == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tCollectionProtocol cp = resultList.get(0);\t\t\t\t\t\t\n\t\t\t\t\t\tCollectionProtocolRegistration collectionProtocolRegistration = new CollectionProtocolRegistration();\t\t\t\t\t\n\t\t\t\t\t\tcollectionProtocolRegistration.setActivityStatus(\"Active\");\n\t\t\t\t\t\tcollectionProtocolRegistration.setCollectionProtocol(cp);\n\t\t\t\t\t\tcollectionProtocolRegistration.setParticipant(p);\n\t\t\t\t\t\tcollectionProtocolRegistration = (CollectionProtocolRegistration) appService.createObject(collectionProtocolRegistration);\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t \te.printStackTrace();\n\t\t \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Participant created successfully\");\n\t\t\t}\n\t\t} catch (JDOMException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t}\n\t\tif(isError)\n\t\t\treturn \"Participant registration failed because of an error [\"+errorMsg+\"]\";\n\t\telse\n\t\t\treturn \"success\";\n\t}", "public void validateRpd15s1()\n {\n // This guideline cannot be automatically tested.\n }", "public boolean singleConstraintExist(SingleConstraint c) {\n for (SingleConstraint constr : singleConstraints) {\n if (constr.getGame() == c.getGame()) {\n return true;\n }\n }\n return false;\n }", "public Task createTask_OnePotentialOwner() throws HTException {\n Task task = services.createTask(\"Task1\", null, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><ClaimApprovalRequest><cust><firstname>witek</firstname></cust><amount>1</amount></ClaimApprovalRequest>\");\n org.junit.Assert.assertTrue(task.getPotentialOwners().size() == 1);\n return task;\n }", "public Integer getParticipant() {\n return participant;\n }", "@Test\n public void testClaimAttendPhysId() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setAttendPhysId,\n RdaFissClaim::getAttendPhysId,\n RdaFissClaim.Fields.attendPhysId,\n 16);\n }", "boolean hasCampaignId();", "boolean hasCampaignId();", "com.google.protobuf.ByteString getParticipantBytes();", "public boolean validateRequirement_OnlyOneRequirementSubtype(Requirement requirement, DiagnosticChain diagnostics, Map<Object, Object> context) {\n\t\treturn requirement.OnlyOneRequirementSubtype(diagnostics, context);\n\t}", "@Test\n public void CardRequirement1() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(1);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.YELLOW, 0, null, null);\n DevelopmentCard card2 = new DevelopmentCard(2, Color.GREEN, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n p.getDevelopmentSlot().addCard(card2, 1);\n c.emptyQueue();\n\n assertTrue(am.activateLeaderCard(p, message));\n\n assertTrue(l2.isEnabled());\n\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_UPD_Player).count());\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_NOTIFICATION).count());\n assertEquals(2, c.messages.size());\n\n }", "@Test\n public void testRemoveConference() throws Exception {\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n deltaEvent.setConferences(Collections.emptyList());\n updateEventAsOrganizer(deltaEvent);\n\n EventData updatedEvent = eventManager.getEvent(defaultFolderId, createdEvent.getId());\n assertThat(\"Should be no conferences!\", updatedEvent.getConferences(), empty());\n\n /*\n * Check that mails has been send\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.ACCEPTED, CustomConsumers.ALL, 1);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"access information was removed\");\n }", "private static boolean particleValidRestriction(XSParticleDecl dParticle, SubstitutionGroupHandler dSGHandler, XSParticleDecl bParticle, SubstitutionGroupHandler bSGHandler) throws XMLSchemaException {\n/* 605 */ return particleValidRestriction(dParticle, dSGHandler, bParticle, bSGHandler, true);\n/* */ }", "abstract void takeResposibilityForConnectionOfAssociation(com.webobjects.eointerface.EOAssociation association);", "@Test\n public void test01ConfRespSignedByRecepient() throws Exception {\n log.trace(\">test01ConfRespSignedByRecepient\");\n\n this.cmpConfiguration.setResponseProtection(cmpAlias, \"signature\");\n this.cmpConfiguration.setCMPDefaultCA(cmpAlias, \"\");\n this.globalConfigurationSession.saveConfiguration(ADMIN, this.cmpConfiguration);\n\n byte[] nonce = CmpMessageHelper.createSenderNonce();\n byte[] transid = CmpMessageHelper.createSenderNonce();\n\n // Send a confirm message to the CA\n String hash = \"foo123\";\n PKIMessage confirm = genCertConfirm(userDN, this.cacert, nonce, transid, hash, 0, null);\n assertNotNull(confirm);\n ByteArrayOutputStream bao = new ByteArrayOutputStream();\n ASN1OutputStream dOut = ASN1OutputStream.create(bao, ASN1Encoding.DER);\n dOut.writeObject(confirm);\n byte[] ba = bao.toByteArray();\n // Send request and receive response\n byte[] resp = sendCmpHttp(ba, 200, cmpAlias);\n checkCmpResponseGeneral(resp, this.testx509ca.getSubjectDN(), userDN, this.cacert, nonce, transid, true, null, PKCSObjectIdentifiers.sha256WithRSAEncryption.getId());\n checkCmpPKIConfirmMessage(userDN, this.cacert, resp);\n\n log.trace(\"<test01ConfRespSignedByRecepient\");\n }", "private static int getContinuedPartnerBonus(FriendMiniGameHistory history, String game, String p1, String p2) {\n final int gameCount = history.getGamesPlayed(game, p1, p2);\n if (gameCount > 0) {\n return 0;\n }\n // At this point, this is definitely a new game.\n final int uniqueCount = history.getTotalGamesPlayed(p1, p2, true);\n if (uniqueCount == 0) {\n // Not a CONTINUED partner, since they have never played any game together before.\n return 0;\n }\n // Minus 1 just so we can start the bonuses array at index 0.\n return CONTINUED_PARTNER_BONUSES[uniqueCount - 1];\n }", "public void setIntroducerCommission(String introducerCommission) {\r\n this.introducerCommission = introducerCommission == null ? null : introducerCommission.trim();\r\n }", "private ClaimOrConcession(int proposal) {\n this.proposal = proposal;\n }", "static final /* synthetic */ boolean m114833a(Activity activity) {\n if (!(activity instanceof C41387m) || !((C41387m) activity).mo88338b()) {\n return false;\n }\n return true;\n }", "boolean hasCombinedAudience();", "public void requirePatientId() {\n hasPatientIdParam = true;\n }", "public static HashSet<ParticipantContext> GetCurrentValidParticipant(String rtid) {\n HashSet<ParticipantContext> retSet = new HashSet<>();\n Session session = HibernateUtil.GetLocalSession();\n Transaction transaction = session.beginTransaction();\n boolean cmtFlag = false;\n try {\n RenRuntimerecordEntity runtimeCtx = session.get(RenRuntimerecordEntity.class, rtid);\n String participants = runtimeCtx.getParticipantCache();\n transaction.commit();\n cmtFlag = true;\n if (CommonUtil.IsNullOrEmpty(participants)) {\n return retSet;\n }\n String[] participantPairItem = participants.split(\",\");\n for (String workerIdBRolePair : participantPairItem) {\n String[] workerItem = workerIdBRolePair.split(\":\");\n retSet.add(ParticipantContext.GetContext(rtid, workerItem[0]));\n }\n return retSet;\n }\n catch (Exception ex) {\n if (!cmtFlag) {\n transaction.rollback();\n }\n throw ex;\n }\n finally {\n HibernateUtil.CloseLocalSession();\n }\n }", "public MergingPrerequisites withOneConnectionIdMustBePresent(List<String> oneConnectionIdMustBePresent) {\n this.oneConnectionIdMustBePresent = oneConnectionIdMustBePresent;\n return this;\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n @Test\n public void updateParticipantRegistrationGetParticipantFailure() throws IntegrationException, SOAPFaultException,\n MalformedURLException, JAXBException, DatatypeConfigurationException {\n final Date stTime = new Date(new java.util.Date().getTime()); \n\n xsltTransformer.transform(null, null, null);\n EasyMock.expectLastCall().andAnswer(new IAnswer() {\n\n public Object answer() {\n return getParticipantXMLString();\n }\n }).anyTimes();\n\n final CaaersServiceResponse updateResponse = getUpdateParticipantResponse(SUCCESS);\n final CaaersServiceResponse getResponse = getParticipantResponse(FAILURE);\n EasyMock.expect(wsClient.updateParticipant((String) EasyMock.anyObject())).andReturn(updateResponse).anyTimes();\n EasyMock.expect(wsClient.getParticipant((String) EasyMock.anyObject())).andReturn(getResponse);\n EasyMock.replay(wsClient);\n\n final ServiceInvocationMessage serviceInvocationMessage = prepareServiceInvocationMessage(REFMSGID,\n getParticipantInterimMessage(), stTime,\n caAERSUpdateRegistrationServiceInvocationStrategy.getStrategyIdentifier());\n\n final ServiceInvocationResult result = caAERSUpdateRegistrationServiceInvocationStrategy\n .invoke(serviceInvocationMessage);\n\n Assert.assertNotNull(result);\n }", "@Test\n public void test02ConfRespSignedByDefaultCA() throws Exception {\n log.trace(\">test02ConfRespSignedByDefaultCA\");\n\n this.cmpConfiguration.setResponseProtection(cmpAlias, \"signature\");\n this.cmpConfiguration.setCMPDefaultCA(cmpAlias, this.testx509ca.getSubjectDN());\n this.globalConfigurationSession.saveConfiguration(ADMIN, this.cmpConfiguration);\n\n byte[] nonce = CmpMessageHelper.createSenderNonce();\n byte[] transid = CmpMessageHelper.createSenderNonce();\n\n // Send a confirm message to the CA\n String hash = \"foo123\";\n // the parameter 'null' is to generate a confirm request for a recipient that does not exist\n PKIMessage confirm = genCertConfirm(userDN, null, nonce, transid, hash, 0, PKCSObjectIdentifiers.sha1WithRSAEncryption);\n assertNotNull(confirm);\n ByteArrayOutputStream bao = new ByteArrayOutputStream();\n ASN1OutputStream dOut = ASN1OutputStream.create(bao, ASN1Encoding.DER);\n dOut.writeObject(confirm);\n byte[] ba = bao.toByteArray();\n // Send request and receive response\n byte[] resp = sendCmpHttp(ba, 200, cmpAlias);\n checkCmpResponseGeneral(resp, this.testx509ca.getSubjectDN(), userDN, this.cacert, nonce, transid, true, null, PKCSObjectIdentifiers.sha1WithRSAEncryption.getId());\n checkCmpPKIConfirmMessage(userDN, this.cacert, resp);\n\n log.trace(\"<test02ConfRespSignedByDefaultCA\");\n }", "public boolean isAuMoinsUneCompetenceAutrefEstEnCoursDeModification() {\n\t\tboolean result = false;\n\t\tint i = 0;\n\t\twhile (!result && i < tosRepartFdpCompetencesAutres().count()) {\n\t\t\tEORepartFdpAutre repart = (EORepartFdpAutre) tosRepartFdpCompetencesAutres().objectAtIndex(i);\n\t\t\tif (repart.isEnCoursDeModification()) {\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn result;\n\t}", "public boolean checkParticipate(Authentication auth, Integer ctId) throws NoSuchPageException {\n //check if participator\n ContestEntity contestEntity = getContestById(ctId);\n Date currentTime = new Date();\n Date startTime = contestEntity.getStartTime();\n Date endTime = DateUtils.addMinutes(startTime, contestEntity.getDuration());\n List<AuthorityDTO> lstAuthority = authorityMapper.getContestAuthority(ctId, auth.getName());\n for (AuthorityDTO curAuth : lstAuthority) {\n if (curAuth.getId().equals(Constants.AUTH_PARTICIPATE_CONTEST_ID)) {\n //if so then check conditions mentioned above\n if (currentTime.compareTo(startTime) >= 0\n && currentTime.compareTo(endTime) <= 0){\n return true;\n }else if(currentTime.compareTo(endTime) > 0\n && contestEntity.getCanPractice().equals(1)){\n return true;\n }\n }\n }\n //not participator\n return false;\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n @Test\n public void registerParticipantFailure() throws IntegrationException, SOAPFaultException, MalformedURLException,\n JAXBException {\n final Date stTime = new Date(new java.util.Date().getTime()); \n\n xsltTransformer.transform(null, null, null);\n EasyMock.expectLastCall().andAnswer(new IAnswer() {\n\n public Object answer() {\n return getParticipantXMLString();\n }\n }).anyTimes();\n\n final CaaersServiceResponse caaersServiceResponse = getRegisterParticipantResponse(FAILURE);\n EasyMock.expect(wsClient.createParticipant((String) EasyMock.anyObject())).andReturn(caaersServiceResponse);\n EasyMock.replay(wsClient);\n\n final ServiceInvocationMessage serviceInvocationMessage = prepareServiceInvocationMessage(REFMSGID,\n getParticipantInterimMessage(), stTime,\n caAERSRegistrationServiceInvocationStrategy.getStrategyIdentifier());\n\n final ServiceInvocationResult result = caAERSRegistrationServiceInvocationStrategy\n .invoke(serviceInvocationMessage);\n\n Assert.assertNotNull(result);\n }", "FeedbackConsequence getConsequence();", "private void createQueryMsg(String patientId, String namespaceId, String universalId, String universalIdType, boolean useCPAssigningAuthority) throws PixConsumerException {\n\t\t\t\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"PixConsumerQuery: createQueryMsg - Entry \");\n\t\t}\n\t\t\n\t\tif ((patientId == null) || (patientId.length() <= 0)) {\n\t\t\tlogger.error(\"PixConsumerQuery: createQueryMsg - required patientId empty\");\n\t\t\tthrow new PixConsumerException(\"PixConsumerQuery: createQueryMsg - required patientId empty\");\n\t\t}\n\n\t\ttry {\n\t\t\t\n\t\t\t//initialize message object\n\t\t\tclear();\n\t\t\tif (globalFactory != null) {\n\t\t\t\tsetDefinitions(globalFactory.getVersionDefinitions());\n\t\t\t}\n\t\t\tsetVersion(version);\n\t\t\tsetEvent(MSH_9_1_PIXC);\n\t\t\tsetMessageType(MSH_9_2_PIXC);\n\t\t\tsetStructId(MSH_9_3_PIXC);\n\t\t\taddMSHFromFields();\n\t\t\t\n\t\t\t//define message segments (MSH added with earlier set statements)\n\t\t\tgetSegments().add(QPD);\n\t\t\tgetSegments().add(RCP);\n\t\t\t\n\t\t\t//Setup \"custom\" QPD fields\n\t\t\t//forceField(2) uses 0 based index to create QPD-{1..3}\n\t\t\t//forceComponent(3) uses 0 based index to create QPD-3-{1..4} \n\t\t\t//forceComponent(2) uses 0 based to create QPD-3-4-{1..3}\n\t\t\tgetSegments().getByCodeAndIndex(QPD, 1).forceField(2).forceComponent(3);\n\t\t\tgetSegments().getByCodeAndIndex(QPD, 1).forceField(2).getComponents().item(3).forceComponent(2);\n\t\t\t\n\t\t\t//Default constant values from conformance profile as a config file\n\t\t\tif (cpProfile != null) {\n\t\t\t\tCPMessageBuilder builder = new CPMessageBuilder();\n\t\t\t\tbuilder.build(version, cpProfile.getInteractions().itemInteraction(0).getStaticDefinition(), true, this);\n\t\t\t\t\n\t\t\t\t// validate assigning authority if coming from conformance profile\n\t\t\t\tString cpNamespaceId = this.getField(QPD_3_4_1);\n\t\t\t\tString cpUniversalId = this.getField(QPD_3_4_2);\n\t\t\t\tString cpUniversalIdType = this.getField(QPD_3_4_3);\n\t\t\t\tlogger.debug(\"PixFeedMsg: cp assigningAuthority \" + cpNamespaceId + \", \" + cpUniversalId + \", \" + cpUniversalIdType);\n\t\t\t\t\n\t\t\t\tif (useCPAssigningAuthority) {\n\t\t\t\t\tif (PixPdqMessageUtilities.isHDParamValid(cpNamespaceId, cpUniversalId, cpUniversalIdType) == false) {\n\t\t\t\t\t\tthrow new PixConsumerException(\"PixConsumerQuery: createQueryMsg - patientId cp assigning authority invalid\");\n\t\t\t\t\t}\n\t\t\t\t\tsetField(QPD_3_1, patientId);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// support user override of conformance profile\n\t\t\t\tif (((namespaceId != null) && (namespaceId.length() > 0)) ||\n\t\t\t\t\t\t((universalId != null) && (universalId.length() > 0)) ||\n\t\t\t\t\t\t((universalIdType != null) && (universalIdType.length() > 0))) {\n\t\t\t\t\tif (PixPdqMessageUtilities.isHDParamValid(namespaceId, universalId, universalIdType) == false) {\n\t\t\t\t\t\tthrow new PixConsumerException(\"PixConsumerQuery: createQueryMsg - patientId assigning authority invalid\");\n\t\t\t\t\t}\n\t\t\t\t\tsetField(QPD_3_1, patientId);\n\t\t\t\t\tsetField(QPD_3_4_1, namespaceId);\n\t\t\t\t\tsetField(QPD_3_4_2, universalId);\n\t\t\t\t\tsetField(QPD_3_4_3, universalIdType);\n\t\t\t\t\t\n\t\t\t\t\tlogger.debug(\"PixConsumerQuery: createQueryMsg - patientId cp assigning authority overridden with local parameters\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (PixPdqMessageUtilities.isHDParamValid(namespaceId, universalId, universalIdType) == false) {\n\t\t\t\t\tthrow new PixConsumerException(\"PixConsumerQuery: createQueryMsg - required patient namespace parameters invalid\");\n\t\t\t\t}\n\t\t\t\tsetField(QPD_3_1, patientId);\n\t\t\t\tsetField(QPD_3_4_1, namespaceId);\n\t\t\t\tsetField(QPD_3_4_2, universalId);\n\t\t\t\tsetField(QPD_3_4_3, universalIdType);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//field fixed for pix consumer query\n\t\t\tsetField(MSH_12, VersionDefnList.display(version));\n\t\t\tsetField(RCP_1, RCP_1_IMMEDIATE); //immediate response\n\n\t\t\tsetField(MSH_7, PixPdqMessageUtilities.getCurrentDateTimeString());\n\t\t\tsetNonNullElement(MSH_10, PixPdqMessageUtilities.getRandomFieldValue(20));\n\t\t\tsetNonNullElement(MSH_11_1, MSH_11_1_PRODUCTION);\n\t\t\tsetNonNullElement(MSH_18_1, MSH_18_1_ASCII);\n\t\t\tsetNonNullElement(QPD_1_1, QPD_1_1_PIXC); //query name - identifier\n\t\t\tsetNonNullElement(QPD_1_2, QPD_1_2_PIXC); //query name - text\n\t\t\tsetNonNullElement(QPD_1_3, QPD_1_3_PIXC);\n\t\t\tsetNonNullElement(QPD_2, PixPdqMessageUtilities.getRandomFieldValue(32));\t\n\t\t\t\t\n\t\t} catch (HL7V2Exception e) {\n\t\t\tlogger.error(\"PixConsumerQuery: createQueryMsg - HL7V2Exception \" + e.getLocalizedMessage());\n\t\t\tthrow new PixConsumerException(e);\n\t\t} catch (PixPdqMessageException e) {\n\t\t\tthrow new PixConsumerException(e);\n\t\t}\n\t\t\n\t\tif (logger.isDebugEnabled()) {\n\t\t\ttry {\n\t\t\t\tlogger.debug(\"PixConsumerQuery: createQueryMsg \\r\" + PixPdqMessageUtilities.msgToString(this));\n\t\t\t} catch (PixPdqMessageException e) {\n\t\t\t\tlogger.debug(\"PixConsumerQuery: createQueryMsg \\r\");\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void testcheckConflict() {\n\t\tActivity a1 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"MW\", 1330, 1445);\n\t\tActivity a2 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"TH\", 1330, 1445);\n\t\t try {\n\t\t a1.checkConflict(a2);\n\t\t assertEquals(\"Incorrect meeting string for this Activity.\", \"MW 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"Incorrect meeting string for possibleConflictingActivity.\", \"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t a2.checkConflict(a1);\n\t\t assertEquals(\"Incorrect meeting string for this Activity.\", \"MW 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"Incorrect meeting string for possibleConflictingActivity.\", \"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t } catch (ConflictException e) {\n\t\t fail(\"A ConflictException was thrown when two Activities at the same time on completely distinct days were compared.\");\n\t\t }\n\t\t a1.setMeetingDays(\"TH\");\n\t\t a1.setActivityTime(1445, 1530);\n\t\t try {\n\t\t a1.checkConflict(a2);\n\t\t fail(); //ConflictException should have been thrown, but was not.\n\t\t } catch (ConflictException e) {\n\t\t //Check that the internal state didn't change during method call.\n\t\t assertEquals(\"TH 2:45PM-3:30PM\", a1.getMeetingString());\n\t\t assertEquals(\"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t }\n\t}", "public void testAddRejectReasons_RejectReasonsContainsManyDuplicateElementsAccuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[4];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[1] = new ExpenseEntryRejectReason(3);\r\n rejectReasons[2] = new ExpenseEntryRejectReason(3);\r\n rejectReasons[3] = new ExpenseEntryRejectReason(2);\r\n entry.addRejectReason(new ExpenseEntryRejectReason(1));\r\n\r\n ExpenseEntryRejectReason[] duplicate = entry.addRejectReasons(rejectReasons);\r\n\r\n // check nothing is added into the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should not be added.\", 1, rejectReasonsMap.size());\r\n\r\n // check the duplicate result\r\n assertNotNull(\"The duplicate result should be correct.\", duplicate);\r\n V1Dot1TestHelper.assertEquals(\"The duplicate result should be correct.\",\r\n new ExpenseEntryRejectReason[] {rejectReasons[0], rejectReasons[1], rejectReasons[2]}, duplicate);\r\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT08() {\n\t\t// PRECONDITIONS\n\t\tArrayList<Integer> a = new ArrayList<Integer>();\n\t\ta.add(100);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<Collection<?>> singleElementCollection = new HashSet<Collection<?>>();\n\t\tsingleElementCollection.add(a);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean sizeIsOne = smc.sizeIsOne(singleElementCollection);\n\t\tassertTrue(sizeIsOne);\n\t}", "public void m9130p() throws cf {\r\n if (this.f6007a == null) {\r\n throw new cz(\"Required field 'domain' was not present! Struct: \" + toString());\r\n } else if (this.f6009c == null) {\r\n throw new cz(\"Required field 'new_id' was not present! Struct: \" + toString());\r\n }\r\n }", "public boolean isAssocId();", "public Boolean addActivity(String client, String cisId, AActivity activity);", "public boolean hasConversation() {\n return typeCase_ == 2;\n }", "@Test\n\tpublic void testCheckConflictOverlappingTimes() {\n\t\tActivity a1 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"MW\", 1330, 1445);\n\t\tActivity a2 = new Course(\"CSC226\", \"Discrete Math\", \"001\", 3, \"sesmith5\", 12, \"MW\", 1445, 1545);\n\t\ttry {\n\t\t a1.checkConflict(a2);\n\t\t fail(); //ConflictException should have been thrown, but was not.\n\t\t } catch (ConflictException e) {\n\t\t //Check that the internal state didn't change during method call.\n\t\t assertEquals(\"MW 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"MW 2:45PM-3:45PM\", a2.getMeetingString());\n\t\t }\n\t}", "public boolean requireAllPresenceValues() throws android.os.RemoteException;", "public void testGetMultiplicity_1_accuracy() {\n instance.setMultiplicity(multiplicity);\n assertTrue(\"The multiplicity is not set properly.\", multiplicity == instance.getMultiplicity());\n }", "public boolean contient(Couple assoc) {\n for (int i = 0; i < nbAssoc; i++)\n if (associations[i].equals(assoc))\n return true;\n return false;\n }", "boolean hasHas_consequence();", "public void testAddRejectReasons_RejectReasonsContainsDuplicateElementsAccuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[4];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[1] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[2] = new ExpenseEntryRejectReason(2);\r\n rejectReasons[3] = new ExpenseEntryRejectReason(1);\r\n\r\n ExpenseEntryRejectReason[] duplicate = entry.addRejectReasons(rejectReasons);\r\n\r\n // check nothing is added into the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should not be added.\", 0, rejectReasonsMap.size());\r\n\r\n // check the duplicate result\r\n assertNotNull(\"The duplicate result should be correct.\", duplicate);\r\n V1Dot1TestHelper.assertEquals(\"The duplicate result should be correct.\",\r\n new ExpenseEntryRejectReason[] {rejectReasons[0], rejectReasons[1], rejectReasons[3]}, duplicate);\r\n }", "boolean hasPersonCharacteristicIds();", "@Override\n\tpublic int cardinality() {\n\t\treturn 2;\n\t}", "@Test\n public void testASSY1HasNoSubComponents() {\n assertThat( hasSubComponents( ASSY1_WITHOT_SUB_COMP ), is( false ) );\n }", "public void setParticipantId(int participantId) {\r\n\t\tthis.participantId = participantId;\r\n\t}", "boolean hasDidcommInvitation();", "public void addParticipant(String uid) {\n\r\n if (!participants.contains(uid))\r\n participants.add(uid);\r\n }", "public void validateRpd11s1()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\r\n void B6007089_test_SemeterMustNotBeNull() {\r\n System.out.println(\"\\n=======================================\");\r\n System.out.println(\"\\nTest Time Must Not Be Null\");\r\n System.out.println(\"\\n=======================================\\n\");\r\n Section section = new Section();\r\n section.setSec(\"1\");\r\n section.setTime(null);\r\n\r\n\r\n Set<ConstraintViolation<Section>> result = validator.validate(section);\r\n assertEquals(1, result.size());\r\n\r\n ConstraintViolation<Section> v = result.iterator().next();\r\n assertEquals(\"must not be null\", v.getMessage());\r\n assertEquals(\"time\", v.getPropertyPath().toString());\r\n }", "public Audience() {\n members = new HashSet<Person>();\n }", "@RequestMapping(value = \"/acl_presencerequests\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Presencerequest> createPresencerequest(@RequestBody Communicativeaction communicativeaction) throws URISyntaxException {\n communicativeaction.setActionTime(new DateTime());\n communicativeactionRepository.save(communicativeaction);\n String [] presenceReqInfo = communicativeaction.getContent().split(\",\");\n DateTime time = new DateTime();\n Presencestatus presenceStatus = null;\n Agent agent = communicativeaction.getAction_sender();\n for(String info : presenceReqInfo){\n String [] presencePair = info.split(\":\");\n switch(presencePair[0]){\n case \"presenceStatus\":{\n presenceStatus = presencestatusRepository.findByPresenceStatusName(presencePair[1]);\n break;\n }\n }\n }\n if(presenceStatus != null){\n Presencerequest presence = new Presencerequest(presenceStatus, time, agent);\n Presencerequest result = presencerequestRepository.save(presence);\n return ResponseEntity.created(new URI(\"/api/presencerequests/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"presencerequest\", result.getId().toString()))\n .body(result);\n }\n return ResponseEntity.created(new URI(\"/api/presencerequests/\"))\n .headers(HeaderUtil.createEntityCreationAlert(\"Failure\", \"Not a valid presence request status\"))\n .body(null);\n }", "public void testAllMedicalQuestionParametersPopulated() {\n final String QUESTION_ID = \"hypoglycaemia-blood-sugar\";\n\n Map<String, MedicalCondition> conditions = cache.getConditions(Service.NOTIFY);\n MedicalCondition condition = conditions.get(DIABETES_CONDITION);\n\n assertNotNull(condition);\n\n MedicalQuestion question = condition.getQuestions().get(QUESTION_ID);\n assertNotNull(question);\n\n assertEquals(QUESTION_ID, question.getID());\n assertEquals(\"22\", question.getStep());\n assertEquals(Page.VERIFIED.getName(), question.getPage());\n assertEquals(9, question.getOrder().intValue());\n assertEquals(Format.RADIO.getName(), question.getType());\n assertEquals(Boolean.TRUE, question.getValidate());\n assertEquals(Boolean.FALSE, question.getLogout());\n assertEquals(EMPTY, question.getOptions());\n\n assertNotNull(question.getAnswers());\n assertEquals(question.getAnswers().size(), 0);\n\n assertNotNull(question.getConfiguration());\n assertTrue(question.getConfiguration().trim().length() > 0);\n\n assertNotNull(question.toString());\n }", "public static String regParticipants(String fileName) {\n\t\t\n\t\tlogger.info(\"ParticipantRegistrationPlus:regParticipants \" + fileName);\t\n\t\tClientSession cs = ClientSession.getInstance();\n\t\t\t\t\n\t\ttry {\n\t\t\tcs.startSession(userName, password);\n\t\t} catch (ApplicationException e1) {\n\t\t\tlogger.info(\"ApplicationException in ParticipantRegistrationPlus:regParticipants\");\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tboolean isError=false;\n\t\tString errorMsg=\"\";\n\t\t\n\t\ttry\n\t\t{\n\t\t\tFile fXmlFile = new File(fileName);\n\t\t\tSAXBuilder builder = new SAXBuilder();\n\t\t\tDocument document = builder.build(new ByteArrayInputStream(getFileAsString(fXmlFile).getBytes()));\n\t\t\tElement root = document.getRootElement();\n\n\t\t\tList rows = root.getChild(\"patient_set\").getChildren(\"patient\");\n\t\t\tfor (int i = 0; i < rows.size(); i++) {\n\t\t\t\tElement row = (Element) rows.get(i);\n\t\t\t\tElement patientElement = row.getChild(\"patient_id\");\n\t\t\t\tElement cpElement = row.getChild(\"study_name\");\n\t\t\t\tHashMap<String, String> hashMap = new HashMap<String, String>();\n\t\t\t\tString gender = \"Unknown\", def_vital_status_cd = \"Unknown\", sex_cd=\"\";\n\n\t\t\t\tList params = row.getChildren(\"param\");\n\t\t\t\tfor (int j = 0; j < params.size(); j++) {\n\t\t\t\t\tElement column = (Element) params.get(j);\n\t\t\t\t\tString value = column.getText();\n\t\t\t\t\thashMap.put(j+\"\", value);\n\t\t\t\t}\n\t\t\t\tParticipant p = new Participant();\n\t\t\t\tp.setLastName(patientElement.getText());\n\t\t\t\tp.setFirstName(\"\");\n\t\t\t\tp.setMiddleName(cpElement.getText());\n\t\t\t\tp.setActivityStatus(\"Active\");\n\t\t\t\tp.setBirthDate(dateFormat(hashMap.get(\"1\")));\n\t\t\t\tsex_cd=hashMap.get(\"4\");\n\n\t\t\t\tif(sex_cd.equalsIgnoreCase(\"MALE\"))\n\t\t\t\t\tgender=\"Male Gender\";\n\t\t\t\telse if(sex_cd.equalsIgnoreCase(\"FEMALE\"))\n\t\t\t\t\tgender=\"Female Gender\";\n\n\t\t\t\tp.setGender(gender);\n\t\t\t\tp.setVitalStatus(def_vital_status_cd);\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tp = (Participant) appService.createObject(p);\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t \te.printStackTrace();\t\t \n\t\t\t\t}\t\t\t\t\n\t\t\t\tlogger.info(\"ParticipantRegistrationPlus:regParticipants - Participant created successfully\");\t\t\t\t\t\n\t\t\t}\n\t\t} catch (JDOMException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tisError = true;\n\t\t\terrorMsg=e.getMessage();\n\t\t}\n\t\t\n\t\tif(isError)\n\t\t\treturn \"Participant registration failed because of an error [\"+errorMsg+\"]\";\n\t\telse\n\t\t\treturn \"success\";\n\t}", "boolean hasCampaignSharedSet();", "boolean hasCampaignExperiment();", "@Test\n public void testMatchesStatusNonNullStatus() {\n BgpSessionCompatibilityQuestion q =\n new BgpSessionCompatibilityQuestion(\n null, null, ConfiguredSessionStatus.UNIQUE_MATCH.toString(), null);\n\n for (ConfiguredSessionStatus status : ConfiguredSessionStatus.values()) {\n if (status == ConfiguredSessionStatus.UNIQUE_MATCH) {\n assertTrue(status.toString(), q.matchesStatus(status));\n } else {\n assertFalse(status.toString(), q.matchesStatus(status));\n }\n }\n }", "boolean isActivityNotValid(ExoSocialActivity activity, ExoSocialActivity comment) throws Exception;", "public boolean hasCampaignId() {\n return campaignIdBuilder_ != null || campaignId_ != null;\n }", "public boolean hasCampaignId() {\n return campaignIdBuilder_ != null || campaignId_ != null;\n }", "public boolean isActive(){\n return (registeredParticipants.size() == connections().size());\n }", "boolean hasCampaignAudienceView();", "public void validateRpd13s17()\n {\n // This guideline cannot be automatically tested.\n }", "public boolean hasConversation() {\n return typeCase_ == 2;\n }", "final int getShareOfOne() { return getPlayerId() == 0 ? 1 : 0; }", "public List<String> oneConnectionIdMustBePresent() {\n return this.oneConnectionIdMustBePresent;\n }", "public ParticipantBehaviorDescription(){\n\t\t\n\t}", "@javax.annotation.Nonnull\n @ApiModelProperty(required = true, value = \"ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result.\")\n\n public String getConferenceId() {\n return conferenceId;\n }", "public Participant getParticipant ()\r\n {\r\n return participant_;\r\n }", "public static String regParticipantsTest() {\n\t\t\t\n\t\t\tlogger.info(\"ParticipantRegistrationPlus:regParticipantsTest\");\t\n\t\t\t\n\t\t\tClientSession cs = ClientSession.getInstance();\n\t\t\t\t\t\t\n\t\t\ttry {\n\t\t\t\tcs.startSession(userName, password);\n\t\t\t} catch (ApplicationException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tboolean isError=false;\n\t\t\tString errorMsg=\"\";\n\t\t\tProperties prop = new Properties();\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\tParticipant p = new Participant();\n\t\t\t\t\tp.setLastName(\"patientElement\");\n\t\t\t\t\tp.setFirstName(\"\");\n\t\t\t\t\tp.setMiddleName(\"cpElement\");\n\t\t\t\t\tp.setActivityStatus(\"Active\");\n\t\t\t\t\tp.setBirthDate(dateFormat(\"0000-00-00\"));\n\t\t\t\t\tString gender=\"Male Gender\";\n\t\t\t\t\tp.setGender(gender);\n\t\t\t\t\tp.setVitalStatus(\"Unknown\");\n\t\t\t\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\tp = (Participant) appService.createObject(p);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\tlogger.info(\"while creating participant\");\n\t\t\t\t \te.printStackTrace();\n\t\t\t \n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Participant created successfully\");\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tisError = true;\n\t\t\t\terrorMsg=e.getMessage();\n\t\t\t}\n\t\t\tif(isError)\n\t\t\t\treturn \"Participant registration failed because of an error [\"+errorMsg+\"]\";\n\t\t\telse\n\t\t\t\treturn \"success\";\n\t\t}", "public void verifyNoMatching(AcBatchFlight e)\n {\n }", "public String getIntroducerCommission() {\r\n return introducerCommission;\r\n }", "@Test(priority = 2)\n public void testVerifyQuestionOne() {\n\t\tassertTrue(true);\n }", "final void checkForComodification() {\n\t}", "@When(\"^clicks request$\")\n public void patient_clicks_request() throws Throwable {\n \t//appt request has been saved and is pending...\n \tAssert.assertTrue(appt.getApptType() != null);\n \tAssert.assertTrue(appt.getDate() != null);\n \tAssert.assertTrue(appt.getComment() != null);\n \t//check if the above items have been set correctly from the previous method\n }", "public void validateRpd12s1()\n {\n // Usage of iframes is forbidden\n // frameset and frame tags are checked in RPD2.5.\n assertFalse(Type.ERROR, \"rpd12s1.iframe\", containsElement(ELEM_IFRAME));\n }", "public boolean hasCLAPPROVAL() {\n return fieldSetFlags()[5];\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n DBSchema dBSchema0 = new DBSchema(\"Er\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"Er\", dBSchema0);\n String[] stringArray0 = new String[0];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"e/ \", false, stringArray0);\n boolean boolean0 = DBUtil.containsMandatoryColumn(dBUniqueConstraint0);\n assertFalse(boolean0);\n }", "void claim(@Nonnull Client client, @Nonnull List<Set<TCSResource<?>>> resourceSequence)\n throws IllegalArgumentException;", "@Test\n public void testClaimAdjReqCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setAdjReqCdEnum,\n RdaFissClaim::getAdjReqCd,\n FissAdjustmentRequestorCode.ADJUSTMENT_REQUESTOR_CODE_FISCAL_INTERMEDIARY,\n \"F\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setAdjReqCdUnrecognized,\n RdaFissClaim::getAdjReqCd,\n RdaFissClaim.Fields.adjReqCd,\n 1);\n }", "@Test\n public void testClaimCancAdjCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setCancAdjCdEnum,\n RdaFissClaim::getCancAdjCd,\n FissCancelAdjustmentCode.CANCEL_ADJUSTMENT_CODE_COVERAGE,\n \"C\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setCancAdjCdUnrecognized,\n RdaFissClaim::getCancAdjCd,\n RdaFissClaim.Fields.cancAdjCd,\n 1);\n }", "int updateParticipant(TccTransaction tccTransaction);", "@Test\n\tpublic void TC1060_ObserveActiveAndInactiveEQSurvey() throws Exception{\n\t\tLog.info(\"\\nTestcase - TC1060_ObserveActiveAndInactiveEQSurvey\\n\");\n\t\tfinal int userDataRowID = 16;\n\t\tfinal int analyzerDb3DataRowID = 78;\n\t\tfinal int surveyDataRowID = 65;\n\t\tgetLoginPageAction().open(EMPTY, NOTSET);\n\t\tgetLoginPageAction().login(EMPTY, userDataRowID); /* Picarro Driver */\n\n\t\t\n\t\tLog.info(\"Starting Analyzer...\");\n\t\ttestEnvironmentAction.startAnalyzer(EMPTY, analyzerDb3DataRowID); \t// start analyzer.\n\t\tdriverViewPageAction.open(EMPTY,NOTSET);\n\t\tdriverViewPageAction.waitForConnectionToComplete(EMPTY,NOTSET);\n\n\t\tLog.info(\"Starting Replay...\");\n\t\tgetTestEnvironmentAction().startReplay(EMPTY, analyzerDb3DataRowID);\n\t\t// start survey.\n\t\tdriverViewPageAction.clickOnModeButton(EMPTY, NOTSET);\n\t\tdriverViewPageAction.startEQDrivingSurvey(EMPTY, surveyDataRowID);\n\n\t\tloginAsObserver(USER_ROW_ID_PICARRO_DRIVER);\n\n\t\tString analyzer = getTestEnvironmentAction().getWorkingAnalyzerSerialNumber();\n\t\thomePageActionList.get(0).clickOnFirstMatchingOnlineSurveyorLink(analyzer, NOTSET);\n\t\tobserverViewPageActionList.get(0).getObserverViewPage().waitForPageLoad();\n\t\tobserverViewPageActionList.get(0).waitForConnectionToComplete(EMPTY, NOTSET);\n\t\tassertTrue(observerViewPageActionList.get(0).verifyObserverViewPageIsOpened(EMPTY, NOTSET));\n\n\t\tobserverViewPageActionList.get(0).getObserverViewPage().waitForAJAXCallsToComplete();\n\t\tobserverViewPageActionList.get(0).clickOnMapButton(EMPTY, NOTSET);\n\t\tobserverViewPageActionList.get(0).turnOnMapView(EMPTY, NOTSET);\n\t\t\n\t\tobserverViewPageActionList.get(0).clickOnDisplayButton(EMPTY, NOTSET);\n\t\n\t\t// Check availability of toggle buttons\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchIndicationsButtonIsVisible(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchLisasButtonIsVisible(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchFovsButtonIsVisible(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchConcentrationChartButtonIsVisible(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchWindroseButtonIsVisible(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyDisplaySwitchIsotopicAnalysisButtonIsNotVisible(EMPTY, NOTSET));\n\n\t\t// Check Survey information displayed\n\t\tobserverViewPageActionList.get(0).clickOnHeaderInfoBox(EMPTY, NOTSET);\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTagLabelEquals(DriverViewPageActions.workingDataRow.get().surveyTag, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoModeLabelEquals(SURVEY_INFO_MODE_PREFIX + DriverViewPageActions.workingDataRow.get().surveyType, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTimeLabelStartsWith(SURVEY_INFO_TIME_PREFIX + String.valueOf(getHourOfDay()), NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTimeElapsedLabelStartsWith(SURVEY_INFO_ELAPSED_TIME_00, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTimeRemainingLabelStartsWith(SURVEY_INFO_REMAINING_TIME_07, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoZoomLevelLabelEquals(String.format(SURVEY_INFO_ZOOM_LEVEL_X, 19), NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTimeElapsedIsTickingForward(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoTimeRemainingLabelIsTickingBackward(EMPTY, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoAnalyzerLabelEquals(SURVEY_INFO_SURVEY_STATUS_ACTIVE, NOTSET));\n\t\t\n\t\tassertTrue(observerViewPageActionList.get(0).verifyCrossHairIconIsShownOnMap(\"Red\", NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyBreadcrumbIsShownOnMap(\"Blue\", NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyCorrectSurveyActiveMessageIsShownOnMap(\"EQ\", NOTSET));\n\n\t\t// Check Inactive information displayed\n\t\tdriverViewPageAction.clickOnModeButton(EMPTY, NOTSET);\n\t\tFunctionUtil.warnOnError(() -> driverViewPageAction.stopDrivingSurvey(EMPTY, NOTSET));\n\t\tgetTestEnvironmentAction().idleForSeconds(\"5\", NOTSET);\n\t\t\n\t\tassertTrue(observerViewPageActionList.get(0).verifySurveyInfoAnalyzerLabelEquals(SURVEY_INFO_SURVEY_STATUS_INACTIVE, NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyCrossHairIconIsShownOnMap(\"Gray\", NOTSET));\n\t\tassertTrue(observerViewPageActionList.get(0).verifyBreadcrumbIsShownOnMap(\"Black\", NOTSET));\n\t\t\n\t\t// stop simulator and PSA.\n\t\tLog.info(\"Stopping Analyzer...\");\n\t\tgetTestEnvironmentAction().stopReplay(EMPTY, NOTSET);\n\t\tgetTestEnvironmentAction().stopAnalyzer(EMPTY, NOTSET);\n\t}" ]
[ "0.5276512", "0.50481254", "0.4827167", "0.48265746", "0.47788486", "0.46210408", "0.46181762", "0.45865136", "0.45759258", "0.45614895", "0.45416474", "0.4541257", "0.45190984", "0.4495182", "0.44574094", "0.44516575", "0.44045132", "0.43895778", "0.4370924", "0.4370306", "0.4369363", "0.43490914", "0.43368477", "0.43363628", "0.43363628", "0.42962116", "0.42891032", "0.4280454", "0.42769715", "0.427607", "0.42701206", "0.42640594", "0.42600602", "0.42460114", "0.4245717", "0.42427218", "0.42417088", "0.42391887", "0.42383307", "0.42309585", "0.42289752", "0.42282054", "0.4221316", "0.4215863", "0.42142835", "0.4211439", "0.42063284", "0.42048872", "0.4204408", "0.4203096", "0.41994804", "0.41962367", "0.41953546", "0.41892117", "0.41887647", "0.41881183", "0.41808274", "0.41802585", "0.41739446", "0.41718802", "0.41702855", "0.41701603", "0.416415", "0.41630647", "0.41544068", "0.41531205", "0.4149816", "0.4145773", "0.41415665", "0.41415656", "0.4139409", "0.41344872", "0.41316628", "0.4129781", "0.4125436", "0.41249692", "0.41234", "0.41234", "0.4120394", "0.41196144", "0.41186398", "0.41185725", "0.4116228", "0.40950498", "0.4093162", "0.40922007", "0.40920612", "0.408794", "0.4087593", "0.40795434", "0.40789056", "0.40735275", "0.40729985", "0.4070704", "0.40675908", "0.40653408", "0.40647903", "0.40642574", "0.40638867", "0.40615165", "0.40592393" ]
0.0
-1
String s = "pwwkew"; System.out.println(lengthOfLongestSubstring3(s)); reverse(456);
public static void main(String[] args){ int [] a= {18,10,23,46,9}; quickSort(a,0,a.length-1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n String str = \"pwwkew\";\n// System.out.println(str.length());\n System.out.println(lengthOfLongestSubstring(str));\n\n\n }", "@Test\n\tpublic void eg1() {\n\t\tString s=\"babad\";\n\t\tSystem.out.println(longestPalindromicSubString(s));\n\t\t\n\t}", "public int lengthOfLongestSubstring(String s) {\n return sol2a(s); \n //return sol3_WRONG(s); //NO! D & C (unlike LC53)\n }", "public static int lengthOfLongestSubstring(String s) {\n int[] dp=new int[256];\n for(int i=0;i<dp.length;i++){\n dp[i]=-1;\n }\n int start=0,result=0;\n for(int i=0;i<s.length();i++){\n start=Math.max(dp[s.charAt(i)]+1,start);\n dp[s.charAt(i)]=i;\n result=Math.max(result,i-start+1);\n }\n return result;\n }", "public static void main(String [] args){\n System.out.println(lengthOfLongestSubstring(\"1a1b1c1d1\"));\n System.out.println(lengthOfLongestSubstring1(\"1a1b1c1d1\"));\n\n System.out.println(17/10);\n }", "public static void main(String[] args)\n\t{\n\t\tString s= \"abcbaaaaaa\";\n\t\tSystem.out.println(longestPalindromicSubstring(s));\n\t}", "public int lengthOfLongestSubstring(String s) {\r\n\r\n int answer = 0;\r\n int index = 0;\r\n while (index < s.length()) {\r\n String tmp = \"\";\r\n for (int i = index; i < s.length(); i++) {\r\n if (tmp.contains(String.valueOf(s.charAt(i)))) {\r\n break;\r\n } else {\r\n tmp += String.valueOf(s.charAt(i));\r\n }\r\n }\r\n if (tmp.length() > answer) {\r\n answer = tmp.length();\r\n }\r\n index++;\r\n }\r\n\r\n return answer;\r\n }", "private static int lengthOfLongestSubstring2(String s) {\n int maxLength = 0;\n int currentlength = 0;\n int startIndex = -1;\n Map<Character, Integer> charMap = new HashMap<>();\n \n for(int index = 0; index < s.length(); index++){\n Character c = s.charAt(index);\n Integer currentIndex = charMap.get(c);\n if(currentIndex != null){\n \tcurrentlength = index - startIndex -1 ;\n if(maxLength < currentlength){\n maxLength = currentlength;\n }\n if(currentIndex > startIndex) {\n startIndex = currentIndex;\n }\n }\n charMap.put(c, index);\n }\n currentlength = s.length() - startIndex -1 ;\n if(maxLength < currentlength){\n maxLength = currentlength;\n }\n return maxLength;\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(lengthOfLongestSubstring(\"abba\"));\r\n\r\n\t}", "public int lengthOfLongestSubstring(String s) {\n if (s == null) {\n return 0;\n }\n return helper(s, 0);\n }", "public int lengthOfLongestSubstring(String s) {\n if(s == null || s.length() == 0){\n return 0;\n }\n int runner = 0;\n int walker = 0;\n int max = 0;\n HashSet<Character> set = new HashSet<Character>();\n while(runner < s.length()){\n if(set.contains(s.charAt(runner))){\n if(max < runner - walker){\n max = runner - walker;\n }\n while(s.charAt(walker) != s.charAt(runner)){\n set.remove(s.charAt(walker));\n walker++;\n }\n walker++;\n }else{\n set.add(s.charAt(runner));\n }\n runner++;\n }\n max = Math.max(max, runner - walker);\n return max;\n }", "public int lengthOfLongestSubstring2(String s) {\n int n = s.length(), ans = 0;\n int[] index = new int[128]; // current index of character\n // try to extend the range [i, j]\n for (int j = 0, i = 0; j < n; j++) {\n i = Math.max(index[s.charAt(j)], i);\n ans = Math.max(ans, j - i + 1);\n index[s.charAt(j)] = j + 1;\n }\n return ans;\n }", "public int lengthOfLongestSubstring(String s) {\n\t\tint n = s.length();\n\t\tint ans = 0;\n\t\tMap<Character, Integer> map = new HashMap<Character, Integer>();\n\t\tfor (int i = 0, j = 0; j < n; j++) {\n\t\t\tif (map.containsKey(s.charAt(j))) {\n\t\t\t\ti = Math.max(map.get(s.charAt(j)), i);\n\t\t\t}\n\t\t\tans = Math.max(ans, j - i + 1);\n\t\t\tmap.put(s.charAt(j), j + 1);\n\t\t}\n\t\treturn ans;\n\n\t}", "public int lengthOfLongestSubstring(String s) {\n int[] chars = new int[128];\n\n int left = 0;\n int right = 0;\n\n int res = 0;\n while (right < s.length()) {\n char r = s.charAt(right);\n chars[r]++;\n\n while (chars[r] > 1) {\n char l = s.charAt(left);\n chars[l]--;\n left++;\n }\n\n res = Math.max(res, right - left + 1);\n\n right++;\n }\n return res;\n }", "public int lengthOfLongestSubstring(String s) {\n int len = s.length();\n HashMap map = new HashMap();\n int i = 0;\n for(; i<len; i++) {\n char c = s.charAt(i);\n // System.out.println(c);\n if (map.containsKey(c)) {\n return Math.max(i, lengthOfLongestSubstring(s.substring((int)map.get(c)+1, len)));\n }\n else {\n map.put(c, i);\n }\n }\n return i;\n }", "public abstract String getLongestRepeatedSubstring();", "public int lengthOfLongestSubstring(String s) {\n\t\tif (s == null || s.length() == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tint slow = 0, fast = 0;\n\t\tHashMap<Character, Integer> map = new HashMap<Character, Integer>();\n\t\tint maxLen = 0;\n\t\tint start = 0, end = 0;\n\t\twhile (fast < s.length()) {\n\t\t\tchar cur = s.charAt(fast);\n\t\t\tif (!map.containsKey(cur)) {\n\t\t\t\tmap.put(cur, 1);\n\t\t\t} else {\n\t\t\t\tmap.put(cur, map.get(cur) + 1);\n\t\t\t}\n\n\t\t\twhile (map.get(cur) > 1 && slow <= fast) {\n\t\t\t\tchar slow_char = s.charAt(slow);\n\t\t\t\tmap.put(slow_char, map.get(slow_char) - 1);\n\t\t\t\tslow++;\n\t\t\t}\n\t\t\tif (maxLen < fast - slow + 1) {\n\t\t\t\tmaxLen = fast - slow + 1;\n\t\t\t\tstart = slow;\n\t\t\t\tend = fast;\n\t\t\t}\n\t\t\tfast++;\n\t\t}\n\n\t\t// System.out.println(\"maxLen = \" + maxLen);\n\t\t// System.out.println(s.substring(start, end + 1));\n\t\treturn maxLen;\n\t}", "public int lengthOfLongestSubstring2(String s) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n\n int start=0;\n int max = 0;\n int[] map = new int[256];\n\n for (int i = 0; i < s.length(); i++) {\n int c = (int)s.charAt(i);\n start = Math.max(map[c], start);\n map[c] = i + 1;\n max = Math.max(max, i + 1 - start);\n }\n\n return max;\n }", "public static void main(String[] args) {\n int length = lengthOfLongestSubstring(\"\");\n\n System.out.println(length);\n }", "public static void main(String[] args) {\n\t\tString A = \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\";\r\n\t\tLongestSubString longestSubString = new LongestSubString();\r\n\t\tint lengthOfLongestSubstring = longestSubString.lengthOfLongestSubstring(A);\r\n\t\tSystem.out.println(lengthOfLongestSubstring);\r\n\r\n\t}", "public int lengthOfLongestSubstring(String s)\n {\n\tif (s.length() < 2)\n\t return s.length();\n\n\tint max = 0, i = 0, j = 1;\n\n\tboolean[] cache = new boolean[128];\n\tcache[s.charAt(i) - ' '] = true;\n\n\twhile (i < s.length() && j < s.length())\n\t{\n\t while (cache[s.charAt(j)-' '])\n\t\t cache[s.charAt(i++)-' '] = false; \n\t cache[s.charAt(j++)-' '] = true;;\n\t max = Math.max(max, j - i);\n\t}\n\treturn max;\n }", "public int lengthOfLongestSubstring(String s) {\n\t\tint max=0;\n\t\tif (s == null )\n\t\t\treturn max;\n\n\t\tchar[] aChars = s.toCharArray();\n\t\tSet<Character> set=new HashSet<Character>();\n\t\tString slidingWindow =\"\";\n\t\tfor (int i = 0; i < aChars.length; i++) {\n\t\t\tset.add(aChars[i]);\n\t\t\tfor(int j=i+1;j<=aChars.length;j++) {\n\t\t\t\tslidingWindow = s.substring(i,j);\n\t\t\t\tif(j==aChars.length || set.contains(aChars[j])) {\n\t\t\t\t\tmax = max>slidingWindow.length()?max:slidingWindow.length();\n\t\t\t\t\tset.clear();\n\t\t\t\t\tbreak;\n\t\t\t\t}else {\n\t\t\t\t\tset.add(aChars[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn max;\n\n\t}", "public int lengthOfLongestSubstring(String s) {\n int longest = 0;\n Set<Character> set = new HashSet<>();\n int i = 0, j = 0;\n while (j < s.length()) {\n if (set.contains(s.charAt(j))) {\n longest = getMax(set.size(), longest);\n set.remove(s.charAt(i));\n i++;\n } else {\n set.add(s.charAt(j));\n j++;\n }\n }\n return getMax(longest, set.size());\n }", "public static void main(String[] args){\n\t\tLongestSubString obj = new LongestSubString();\n\t\t//System.out.println(obj.lengthOfLongestSubString(\"sandeep\"));\n\t\tSystem.out.println(obj.lengthOfLongestSubString(\"anday\"));\n\t}", "public static int lengthOfLongestSubstring(String s) {\n if(s.length()==1)\n return 1;\n\n int sum=0;\n int left = 0, right = 0;\n boolean[] used = new boolean[128];\n\n while(right < s.length()){\n if(used[s.charAt(right)] == false){\n used[s.charAt(right)] = true;\n right++;\n }else{\n sum = Math.max(sum, right-left);\n while(left<right && s.charAt(right) != s.charAt(left)){\n used[s.charAt(left)] = false;\n left++;\n }\n left++;\n right++;\n }\n }\n sum = Math.max(sum, right - left);\n\n return sum;\n }", "public static int lengthOfLongestSubstring(String s) {\n\t\tchar[] chars = s.toCharArray();\n\t\tint x = 0;\n\t\tint head = 0;\n\t\tHashMap<Character, Integer> map = new HashMap<Character, Integer>();\n\t\tfor (int i = 0; i < chars.length; i++) {\n\t\t\tif (!map.containsKey(chars[i])) {\n\t\t\t\tmap.put(chars[i], i);\n\t\t\t\tif (map.size() > x) {\n\t\t\t\t\tx = map.size();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (map.size() > x) {\n\t\t\t\t\tx = map.size();\n\t\t\t\t}\n\t\t\t\tint temp = map.get(chars[i]);\n\n\t\t\t\tfor (int j = head; j <= temp; j++) {\n\t\t\t\t\tmap.remove(chars[j]);\n\t\t\t\t}\n\t\t\t\thead = temp + 1;\n\t\t\t\tmap.put(chars[i], i);\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}", "public static void main(String[] args) {\n String a = \"agbcba\";\n StringBuilder rev = new StringBuilder(a);\n System.out.println(a.length() - findLCS(a, rev.reverse().toString(), a.length(), a.length()));\n }", "public int lengthOfLongestSubstring(String s) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n\n int n = s.length();\n\n int i=0, j=0, max=0;\n\n Set<Character> chars = new HashSet<>();\n while (i < n && j < n) {\n if (!chars.contains(s.charAt(j))) {\n chars.add(s.charAt(j));\n j++;\n max = Math.max(max, j - i);\n } else {\n chars.remove(s.charAt(i));\n i++;\n }\n }\n\n return max;\n }", "public int lengthOfLongestSubstring(String s) {\n HashMap<Character, Integer> charsVisit = new HashMap();\n int result = 0;\n int longest = 0;\n\n for (int i = 0; i < s.length(); i++) {\n\n if (charsVisit.containsKey(s.charAt(i))) {\n\n /* Start at repeat character to see if that is where the longest substring starts */\n i = charsVisit.get(s.charAt(i));\n\n charsVisit.clear(); // Clear hash map.\n result = 0;\n\n } else {\n result++;\n\n /* KEY/VALUE = char/index */\n charsVisit.put(s.charAt(i), i);\n }\n\n if (longest < result)\n longest = result;\n }\n return longest;\n }", "public int lengthOfLongestSubstring(String s) {\n if(s.length()<=1) return s.length();\n HashMap<Character,Integer> h=new HashMap<Character,Integer>();\n int curmax=0,max=0;\n for(int i=0;i<s.length();i++) {\n char c=s.charAt(i);\n if(h.containsKey(c)) { \n if(i-h.get(c)<curmax) { // previous is in the middle of curmax, then restart from the previous next char\n curmax=1; // otherwise previous is the start of curmax, then simply replace current with previous\n i=h.get(c)+1; \n c=s.charAt(i);\n h.clear();\n }\n }\n else {\n curmax++;\n }\n h.put(c,i);\n max=curmax>max?curmax:max;\n }\n return max;\n }", "public static void main(String[] args) {\n String str = \"aa\";\n\n String s = longestPalindrome(str);\n System.out.println(s);\n }", "public int lengthOfLongestSubstring(String s) {\n if(s.length() == 0) return 0;\r\n \r\n int windowEnd = 0;\r\n int windowStart = 0;\r\n int maxLen = 0;\r\n \r\n \r\n HashMap<Character, Integer> hm = new HashMap<>();\r\n \r\n for(windowEnd = 0;windowEnd < s.length(); windowEnd++){\r\n \r\n char ch = s.charAt(windowEnd);\r\n \r\n if(hm.containsKey(ch)){\r\n windowStart = Math.max(windowStart , hm.get(ch)+1);\r\n }\r\n \r\n hm.put(ch,windowEnd);\r\n maxLen = Math.max(maxLen, windowEnd-windowStart+1);\r\n }\r\n \r\n return maxLen; \r\n }", "@Test\n\tvoid testLongestPalindromicSubstring() {\n\t\tassertEquals(\"bab\", new LongestPalindromicSubstring().longestPalindrome(\"babad\"));\n\t\tassertEquals(\"bb\", new LongestPalindromicSubstring().longestPalindrome(\"cbbd\"));\n\t}", "public int lengthOfLongestSubstring(String s) {\n\n int res = 0;\n int len = s.length();\n int i = 0, j = 0;\n Set<Character> set = new HashSet<>();\n while (i < len && j < len) {\n if (!set.contains(s.charAt(j))) {\n set.add(s.charAt(j++)); // here s.set an ele then j already plus\n res = Math.max(res, j - i); // so use j-i\n } else {\n set.remove(s.charAt(i++));\n }\n }\n\n return res;\n }", "public int lengthOfLongestSubstring2(String s) {\n\n int res = 0;\n int len = s.length();\n Map<Character, Integer> map = new HashMap<Character, Integer>();\n\n for (int i = 0, j = 0; j < len; j++) {\n if (map.containsKey(s.charAt(j))) {\n i = Math.max(map.get(s.charAt(j)), i);// use Max mesas never looking back\n }\n res = Math.max(res, j - i + 1); // j not plus yet, need add 1 to get a real length ( indicate j itself)\n map.put(s.charAt(j), j + 1); // (j+1) means skip duplicate\n System.out.println(map.toString()); // will update the value of key ( union key)\n }\n\n\n return res;\n }", "public String longestPalindrome(String s) {\n // string to hold the current max\n String max = \"\";\n // deal with edge cases where it is either empty or one letter\n if(s.length() < 2){\n return s;\n }\n // go through each possible string\n for(int i = 0; i < s.length(); ++i){\n \n for(int j = i + 1; j <= s.length(); ++j){\n // if the reversed substring is equal, its a palindrome \n if(s.substring(i,j).equals(reverse(s.substring(i,j)))){\n // if it is greater than the current max's length, it is the new max\n if(s.substring(i,j).length() > max.length() ){\n max = s.substring(i,j);\n }\n }\n }\n }\n // give them back the max\n return max;\n }", "public int lengthOfLongestSubstring(String s) {\n HashMap<Character, Integer> hm = new HashMap<Character, Integer>();\n int counter = 0;\n int max = 0;\n char[] charArray = s.toCharArray();\n for (int i = 0; i < charArray.length; i++) {\n if (!hm.containsKey(charArray[i])) {\n hm.put(charArray[i], i);\n counter++;\n } else {\n max = (max > counter) ? max : counter;\n int index = hm.get(charArray[i]);\n for (int j = 0; j <= index; j++)\n hm.remove(charArray[j]);\n hm.put(charArray[i], i);\n counter = hm.size();\n }\n }\n max = (max > counter) ? max : counter;\n return max;\n }", "public static int lengthOfLongestSubstring(String s) \r\n {\r\n \tif (s.length()==0) \r\n \t\treturn 0;\r\n \t\r\n HashMap<Character, Integer> map = new HashMap<Character, Integer>();\r\n int length = 0;\r\n int start = 0;\r\n \r\n for (int end=0; end < s.length(); end++)\r\n {\r\n \t// When we have reached a repeated character, then the currently held string is potentially the largest string.\r\n \t// If the character is there in the map, start needs to be changed. \r\n \t// If it is not there, start remains the same so that it can increase the count\r\n if (map.containsKey(s.charAt(end)))\r\n {\r\n \t// Consider input as abba. For b[2], start < map.get(s.charAt(end)) + 1 \r\n \t// For b[3], start > map.get(s.charAt(end)) + 1. It means, if the character has occured towards the beginning, we dont want the start to be modified.\r\n \tstart = Math.max(start, map.get(s.charAt(end)) + 1);\r\n } \r\n \r\n map.put(s.charAt(end), end);\r\n \r\n // Why +1? Lets say start=2, end=5. Then the length will be 5-2=3. And, 3+1 = 4.\r\n length = Math.max(length, end-start+1);\r\n \r\n }\r\n return length;\r\n }", "private static int longestPalindromicSubsequence(String str1) {\n\t\tStringBuilder str2 = new StringBuilder(str1);\n\t\tstr2.reverse().toString();\n\t\tString strtemp = str2.toString(); \n\t\treturn LCSDP(str1,strtemp,str1.length(),str1.length());\n\t}", "public int lengthOfLongestSubstring(String s) {\n int i = 0, j = 0, max = 0;\n Set<Character> set = new HashSet<>();\n \n while (j < s.length()) {\n if (!set.contains(s.charAt(j))) {\n set.add(s.charAt(j++));\n max = Math.max(max, set.size());\n } else {\n set.remove(s.charAt(i++));\n }\n }\n \n return max;\n}", "static int computeTheLongestSubstringWithMatchingParens(String string) {\n Deque<Integer> stack = new ArrayDeque<>();\n\n int length = 0;\n int endIndex = -1;\n\n for (int i = 0; i < string.length(); i++) {\n if (string.charAt(i) == '(') stack.push(i);\n else {\n if (stack.isEmpty()) {\n endIndex = i;\n } else {\n stack.pop();\n\n int start = stack.isEmpty() ? endIndex : stack.peek();\n length = Math.max(length, i - start);\n }\n }\n }\n\n return length;\n }", "public int lengthOfLongestSubstring1(String s) {\n\t\tint i = 0, j = 0, max = 0;\n\t\tSet<Character> set = new HashSet<>();\n\n\t\twhile (j < s.length()) {\n\t\t\tif (!set.contains(s.charAt(j))) {\n\t\t\t\tset.add(s.charAt(j++));\n\t\t\t\tmax = Math.max(max, set.size());\n\t\t\t} else {\n\t\t\t\tset.remove(s.charAt(i++));\n\t\t\t}\n\t\t}\n\n\t\treturn max;\n\t}", "public static void main(String[] args) {\n String str = \"geeksforgeeks\";\n System.out.println(longestRepeatedSubstring(str));\n String str1 = \"aaaaaaabbbbbaaa \";\n System.out.println(longestRepeatedSubstring(str1));\n }", "public int lengthOfLongestSubstring(String s) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n int res = 0;\n boolean[] used = new boolean[128];//ASCII 表共能表示 256 个字符,但是由于键盘只能表示 128 个字符,所以用 128 也行\n int left = 0, right = 0; //维持[i, j) 滑动窗口\n while (right < s.length()) {\n if (!used[s.charAt(right)]) {\n used[s.charAt(right ++)] = true;\n } else {\n res = Math.max(res, right - left);\n while ( left < right && s.charAt(left) != s.charAt(right)) {\n used[s.charAt(left ++)] = false;\n }\n left ++;\n right ++;\n }\n }\n res = Math.max(res, right - left);\n return res;\n }", "public String longestPalindrome(String s) {\n String ans = \"\";\n int maxLen = 0;\n for (int i = 0; i < s.length(); i++) {\n int[] pair = expand(s, i, i);\n if (pair[1] - pair[0] + 1 > maxLen) {\n maxLen = pair[1] - pair[0] + 1;\n ans = s.substring(pair[0], pair[1] + 1);\n }\n pair = expand(s, i, i + 1);\n if (pair[1] - pair[0] + 1 > maxLen) {\n maxLen = pair[1] - pair[0] + 1;\n ans = s.substring(pair[0], pair[1] + 1);\n }\n }\n return ans;\n }", "public int lengthOfLongestSubstringE(String s)\n {\n\tif (s.length() < 2)\n\t return s.length();\n\n\tint max = 0, i = 0, j = 1;\n\n\tSet<Character> cache = new HashSet<Character>();\n\tcache.add(s.charAt(i));\n\n\twhile (i < s.length() && j < s.length())\n\t{\n\t while (cache.contains(s.charAt(j)))\n\t\tcache.remove(s.charAt(i++));\n\t cache.add(s.charAt(j++));\n\t max = Math.max(max, j - i);\n\t}\n\treturn max;\n }", "public static int lengthOfLongestSubstring(String s) {\n\t int i = 0, j = 0, max = 0;\n\t Set<Character> set = new HashSet<>();\n\t while (j < s.length()) {\n\t \tSystem.out.println(j);\n\t \tSystem.out.println(set);\n\t \t// if set doesnot contain a character in string - add it to set\n\t if (!set.contains(s.charAt(j))) {\n\t set.add(s.charAt(j));\n\t j++;\n\t max = Math.max(max, set.size());\n\t } else {\n\t set.remove(s.charAt(i++));\n\t }\n\t }\n\t \n\t return max;\n\t}", "public int lengthOfLongestSubstring(String s) {\n int l=s.length(),len=0,r=0;\n HashMap<Character,Integer> h=new HashMap<Character,Integer>();\n for(int i=0;i<l;) {\n char c=s.charAt(i);\n if(h.containsKey(c)) {\n i=h.get(c)+1; // we should restart and clear the hash map before the repeated c\n h.clear();\n len=0;\n }\n else {\n h.put(c,i);\n len++;\n r=Math.max(len,r);\n i++;\n }\n }\n return r;\n }", "public static String findLongestPalindromeSubstring(String s, int len){\n\n // variable to store max len palindromic substring\n // \"\" .. means string at start is empty\n String max_str= \"\",curr_str;\n\n // variable to store max len of palindromic substring\n // 0 means at start len is 0\n int max_len=0,curr_len;\n\n // now string can have length EVEN and ODD so\n // EVEN has two midpoint ans ODD has one midpoint\n //so we have to check both condition of even and odd\n\n\n //and now we have to take midpoint at every charachter\n //in string one by one and check palindromic substring\n // so loop will take one by one character from string and set it as midpoint\n for (int i=0; i < len; i++)\n {\n //find longest odd length palindrome str[i] as midpoint\n //as length is odd high and low pointer is at same position i(which is midpoint)\n // (s,i,i) bcoz same position pointer high and low at midpoint\n curr_str = expand(s,i,i);\n curr_len = curr_str.length();\n\n //update the substring and length of substring\n\n if ( curr_len > max_len ){\n\n max_len = curr_len;\n max_str = curr_str;\n }\n\n // now find even length longest palindrom Str[i] and str[i+1] as midpoint\n // as length is even there are two midpoint position of low and high at str[i] and str[i+1]\n //(s,i,i+1) bcoz two pos of two pointer high and low\n curr_str = expand(s,i,i+1);\n curr_len = curr_str.length();\n\n //update the substring and its length\n\n if (curr_len > max_len )\n {\n max_str = curr_str;\n max_len = curr_len;\n }\n }\n return max_str;\n }", "public int lengthOfLongestSubstring(String s) {\n // Sanitization\n // Create a hashmap to save the character and the index\n // fast pointer - Move until it didn't find the duplicate\n // slow pointer - If the fast pointer pointed the duplicate, get that index and\n // place it next to it.\n\n if (s == null || s.length() == 0)\n return 0;\n int slowPointer = 0;\n int fastPointer = 0;\n int result = 0;\n HashMap<Character, Integer> map = new HashMap();\n while (fastPointer < s.length()) {\n char currentChar = s.charAt(fastPointer);\n if (map.containsKey(currentChar)) {\n int currentIndedx = map.get(currentChar);\n if (slowPointer <= currentIndedx) {\n slowPointer = currentIndedx + 1;\n }\n }\n int difference = fastPointer - slowPointer;\n result = Math.max(result, difference + 1);\n map.put(currentChar, fastPointer);\n fastPointer++;\n }\n return result;\n }", "public static void main(String[] args) {\n // TODO Auto-generated method stub\n String test = \"abcabcbb\";\n int result = LongestSubStringWithoutRepeatingCharacters.solution(test);\n System.out.println(result);\n }", "public int lengthOfLongestSubstringTwoDistinct(String s) {\n if(s == null || s.length() == 0)\n return 0;\n \n //corner case\n int n = s.length();\n if(n < 3)\n return n;\n \n int left = 0;\n int right = 0;\n HashMap<Character,Integer> sMap = new HashMap<>(); // HashMap storing Character, rightmost position\n int maxLen = 2;\n \n while(right < n) {\n // when the slidewindow contains less than three characters\n sMap.put(s.charAt(right), right++);\n \n // when the slidewindow contains three characters\n if(sMap.size() == 3) {\n int i = Collections.min(sMap.values());\n sMap.remove(s.charAt(i)); // remove leftmost character\n left = i+1;\n }\n maxLen = Math.max(maxLen, right - left);\n }\n return maxLen;\n }", "private static String longestPalindrome (String s) {\n\n if (s.length() == 1) {\n return s;\n }\n String returnString = \"\";\n for (int mid = 1; mid < s.length() * 2 - 1; mid++) {\n int i, j;\n if (mid % 2 == 0) {\n i = (mid / 2) - 1;\n j = (mid / 2);\n int currentSize = 2;\n while (i >= 0 && j < s.length() && s.charAt(i) == s.charAt(j)) {\n i--;\n j++;\n currentSize += 2;\n }\n if (currentSize - 2 > returnString.length()) {\n returnString = s.substring(i+1, j);\n }\n } else {\n i = j = mid / 2;\n int currentSize = 1;\n while (i >= 0 && j < s.length() && s.charAt(i) == s.charAt(j)) {\n i--;\n j++;\n currentSize += 2;\n }\n if (currentSize - 2 > returnString.length()) {\n returnString = s.substring(i+1, j);\n }\n }\n }\n return returnString;\n }", "public static void main(String[] args) {\n\t\t// Longest Palindromic Substring Part I\n\t\tString s = \"adfsdaffadada\";\n\t\tfindLongestSubPalindramic(s);\n\n\t\tSystem.out.println(findLongestSubPalindramic2(s));\n\t}", "public int lengthOfLongestSubstring(String s){\n\t\tif(s == null || s.length() == 0){\n\t\t\treturn 0;\n\t\t}\n\n\t\tchar[] ch = s.toCharArray();\n\t\tint[] map = new int[128];\n\t\tint start = 0, end = 0, count = 0, maxLen = 0;\n\n\t\twhile(end < s.length()){\n\t\t\t// If map[ch[end]] > 0, it means ch[end] is duplicated now.\n\t\t\tif(map[ch[end]] > 0){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tmap[ch[end]]++;\n\t\t\tend++;\n\n\t\t\t// deal with the duplicated cases\n\t\t\twhile(count > 0){\n\t\t\t\tif(map[ch[start]] > 1){\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tmap[ch[start]]--;\n\t\t\t\tstart++;\n\t\t\t}\n\n\t\t\tmaxLen = Math.max(maxLen, end - start);\n\t\t}\n\t\treturn maxLen;\n\t}", "public String longestPalindrome(String s) {\n if(s.length() < 2) return s;\n\n for(int i = 0; i < s.length(); i++){\n isValidPalindrome(s, i, i);\n isValidPalindrome(s, i, i + 1);\n }\n return s.substring(start, maxLen + start);\n }", "public static void main(String[] args) {\n\t\tString s = \"ababacbaccc\";//{abcbbbbcccbdddadacb,bcbbbbcccb,10}\n\t\tSystem.out.println(lengthOfLongestSubstringTwoDistinct(s));\n\t}", "public static int lengthOfLongestSubstring(String s) {\n int[] characters = new int[127];\n int longestSubstringLength = 0, subarrayStart = 0;\n \n for (int i = 0; i < s.length(); i++) {\n int characterValue = (int) s.charAt(i);\n if (characters[characterValue] != 0 && characters[characterValue] > subarrayStart) {\n subarrayStart = characters[characterValue];\n }\n\n characters[characterValue] = i + 1;\n\n int currentSubarrayLength = (i - subarrayStart) + 1;\n if (currentSubarrayLength > longestSubstringLength) {\n longestSubstringLength = currentSubarrayLength;\n }\n }\n \n return longestSubstringLength;\n }", "public String longestPalindrome(String s) {\n int start = 0;\n int end = 0;\n for (int i = 0; i < s.length(); i++) {\n int len1 = expand(s, i, i);\n int len2 = expand(s, i, i + 1);\n int len = Math.max(len1, len2);\n if (len > end - start) {\n start = i - (len - 1) / 2;\n end = i + len / 2;\n }\n }\n return s.substring(start, end + 1);\n }", "public int longestPalindromeSubseq(String s) {\n return lps(s, 0, s.length() - 1);\n }", "public static int lengthOfLongestSubstring2(String s) {\n if(s.length()==1)\n return 1;\n\n int sum = 0;\n\n Map<Character, Integer> map = new HashMap<>();\n int i=0;\n\n while(i<s.length()){\n char c = s.charAt(i);\n\n // map exists char c\n if(map.containsKey(c)){\n if(map.keySet().size() > sum) // replace sum\n sum = map.keySet().size();\n i = map.get(c);\n map = new HashMap<>(); // clear map\n }\n // map doesn't exist char c\n else\n map.put(c, i);\n i++;\n }\n\n if(map.keySet().size() > sum)\n return map.keySet().size();\n return sum;\n }", "public static void main(String[] args) {\n String test = \"a\";\n String result = longestPalindrome(test);\n System.out.println(result);\n }", "public static String longestPalindrome(String str) {\n\t\tString longest = \"\";\n\t\tfor(int i=0; i<str.length()-1; i++) {\n\t\t\tString s1 = expandAroundCenter(str, i, i); // Expand around a character\n\t\t\tif(s1.length() > longest.length()) {\n\t\t\t\tlongest = s1;\n\t\t\t}\n\n\t\t\tString s2 = expandAroundCenter(str, i, i+1); // Expand between two characters\n\t\t\tif(s2.length() > longest.length()) {\n\t\t\t\tlongest = s2;\n\t\t\t}\n\t\t}\n\n\t\treturn longest;\n\t}", "public static void main(String[] args) {\n String str = \"aabacbebebe\";\n int k = 3;\n\n int maxLength = getMaxSubstr(str, k);\n System.out.println(maxLength);\n }", "public static void main(String[] args) {\n String s = \"zazb\";\n// String s = \"zbza\";\n String subStr = lastSubstring(s);\n System.out.println(subStr);\n }", "public int getLongestRepeatedSubstringLength()\r\n {\r\n return maxLength;\r\n }", "public static void main(String[] args){\n\t\tString st = \"attabababab\"; \n\t\t// finding the longest pallindrome from the given sequence \n\t\tSystem.out.println(findlongestpalindrome(st));\n\t\t//System.out.println(ispalindrome1(\"atata\"));\n\t}", "public int lengthOfLongestSubstring(String str) {\n \n if(str.compareTo(\"\") == 0)\n {\n \treturn 0;\n }\n \n if(str.length() == 1)\n {\n \treturn 1;\n }\n \t\t\n\t\tboolean charSet[] = new boolean[256];\n\t\tint begin = 0;\n\t\tint end = 0;\n\t\tint maxBegin = 0;\n\t\tint maxEnd = 0;\n\t\t\n\t\tfor(int i = 0; i < str.length(); i++)\n\t\t{\n\t\t\tint value = str.charAt(i);\n\t\t\tif(charSet[value])\n\t\t\t{\t\t\t\t\n\t\t\t\tfor(int j = begin; j <= end; j++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif(str.charAt(j) == str.charAt(i))\n\t\t\t\t\t{\n\t\t\t\t\t\tbegin = j + 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcharSet[j] = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//begin = i;\n\t\t\t\tend = i;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcharSet[value] = true;\n\t\t\t\tend = i;\n\t\t\t}\n\t\t\t\n\t\t\tif((maxEnd - maxBegin + 1) < (end - begin + 1))\n\t\t\t{\n\t\t\t\tmaxBegin = begin;\n\t\t\t\tmaxEnd = end;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn (maxEnd - maxBegin + 1);\n\n }", "public static void main(String[] args) {\n\r\n\t\tFind_String f1;\r\n\t\tf1 = new Find_String();\r\n\t\tint p = f1.Max_Length(\"The cow jumped over the moon\");\r\n\t System.out.println(p);\r\n\t String ss = f1.Word_with_max_length(\"The cow jumped over the moon\");\r\n\t System.out.println(ss);\r\n\t\t\r\n\t}", "public int longestPalindromeSubseqV2(String s) {\n int n = s.length();\n Integer[][] memo = new Integer[n][n];\n return helper(s, memo, 0, n - 1);\n }", "private static void longestRepeatingSubsequence(String string) {\n\t\t\n\t}", "public int lengthOfLongestSubstringTwoDistinct(String s) {\n int firstC = 0, secondC = 0;\n int start = 0, end = 0, len = s.length();\n int res = 0;\n char first =' ', second = ' ';\n while(end < len) {\n char cur = s.charAt(end);\n if(cur == first) {\n firstC++;\n }\n else if(cur == second) {\n secondC++;\n }\n else {\n while(firstC != 0 && secondC != 0) {\n if(s.charAt(start) == first) firstC--;\n else secondC--;\n start++;\n }\n if(firstC == 0) {\n first = cur;\n firstC = 1;\n }\n else {\n second = cur;\n secondC = 1;\n }\n }\n res = Math.max(res, end - start + 1);\n end++;\n }\n return res;\n }", "public abstract void createLongestRepeatedSubstring();", "public static String lrs(String s) {\n\n // form the N suffixes\n int N = s.length();\n String[] suffixes = new String[N];\n for (int i = 0; i < N; i++) {\n suffixes[i] = s.substring(i, N);\n }\n\n // sort them\n Arrays.sort(suffixes);\n\n // find longest repeated substring by comparing adjacent sorted suffixes\n String lrs = \"\";\n for (int i = 0; i < N - 1; i++) {\n String x = lcp(suffixes[i], suffixes[i+1]);\n if (x.length() > lrs.length())\n lrs = x;\n }\n return lrs;\n }", "public static void main(String[] args) {\n\n\n List<String> d = new ArrayList<>();\n d.add(\"ba\");\n d.add(\"ab\");\n d.add(\"a\");\n d.add(\"b\");\n System.out.println(findLongestWord(\"bab\", d));\n\n\n System.out.println(findLongestWord(\"aewfafwafjlwajflwajflwafj\", Arrays.asList(new String[]{\"apple\", \"ewaf\", \"awefawfwaf\", \"awef\", \"awefe\", \"ewafeffewafewf\"})));\n System.out.println(findLongestWord(\"apple\", Arrays.asList(new String[]{\"zxc\", \"vbn\"})));\n\n\n }", "public int findLUSlength(String[] strs) { //O(n^2) time. O(1) space.\r\n\t\tif (strs.length == 0)\r\n\t\t\treturn 0;\r\n\t\tint max = -1;\r\n\t\tint i = 0;\r\n\t\t// Arrays.sort(strs, (a,b) -> b.length() - a.length());\r\n\t\tfor (int j = 0; j < strs.length; j++) {\r\n\t\t\tfor (i = 0; i < strs.length; i++) {\r\n\t\t\t\tif (j == i || !isSubsequence(strs[j], strs[i]))\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\telse\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (i == strs.length)\r\n\t\t\t\tmax = Math.max(strs[j].length(), max);\r\n\t\t}\r\n\t\treturn max;\r\n\t}", "public int lengthOfLSS(String s){\n HashMap<Character, Integer> m = new HashMap<>();\n int ans = 0;\n \n for(int i=0, j=0; j<s.length(); j++){\n if(m.containsKey(s.charAt(j))){\n i = Math.max(m.get(s.charAt(j)),i);\n }\n ans = Math.max(j-i+1,ans);\n m.put(s.charAt(j),j+1);\n }\n\n return ans;\n }", "@Test\n\tvoid testLongestSubstringWithoutRepeatingCharacters() {\n\t\t// Test for LongestSubstringWithoutRepeatingCharacters\n\t\tLongestSubstringWithoutRepeatingCharacters tester = new LongestSubstringWithoutRepeatingCharacters();\n\t\tassertEquals(3, tester.lengthOfLongestSubstring(\"abcabcbb\"));\n\t\tassertEquals(1, tester.lengthOfLongestSubstring(\"bbbbb\"));\n\t\tassertEquals(3, tester.lengthOfLongestSubstring(\"pwwkew\"));\n\t\tassertEquals(6, tester.lengthOfLongestSubstring(\"ohvhjdml\"));\n\t\tassertEquals(1, tester.lengthOfLongestSubstring(\" \"));\n\t\tassertEquals(5, tester.lengthOfLongestSubstring(\"tmmzuxt\"));\n\t\t\n\t\t// Test for LongestSubstringWithoutRepeatingCharacters2\n\t\tLongestSubstringWithoutRepeatingCharacters2 tester2 = new LongestSubstringWithoutRepeatingCharacters2();\n\t\tassertEquals(3, tester2.lengthOfLongestSubstring(\"abcabcbb\"));\n\t\tassertEquals(1, tester2.lengthOfLongestSubstring(\"bbbbb\"));\n\t\tassertEquals(3, tester2.lengthOfLongestSubstring(\"pwwkew\"));\n\t\tassertEquals(6, tester2.lengthOfLongestSubstring(\"ohvhjdml\"));\n\t\tassertEquals(1, tester2.lengthOfLongestSubstring(\" \"));\n\t\tassertEquals(5, tester2.lengthOfLongestSubstring(\"tmmzuxt\"));\n\t}", "public int longestRod ();", "public static String longerString(String s1, String s2) {\n\t\t\n\t\tint str1 = s1.length();\n\t\tint str2 = s2.length();\n\t\tif(str1 > str2)\n\t\t\treturn s1;\n\t\telse\n\t\t\treturn s2;\n\t}", "public static void main(String[] args) {\n\t\tString s = \"Hello world\";\r\n\t\tint size = lengthOfLastWord(s);\r\n\t\tSystem.out.println(size);\r\n\r\n\t}", "public static String longestRepeatedSubstring(String s){\r\n int N = s.length();\r\n String[] suffixes = new String[N];\r\n \r\n for (int i = 0; i < N; i++)\r\n suffixes[i] = s.substring(i, N);\r\n \r\n /* bring subffixes with common prefix together. */\r\n Arrays.sort(suffixes);\r\n \r\n /* compare the adjacent suffixes. */\r\n String longest = \"\";\r\n for (int i = 0; i < suffixes.length - 1; i++){\r\n String common = longestCommonPrefix(suffixes[i], suffixes[i+1]);\r\n if (common.length() > longest.length())\r\n longest = common;\r\n }\r\n \r\n return longest;\r\n }", "public static void main(String[] args){\n String s = \"()()()\";\n System.out.println(find_max_length_of_matching_parentheses(s));\n }", "public static void main(String[] args) {\n String s = \"Hello World\";\n\n System.out.println(lengthOfLastWord(s));\n }", "public static int longestRepeatingSubstringUsingSuffixArray(String s) {\n\t\tint n = s.length();\n\t\tSuffixArray sa = new SuffixArray(s);\n\t\tint ans = 0;\n\t\tfor(int i = 1 ; i < n ; i++) {\n\t\t\tint len = sa.lcp(i);\n\t\t\tans = Math.max(ans, len);\n\t\t}\n\t\treturn ans;\n\t}", "public static int longerThanOriginalOne(String s){\n\n\t\tint count = 1;\n\t\tchar c = s.charAt(0);\n\n\t\tint total = 0;\n\n\t\tfor (int i = 1; i < s.length(); i++){\n\t\t\tif (s.charAt(i) == c){\n\t\t\t\tcount += 1;\n\t\t\t}else{\n\t\t\t\ttotal += 1 + Integer.toString(count).length();\n\t\t\t\tc = s.charAt(i);\n\t\t\t\tcount = 1;\n\n\t\t\t}\n\t\t}\n\t\ttotal += 1 + Integer.toString(count).length();\n\t return total;\n\n\n\t}", "public static void main(String[] args) {\n System.out.println(\"result = \" + new Main().findLongestPalindrome(\"abcdcbac\"));\n }", "public static void main(String[] args) {\n\t\tString s=\"hello far \";\n\t\tSystem.out.println(lengthOfLastWord(s));\n\t\t\n\n\t\t\n\t}", "static int size_of_lhld(String passed){\n\t\treturn 3;\n\t}", "public static void main(String[] args) {\n\t\tString s = \"aabacbebebe\";\n\n\t\tSystem.out.println(\"Given String : \" + s);\n\n\t\tSystem.out.println(\"Longest Substring Using Set (2-pointer) : \"\n\t\t\t\t+ lengthOfLongestSubstringUsingSet(s));\n\t\tSystem.out.println(\"Longest Substring Using Sliding Window : \"\n\t\t\t\t+ longestStringWithNoRepeatingChars(s));\n\n\t\tSystem.out.println(\"\\n ===== Longest string with 2 distinct characters ===== \");\n\t\tSystem.out.println(\"Original String : \" + s);\n\t\tSystem.out\n\t\t\t\t.println(\"Length of Longest Substring with at most 2 distinct characters: \"\n\t\t\t\t\t\t+ longestStringWithTwoDistinctChars(s));\n\n\t\tSystem.out.println(\"\\n ===== Longest string with K distinct characters ===== \");\n\n\t\tPair<Integer, Pair<Integer, Integer>> pair = longestStringWithKDistinctChars(s, 3);\n\t\tSystem.out.print(\"Longest Substring length with 3 Distinct Chars : \");\n\t\tSystem.out.print(pair.getKey() + \", \" + pair.getValue().getKey() + \" \"\n\t\t\t\t+ pair.getValue().getValue());\n\n\t\tif (pair.getValue().getKey() != -1)\n\t\t\tSystem.out.println(\", \"\n\t\t\t\t\t+ s.substring(pair.getValue().getKey(), pair.getValue()\n\t\t\t\t\t\t\t.getValue() + 1));\n\t\telse\n\t\t\tSystem.out.println(\", Empty String\");\n\t\t\n\t\tSystem.out.println(\"\\n ===== Longest string with K distinct characters (AS approach) ===== \");\n\n\t\tPair<Integer, Pair<Integer, Integer>> pair1 = longestStringWithKDistinctCharsAS(s, 3);\n\t\tSystem.out.print(\"Longest Substring length with 3 Distinct Chars : \");\n\t\tSystem.out.print(pair1.getKey() + \", \" + pair1.getValue().getKey() + \" \"\n\t\t\t\t+ pair1.getValue().getValue());\n\n\t\tif (pair1.getValue().getKey() != -1)\n\t\t\tSystem.out.println(\", \"\n\t\t\t\t\t+ s.substring(pair1.getValue().getKey(), pair1.getValue()\n\t\t\t\t\t\t\t.getValue() + 1));\n\t\telse\n\t\t\tSystem.out.println(\", Empty String\");\n\n\t\tSystem.out.println(\"\\n ===== Longest string with no repeating characters ===== \");\n\n\t\ts = \"abcabcbb\";\n\t\tSystem.out.print(\"For string: \" + s);\n\t\tSystem.out.print(\"; Method Other: \"\n\t\t\t\t+ longestStringWithNoRepeatingChars(s));\n\t\tSystem.out.println(\"; AS: \" + longestStringWithNoRepeatingCharsAS(s));\n\n\t\ts = \"bbbbb\";\n\t\tSystem.out.print(\"For string: \" + s);\n\t\tSystem.out.print(\"; Method Other: \"\n\t\t\t\t+ longestStringWithNoRepeatingChars(s));\n\t\tSystem.out.println(\"; AS: \" + longestStringWithNoRepeatingCharsAS(s));\n\n\t\ts = \"pwwkew\";\n\t\tSystem.out.print(\"For string: \" + s);\n\t\tSystem.out.print(\"; Method Other: \"\n\t\t\t\t+ longestStringWithNoRepeatingChars(s));\n\t\tSystem.out.println(\"; AS: \" + longestStringWithNoRepeatingCharsAS(s));\n\t}", "public static String longestSubSequence(String str1, int st1, String str2, int st2) {\n if ((st1 >= str1.length()) || (st2 >= str2.length()))\n return null;\n String subStr1 = str1.substring(st1, str1.length());\n String subStr2 = str2.substring(st2, str2.length());\n String lonSeq1 = null;\n String lonSeq2 = null;\n if (subStr1.length() == 1) {\n lonSeq1 = (str2.contains(subStr1)) ? subStr1 : null;\n } else {\n lonSeq1 = longestSubSequence(str1, st1 + 1, str2, st2);\n if ((lonSeq1 != null) && (!lonSeq1.isEmpty())) {\n String sub2 = str2.substring(0, str2.indexOf(lonSeq1.charAt(0)));\n if ((sub2 != null) && (!sub2.isEmpty())) {\n if (sub2.contains(String.valueOf(str1.charAt(st1)))) {\n lonSeq1 = str1.charAt(st1) + lonSeq1;\n }\n }\n }\n }\n if (subStr2.length() == 1) {\n lonSeq2 = (str1.contains(subStr2)) ? subStr2 : null;\n } else {\n // find longestSequence with str1 index increased\n lonSeq2 = longestSubSequence(str1, st1, str2, st2 + 1);\n if ((lonSeq2 != null) && (!lonSeq2.isEmpty())) {\n // find the index of longSeq2 in str1\n String sub1 = str1.substring(0, str1.indexOf(lonSeq2.charAt(0)));\n if ((sub1 != null) && (!sub1.isEmpty())) {\n if (sub1.contains(String.valueOf(str2.charAt(st2)))) {\n lonSeq2 = str2.charAt(st2) + lonSeq2;\n }\n }\n }\n\n }\n\n if ((lonSeq1 == null) || (lonSeq1.isEmpty())) return lonSeq2;\n if ((lonSeq2 == null) || (lonSeq2.isEmpty())) return lonSeq1;\n return (lonSeq1.length() > lonSeq2.length()) ? lonSeq1 : lonSeq2;\n }", "public static void main(String[] args) {\n String str = \"dadasd34d3212323sddasda\";\n String[] longestNumbers = getLongestNumbers(str);\n System.out.println(longestNumbers[0]+\",\"+longestNumbers[1]);\n }", "static String reverse3(String s)\n\t{\n\t\tString reverseStr = new StringBuffer(s).reverse().toString();\n\t\treturn reverseStr;\n \n\t}", "public static void main(String[] args){\n\t\tSystem.out.println(makeThreeSubstr(\"hello\",0,2)); //should be hehehe\n\t\tSystem.out.println(makeThreeSubstr(\"shenanigans\",3,7)); //should be naninaninani\n\t}", "public static int lengthOfLongestSubstringUsingSet(String s) {\n\t\tif (s == null || s.length() == 0)\n\t\t\treturn 0;\n\n\t\tint n = s.length();\n\t\tSet<Character> set = new HashSet<>();\n\t\tint ans = 0, start = 0, end = 0;\n\t\twhile (start <= end && end < n) {\n\t\t\t// try to extend the range [i, j]\n\t\t\tif (!set.contains(s.charAt(end))) {\n\t\t\t\tset.add(s.charAt(end));\n\t\t\t\tend++;\n\n\t\t\t\tans = Math.max(ans, end - start); // Update ans\n\t\t\t} else {\n\t\t\t\tset.remove(s.charAt(start++));\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}", "public static void main(String[] args) {\n SolutionDp solution = new SolutionDp();\n System.out.println(solution.longestPalindrome(\"babad\"));\n System.out.println(solution.longestPalindrome(\"cbbd\"));\n System.out.println(solution.longestPalindrome(\"a\"));\n System.out.println(solution.longestPalindrome(\"ac\"));\n System.out.println(solution.longestPalindrome(\"aaabaaaa\"));\n System.out.println(solution.longestPalindrome(\"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\"));\n }", "public static String getLongestSubSeq(String s1, String s2) {\n if (s1 == null || s2 == null) {\n return null;\n }\n Set<String> set1 = getAllSubSeq(s1);\n Set<String> set2 = getAllSubSeq(s2);\n if (set1 == null || set2 == null || set1.size() == 0 || set2.size() == 0) {\n return null;\n }\n\n String longest = \"\";\n for (String s : set1) {\n if (s.length() > longest.length() && set2.contains(s)) {\n longest = s;\n }\n }\n\n return longest.length() > 0 ? longest : null;\n }", "@org.junit.Test\n\tpublic void testingStringlargestFromLast() {\n\t\tString result=object.largestWordInString(\"I live in Pune\");\n\t\tassertEquals(\"Pune\",result );\n\t}", "public static int longestCommonSubsequenceLength(String s1, String s2)\n {\n return longestCommonSubsequenceLength(s1.toCharArray(), s2.toCharArray(), s1.length(), s2.length());\n }", "int mo5867a(String str, long j);", "public static String returnLongestWord(String sentence) {\n\n\n\t\tString longestWord = \"\";\n\t\tString splitWords[] = sentence.split(\" \");\n\n\t\tfor (int i = 0; i < splitWords.length; i++) {\n\n\t\t\tString currentWord = splitWords[i].toLowerCase();\n\t\t\tint currentLength = currentWord.length();\n\t\t\tint longestLength = longestWord.length();\n\n\t\t\tif (currentLength > longestLength) {\n\t\t\t\tlongestWord = currentWord;\n\t\t\t} else {\n\t\t\t}\n\n\t\t}\n\t\tSystem.out.println(longestWord.length() + \" \" + longestWord);\n\t\treturn longestWord;\n\n\t}" ]
[ "0.8270508", "0.7828076", "0.76243067", "0.7409536", "0.74069613", "0.7331496", "0.73051065", "0.7289043", "0.7171868", "0.71647584", "0.7135155", "0.7132989", "0.7130191", "0.7123175", "0.71044976", "0.70669836", "0.7040121", "0.701936", "0.7011903", "0.70061284", "0.70034087", "0.69372624", "0.6933274", "0.69174135", "0.6896635", "0.6872328", "0.68640125", "0.68636686", "0.6852924", "0.6850353", "0.6840232", "0.6821529", "0.6819119", "0.6814426", "0.6806099", "0.6793882", "0.6788524", "0.678629", "0.67797697", "0.67652136", "0.6752626", "0.673686", "0.67267376", "0.6721208", "0.672056", "0.6713772", "0.6692777", "0.6671393", "0.6668784", "0.6630665", "0.662078", "0.6605836", "0.65917766", "0.6591354", "0.6582571", "0.6577252", "0.6544214", "0.6535568", "0.65276843", "0.65218407", "0.65189147", "0.65179044", "0.65067756", "0.6477231", "0.64447033", "0.63933766", "0.6369131", "0.63300854", "0.6324181", "0.6318328", "0.6306363", "0.625632", "0.62558675", "0.62268007", "0.621391", "0.61904776", "0.61857814", "0.6182943", "0.61785775", "0.61768913", "0.6157431", "0.61542076", "0.61412114", "0.6138886", "0.6133003", "0.61296004", "0.6115402", "0.61138713", "0.6110352", "0.60724634", "0.6050665", "0.605042", "0.60502905", "0.6020603", "0.60200495", "0.6014247", "0.5998649", "0.59851176", "0.5979326", "0.5968294", "0.59513146" ]
0.0
-1
Write code here that turns the phrase above into concrete actions throw new PendingException(); DriverManager dm = new DriverManager();
@Given("^Initialize the browser with Chrome$") public void initialize_the_browser_with_Chrome() throws Throwable { driver = DriverManager.getDriverInstance("chrome", 20); System.out.println("Launched Chrome"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MyDriver() throws SQLException {\n }", "private void test() throws SQLException {\n\n\t}", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n JDBCConnectData jDBCConnectData0 = new JDBCConnectData((String) null, \"One-row database query returned multiple rows: \", \"One-row database query returned multiple rows: \", (String) null, \"Closing statement failed\", (String) null);\n // Undeclared exception!\n try { \n DBUtil.connect(jDBCConnectData0, true);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No JDBC driver class name specified\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n ErrorMessages errorMessages0 = new ErrorMessages();\n // Undeclared exception!\n try { \n DBUtil.getStatement(errorMessages0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Error getting statement from result set\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "public void execute() {\n /*\n r6 = this;\n java.lang.String r0 = \"Failed to close connection after DBUnit operation: \"\n java.util.logging.Logger r1 = log\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n java.lang.String r3 = \"Executing DBUnit operations: \"\n r2.append(r3)\n int r3 = r6.size()\n r2.append(r3)\n java.lang.String r2 = r2.toString()\n r1.info(r2)\n org.dbunit.database.IDatabaseConnection r1 = r6.getConnection() // Catch:{ all -> 0x005a }\n r6.disableReferentialIntegrity(r1) // Catch:{ all -> 0x0058 }\n java.util.Iterator r2 = r6.iterator() // Catch:{ all -> 0x0058 }\n L_0x0027:\n boolean r3 = r2.hasNext() // Catch:{ all -> 0x0058 }\n if (r3 == 0) goto L_0x0037\n java.lang.Object r3 = r2.next() // Catch:{ all -> 0x0058 }\n org.seamless.util.dbunit.DBUnitOperations$Op r3 = (org.seamless.util.dbunit.DBUnitOperations.Op) r3 // Catch:{ all -> 0x0058 }\n r3.execute(r1) // Catch:{ all -> 0x0058 }\n goto L_0x0027\n L_0x0037:\n r6.enableReferentialIntegrity(r1) // Catch:{ all -> 0x0058 }\n if (r1 == 0) goto L_0x0057\n r1.close() // Catch:{ Exception -> 0x0040 }\n goto L_0x0057\n L_0x0040:\n r1 = move-exception\n java.util.logging.Logger r2 = log\n java.util.logging.Level r3 = java.util.logging.Level.WARNING\n java.lang.StringBuilder r4 = new java.lang.StringBuilder\n r4.<init>()\n r4.append(r0)\n r4.append(r1)\n java.lang.String r0 = r4.toString()\n r2.log(r3, r0, r1)\n L_0x0057:\n return\n L_0x0058:\n r2 = move-exception\n goto L_0x005c\n L_0x005a:\n r2 = move-exception\n r1 = 0\n L_0x005c:\n if (r1 == 0) goto L_0x0079\n r1.close() // Catch:{ Exception -> 0x0062 }\n goto L_0x0079\n L_0x0062:\n r1 = move-exception\n java.util.logging.Logger r3 = log\n java.util.logging.Level r4 = java.util.logging.Level.WARNING\n java.lang.StringBuilder r5 = new java.lang.StringBuilder\n r5.<init>()\n r5.append(r0)\n r5.append(r1)\n java.lang.String r0 = r5.toString()\n r3.log(r4, r0, r1)\n L_0x0079:\n goto L_0x007b\n L_0x007a:\n throw r2\n L_0x007b:\n goto L_0x007a\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.seamless.util.dbunit.DBUnitOperations.execute():void\");\n }", "private DatabasePreemptedException(String message, DatabasePreemptedException cause) {\n super(message, cause);\n dbName = cause.dbName;\n dbHandle = cause.dbHandle;\n }", "private DriverManager() {\n\t}", "public void testDbCommand() throws Exception{\n\t}", "protected oracle.jdbc.internal.OracleConnection getConnectionDuringExceptionHandling()\n/* */ {\n/* 1183 */ return null;\n/* */ }", "public static void main(String args[]) throws ClassNotFoundException, SQLException{\n }", "@When(\"^I execute my test case$\")\n public void iExecuteMyTestCase() throws Throwable {\n throw new PendingException();\n }", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n DBUtil.assertAllDbResourcesClosed(true);\n // Undeclared exception!\n try { \n ContextService.getFactory();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // \n //\n verifyException(\"org.apache.derby.iapi.services.context.ContextService\", e);\n }\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n JDBCConnectData jDBCConnectData0 = new JDBCConnectData((String) null, (String) null, \"-l#o]ndt$;\", \"-l#o]ndt$;\");\n // Undeclared exception!\n try { \n DBUtil.connect(jDBCConnectData0, false);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No JDBC URL specified\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "public static void main(String args[]) throws SQLException {\n }", "@Test(timeout = 4000)\n public void test017() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.prepareStatement((Connection) null, \"EJ1m8=\", true, (-91830697), 2478, (int) (byte)26);\n fail(\"Expecting exception: IllegalStateException\");\n \n } catch(IllegalStateException e) {\n //\n // Tried to mutate a database with read-only settings: EJ1m8=\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "void execute() throws Exception;", "public void setup() throws DatabaseTestException;", "public DeferConsultationException() {\n }", "@Override\r\n public void runCode(String sql)\r\n throws DatabaseException {\r\n try {\r\n Class.forName(driverClassName);\r\n conn = DriverManager.getConnection(url, userName, password);\r\n \r\n } catch (ClassNotFoundException ex) {\r\n throw new DatabaseException(\"Could not load JDBC driver\");\r\n }\r\n catch(SQLException sq){\r\n throw new DatabaseException(\"Connection Failed\");\r\n }\r\n \r\n try {\r\n stmt = conn.createStatement();\r\n stmt.executeUpdate(sql); \r\n } catch (SQLException sqle) {\r\n throw new DatabaseException(\"Execution of SQL failed\");\r\n } catch (Exception e) {\r\n } finally {\r\n try {\r\n stmt.close();\r\n conn.close();\r\n } catch (Exception e) {\r\n throw new DatabaseException(\"Unknown error\");\r\n }\r\n }\r\n }", "public static void main(String[] args) throws ClassNotFoundException, SQLException {\n Class.forName(\"jdbc.oracle.driver.OracleDriver\"); //Throws ClassNotFoundException\n //Step 2 Create Connection Object\n Connection connection = DriverManager.getConnection(\n \"jdbc:oracle:thin:@localhost:1521:xe\",\"system\",\"oracle\");\n //Throws SQL Excpetion\n //Step 3 create statement Object\n Statement statement = connection.createStatement();\n\n //step 4 excecute query\n ResultSet resultSet = statement.executeQuery(\"select * from emp\");\n //Step 5 close the connection\n resultSet.close();\n\n statement.close();\n\n connection.close();\n\n }", "void mo57276a(Exception exc);", "@Test(timeout = 4000)\n public void test092() throws Throwable {\n Proxy proxy0 = (Proxy)DBUtil.wrapWithPooledConnection((Connection) null, false);\n // Undeclared exception!\n try { \n DBUtil.prepareStatement((Connection) proxy0, \"SELECT pronae,oid FROM pg_roc WHEE \", false);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "private void ucitajDrajver()throws Exception{\r\n db.loadDriver();\r\n }", "public static void main(String[] args) throws SQLException, ClassNotFoundException {\n }", "public interface RoutineException {}", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.getStatement((ResultSet) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "public static void main(String[] args) throws SQLException {\n\t}", "public void prepare() throws Exception {\n\r\n\t}", "@Test\r\n\tpublic void testChooseConnection() throws Exception {\n\t}", "public static void main(String[] args) {\n Connection conection = createConnection(\"people.db\");\n \n try {\n conection.createStatement().executeQuery(\"SELECT * FROM people\");\n \n } catch (SQLException ex) {\n System.out.println(\"PRINT AN ERROR HERE\");\n }\n}", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n jdbcConnection jdbcConnection0 = new jdbcConnection((Session) null);\n // Undeclared exception!\n try { \n DBUtil.executeQuery(\"c\", jdbcConnection0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.hsqldb.jdbc.jdbcStatement\", e);\n }\n }", "@Test(timeout = 4000)\n public void test016() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.prepareStatement((Connection) null, \"EJ1mj8=\", false, 0, (int) (byte)38, (-91830680));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());\n doReturn((Result) null).when(session0).execute(any(org.hsqldb.Result.class));\n jdbcConnection jdbcConnection0 = new jdbcConnection(session0);\n // Undeclared exception!\n try { \n DBUtil.executeUpdate(\"30J;t|'\", jdbcConnection0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.hsqldb.jdbc.jdbcStatement\", e);\n }\n }", "@Quando(\"executá-lo$\")\n\tpublic void executáLo() throws Throwable{\n\t\tthrow new PendingException();\n\t}", "private void initDriver() throws InvalidDriverException {\n\t\ttry {\n\t\t\tClass.forName(this.driverName);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// unable to load driver; invalid\n\t\t\tthrow new InvalidDriverException(Failure.DRIVER);\n\t\t}\n\t}", "public void selectAll() {\n/* 101 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test018() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.prepareStatement((Connection) null, \"Expected exactly one row, found more.\", true);\n fail(\"Expecting exception: IllegalStateException\");\n \n } catch(IllegalStateException e) {\n //\n // Tried to mutate a database with read-only settings: Expected exactly one row, found more.\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "@Override\r\n\tpublic void doException() {\n\r\n\t}", "public void bootstrapDatabase() throws Exception {\n\n }", "public DAOException(String reason) {\n super(reason);\n }", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\tdbme = new DBManagerException(dbme.getMessage());\r\n\t}", "public interface ConnectionMaker{\n public Connection makeConnection() throws ClassNotFoundException, SQLException;\n\n\n}", "@Override\n public OperationFailureException wrapSelf(String msg) {\n return new DatabasePreemptedException(msg, this);\n }", "public XDBBaseException() {\n }", "@Test(expected = DBManagerException.class)\r\n\tpublic void testDBManagerException() throws DBManagerException {\r\n\t\ttry {\r\n\t\t\tString CONTROLADOR = \"MAL\";\r\n\t\t\tString URL = \"MAL\";\r\n\t\t\tString USUARIO = \"MAL\";\r\n\t\t\tString CONTRASENA = \"MAL\";\r\n\r\n\t\t\tClass.forName(CONTROLADOR);\r\n\t\t\tDriverManager.getConnection(URL, USUARIO, CONTRASENA);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new DBManagerException(\"Mensaje y causa\", e);\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tString CONTROLADOR = \"MAL\";\r\n\t\t\tString URL = \"MAL\";\r\n\t\t\tString USUARIO = \"MAL\";\r\n\t\t\tString CONTRASENA = \"MAL\";\r\n\r\n\t\t\tClass.forName(CONTROLADOR);\r\n\t\t\tDriverManager.getConnection(URL, USUARIO, CONTRASENA);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new DBManagerException(\"Solo mensaje\");\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());\n doReturn((Result) null).when(session0).execute(any(org.hsqldb.Result.class));\n jdbcConnection jdbcConnection0 = new jdbcConnection(session0);\n Class<PGPooledConnection> class0 = PGPooledConnection.class;\n // Undeclared exception!\n try { \n DBUtil.queryScalarArray((String) null, class0, (Connection) jdbcConnection0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.hsqldb.jdbc.jdbcStatement\", e);\n }\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.connect(\"org.hsqldb.lib.HsqlByteArrayOutputStream\", false);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No environment definition 'org.hsqldb.lib.HsqlByteArrayOutputStream.env.properties' found\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n ErrorMessages errorMessages0 = new ErrorMessages();\n // Undeclared exception!\n try { \n DBUtil.closeResultSetAndStatement(errorMessages0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Error getting statement from result set\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "public void mo1974q() throws cf {\r\n }", "private RuntimeException getSqlException(HiveSQLException e) throws ExploreException, SQLException {\n if (e.getSQLState() != null) {\n throw e;\n }\n throw new ExploreException(e);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n String[] stringArray0 = new String[0];\n SQLUtil.leftJoin(\"cxecute\", stringArray0, \"cxecute\", \"cxecute\", stringArray0);\n DBCatalog dBCatalog0 = new DBCatalog(\"cxecute\");\n DBSchema dBSchema0 = new DBSchema(\"\");\n // Undeclared exception!\n try { \n dBSchema0.getDatabase();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.model.DBSchema\", e);\n }\n }", "private void sqlException(SQLException e) {\n System.err.println(\"SQLException: \" + e.getMessage());\n System.err.println(\"SQLState: \" + e.getSQLState());\n System.err.println(\"VendorError: \" + e.getErrorCode());\n e.printStackTrace();\n// System.exit(-1);\n }", "@Test\n public void testSelectByNew() throws Exception{\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.nextLine((ResultSet) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "void mo753w() throws RemoteException;", "private void throwsError() throws OBException {\n }", "public static void main(String[] args) throws SQLException {\n\t\t\r\n\t}", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.queryString((PreparedStatement) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "public AddressBookDB() throws SQLException, ClassNotFoundException{ }", "public abstract String getDriver() throws DataServiceException;", "@Test(timeout = 4000)\n public void test71() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n TableContainer tableContainer0 = new TableContainer(\"-KwE,kZ\");\n DefaultDBTable defaultDBTable1 = new DefaultDBTable();\n DBDataType.getInstance((-1717986917), \"%~-1t&Ncqx{&'OP~@\");\n tableContainer0.getSchema();\n Integer integer0 = RawTransaction.SAVEPOINT_ROLLBACK;\n Integer integer1 = RawTransaction.LOCK_ESCALATE;\n SQLUtil.removeComments(\"/**/\");\n System.setCurrentTimeMillis(1722L);\n // Undeclared exception!\n try { \n SQLUtil.normalize((String) null, false);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.io.StringReader\", e);\n }\n }", "@Test\n public void testRegister_connectionException() throws SQLException {\n SignUpRequest request = new SignUpRequest(UNIQUE, PASSWORD);\n\n doThrow(SQLException.class).when(connection).register(request);\n\n dao.register(request);\n\n verify(controller).connectionFailed();\n }", "public Driver() throws SQLException {\n // Required for Class.forName().newInstance()\n }", "public BDException() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "@Test(timeout = 4000)\n public void test077() throws Throwable {\n ErrorMessages errorMessages0 = new ErrorMessages();\n try { \n DBUtil.format(errorMessages0);\n fail(\"Expecting exception: SQLException\");\n \n } catch(SQLException e) {\n //\n // getObject\n //\n verifyException(\"org.apache.derby.vti.VTITemplate\", e);\n }\n }", "@Test(timeout = 4000)\n public void test081() throws Throwable {\n jdbcConnection jdbcConnection0 = new jdbcConnection((Session) null);\n try { \n DBUtil.prepareStatement((Connection) jdbcConnection0, \"%EmSra)4o>D\", false, 15, 414, 42001);\n fail(\"Expecting exception: SQLException\");\n \n } catch(SQLException e) {\n //\n // java.lang.String@0000000002\n //\n verifyException(\"org.hsqldb.jdbc.Util\", e);\n }\n }", "@Test(timeout = 4000)\n public void test035() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.connect((JDBCConnectData) null, false);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "abstract void execute() throws Exception;", "@Test(timeout = 4000)\n public void test089() throws Throwable {\n Class<Driver> class0 = Driver.class;\n ErrorHandler errorHandler0 = new ErrorHandler(class0);\n // Undeclared exception!\n try { \n DBUtil.runScript(\"Cu#M95}\\bXiOX\\\"4V\", 'K', (Connection) null, false, errorHandler0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.closeResultSetAndStatement((ResultSet) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "public static void main(String[] args) throws ClassNotFoundException, SQLException {\n\t}", "public void m9741j() throws cf {\r\n }", "public interface TargetDAOListener {\n public void beforeOpenConnection() throws InterruptedException;\n\n public void beforeOpenPreparedStatement(Connection connection) throws InterruptedException;\n\n public void beforeExecuteSql(PreparedStatement preparedStatement) throws InterruptedException;\n\n public void afterExecuteSql(PreparedStatement preparedStatement) throws InterruptedException;\n \n public void afterClosePreparedStatement() throws InterruptedException;\n \n public void afterCloseConnection() throws InterruptedException;\n}", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n PipedWriter pipedWriter0 = new PipedWriter();\n PipedReader pipedReader0 = new PipedReader(pipedWriter0);\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(pipedReader0);\n DBCatalog dBCatalog0 = new DBCatalog();\n SQLUtil.ownerDotComponent(dBCatalog0);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n MockFileOutputStream mockFileOutputStream0 = new MockFileOutputStream(\"null\", true);\n // Undeclared exception!\n try { \n DBDataType.getInstance((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.model.DBDataType\", e);\n }\n }", "@Test(timeout = 4000)\n public void test015() throws Throwable {\n jdbcConnection jdbcConnection0 = new jdbcConnection((Session) null);\n // Undeclared exception!\n try { \n DBUtil.queryScalar(\"\", jdbcConnection0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.hsqldb.jdbc.jdbcStatement\", e);\n }\n }", "@Test(timeout = 4000)\n public void test019() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.parseResultSet((ResultSet) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.getConnectData(\"LqxHS(Mc^On8f:aY:94\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No environment definition 'LqxHS(Mc^On8f:aY:94.env.properties' found\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "private DbHandler()\n\t{\n\t\ttry\n\t\t{\n\t\t\t// Check if library exists\n\t\t\tClass.forName(DRIVER_CLASS);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tIO.dbOutF(\"Failed to load the SQLite JDBC Driver.\");\n\t\t}\n\t}", "private static Connection connect() throws SQLException {\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\t \r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:xe\", \"system\", \"1234\");\r\n\t\t\treturn con;\r\n\t\t\r\n\t\t\t \r\n\t\t }\r\n\t catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\nreturn con;\r\n}", "@Test(timeout = 4000)\n public void test014() throws Throwable {\n Class<PGPooledConnection> class0 = PGPooledConnection.class;\n // Undeclared exception!\n try { \n DBUtil.queryScalarArray(\"LONG VARCHAR\", class0, (Connection) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.addRequiredCondition((String) null, (StringBuilder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "protected abstract void execute() throws Exception;", "void mo749s() throws RemoteException;", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n JDBCConnectData jDBCConnectData0 = new JDBCConnectData(\"SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE\", \"SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE\", \"SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE\", \"SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE\");\n try { \n DBUtil.connect(jDBCConnectData0, true);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // Connecting SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE failed: \n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "public DAOException() {\r\n }", "@Test(timeout = 4000)\n public void test094() throws Throwable {\n ErrorMessages errorMessages0 = new ErrorMessages();\n try { \n DBUtil.nextLine(errorMessages0);\n fail(\"Expecting exception: SQLException\");\n \n } catch(SQLException e) {\n //\n // getObject\n //\n verifyException(\"org.apache.derby.vti.VTITemplate\", e);\n }\n }", "public abstract void mo33865a(Throwable th, Throwable th2);", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n DBDataType dBDataType0 = DBDataType.getInstance((-280560843), \"\");\n DefaultDBColumn defaultDBColumn0 = new DefaultDBColumn(\"new org.apache.derby.catalog.TriggerOldTransitionRows() \", (DBTable) null, dBDataType0);\n DBColumn[] dBColumnArray0 = new DBColumn[4];\n dBColumnArray0[0] = (DBColumn) defaultDBColumn0;\n // Undeclared exception!\n try { \n SQLUtil.renderColumnNames(dBColumnArray0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "public DAOException()\r\n {\r\n super();\r\n }", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.query(\"No JDBC URL specified\", (Connection) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "public DataAccessLayerException() {\n }", "@Override\r\n\tpublic void prepare() throws Exception {\n\t\t\r\n\t}", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.parseAndSimplifyResultSet((ResultSet) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "public static void main(String[] unused) throws SQLException {\n Connection connection = SQLConnector.getTestInstance().getConnection();\n\n if (null != connection && !connection.isClosed()) {\n System.out.println(\"Connection successfully established.\");\n } else {\n System.err.println(\"Establishing the connection failed!\");\n }\n\n connection.close();\n }", "void mo750t() throws RemoteException;", "public void execute()\n/* */ throws Pausable, Exception\n/* */ {\n/* 378 */ errNotWoven(this);\n/* */ }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.addRequiredCondition((String) null, (StringBuilder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test038() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.executeUpdate(\"--DAN-438-tmp\", (Connection) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "private void loadDriver() \n\t{\n\t\ttry \n\t\t{\n\t\t\t Class.forName(\"org.postgresql.Driver\");\n\t\t} \n\t\tcatch(ClassNotFoundException cnfe) \n\t\t{\n\t\t\tDBErrorHandler.handle(\"DriverLoad\");\n\t\t}\n\t}", "public void beforeFirst() throws SQLException {\n/* 251 */ notSupported();\n/* */ }", "protected void init() throws SQLException {\n }" ]
[ "0.6439426", "0.6039813", "0.6004582", "0.59263134", "0.578654", "0.5774573", "0.57423645", "0.5662933", "0.56464076", "0.5644028", "0.5612522", "0.5612343", "0.5605312", "0.56033117", "0.5603042", "0.5595582", "0.55925244", "0.55667543", "0.5558146", "0.55413604", "0.5539605", "0.55356055", "0.5532432", "0.55268955", "0.5521044", "0.55202746", "0.551464", "0.5511181", "0.55097467", "0.5508103", "0.5484215", "0.5479106", "0.5478108", "0.5460484", "0.5451503", "0.5451203", "0.5450272", "0.54488957", "0.5446907", "0.54452735", "0.543423", "0.5420973", "0.54208744", "0.54183453", "0.5414027", "0.54071647", "0.53983974", "0.5392277", "0.538705", "0.53697944", "0.536214", "0.5358425", "0.5352646", "0.53489906", "0.534462", "0.53441095", "0.53434026", "0.53299063", "0.53201425", "0.5308871", "0.5306046", "0.52984774", "0.5289029", "0.5287058", "0.52829564", "0.52755964", "0.5272186", "0.5264206", "0.5261584", "0.5255674", "0.5254004", "0.52436477", "0.52404004", "0.5237087", "0.52325964", "0.5226533", "0.52236646", "0.52222764", "0.522102", "0.52206296", "0.521974", "0.5219044", "0.52163184", "0.521251", "0.5212224", "0.5211592", "0.5202439", "0.5201925", "0.51998615", "0.5190448", "0.5190084", "0.51884544", "0.5185204", "0.5172726", "0.5163626", "0.51598054", "0.51584893", "0.5157749", "0.51572824", "0.51550114", "0.51367915" ]
0.0
-1
Write code here that turns the phrase above into concrete actions throw new PendingException();
@When("^Navigate to \"([^\"]*)\" Site$") public void navigate_to_Site(String arg1) throws Throwable { driver = DriverManager.getDriver(); driver.get(arg1); System.out.println("Launched Mercury Tours Site"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Then(\"^the booking is successful$\")\n public void the_booking_is_successful() throws Throwable {\n throw new PendingException();\n }", "@When(\"^I execute my test case$\")\n public void iExecuteMyTestCase() throws Throwable {\n throw new PendingException();\n }", "@Then(\"^I should be presented with a unsuccessful validation alert$\")\n\tpublic void i_should_be_presented_with_a_unsuccessful_validation_alert() throws Throwable {\n\t\tthrow new PendingException();\n\t}", "@Then(\"^the status code is (\\\\d+)$\")\npublic void the_status_code_is(int arg1) throws Throwable {\n throw new PendingException();\n}", "@Then(\"^I should be presented with a successful validation alert$\")\n\tpublic void i_should_be_presented_with_a_successful_validation_alert() throws Throwable {\n\t\tthrow new PendingException();\n\t}", "public interface RoutineException {}", "@Then(\"^My Account button is not present$\")\r\n public void my_Account_button_is_not_present() throws Throwable {\n throw new PendingException();\r\n }", "@Then(\"^user gets login failed error message$\")\r\n public void user_gets_login_failed_error_message() throws Throwable {\n throw new PendingException();\r\n }", "@Given(\"^I an open journey$\")\n public void iAnOpenJourney() throws Throwable {\n throw new PendingException();\n }", "@Then(\"^Post should be created successfully$\")\n\tpublic void post_should_be_created_successfully() throws Throwable {\n\t throw new PendingException();\n\t}", "@Then(\"^I get the same item back$\")\n\tpublic void i_get_the_same_item_back() throws Throwable {\n\t throw new PendingException();\n\t}", "public abstract PendingResult<Status> mo27382b();", "@Then(\"Like counter increases by one\")\n\tpublic void like_counter_increases_by_one() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public boolean performAction(int action) {\n/* 567 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Then(\"DisLike counter increases by one\")\n\tpublic void dis_like_counter_increases_by_one() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@Quando(\"executá-lo$\")\n\tpublic void executáLo() throws Throwable{\n\t\tthrow new PendingException();\n\t}", "@Then(\"^user is successfully registered$\")\r\n public void user_is_successfully_registered() throws Throwable {\n throw new PendingException();\r\n }", "@Given(\"^I launched Math Inventory$\")\n\tpublic void i_launched_Math_Inventory() throws Throwable {\n\t throw new PendingException();\n\t}", "@Then(\"^I should be logged in successfully$\")\n public void iShouldBeLoggedInSuccessfully() throws Throwable {\n throw new PendingException();\n }", "void throwEvents();", "@Then(\"^new type is saved$\")\n public void newTypeIsSaved() throws Throwable {\n throw new PendingException();\n }", "@Then(\"^i should redirected to confirmation page$\")\n public void i_should_redirected_to_confirmation_page() throws Throwable {\n throw new PendingException();\n }", "IntermediateThrowEvent createIntermediateThrowEvent();", "@Then(\"^the user expects to see the Myaccount link$\")\n public void the_user_expects_to_see_the_Myaccount_link() throws Throwable {\n throw new PendingException();\n }", "@Entao(\"^nao sera possivel por falta de estoque$\")\n\tpublic void naoSeraPossivelPorFaltaDeEstoque() throws Throwable {\n\t throw new PendingException();\n\t}", "@Then(\"^the user can view their booking entry$\")\n public void the_user_can_view_their_booking_entry() throws Throwable {\n throw new PendingException();\n }", "@When(\"User clicks Like\")\n\tpublic void user_clicks_like() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public void performValidation() {\n/* 623 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@When(\"je verifie les informations et clique sur Submit Order\")\n\tpublic void je_verifie_les_informations_et_clique_sur_Submit_Order() {\n\t throw new PendingException();\n\t}", "@Ignore\n public void testDisapproveReason() throws Exception {\n\n }", "@When(\"^I modify journey type$\")\n public void iModifyJourneyType() throws Throwable {\n throw new PendingException();\n }", "@When(\"^i input my guest information$\")\n public void i_input_my_guest_information() throws Throwable {\n throw new PendingException();\n }", "@Then(\"meme gets uploaded\")\n\tpublic void meme_gets_uploaded() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@When(\"^user clicks on My Account button$\")\r\n public void user_clicks_on_My_Account_button() throws Throwable {\n throw new PendingException();\r\n }", "@When(\"User clicks disLike\")\n\tpublic void user_clicks_dis_like() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@When(\"User clicks post\")\n\tpublic void user_clicks_post() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@Then(\"Caption gets added to the meme\")\n\tpublic void caption_gets_added_to_the_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@When(\"I click the save button\")\n public void i_click_the_save_button() {\n throw new io.cucumber.java.PendingException();\n }", "@Given(\"User wants to like a meme\")\n\tpublic void user_wants_to_like_a_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public void performCompletion() {\n/* 536 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Then(\"comment gets added to meme\")\n\tpublic void comment_gets_added_to_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public String getSuggestIntentAction() {\n/* 127 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Then(\"je verifie que le message {string} est present.\")\n\tpublic void je_verifie_que_le_message_est_present(String string) {\n\t throw new PendingException();\n\t}", "@When(\"User clicks comment\")\n\tpublic void user_clicks_comment() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@When(\"^customer selecting the new message and verifies the target page$\")\r\n\tpublic void customer_selecting_the_new_message_and_verifies_the_target_page() throws Throwable {\n\t\tthrow new PendingException();\r\n\t}", "@When(\"je clique sur le bouton Valider ma commande\")\n\tpublic void je_clique_sur_le_bouton_Valider_ma_commande() {\n\t throw new PendingException();\n\t}", "@Then(\"^response includes the following in any order$\")\npublic void response_includes_the_following_in_any_order(DataTable arg1) throws Throwable {\n throw new PendingException();\n}", "@Given(\"User wants to rate a meme\")\n\tpublic void user_wants_to_rate_a_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "void failed (Exception e);", "@Override\n protected void triggerNextIteration() throws IllegalActionException {\n }", "@Given(\"User is uploading a meme\")\n\tpublic void user_is_uploading_a_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public void cancel() {\n/* 170 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Given(\"^User exists with an \\\"([^\\\"]*)\\\"$\")\npublic void user_exists_with_an(String arg1) throws Throwable {\n throw new PendingException();\n}", "@Então(\"o teste vai funcionar\")\n\tpublic void oTesteVaiFuncionar() {\n\t throw new cucumber.api.PendingException();\n\t}", "@When(\"User clicks Caption\")\n\tpublic void user_clicks_caption() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@Given(\"User wants to comment on a meme\")\n\tpublic void user_wants_to_comment_on_a_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public interface IAction {\n public boolean runAction() throws IOException, BrokenBarrierException, InterruptedException;\n}", "@DefaultMessage(\"Your Lock on this record has expired; Please abort and try again\")\n @Key(\"gen.expiredLockException\")\n String gen_expiredLockException();", "@When(\"^I push another item into the stack$\")\n\tpublic void i_push_another_item_into_the_stack() throws Throwable {\n\t throw new PendingException();\n\t}", "@Override\n protected void triggerFirstIteration() throws IllegalActionException {\n }", "@Given(\"User wants to dislike a meme\")\n\tpublic void user_wants_to_dislike_a_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@When(\"^i press login$\")\r\n\tpublic void i_press_login() throws Throwable {\n\t throw new PendingException();\r\n\t}", "@Given(\"I come in to the bar\")\r\n public void i_come_in_to_the_bar() {\n System.out.println(\"@Given: Entro al bar\");\r\n //throw new io.cucumber.java.PendingException();\r\n }", "public void doSomething(String input) throws MyBusinessException {\n // code ...\n }", "@Given(\"User wants to upload meme\")\n\tpublic void user_wants_to_upload_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@Then(\"^click the login button$\")\n public void click_the_login_button() throws Throwable {\n throw new PendingException();\n }", "@When(\"je verifie le montant des frais de port et clique sur suivant\")\n\tpublic void je_verifie_le_montant_des_frais_de_port_et_clique_sur_suivant() {\n\t throw new PendingException();\n\t}", "public void doTheFaultyThing();", "@When(\"^user clicks on Register button$\")\r\n public void user_clicks_on_Register_button() throws Throwable {\n throw new PendingException();\r\n }", "@When(\"I add that menu item\")\n public void i_add_that_menu_item() {\n throw new io.cucumber.java.PendingException();\n }", "@And(\"^I see only the pets with the status \\\"([^\\\"]*)\\\"$\")\n public void iSeeOnlyThePetsWithTheStatus(String arg0) throws Throwable {\n throw new PendingException();\n }", "@Given(\"^customer open the application$\")\r\n\tpublic void customer_open_the_application() throws Throwable {\n\r\n\t\tSystem.out.println(\"my scripts are execting\");\r\n\t\tthrow new PendingException();\r\n\t}", "public void illegalMove(){\r\n //Taken care of in view?\n \t//throw new RuntimeException(\"this is a illegal move\");\r\n }", "@Then(\"^Validar registro de usuario$\")\n\tpublic void validar_registro_de_usuario() throws Exception {\n\t throw new PendingException();\n\t}", "@Test\n void buildTaskEventWrongCode() {\n String args = \"do CS2103 project (at: FOREVER IT NEVER STOPS)\";\n assertThrows(DukeIoException.class, () -> Storage.buildTask(\"F\", args, true));\n }", "void illegalCommand(final String reason);", "public BadAction(Action... actions) throws ActionFinishedException {\n\t\tsuper(actions);\n\t}", "public int getEventCode() {\n/* 41 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@When(\"User enters a Caption\")\n\tpublic void user_enters_a_caption() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@Then(\"^user is on Your Account page$\")\r\n public void user_is_on_Your_Account_page() throws Throwable {\n throw new PendingException();\r\n }", "ThrowingEvent createThrowingEvent();", "@RequiresLock(\"SeaLock\")\r\n protected void dependentInvalidAction() {\r\n // by default do nothing\r\n }", "void mo57276a(Exception exc);", "public void throwException()\n\t{\n\t\tthrow new RuntimeException(\"Dummy RUNTIME Exception\");\n\t}", "@When(\"^user see the message \\\"(.*?)\\\"$\")\n public void user_see_the_message(String arg1) throws Throwable {\n throw new PendingException();\n }", "public interface Thrower {\n\n String throwing();\n}", "@When(\"^click the submit button$\")\n public void click_the_submit_button() throws Throwable {\n \tSystem.out.println(\"click the button\");\n //throw new PendingException();\n }", "@Test(expected = WorkflowExecutionException.class)\n public void testExecuteWorkflowExecutionException() {\n action.execute(state);\n action.execute(state);\n }", "public BuildInterruptedException() {\n }", "void failure(ServiceExecutionEvent e) {\n\n }", "public void methodA() throws RuntimeException {\n }", "@Override\r\n\tpublic void doException() {\n\r\n\t}", "@When(\"^I pop from the stack$\")\n\tpublic void i_pop_from_the_stack() throws Throwable {\n\t throw new PendingException();\n\t}", "public OutOfBoundException() {\n super(\"Task does not exist. Please send a correct task number ><\");\n }", "@When(\"^I enter a invalid password$\")\n\tpublic void i_enter_a_invalid_password() throws Throwable {\n\t\tthrow new PendingException();\n\t}", "public FaultException raise(Throwable e);", "public void pending()\n\t{\n\t\tdriver.findElementByName(OR.getProperty(\"Pending\")).click();\n\t}", "@And(\"I enter the other fields with valid data\")\n public void i_enter_the_other_fields_with_valid_data() {\n throw new io.cucumber.java.PendingException();\n }", "public interface ThrowingRunnable {\n\n void run() throws Throwable;\n }", "@When(\"^the checkin date is $\")\n public void the_checkin_date_is() throws Throwable {\n throw new PendingException();\n }", "public ScheduleException() {\r\n }" ]
[ "0.66780454", "0.65141594", "0.6401435", "0.6346158", "0.6301794", "0.620927", "0.6132123", "0.6110179", "0.6037908", "0.603113", "0.599397", "0.5983267", "0.59585106", "0.5947061", "0.5945196", "0.5944265", "0.5869944", "0.5865269", "0.58456486", "0.58419645", "0.58319396", "0.5818693", "0.5804338", "0.5802529", "0.5783624", "0.57430136", "0.5721718", "0.5700279", "0.5697905", "0.56964684", "0.56786066", "0.56775606", "0.5653049", "0.5622099", "0.56107044", "0.56026876", "0.558756", "0.55760497", "0.55737925", "0.55625695", "0.5546616", "0.55451584", "0.5538248", "0.553636", "0.55284363", "0.55214363", "0.5511664", "0.550466", "0.5499826", "0.5492048", "0.548635", "0.54752946", "0.54744476", "0.5467045", "0.544115", "0.5440062", "0.5436893", "0.5423161", "0.54189646", "0.54142165", "0.5404316", "0.5402294", "0.53914183", "0.538973", "0.53882", "0.53793454", "0.5375611", "0.53750366", "0.53706115", "0.5370157", "0.53617287", "0.5356248", "0.53520286", "0.5349113", "0.5347312", "0.53435636", "0.53380585", "0.53372484", "0.5324285", "0.5323236", "0.53221107", "0.5319708", "0.531853", "0.53160214", "0.5305338", "0.5287119", "0.5279302", "0.5277153", "0.52749527", "0.52713746", "0.52696943", "0.5266856", "0.52655506", "0.5264436", "0.5264125", "0.5258516", "0.5256997", "0.52569926", "0.52521163", "0.52499855", "0.5241427" ]
0.0
-1
Write code here that turns the phrase above into concrete actions throw new PendingException();
@Then("^Close Browser$") public void close_Browser(DataTable dt) throws Throwable { System.out.println(dt.getGherkinRows().size()); System.out.println(dt.getGherkinRows().get(0).getCells()); System.out.println(dt.getGherkinRows().get(1).getCells()); DriverManager.killDriverInstance(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Then(\"^the booking is successful$\")\n public void the_booking_is_successful() throws Throwable {\n throw new PendingException();\n }", "@When(\"^I execute my test case$\")\n public void iExecuteMyTestCase() throws Throwable {\n throw new PendingException();\n }", "@Then(\"^I should be presented with a unsuccessful validation alert$\")\n\tpublic void i_should_be_presented_with_a_unsuccessful_validation_alert() throws Throwable {\n\t\tthrow new PendingException();\n\t}", "@Then(\"^the status code is (\\\\d+)$\")\npublic void the_status_code_is(int arg1) throws Throwable {\n throw new PendingException();\n}", "@Then(\"^I should be presented with a successful validation alert$\")\n\tpublic void i_should_be_presented_with_a_successful_validation_alert() throws Throwable {\n\t\tthrow new PendingException();\n\t}", "public interface RoutineException {}", "@Then(\"^My Account button is not present$\")\r\n public void my_Account_button_is_not_present() throws Throwable {\n throw new PendingException();\r\n }", "@Then(\"^user gets login failed error message$\")\r\n public void user_gets_login_failed_error_message() throws Throwable {\n throw new PendingException();\r\n }", "@Given(\"^I an open journey$\")\n public void iAnOpenJourney() throws Throwable {\n throw new PendingException();\n }", "@Then(\"^Post should be created successfully$\")\n\tpublic void post_should_be_created_successfully() throws Throwable {\n\t throw new PendingException();\n\t}", "@Then(\"^I get the same item back$\")\n\tpublic void i_get_the_same_item_back() throws Throwable {\n\t throw new PendingException();\n\t}", "public abstract PendingResult<Status> mo27382b();", "@Then(\"Like counter increases by one\")\n\tpublic void like_counter_increases_by_one() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public boolean performAction(int action) {\n/* 567 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Then(\"DisLike counter increases by one\")\n\tpublic void dis_like_counter_increases_by_one() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@Quando(\"executá-lo$\")\n\tpublic void executáLo() throws Throwable{\n\t\tthrow new PendingException();\n\t}", "@Then(\"^user is successfully registered$\")\r\n public void user_is_successfully_registered() throws Throwable {\n throw new PendingException();\r\n }", "@Given(\"^I launched Math Inventory$\")\n\tpublic void i_launched_Math_Inventory() throws Throwable {\n\t throw new PendingException();\n\t}", "@Then(\"^I should be logged in successfully$\")\n public void iShouldBeLoggedInSuccessfully() throws Throwable {\n throw new PendingException();\n }", "void throwEvents();", "@Then(\"^new type is saved$\")\n public void newTypeIsSaved() throws Throwable {\n throw new PendingException();\n }", "@Then(\"^i should redirected to confirmation page$\")\n public void i_should_redirected_to_confirmation_page() throws Throwable {\n throw new PendingException();\n }", "IntermediateThrowEvent createIntermediateThrowEvent();", "@Then(\"^the user expects to see the Myaccount link$\")\n public void the_user_expects_to_see_the_Myaccount_link() throws Throwable {\n throw new PendingException();\n }", "@Entao(\"^nao sera possivel por falta de estoque$\")\n\tpublic void naoSeraPossivelPorFaltaDeEstoque() throws Throwable {\n\t throw new PendingException();\n\t}", "@Then(\"^the user can view their booking entry$\")\n public void the_user_can_view_their_booking_entry() throws Throwable {\n throw new PendingException();\n }", "@When(\"User clicks Like\")\n\tpublic void user_clicks_like() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public void performValidation() {\n/* 623 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@When(\"je verifie les informations et clique sur Submit Order\")\n\tpublic void je_verifie_les_informations_et_clique_sur_Submit_Order() {\n\t throw new PendingException();\n\t}", "@Ignore\n public void testDisapproveReason() throws Exception {\n\n }", "@When(\"^I modify journey type$\")\n public void iModifyJourneyType() throws Throwable {\n throw new PendingException();\n }", "@When(\"^i input my guest information$\")\n public void i_input_my_guest_information() throws Throwable {\n throw new PendingException();\n }", "@Then(\"meme gets uploaded\")\n\tpublic void meme_gets_uploaded() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@When(\"^user clicks on My Account button$\")\r\n public void user_clicks_on_My_Account_button() throws Throwable {\n throw new PendingException();\r\n }", "@When(\"User clicks disLike\")\n\tpublic void user_clicks_dis_like() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@When(\"User clicks post\")\n\tpublic void user_clicks_post() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@Then(\"Caption gets added to the meme\")\n\tpublic void caption_gets_added_to_the_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@When(\"I click the save button\")\n public void i_click_the_save_button() {\n throw new io.cucumber.java.PendingException();\n }", "@Given(\"User wants to like a meme\")\n\tpublic void user_wants_to_like_a_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public void performCompletion() {\n/* 536 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Then(\"comment gets added to meme\")\n\tpublic void comment_gets_added_to_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public String getSuggestIntentAction() {\n/* 127 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Then(\"je verifie que le message {string} est present.\")\n\tpublic void je_verifie_que_le_message_est_present(String string) {\n\t throw new PendingException();\n\t}", "@When(\"User clicks comment\")\n\tpublic void user_clicks_comment() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@When(\"^customer selecting the new message and verifies the target page$\")\r\n\tpublic void customer_selecting_the_new_message_and_verifies_the_target_page() throws Throwable {\n\t\tthrow new PendingException();\r\n\t}", "@When(\"je clique sur le bouton Valider ma commande\")\n\tpublic void je_clique_sur_le_bouton_Valider_ma_commande() {\n\t throw new PendingException();\n\t}", "@Then(\"^response includes the following in any order$\")\npublic void response_includes_the_following_in_any_order(DataTable arg1) throws Throwable {\n throw new PendingException();\n}", "@Given(\"User wants to rate a meme\")\n\tpublic void user_wants_to_rate_a_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "void failed (Exception e);", "@Override\n protected void triggerNextIteration() throws IllegalActionException {\n }", "@Given(\"User is uploading a meme\")\n\tpublic void user_is_uploading_a_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public void cancel() {\n/* 170 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Given(\"^User exists with an \\\"([^\\\"]*)\\\"$\")\npublic void user_exists_with_an(String arg1) throws Throwable {\n throw new PendingException();\n}", "@Então(\"o teste vai funcionar\")\n\tpublic void oTesteVaiFuncionar() {\n\t throw new cucumber.api.PendingException();\n\t}", "@When(\"User clicks Caption\")\n\tpublic void user_clicks_caption() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@Given(\"User wants to comment on a meme\")\n\tpublic void user_wants_to_comment_on_a_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public interface IAction {\n public boolean runAction() throws IOException, BrokenBarrierException, InterruptedException;\n}", "@DefaultMessage(\"Your Lock on this record has expired; Please abort and try again\")\n @Key(\"gen.expiredLockException\")\n String gen_expiredLockException();", "@When(\"^I push another item into the stack$\")\n\tpublic void i_push_another_item_into_the_stack() throws Throwable {\n\t throw new PendingException();\n\t}", "@Override\n protected void triggerFirstIteration() throws IllegalActionException {\n }", "@Given(\"User wants to dislike a meme\")\n\tpublic void user_wants_to_dislike_a_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@When(\"^i press login$\")\r\n\tpublic void i_press_login() throws Throwable {\n\t throw new PendingException();\r\n\t}", "@Given(\"I come in to the bar\")\r\n public void i_come_in_to_the_bar() {\n System.out.println(\"@Given: Entro al bar\");\r\n //throw new io.cucumber.java.PendingException();\r\n }", "public void doSomething(String input) throws MyBusinessException {\n // code ...\n }", "@Given(\"User wants to upload meme\")\n\tpublic void user_wants_to_upload_meme() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@Then(\"^click the login button$\")\n public void click_the_login_button() throws Throwable {\n throw new PendingException();\n }", "@When(\"je verifie le montant des frais de port et clique sur suivant\")\n\tpublic void je_verifie_le_montant_des_frais_de_port_et_clique_sur_suivant() {\n\t throw new PendingException();\n\t}", "public void doTheFaultyThing();", "@When(\"^user clicks on Register button$\")\r\n public void user_clicks_on_Register_button() throws Throwable {\n throw new PendingException();\r\n }", "@When(\"I add that menu item\")\n public void i_add_that_menu_item() {\n throw new io.cucumber.java.PendingException();\n }", "@And(\"^I see only the pets with the status \\\"([^\\\"]*)\\\"$\")\n public void iSeeOnlyThePetsWithTheStatus(String arg0) throws Throwable {\n throw new PendingException();\n }", "@Given(\"^customer open the application$\")\r\n\tpublic void customer_open_the_application() throws Throwable {\n\r\n\t\tSystem.out.println(\"my scripts are execting\");\r\n\t\tthrow new PendingException();\r\n\t}", "public void illegalMove(){\r\n //Taken care of in view?\n \t//throw new RuntimeException(\"this is a illegal move\");\r\n }", "@Then(\"^Validar registro de usuario$\")\n\tpublic void validar_registro_de_usuario() throws Exception {\n\t throw new PendingException();\n\t}", "@Test\n void buildTaskEventWrongCode() {\n String args = \"do CS2103 project (at: FOREVER IT NEVER STOPS)\";\n assertThrows(DukeIoException.class, () -> Storage.buildTask(\"F\", args, true));\n }", "void illegalCommand(final String reason);", "public BadAction(Action... actions) throws ActionFinishedException {\n\t\tsuper(actions);\n\t}", "public int getEventCode() {\n/* 41 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@When(\"User enters a Caption\")\n\tpublic void user_enters_a_caption() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@Then(\"^user is on Your Account page$\")\r\n public void user_is_on_Your_Account_page() throws Throwable {\n throw new PendingException();\r\n }", "ThrowingEvent createThrowingEvent();", "@RequiresLock(\"SeaLock\")\r\n protected void dependentInvalidAction() {\r\n // by default do nothing\r\n }", "void mo57276a(Exception exc);", "public void throwException()\n\t{\n\t\tthrow new RuntimeException(\"Dummy RUNTIME Exception\");\n\t}", "@When(\"^user see the message \\\"(.*?)\\\"$\")\n public void user_see_the_message(String arg1) throws Throwable {\n throw new PendingException();\n }", "public interface Thrower {\n\n String throwing();\n}", "@Test(expected = WorkflowExecutionException.class)\n public void testExecuteWorkflowExecutionException() {\n action.execute(state);\n action.execute(state);\n }", "@When(\"^click the submit button$\")\n public void click_the_submit_button() throws Throwable {\n \tSystem.out.println(\"click the button\");\n //throw new PendingException();\n }", "public BuildInterruptedException() {\n }", "public void methodA() throws RuntimeException {\n }", "void failure(ServiceExecutionEvent e) {\n\n }", "@Override\r\n\tpublic void doException() {\n\r\n\t}", "@When(\"^I pop from the stack$\")\n\tpublic void i_pop_from_the_stack() throws Throwable {\n\t throw new PendingException();\n\t}", "public OutOfBoundException() {\n super(\"Task does not exist. Please send a correct task number ><\");\n }", "@When(\"^I enter a invalid password$\")\n\tpublic void i_enter_a_invalid_password() throws Throwable {\n\t\tthrow new PendingException();\n\t}", "public FaultException raise(Throwable e);", "public void pending()\n\t{\n\t\tdriver.findElementByName(OR.getProperty(\"Pending\")).click();\n\t}", "@And(\"I enter the other fields with valid data\")\n public void i_enter_the_other_fields_with_valid_data() {\n throw new io.cucumber.java.PendingException();\n }", "public interface ThrowingRunnable {\n\n void run() throws Throwable;\n }", "@When(\"^the checkin date is $\")\n public void the_checkin_date_is() throws Throwable {\n throw new PendingException();\n }", "public ScheduleException() {\r\n }" ]
[ "0.6677174", "0.6513673", "0.64008087", "0.63447237", "0.6301511", "0.62088287", "0.6130419", "0.6109835", "0.60362107", "0.6031433", "0.5994029", "0.5982437", "0.5957016", "0.5946188", "0.59437114", "0.5943646", "0.5869198", "0.5863756", "0.58459616", "0.5840422", "0.5830778", "0.5817747", "0.5803021", "0.58017975", "0.57840204", "0.5742469", "0.5720085", "0.569886", "0.5697503", "0.56964064", "0.5677534", "0.5675964", "0.5652353", "0.5620711", "0.56091356", "0.5601988", "0.558665", "0.55737233", "0.5572185", "0.5561688", "0.55453503", "0.55430084", "0.5537736", "0.5534956", "0.5528027", "0.55207694", "0.5510614", "0.5502949", "0.54989666", "0.54913896", "0.5485383", "0.5473659", "0.54724646", "0.5466122", "0.54401505", "0.5438768", "0.5435819", "0.5422221", "0.54190224", "0.5414256", "0.5402597", "0.54022264", "0.5389227", "0.53886503", "0.5387189", "0.5378695", "0.53758526", "0.5373925", "0.536871", "0.53685236", "0.5361632", "0.5354672", "0.5351691", "0.5348605", "0.5347607", "0.53415036", "0.5337573", "0.53354865", "0.5323556", "0.53229964", "0.53206587", "0.53197145", "0.5318138", "0.5315885", "0.5304522", "0.52867746", "0.52781916", "0.52777636", "0.5274829", "0.52699995", "0.5269363", "0.5267161", "0.52654845", "0.52629036", "0.5262374", "0.5257506", "0.5255556", "0.5255472", "0.5253076", "0.52497524", "0.5241191" ]
0.0
-1
When a server is created it creates a HashMap to allocate all users data.
public Server(){ users = new HashMap<String, Vector<Integer>>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void init() {\n\t\tuserDatabase = new HashMap<String, User>();\n\t}", "private static void initializeServerThreadSocketMapping()\n\t{\n\t\tthreadSocketMap = new HashMap<Thread, InterruptibleRMIServerSideSocket>();\n\t\tsocketThreadMap = new HashMap<InterruptibleRMIServerSideSocket, Thread>();\n\t}", "private ServerModel() {\n this.users = new HashMap<>();\n this.authTokens = new HashMap<>();\n this.gameListClients = new HashSet<>();\n this.waitingGames = null;\n this.activeGames = new HashMap<>();\n this.sessionCommandQueue = new HashMap<>();\n this.persistenceFacade = new PersistenceFacade();\n addComputerPlayer();\n\n /* Timer timer = new Timer();\n int HOUR = 3600000; //3,600,000 milliseconds in one hour\n timer.schedule(new ExpireAuthsTask(), 0, HOUR); */\n }", "public Server(int clientNumber) {\r\n this.clientNumber = clientNumber;\r\n hashtable = new Hashtable<String,String>();\r\n }", "public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public ServerMap(int nameServerPort) {\n servers = new HashMap<String, Server>();\n this.nameServerPort = nameServerPort;\n nameServer = new Server(ComsFormat.nameserver_hostname\n , ComsFormat.nameserver_ip, nameServerPort);\n }", "public static HashMap<Long, User> userMapInit() {\n HashMap<Long, User> userMap = new HashMap<Long, User>();\n\n\n User user = UserFactory.getNewUser(\"firstName\", \"secondName\");\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"firstN1\", \"secondN1\", \"88005553535\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"first2\", \"second2\", \"890006662525\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"fir3\", \"sec3\", \"72563698562\"));\n userMap.put(user.getId(), user);\n\n user = UserFactory.getNewUser(\"firstN1\", \"secondN1\");\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"sfg\", \"gdsfg\", \"88005693599\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"asdfdsf\", \"secovbnd2\", \"890006662577\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"bbbbb\", \"nbvnbn\", \"72563698588\"));\n userMap.put(user.getId(), user);\n\n user = UserFactory.getNewUser(\"first2\", \"second2\");\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"sfg\", \"gdsfg\", \"88005693599\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"asdfdsf\", \"secovbnd2\", \"890006662577\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"bb\", \"nb\", \"72563698588\"));\n userMap.put(user.getId(), user);\n\n user = UserFactory.getNewUser(\"fir3\", \"sec3\");\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"asdfdsf\", \"secovbnd2\", \"890006662577\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"firstN1\", \"secondN1\", \"88005553535\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"sfg\", \"gdsfg\", \"88005693599\"));\n userMap.put(user.getId(), user);\n\n return userMap;\n }", "public Server() {\r\n this(0);\r\n hashtable = new Hashtable<String,String>();\r\n }", "private IdServer() {\n\t\t//System.out.println(\"Creating new instance of ID Server!\");\n\t\tclientIDCounter = 1;\n\t\tmemberIDCounter = 1;\n\t\tticketIdCounter = 1;\n\t}", "public SharedData(ConcurrentHashMap<String, User> userMap) {\n this.mapOfLoggedInUsersByConnectedIds = new ConcurrentHashMap<>();\n this.mapOfRegisteredUsersByUsername = userMap;\n }", "private void initServer() throws IOException {\r\n \t\tLogger.logMessage(\"Binding Server to \" + this.serverIpAddress + \":\" + this.serverPort);\r\n \r\n \t\tthis.isAlive = true;\r\n \t\tthis.serverSocket = new ServerSocket(this.serverPort, this.backLog, this.serverIpAddress);\r\n \t\tthis.dataLayer = DataLayerFactory.getDataLayer();\r\n \r\n \t\t// Generate the grouplist\r\n \t\tCollection<String> dbGroupList = this.dataLayer.getGroups();\r\n \r\n \t\tfor (String group : dbGroupList) {\r\n \t\t\tthis.groupList.addGroup(group);\r\n \t\t}\r\n \r\n \t\tLogger.logMessage(\"Server successfuly bound!\");\r\n \t}", "private static void setupServerContext(){\n\n serverContext.set(new ServerContext());\n serverContext.get().bgThreadIds = new int[GlobalContext.getNumTotalBgThreads()];\n serverContext.get().numShutdownBgs = 0;\n serverContext.get().serverObj = new Server();\n\n }", "public Server()\n\t{\n\t\tusers = new ArrayList<User>();\n\t\tdepartments = new ArrayList<Department>();\n\t\ttokenGenerator = new Random(System.currentTimeMillis());\n\t}", "private void initData() {\n requestServerToGetInformation();\n }", "protected void buildServerInfoStore() {\n\n if (serverInfoStore != null)\n return;\n\n serverInfoStore = new DefaultVOMSServerInfoStore.Builder()\n .lookupStrategy(vomsesLookupStrategy).storeListener(storeListener)\n .vomsesPaths(vomsesLocations).build();\n }", "public Server(int port) {\n \ttry{\n \t\tserver = new ServerSocket(port);\n \t\tuserMap = new HashMap<Integer, User>();\n \t\troomMap = new HashMap<String, Channel>();\n \t\tnextId = 0;\n \t}\n \tcatch(Exception e){\n \t\te.printStackTrace(); \t\t\n \t}\n }", "public Server()\n {\n clientSessions = new ArrayList();\n }", "private final void initializeCache() {\r\n try {\r\n UserIndex index = makeUserIndex(this.dbManager.getUserIndex());\r\n for (UserRef ref : index.getUserRef()) {\r\n String email = ref.getEmail();\r\n String userString = this.dbManager.getUser(email);\r\n User user = makeUser(userString);\r\n this.updateCache(user);\r\n }\r\n }\r\n catch (Exception e) {\r\n server.getLogger().warning(\"Failed to initialize users \" + StackTrace.toString(e));\r\n }\r\n }", "@Override\n public boolean onCreate() {\n SetMyCaseMaps();\n myKeys = new HashMap<String, String>();\n TelephonyManager tel = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE);\n String portStr = tel.getLine1Number().substring(tel.getLine1Number().length() - 4);\n localport = String.valueOf(Integer.parseInt(portStr));\n\n try {\n ServerSocket serverSocket = new ServerSocket(SERVER_PORT);\n new ServerTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, serverSocket);\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(TAG, \"Can't create a ServerSocket\");\n return false;\n }\n new NodeJoinTask().executeOnExecutor(AsyncTask.SERIAL_EXECUTOR);\n return false;\n }", "public void registerWithServer();", "public synchronized void insertUser(String username) {\n \n if(this.capacity < max_capacity) {\n \n /* Genero la coda dei messaggi offline */\n BlockingQueue<Message> messageQueue = new LinkedBlockingQueue<Message>();\n \n /* Inserisco utente e la sua coda nella HashMap */\n usersList.put(username, messageQueue);\n \n /* Nuovo utente servito */\n capacity++;\n \n System.out.println(\"GOSSIP System: \"+username+\" assigned to Proxy \"+\n id+\"@\"+address+\":\"+port+\" [Capacity: \"+max_capacity+\n \"][Available: \"+(max_capacity-capacity)+\"]\");\n }\n }", "public void buildMap(){\n this.map = new HashMap<String, String>();\n map.put(\"user\", \"user\");\n map.put(\"pw\", \"pass\");\n map.put(\"quit\", \"quit\");\n map.put(\"features\", \"feat\");\n map.put(\"cd\", \"cwd\");\n map.put(\"dir\", \"list\");\n map.put(\"get\", \"retr\");\n }", "public BasicServerMetricsListener() {\n myServerMetrics = new ConcurrentHashMap<String, BasicServerMetrics>();\n }", "public InMemoryServiceInstancePersistence() {\n this.serviceInstances = new HashMap<>(); \n }", "public User() {\r\n\t\temployee=new HashMap<Integer, Employee>();\r\n\t\tperformance=new HashMap<Employee,String>();\r\n\t}", "private AeRegistration() {\n\t\tnotifications = new HashMap<String, List<JSONObject>>();\n\t\tsubscriptions = new HashMap<String,String>();\n\t\tsubscribedToResourcesSet = new HashMap<String,String>();\n\t\tsubscriptionsPerSessions = new HashMap<String, Set<String>>();\n\t}", "private final void configureKeys() {\n\t\t// SecretServer's public key\n\t\tString line = ComMethods.getValueFor(\"SecretServer\", pubkeysfn);\n\t\tint x = line.indexOf(',');\n\t\tmy_n = new BigInteger(line.substring(0,x));\n\t\tmy_e = new Integer(line.substring(x+1,line.length()));\n\n\t\t// SecretServer's private key\n\t\tline = ComMethods.getValueFor(\"SecretServer\", privkeysfn);\n\t\tx = line.indexOf(',');\n\t\tmy_d = new BigInteger(line.substring(x+1,line.length()));\n\n\t\t// Public keys for all registered Users\n\t\tusersPubKeys1 = new BigInteger[validUsers.length];\n\t\tusersPubKeys2 = new int[validUsers.length];\n\t\tfor (int i=0; i<validUsers.length; i++) {\n\t\t\tline = ComMethods.getValueFor(validUsers[i], pubkeysfn);\n\t\t\tx = line.indexOf(',');\n\t\t\tusersPubKeys1[i] = new BigInteger(line.substring(0,x));\n\t\t\tusersPubKeys2[i] = new Integer(line.substring(x+1,line.length()));\n\t\t}\n\t}", "public void requestServerData() throws IOException {\n Iterator it = gameServers.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry<InetSocketAddress, GameServer> pair = (Map.Entry) it.next();\n pair.getValue().requestAll();\n }\n }", "public UserManager(Server server) {\r\n this.server = server;\r\n this.dbManager = (DbManager)this.server.getContext().getAttributes().get(\"DbManager\");\r\n try {\r\n this.jaxbContext = \r\n JAXBContext.newInstance(\r\n org.hackystat.sensorbase.resource.users.jaxb.ObjectFactory.class);\r\n loadDefaultUsers(); //NOPMD it's throwing a false warning. \r\n initializeCache(); //NOPMD \r\n initializeAdminUser(); //NOPMD\r\n }\r\n catch (Exception e) {\r\n String msg = \"Exception during UserManager initialization processing\";\r\n server.getLogger().warning(msg + \"\\n\" + StackTrace.toString(e));\r\n throw new RuntimeException(msg, e);\r\n }\r\n }", "public void listen(){\n \ttry{ \t\t\n \t\twhile(true){\n \t \t\tSocket socket = server.accept();\n \t \t\tString nickname = new String(\"Guest_\" + String.valueOf(nextId));\n \t \t\t\n \t \t\t// Create a server connection and connect it to the appropriate user.\n \t \t\tServerConnection userConnection = new ServerConnection(nextId, socket, this);\n \t \t\tUser user = new User(nextId, nickname, userConnection);\n \t \t\tuserConnection.setUser(user);\n \t \t\t\n \t \t\tsynchronized(userMap){\n \t \t\t\tuserMap.put(nextId, user);\n \t \t\t}\n \t \t\t// Send a response that connection was successful;\n \t \t\tuserConnection.sendMessage(new Message(Command.REPLY_SUCCESS, \"\", Calendar.getInstance(), \"\"));\n \t \t\t\n \t \t\tnextId++;\n \t\t}\n \t}\n \tcatch(IOException e){\n \t\te.printStackTrace();\n \t}\n }", "public void setup_servers()\n {\n // get ServerInfo\n ServerInfo t = new ServerInfo();\n // all 3 servers\n for(int i=0;i<3;i++)\n {\n // get the server IP and port info\n String t_ip = t.hmap.get(i).ip;\n int t_port = Integer.valueOf(t.hmap.get(i).port);\n Thread x = new Thread()\n {\n public void run()\n {\n try\n {\n Socket s = new Socket(t_ip,t_port);\n // SockHandle instance with svr_hdl true and rx_hdl false as this is the socket initiator\n SockHandle t = new SockHandle(s,my_ip,my_port,my_c_id,c_list,s_list,false,true,cnode);\n }\n catch (UnknownHostException e) \n {\n \tSystem.out.println(\"Unknown host\");\n \tSystem.exit(1);\n } \n catch (IOException e) \n {\n \tSystem.out.println(\"No I/O\");\n e.printStackTrace(); \n \tSystem.exit(1);\n }\n }\n };\n \n x.setDaemon(true); \t// terminate when main ends\n x.setName(\"Client_\"+my_c_id+\"_SockHandle_to_Server\"+i);\n x.start(); \t\t\t// start the thread\n }\n }", "public void createReplicatedObjectsPolicy(){\n\t\t\n\t\tIterator<String> it = serverList.keySet().iterator();\n\t\twhile(it.hasNext()){\n\t\t\tString serverId = it.next();\n\t\t\t//System.out.println(\"Server ID: \" + serverId);\n\t\t\tASPolicyMap.put(serverId, new AppServerPolicy());\n\t\t}\n\t\t\n\t\tIterator<CacheObject> cit = candidateReplicationList.iterator();\n\t\t\n\t\twhile(cit.hasNext()){\n\t\t\t\n\t\t\tCacheObject ct = cit.next();\n\t\t\tIterator<String> itemp = serverList.keySet().iterator();\n\t\t\twhile(itemp.hasNext()){\n\t\t\t\tString serverId = itemp.next();\n\t\t\t\tRuleList rl = new RuleList(serverId, RuleList.REPLICATE, RuleList.STABLE_TTL, new ArrayList<String>(serverList.keySet()));\n\t\t\t\tListKey lk = new ListKey();\n\t\t\t\tlk.addtoListKey(ct.cacheKey);\n\t\t\t\tASPolicyMap.get(serverId).addNewPolicy(lk, rl);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public static Map<String, Object> initUser() {\n\n Map<String, Object> user = new HashMap<String, Object>();\n Map<String, Object> tone = new HashMap<String, Object>();\n\n Map<String, Object> emotionTone = new HashMap<String, Object>();\n emotionTone.put(\"current\", null);\n\n Map<String, Object> socialTone = new HashMap<String, Object>();\n socialTone.put(\"current\", null);\n\n Map<String, Object> languageTone = new HashMap<String, Object>();\n languageTone.put(\"current\", null);\n\n tone.put(\"emotion\", emotionTone);\n tone.put(\"social\", socialTone);\n tone.put(\"language\", languageTone);\n\n user.put(\"tone\", tone);\n\n return user;\n }", "public ServerService(){\n\t\tlogger.info(\"Initilizing the ServerService\");\n\t\tservers.put(1001, new Server(1001, \"Test Server1\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1002, new Server(1002, \"Test Server2\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1003, new Server(1003, \"Test Server3\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1004, new Server(1004, \"Test Server4\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tlogger.info(\"Initilizing the ServerService Done\");\n\t}", "public void createHashMap() {\n myList = new HashMap<>();\n scrabbleList = new HashMap<>();\n }", "private void registerUserOnServer() throws IOException {\r\n\t\tdataSending.sendMessage(Server.REGISTER+\" \"+userName, Long.toString(userModel.ID));\r\n\t}", "@Override\n public void process() {\n Simulator.allocateServer(c);\n }", "public SimpleDataStore () {\n\t\tmessageMap = new HashMap<String , List<Message>>() ;\n\t}", "private void generateMaps() {\r\n\t\tthis.tablesLocksMap = new LinkedHashMap<>();\r\n\t\tthis.blocksLocksMap = new LinkedHashMap<>();\r\n\t\tthis.rowsLocksMap = new LinkedHashMap<>();\r\n\t\tthis.waitMap = new LinkedHashMap<>();\r\n\t}", "@Override\n public void create() {\n theMap = new ObjectSet<>(2048, 0.5f);\n generate();\n }", "public static void main(String[] args) throws Exception {\n\t\tURL path = Server.class.getResource(\"user_pass.txt\");\r\n\t\tSystem.out.println(path);\r\n\t\tFile f = new File(path.getFile());\r\n\t\tBufferedReader reader = new BufferedReader(new FileReader(f));\r\n\r\n\t\t//add the set list of names to both hashtables\r\n\t\tString thisLine = null;\r\n\t\twhile ((thisLine = reader.readLine())!= null) {\r\n\t\t\t//parse the line\r\n\t\t\tString[] userpass = thisLine.split(\"\\\\s+\");\r\n\r\n\t\t\t//insert the key, value pair into the hashtable\r\n\t\t\tSystem.out.println(userpass[0]+\", \"+userpass[1]);\r\n\t\t\tuserpasses.put(userpass[0], userpass[1]);\r\n\t\t\tusers.put(userpass[0],null);\r\n\t\t\tHashMap<String, Calendar> holder = new HashMap<String, Calendar>();\r\n\t\t\tblockList.put(userpass[0],holder);\r\n\t\t}\r\n\r\n\t\t//get the port number from args\r\n\t\tInteger portNum = Integer.parseInt(args[0]);\r\n\r\n\t\t//create the serversocket listener\r\n\t\tServerSocket listener = new ServerSocket(portNum);\r\n\t\t\r\n\t\t//start the thread that will check for inactivity\r\n\t\tnew ActivityKeeper().start();\r\n\t\t\r\n\t\t//make your presence known\r\n\t\tSystem.out.println(\"The server is up!\");\r\n\r\n\t\t//try -> finally\r\n\t\ttry {\r\n\t\t\twhile (true) {\r\n\r\n\t\t\t\t//check for the ipAddress in the keyset of the hashtable\r\n\t\t\t\t//if it doesn't exist, add it along with a reference to the User\r\n\t\t\t\t//if it does exist, add the thread to that User\r\n\t\t\t\t//which thread do you send the \"Username: \" prompt to?\r\n\t\t\t\t//send a test message??\r\n\t\t\t\t//use a try catch clause to swap because an exception will come\r\n\t\t\t\t//\r\n\t\t\t\tnew User(listener.accept()).start();\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tlistener.close();\r\n\t\t}\r\n\t}", "public ServerInfo(Guild server){\n this.serverID = server.getIdLong();\n this.serverName = server.getName();\n ServerInfoCache.add(this);\n }", "public static synchronized void init() {\n\n if (serverRunning.get()) {\n\n LOG.info(\"Initializing the Cassandra server with a default schema and default values\");\n\n String[] createKeySpace = new String[]{\n // \"USE \" + KEY_SPACE + \";\\n\", -> rather specify the key space explicitly for the generic session object we use here\n \"DROP TABLE IF EXISTS \" + KEY_SPACE + \".events;\\n\",\n \"CREATE TABLE \" + KEY_SPACE + \".events (\\n\" +\n \" eventId ASCII PRIMARY KEY,\\n\" +\n \" auditStream ASCII,\\n\" +\n \" eventJson VARCHAR\\n\" +\n \");\"\n };\n\n try {\n for (String cql : createKeySpace) {\n session.execute(cql);\n }\n } catch (Exception e) {\n LOG.error(\"The Cassandra server cannot be initialized\", e.getCause(), e.getStackTrace());\n }\n } else {\n LOG.info(\"The Cassandra server cannot be initialized because it is not running\");\n }\n\n }", "@Override\n \t\tprotected void setup(Context context){\n \t\t\tint port = 5701 + context.getTaskAttemptID().getId()%numInstances;\n \t\t\t//System.out.println(\"Connecting to port \" + port);\n \t\t\tClientConfig clientConfig = new ClientConfig();\n \t\t\tclientConfig.addAddress(\"127.0.0.1:\" + port);\n \t\t\tthis.client = HazelcastClient.newHazelcastClient(clientConfig);\n \t\t\tthis.map = client.getMap(\"kmer\");\n \t\t}", "public void updateServerData() throws IOException {\n Iterator it = gameServers.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry<InetSocketAddress, GameServer> pair = (Map.Entry) it.next();\n pair.getValue().requestInfo();\n pair.getValue().requestPlayers();\n pair.getValue().requestRules();\n }\n }", "private void createSchemaInfo() {\n\t\tfor (String tableName : tableSchemas.keySet()) {\n\t\t\tERWinSchemaInfo schemaInfo = new ERWinSchemaInfo();\n\t\t\tschemaInfo.setType(\"user\");\n\t\t\tschemaInfo.setUniqueName(tableName);\n\t\t\tschemaInfos.put(tableName, schemaInfo);\n\t\t}\n\n\t\tinitCache();\n\t\tparseKeyGroupGroups();\n\n\t\tparseEntityProps();\n\t\tparseRelationGroups();\n\t\tparseAttributes();\n\n\t\tcreateSchemaDDL();\n\t}", "@SuppressWarnings(\"unchecked\")\n private Map<String, String> getUsers() {\n try {\n return (HashMap<String, String>) FileUtil.getInstance().readObjectFromFile(openFileInput(\"users.ser\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return new HashMap<>();\n }", "public Server(GameManager gameManager) {\n this.gameManager = gameManager;\n this.clientHandlerMap = Collections.synchronizedMap(new HashMap<>());\n this.lock = new Object();\n this.isSizeSet = false;\n }", "@Override\n\tpublic List<UserServer> registry() {\n\t\tResultSet result;\n\t\tList<UserServer> listUser = new ArrayList<UserServer>();\n\t\ttry {\n\t\t\tstat = conn.prepareStatement(\"SELECT * FROM client\");\n\t\t\tresult = stat.executeQuery();\n\t\t\twhile (result.next()) {\n\t\t\t\tUserServer user = new UserServer();\n\t\t\t\tuser.setId(result.getInt(\"idclient\"));\n\t\t\t\tuser.setName(result.getString(\"name\"));\n\t\t\t\tuser.setNick(result.getString(\"nick\"));\n\t\t\t\tuser.getTypeUser().setValue(result.getInt(\"typeuser\"));\n\t\t\t\tuser.setPhone(takePhone(user.getId()));\n\t\t\t\tuser.setEmail(takeEmail(user.getId()));\n\t\t\t\tlistUser.add(user);\n\t\t\t}\n\t\t\treturn listUser;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn null;\n\t}", "public void init() throws ServletException {\n\t\tList<User> list = new ArrayList<>();\n\t\t\n\t\t//store the list in ServletContext domain\n\t\tthis.getServletContext().setAttribute(\"list\", list);\n\t}", "void setHashMap();", "@Override\n\tpublic void init() throws ServletException\n\t{\n\t\tsuper.init();\n\t\t\n\t\tActiveUsers = (HashMap<String, User>) getServletContext().getAttribute(\"ActiveUsers\");\n\t\tMessages = (ArrayList<Message>) getServletContext().getAttribute(\"Messages\");\n\t\t\n\t\tif(ActiveUsers == null)\n\t\t{\n\t\t\tActiveUsers = new HashMap<String, User>();\n\t\t\tgetServletContext().setAttribute(\"ActiveUsers\", ActiveUsers);\n\t\t}\n\t\t\n\t\tif(Messages == null)\n\t\t{\n\t\t\tMessages = new ArrayList<Message>();\n\t\t\tgetServletContext().setAttribute(\"Messages\", Messages);\n\t\t}\n\t}", "public Twitter() {\n usersMap = new HashMap<>();\n }", "public ClientData() {\n\n this.name = \"\";\n this.key = \"\";\n this.serverIpString = \"\";\n this.serverPort = 0;\n this.clientListenPort = 0;\n this.clientsSocketPort = 0;\n this.clientsLocalHostName = \"\";\n this.clientsLocalhostAddressStr = \"\";\n\n this.socket = new Socket();\n\n try {\n this.socket.bind(null);\n } catch (IOException ex) {\n ClientInterface.getjTextArea1().append(\"Error. Unable to load data and create client.\");\n }\n \n try {\n this.clientsLocalHostName = InetAddress.getLocalHost().getHostName();\n this.clientsLocalhostAddressStr = InetAddress.getLocalHost().getHostAddress();\n } catch (UnknownHostException ex) {\n ClientInterface.getjTextArea1().append(\"Error. Unable to load data and create client.\");\n }\n this.clientsSocketPort = socket.getLocalPort();\n\n parseClientConfigFile();\n\n //Initialize ServerSocket and bind to specific port.\n try {\n serverS = new ServerSocket(clientListenPort);\n } catch (IOException ex) {\n ClientInterface.getjTextArea1().append(\"Error. Unable to load data and create client.\");\n }\n }", "@Override\n\tpublic void create(UserServer obj) {\n\t\tcreateClient(obj);// INSERE USUARIO NA ENTIDADE CLIENT\n\t\ttry {\n\t\t\tfinal ResultSet result = stat.getGeneratedKeys();\n\t\t\twhile (result.next()) {\n\t\t\t\tobj.setId(result.getInt(\"idclient\"));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcreatePhone(obj);// INSERE PHONE INFORMADO PELO CLIENT CADASTRADO\n\t\tcreateEmail(obj);// INSERE EMAIL INFORMADO PELO CLIENT CADASTRADO\n\t\tencerrarConexao();\n\t}", "@PostConstruct\r\n public void init() {\n List<Person> personList = personRepository.findAll();\r\n for(Person person:personList)\r\n personHashMap.put(person.getId(),person);\r\n }", "public UserFriendServer() {\n\t\tsuper();\n\t}", "private static Set<User> createUsers() {\n\t\tfinal Set<User> users = new HashSet<>();\n\t\tusers.add(new User(\"Max\", \"password\"));\n\t\treturn users;\n\t}", "IcedHM() { _m = new NonBlockingHashMap<>(); }", "private JsonObject getServerData() {\n // Minecraft specific data\n int playerAmount = Server.getInstance().getOnlinePlayers().size();\n int onlineMode = Server.getInstance().getPropertyBoolean(\"xbox-auth\", true) ? 1 : 0;\n String softwareVersion = Server.getInstance().getApiVersion() + \" (MC: \" + Server.getInstance().getVersion().substring(1) + \")\";\n String softwareName = Server.getInstance().getName();\n \n // OS/Java specific data\n String javaVersion = System.getProperty(\"java.version\");\n String osName = System.getProperty(\"os.name\");\n String osArch = System.getProperty(\"os.arch\");\n String osVersion = System.getProperty(\"os.version\");\n int coreCount = Runtime.getRuntime().availableProcessors();\n \n JsonObject data = new JsonObject();\n \n data.addProperty(\"serverUUID\", serverUUID);\n \n data.addProperty(\"playerAmount\", playerAmount);\n data.addProperty(\"onlineMode\", onlineMode);\n data.addProperty(\"bukkitVersion\", softwareVersion);\n data.addProperty(\"bukkitName\", softwareName);\n \n data.addProperty(\"javaVersion\", javaVersion);\n data.addProperty(\"osName\", osName);\n data.addProperty(\"osArch\", osArch);\n data.addProperty(\"osVersion\", osVersion);\n data.addProperty(\"coreCount\", coreCount);\n \n return data;\n }", "private void addClient () {\n ArrayList<String> info = loadOnePlayerInfo();\n Ntotal++;\n Nnow++;\n\n System.out.println(\"Vai ser inicializado o utilizador \" + info.get(0));\n initThread(info.get(0), info.get(1));\n }", "public MyConsistentHash(int numOfReplicas) {\n serverMap = new HashMap<String, Server>();\n nodesMap = new TreeMap<Integer, VirtualNode>();\n this.numOfReplicas = numOfReplicas;\n }", "public MyHashMap() {\n this.key_space = 2069;\n this.hash_table = new ArrayList<Bucket>();\n for (int i = 0; i < this.key_space; ++i) {\n this.hash_table.add(new Bucket());\n }\n }", "private void addNewClient(String username,String password){\n try(FileWriter fileWriter = new FileWriter(\"ClientsInformation.txt\",true)){\n fileWriter.write(username + \", \" + password + \"\\n\"); // Writes new client information in the database\n usersDataBase.put(username,password); // Updates the map with new client information\n }catch (IOException ioException)\n {\n System.out.println(\"From ClientsInformationManager - \" + ioException.getMessage());\n }\n }", "public HashMap<String, HttpServlet> createServletMaps(){\n\t\tHashMap<String,String> servletClass = handler.getServletClass();\n\t\tSet<String> allServletName = servletClass.keySet();\n\t\tContext con = createContext();\n\t\t\n\t\tfor(String servletname: allServletName){\n\t\t\tlog.info(\"ServletContainer: servletname is \"+servletname);\n\t\t\tHttpServlet servlet = createServlet(servletname,con);\n\t\t\t\n\t\t\tservletsmap.put(servletname, servlet);\t\t\t\n\t\t}\n\t\t\n\t\treturn servletsmap;\t\t\n\t\t\n\t}", "private void populateUserMap(List<User> list) {\n\t\tfor (User user : list) {\n\t\t\tuserMap.put(user.getUserName(), user);\n\t\t}\n\n\t}", "private UserDao() {\n\t\tusersList = new HashMap<String, User>();\n\t\tusersDetails = JsonFilehandling.read();\n\t\tfor (JSONObject obj : usersDetails) {\n\t\t\tusersList.put(obj.get(\"id\").toString(), new User(obj.get(\"id\").toString(),obj.get(\"name\").toString(), obj.get(\"profession\").toString()));\n\t\t}\n\t}", "public MorpionServerImpl() throws RemoteException {\r\n\t\tmorpionClients = new HashMap<String, MorpionClientInterface>();\r\n\t}", "public void populateSwitchTenantMap(Server3 server){\n\n\t\tBridge3 bridge;\n\t\tInterfaces3 interfaces;\n\t\tIterator<Bridge3> iteratorBridge = server.getOpenVSwitch().getArrayListBridge().iterator();\n\t\t//Iterate in all bridges of the server to collect the proper information of the bridge\n\t\twhile(iteratorBridge.hasNext()){\n\t\t\tbridge = iteratorBridge.next();\n\t\t\t//Verify if the brigde name is the one configured to host all the VMs. In this version, all VMs have to be hosted \n\t\t\tif(bridge.getName().compareTo(server.getBridgeName())==0){\n\t\t\t\tIterator<Interfaces3> iteratorInterfaces = bridge.getArrayListInterfaces().iterator();\n\t\t\t\t//Iterate in all interfaces of the configured bridge to get all necessary information to populate the structures \n\t\t\t\twhile(iteratorInterfaces.hasNext()){\n\t\t\t\t\tinterfaces = iteratorInterfaces.next();\n\t\t\t\t\tif(interfaces.getOfport() != null && server != null && server.getSw() != null && server.getSw().getId() != null &&\n\t\t\t\t\t\t\tthis.environmentOfServers.getHostLocationHostMap().get(new HostLocation(server.getSw().getId(), interfaces.getOfport())) != null &&\n\t\t\t\t\t\t\tthis.environmentOfServers.getHostLocationHostMap().get(new HostLocation(server.getSw().getId(), interfaces.getOfport())).getIpAddress() != null){\n\t\t\t\t\t\tthis.addToPortMap(server.getSw(), interfaces.getVmsMacAddress(), VlanVid.ofVlan(0), interfaces.getOfport(), \n\t\t\t\t\t\t\t\tthis.environmentOfServers.getHostLocationHostMap().get(new HostLocation(server.getSw().getId(), interfaces.getOfport())).getIpAddress());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void lookUpUsers() {\n\t\ttry {\n\t\t\tString[] regList = Naming.list(\"//localhost:3000\");\n\t\t\tfor (String s : regList) {\n\t\t\t\tif (!s.contains(\"Notary\") && !s.contains(this.id)) {\n\t\t\t\t\tremoteUsers\n\t\t\t\t\t\t.put(s.replace(\"//localhost:3000/\", \"\"), (UserInterface) Naming.lookup(s));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (MalformedURLException | RemoteException | NotBoundException e) {\n\t\t\tSystem.err.println(\"ERROR looking up user\");\n\t\t}\n\t}", "private static Map<String, User> getUsers() {\n Map<String, User> users = new HashMap<String, User>();\n\n User userOne = new User(\"one\",\"1\");\n User userTwo = new User(\"two\",\"2\");\n\n users.put(userOne.getName(), userOne);\n users.put(userTwo.getName(), userTwo);\n\n return users;\n }", "private static void initializeMaps()\n\t{\n\t\taddedPoints = new HashMap<String,String[][][]>();\n\t\tpopulatedList = new HashMap<String,Boolean>();\n\t\tloadedAndGenerated = new HashMap<String,Boolean>();\n\t}", "public void initializeHashMap(DatabaseReference ref){\n ref.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n UserSign sign = dataSnapshot.getValue(UserSign.class);\n System.out.println(\"ADDED USER SIGN FROM LOCAL DECK \" + dataSnapshot.getValue(UserSign.class).getUrl());\n userSigns.put(sign.getUrl(), sign);\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n //Updadte the deck if a sign was removed from the user's myDeck\n System.out.println(\"REMOVED USER SIGN FROM LOCAL DECK \" + dataSnapshot.getValue(UserSign.class).getUrl());\n userSigns.remove(dataSnapshot.getValue(UserSign.class).getUrl());\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "public void addServer(String nameServer) { \n Server server = new Server(nameServer);\n serversList.add(server);\n }", "private void createInternalStorage(int length) {\n\t\tif(internalStorage == null) {\n\t\t\tinternalStorage = new java.util.ArrayList<java.util.HashMap<String,LinkedList<T>>> ();\n\t\t\tfor(int i=0;i<length;i++)\n\t\t\t\tinternalStorage.add(new HashMap<String,LinkedList<T>>());\n\t\t}\n\t\t\n\t}", "protected Map<E, ListenerEntry<? extends E>> createMap() {\n\t\treturn new WeakHashMap<>();\n\t}", "public InitialValuesConnectionCenter() \n\t{\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(PORT);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"IOException ServerConnectionCenter.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setDefaultData()\n\t\t{\n\t\t\t\n\t\t\t//Creating demo/default ADMIN:\n\t\t\t\n\t\t\tUser testAdmin = new User(\"ADMIN\", \"YAGYESH\", \"123\", 123, Long.parseLong(\"7976648278\"));\n\t\t\tdata.userMap.put(testAdmin.getUserId(), testAdmin);\n\t\t\t\n\t\t\t//Creating demo/default CUSTOMER:\n\t\t\tUser tempCustomer = new User(\"CUSTOMER\", \"JOHN\", \"124\", 124, Long.parseLong(\"9462346459\"));\n\t\t\tdata.userMap.put(tempCustomer.getUserId(), tempCustomer);\n\t\t\t\n\t\t\t//Creating Airports:\n\t\t\tAirport airport1 = new Airport(\"Mumbai Chattrapathi Shivaji International Airport\",\n\t\t\t\t\t\t\t\t\t\t\t\"MUMBAI\", \"BOM\");\n\t\t\t\n\t\t\tAirport airport2 = new Airport(\"Bangalore Bengaluru International Airport \",\n\t\t\t\t\t\t\t\t\t\t\t\"Bangalore\", \"BLR\");\n\t\t\t\n\t\t\tAirport airport3 = new Airport(\"New Delhi Indira Gandhi International Airport\",\n\t\t\t\t\t\t\t\t\t\t\t\"New Delhi \", \"DEL\");\n\n\t\t\tAirport airport4 = new Airport(\"Hyderabad Rajiv Gandhi International Airport\",\n\t\t\t\t\t\t\t\t\t\t\t\"Hyderabad\", \"HYD\");\n\n\t\t\tdata.airportMap.put(airport1.getAirportCode(), airport1);\n\t\t\tdata.airportMap.put(airport2.getAirportCode(), airport2);\n\t\t\tdata.airportMap.put(airport3.getAirportCode(), airport3);\n\t\t\tdata.airportMap.put(airport4.getAirportCode(), airport4);\n\t\t\t\n\t\t\t//Creating DateTime Objects:\n\t\t\t\n\t\t\tDate dateTime1 = null;\n\t\t\tDate dateTime2 = null;\n\t\t\tDate dateTime3 = null;\n\t\t\tDate dateTime4 = null;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tdateTime1 = dateFormat.parse(\"12-01-2020 05:12:00\");\n\t\t\t\tdateTime2 = dateFormat.parse(\"02-02-2020 23:45:00\");\n\t\t\t\tdateTime3 = dateFormat.parse(\"12-01-2020 07:12:00\");\n\t\t\t\tdateTime4 = dateFormat.parse(\"03-02-2020 01:45:00\");\n\t\t\t}\n\t\t\tcatch (ParseException e) \n\t\t\t{\n\t\t\t\te.getMessage();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//Creating Schedules:\n\t\t\tSchedule schedule1 = new Schedule(airport1, airport2, dateTime3, dateTime1, dateFormat);\n\t\t\tSchedule schedule2 = new Schedule(airport2, airport3, dateTime3, dateTime1, dateFormat);\n\t\t\tSchedule schedule3 = new Schedule(airport4, airport1, dateTime4, dateTime2, dateFormat);\n\t\t\tSchedule schedule4 = new Schedule(airport3, airport4, dateTime4, dateTime2, dateFormat);\n\t\t\t\n\t\t\t//Creating Flights:\n\t\t\tFlight flight1 = new Flight(\"AB3456\", \"INDIGO\", \"A330\", 293);\n\t\t\tFlight flight2 = new Flight(\"BO6789\", \"JET AIRWAYS\", \"777\", 440);\n\t\t\tdata.flightMap.put(flight1.getFlightNumber(), flight1);\n\t\t\tdata.flightMap.put(flight2.getFlightNumber(), flight2);\n\t\t\t\n\t\t\t//Creating Scheduled Flights:\n\t\t\tScheduledFlight scheduledFlight1 = new ScheduledFlight(flight1, 293, schedule1);\n\t\t\tScheduledFlight scheduledFlight2 = new ScheduledFlight(flight2, 440, schedule2);\n\t\t\tScheduledFlight scheduledFlight3 = new ScheduledFlight(flight1, 293, schedule3);\n\t\t\tScheduledFlight scheduledFlight4 = new ScheduledFlight(flight2, 440, schedule4);\n\t\t\t\n\t\t\t//Creating List of Scheduled Flights:\n\t\t\tdata.listScheduledFlights.add(scheduledFlight1);\n\t\t\tdata.listScheduledFlights.add(scheduledFlight2);\n\t\t\tdata.listScheduledFlights.add(scheduledFlight3);\n\t\t\tdata.listScheduledFlights.add(scheduledFlight4);\n\n\t\t}", "public ServersHT() {\n table = new ServerDescEntry[initialCapacity];\n threshold = (int)(initialCapacity * loadFactor);\n }", "@Override\n public void onConnected(Bundle arg0) {\n setupMap();\n\n\n }", "@Create\n public void create()\n {\n \n log.debug(\"Creating users and mailboxes\");\n //MailboxService ms = MMJMXUtil.getMBean(\"meldware.mail:type=MailboxManager,name=MailboxManager\", MailboxService.class);\n AdminTool at = MMJMXUtil.getMBean(\"meldware.mail:type=MailServices,name=AdminTool\", AdminTool.class);\n \n for (MeldwareUser meldwareUser : getUsers())\n {\n at.createUser(meldwareUser.getUsername(), meldwareUser.getPassword(), meldwareUser.getRoles());\n // TODO This won't work on AS 4.2\n /*Mailbox mbox = ms.createMailbox(meldwareUser.getUsername());\n for (String alias : meldwareUser.getAliases())\n {\n ms.createAlias(mbox.getId(), alias);\n }*/\n log.debug(\"Created #0 #1 #2\", meldwareUser.isAdministrator() ? \"administrator\" : \"user\", meldwareUser.getUsername(), meldwareUser.getAliases() == null || meldwareUser.getAliases().size() == 0 ? \"\" : \"with aliases \" + meldwareUser.getAliases());\n }\n }", "public void add_server(String host) throws LookupException, \n NameServerContactException{\n \n String ip = lookup_ip(host);\n int port = lookup_port(host);\n System.out.println(\"Lookup of host \" + host + \": Success\");\n \n Server server = new Server(host, ip, port);\n \n servers.put(host, server);\n }", "public Map<String,ClientHandler> getUserList()\n {\n return userList;\n }", "public void dataAddAppInstance() {\n String endScore = Integer.toString(pointsScore);\r\n String mLongestWordScore = Integer.toString(longestWordScore);\r\n String date = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\", Locale.US).format(new Date());\r\n\r\n // creating a new user for the database\r\n User newUser = new User(userNameString, endScore, date, longestWord, mLongestWordScore); // creating a new user object to hold that data\r\n\r\n // add new node in database\r\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\r\n mDatabase.child(token).child(userNameString).setValue(newUser);\r\n\r\n // get this device's all time high score for comparison\r\n int highScore = getInt();\r\n\r\n // if high score is achieved, send notification\r\n if ( pointsScore > highScore) {\r\n setInt(\"high score\", pointsScore);\r\n new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n sendMessageToNews();\r\n }\r\n }).start();\r\n }\r\n }", "public Server createServer(Server server){\n\t\tlogger.info(\"Creating the Server with the given details\");\n\t\tint id = servers.size()+1+1000;\n\t\tlogger.info(\"The Server id is \"+id);\n\t\tserver.setServerId(id);\n\t\tserver.setServerStatus(ServerStatus.BUILDING);\n\t\tServerBuilder serverBuilder = new ServerBuilder(\"\"+id, server);\n\t\tserverBuilder.start();\n\t\tservers.put(id, server);\n\t\treturn server;\n\t}", "private void startServer() {\n mBluetoothGattServer = mBluetoothManager.openGattServer(this, mGattServerCallback);\n if (mBluetoothGattServer == null) {\n Log.w(TAG, \"Unable to create GATT server\");\n return;\n }\n\n mBluetoothGattServer.addService(TimeProfile.createTimeService());\n\n // Initialize the local UI\n updateLocalUi(System.currentTimeMillis());\n mBluetoothGattServer.addService(SecurityProfile.createSecurityService());\n //mBluetoothGattServer.addService(ConfigurationProfile.createConfigurationService());\n\n }", "protected HashMap initReqFailedMap() {\n return new HashMap();\n }", "private void registerClient() throws IOException {\n\t\tString instanceID = UUID.randomUUID().toString();\r\n\t\tString registerName = fromClient.readLine();\r\n\t\tString passwordInput = fromClient.readLine();\r\n\t\t\r\n\t\tif (!clientTable.has(registerName)) {\r\n\t\t\tReport.behaviour(registerName + \" has registered and connected\");\r\n\t\t\t\r\n\t\t\t//Adds the new user to the client table and adds a running queue\r\n\t\t\tclientTable.add(registerName, new Password(passwordInput, false));\r\n\t\t\tclientTable.addQueue(registerName, instanceID);\r\n\t\t\t\r\n\t\t\t//tell the client that the connection was a success\r\n\t\t\ttoClient.println(Commands.CONNECTION_SUCCESS);\r\n\t\t\t\r\n\t\t\t//create threads\r\n\t\t\tmakeThreads(registerName, instanceID);\r\n\t\t} else toClient.println(Commands.USER_ALREADY_EXISTS);\r\n\t}", "private NodeDB() {\n\t\tNodeInfo me = new NodeInfo();\n\t\tme.alive = true;\n\t\tme.nodecomms = ConfigManager.get().node_interface;\n\t\tme.nodehash = ConfigManager.get().nodehash;\n\t\tme.timestamp = System.currentTimeMillis();\n\t\tthis.update(new NodeDB.NodeInfo[] { me });\n\t\tthis.random = new Random();\n\t\tthis.random.setSeed(System.currentTimeMillis());\n\t}", "private void updateServerInfo() {\n ServerInfo serverInfo = new ServerInfo(serverConfig.getBaseURL(), serverConfig.getInfoURL(), serverRepositories.keySet());\n String serverInfoJson = new GsonBuilder().setPrettyPrinting().create().toJson(serverInfo);\n try {\n Files.write(Paths.get(\"\").resolve(Filenames.FILENAME_SERVERINFO), serverInfoJson.getBytes(StandardCharsets.UTF_8));\n } catch (IOException e) {\n log.error(\"could not write serverinfo file.\", e);\n }\n }", "private void registerCaches(){\n // Initialize region arraylist\n prisoners = new HashMap<>();\n regions = QueryManager.getRegions();\n prisonBlocks = QueryManager.getPrisonBlocks();\n portals = QueryManager.getPortals();\n }", "public void newConnection(NIOSocket nioSocket)\n {\n System.out.println(\"New user connected from \" + nioSocket.getIp() + \".\");\n m_users.add(new User(this, nioSocket));\n }", "public void addServer(AbstractServer server) {\n // Iterate through all types of CorfuMsgType, registering the handler\n server.getHandler().getHandledTypes()\n .forEach(x -> {\n handlerMap.put(x, server);\n log.trace(\"Registered {} to handle messages of type {}\", server, x);\n });\n }", "public void initializeUser() {\n try {\n Connection connection = connect();\n\n PreparedStatement createCategoryTable = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS user (\"\n + \"id INTEGER PRIMARY KEY, \"\n + \"username VARCHAR(100),\"\n + \"password VARCHAR(100),\"\n + \"UNIQUE(username, password)\"\n + \");\"\n );\n createCategoryTable.execute();\n createCategoryTable.close();\n\n connection.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "private static void createDemoData() {\n if (userManager.user_map.isEmpty() || accountManager.account_map.isEmpty() || banknoteManager.banknotes.isEmpty()) {\n if (userManager.user_map.isEmpty()) {\n userManager.createAccount(BankManager.class.getSimpleName(), \"jen\", \"1234\");\n userManager.createAccount(Teller.class.getSimpleName(), \"pete\", \"1234\");\n userManager.createAccount(Customer.class.getSimpleName(), \"steve\", \"1234\");\n }\n\n if (accountManager.account_map.isEmpty()) {\n accountManager.addAccount(CreditCard.class.getSimpleName(), Collections.singletonList(\"steve\"));\n accountManager.addAccount(Youth.class.getSimpleName(), Collections.singletonList(\"steve\"));\n accountManager.addAccount(Saving.class.getSimpleName(), Collections.singletonList(\"steve\"));\n accountManager.addAccount(Chequing.class.getSimpleName(), Collections.singletonList(\"steve\"));\n accountManager.addAccount(CreditLine.class.getSimpleName(), Collections.singletonList(\"steve\"));\n }\n\n if (banknoteManager.banknotes.isEmpty()) {\n banknoteManager.banknotes = new HashMap<>();\n for (int d : banknoteManager.DENOMINATIONS) {\n banknoteManager.banknotes.put(String.valueOf(d), 50);\n }\n }\n }\n }", "public void initDatabase() {\n Datastore mongoDataStore = DatabaseHandler.getInstance().getMongoDataStore();\n initUsers();\n initAccounts();\n mongoDataStore.save(users);\n }", "void init(){\n \tRootServers = new String[15];\r\n RootServers[0] = \"198.41.0.4\";\r\n RootServers[1] = \"199.9.14.201\";\r\n RootServers[2] = \"192.33.4.12\";\r\n RootServers[3] = \"199.7.91.13[\";\r\n RootServers[4] = \"192.203.230.10\";\r\n RootServers[5] = \"192.5.5.241\";\r\n RootServers[6] = \"192.112.36.4\";\r\n RootServers[7] = \"198.97.190.53\";\r\n RootServers[8] = \"192.36.148.17\";\r\n RootServers[9] = \"192.58.128.30\";\r\n RootServers[10] = \"193.0.14.129\";\r\n RootServers[11] = \"199.7.83.42\";\r\n RootServers[12] = \"202.12.27.33\";\r\n }", "public void addServerToServerArray(Server server){\n serverArray[cntServer] = server;\n cntServer++;\n }", "public void newUserDirectory() {\n\t\tusers = new LinkedAbstractList<User>(100);\n\t}", "public void start() {\n\t\trmiUtils.startRMI(IRMI_Defs.CLASS_SERVER_PORT_CLIENT);\n\n\t\ttry {\n\t\t\tview.setRemoteHost(rmiUtils.getLocalAddress()); //TODO Is this stored somewhere?\n\t\t\tuser = new User(\"default\", rmiUtils.getLocalAddress(), this);\n\t\t\tview.append(\"Create User \" + user.getName() + \"\\n\");\n\n\t\t\tregistry = rmiUtils.getLocalRegistry();\n\t\t\tIUser stub = (IUser) UnicastRemoteObject.exportObject(user, IUser.BOUND_PORT);\n\t\t\tview.append(\"Found registry: \" + registry + \"\\n\");\n\n\t\t\tregistry.rebind(IUser.BOUND_NAME, stub);\n\t\t\tview.append(\"IUser bound to \" + IUser.BOUND_NAME + \"\\n\");\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error getting local address: \" + e);\n\t\t}\n\t}" ]
[ "0.6236544", "0.6138852", "0.60492194", "0.59646577", "0.5944271", "0.59289813", "0.58976805", "0.58884466", "0.58683157", "0.58554715", "0.57709414", "0.5726175", "0.5695672", "0.56462455", "0.5639776", "0.5612241", "0.5598172", "0.55907565", "0.55704576", "0.55471903", "0.55221534", "0.54914075", "0.548075", "0.5478389", "0.5467544", "0.54608256", "0.54411966", "0.5414282", "0.5412769", "0.5411472", "0.5405378", "0.5387057", "0.53841627", "0.5383524", "0.5372011", "0.5357057", "0.5329687", "0.53167176", "0.53156614", "0.53134674", "0.53098196", "0.5309448", "0.5306796", "0.5302262", "0.52893704", "0.5280162", "0.5274896", "0.5273632", "0.52697", "0.5252562", "0.5231469", "0.52256817", "0.52126986", "0.520967", "0.51967746", "0.518848", "0.5171888", "0.51655084", "0.51639014", "0.5161404", "0.515814", "0.5152398", "0.5137487", "0.5134424", "0.5130893", "0.51288617", "0.51263916", "0.5125213", "0.51216143", "0.51087093", "0.5100982", "0.51", "0.50917953", "0.508878", "0.5080269", "0.50802475", "0.5078904", "0.5076197", "0.50747365", "0.5070852", "0.5067859", "0.50661105", "0.505333", "0.50532806", "0.505094", "0.50459665", "0.50444996", "0.5044287", "0.5039644", "0.50393206", "0.5037971", "0.50379705", "0.50367045", "0.503533", "0.50273925", "0.50266886", "0.5022092", "0.50213796", "0.50165766", "0.5014048" ]
0.7201706
0
Adds a new score to users data. Also creates a new user if it cannot find specified user's name.
synchronized void addScore(String name, int score){ if(!users.containsKey(name)){ Vector<Integer> scores = new Vector<Integer>(); users.put(name, scores); } users.get(name).add(score); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addScore(String name, int score) {\n loadScoreFile();\n scores.add(new Score(name, score));\n updateScoreFile();\n }", "public void insert(String name, int score)\n\t{\n\t\tif (size == capacity)\n\t\t{\n\t\t\tString[] usersTmp = new String[capacity*=2];\n\t\t\tint[] countTmp = new int[capacity]; \n\n\t\t\tSystem.arraycopy(users, 0, usersTmp, 0, users.length);\n\t\t\tSystem.arraycopy(count, 0, countTmp, 0, count.length);\n\t\t\tusers = usersTmp;\n\t\t\tcount = countTmp;\n\t\t}\n\n\t\tfor (int i = 0; i < users.length; i++)\n\t\t{\n\t\t\tif (users[i] == null)\n\t\t\t{\n\t\t\t\tusers[i] = name;\n\t\t\t\tcount[i] = score;\n\t\t\t\tsize++;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\telse if (users[i] != null && users[i].equals(name))\n\t\t\t{\n\t\t\t\tcount[i] += score; \n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void addScore(int score);", "public void doDataAddToDb() {\n String endScore = Integer.toString(pointsScore);\r\n String mLongestWordScore = Integer.toString(longestWordScore);\r\n String date = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\", Locale.US).format(new Date());\r\n Log.e(TAG, \"date\" + date);\r\n\r\n // creating a new user for the database\r\n User newUser = new User(userNameString, endScore, date, longestWord, mLongestWordScore); // creating a new user object to hold that data\r\n\r\n // add new node in database\r\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\r\n mDatabase.child(\"users\").child(userNameString).setValue(newUser);\r\n\r\n Log.e(TAG, \"pointsScore\" + pointsScore);\r\n Log.e(TAG, \"highestScore\" + highestScore);\r\n\r\n\r\n // if high score is achieved, send notification\r\n if (highestScore > pointsScore) {\r\n new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n sendMessageToNews();\r\n }\r\n }).start();\r\n }\r\n }", "public static void addToScore(int dareId, String userId, String score) {\n\n Connection conn = null;\n Statement statement = null;\n\n try {\n Class.forName(\"org.sqlite.JDBC\");\n String path = \"jdbc:sqlite:lib/dare_n_share.db\";\n conn = DriverManager.getConnection(path);\n\n String query = \"update Participants set Score ='\" + score + \"' Where DareId=\" + dareId + \" and UserId='\" + userId + \"';\";\n statement = conn.createStatement();\n statement.execute(query);\n\n } catch (ClassNotFoundException | SQLException e) {\n e.printStackTrace();\n } finally {\n try { if (statement != null) statement.close(); } catch (Exception e) {}\n try { if (conn != null) conn.close(); } catch (Exception e) {}\n }\n\n }", "public void addScore(int score, String name){\n for(int i = 0; i < topScores.size(); i++) {\n if(score >= topScores.get(i)){\n topScores.add(i, score);\n topScores.remove(topScores.size()-1);\n if(name.isEmpty()){\n topName.add(i, \"Anonymous\");\n topName.remove(topName.size()-1);\n }else {\n topName.add(i, name);\n topName.remove(topName.size() - 1);\n }\n return;\n }\n }\n }", "protected void addScoreToLeaderboard() {\n\n\t\tif (onlineLeaderboard) {\n\t\t jsonFunctions = new JSONFunctions();\n\t\t jsonFunctions.setUploadScore(score);\n\t\t \n\t\t Handler handler = new Handler() {\n\t\t\t @Override\n\t\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\t @SuppressWarnings(\"unchecked\")\n\t\t\t\t ArrayList<Score> s = (ArrayList<Score>) msg.obj;\n\t\t\t\t globalScores = helper.sortScores(s);\n\t\t\t }\n\t\t };\n\t\t \n\t\t jsonFunctions.setHandler(handler);\n\t\t jsonFunctions\n\t\t\t .execute(\"http://brockcoscbrickbreakerleaderboard.web44.net/\");\n\t\t}\n\t\tsaveHighScore();\n }", "public void add() {\r\n // Getting the player name.\r\n DialogManager dialog = this.gui.getDialogManager();\r\n String name = dialog.showQuestionDialog(\"Name\", \"Enter your name:\", \"\");\r\n if (name != null) {\r\n this.scoreTable.add(new ScoreInfo(name, this.score.getValue()));\r\n try {\r\n this.scoreTable.save(new File(\"highscores\"));\r\n } catch (IOException e) {\r\n System.out.println(\"Failed creating a file.\");\r\n return;\r\n }\r\n }\r\n }", "public void addToScore(int score)\n {\n this.score += score;\n }", "public void addScore(int pointsToAdd) {\n\t\tthis.score = this.score + pointsToAdd;\n\t}", "public SubmitServer addSubmission(String name, int score) {\n\n // validate parameters\n if (name != null && name != \"\" && score >= 0 & score <= 100) {\n // checks if student exists - stores index in student list if exists\n int exists = this.studentExists(name);\n\n // student with name does not exist\n if (exists == -1) {\n // add student and score\n studentList.add(new Student(name, score));\n } else {\n // student exists, so add score to student of index\n (studentList.get(exists)).addScore(score);\n }\n }\n // return clone of current object to allow for chained calls\n return this.clone();\n }", "void addScore() throws ClassNotFoundException, SQLException, ParseException{\n /* \n TODO check if the score in the valid range\n TODO get the last entry and check if not the same\n TODO ADD option to custom the date\n TODO check if score not already in the HT (retrieve the lastElement)\n */\n \n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n if(this.updateValue){\n this.user.modifyScoreValue(this.date, \n Integer.parseInt(scoreField.getText().replaceAll(\"\\\\s+\",\"\")));\n }else{\n Date curr_date = new Date();\n this.user.addScore(dateFormat.format(curr_date).toString(), \n Integer.parseInt(scoreField.getText().replaceAll(\"\\\\s+\",\"\")));\n }\n \n \n }", "public void addUser() {\n\t\tthis.users++;\n\t}", "public void createNewUser(){\n Users user = new Users(winnerName);\n mDatabase.child(\"users\").child(winnerName).setValue(user);\n Log.d(\"DB\", \"Writing new user \" + winnerName + \" to the database\");\n\n Toast.makeText(this, \"Scoreboard has been updated!\", Toast.LENGTH_SHORT).show();\n\n endGame();\n\n\n\n }", "public void addScore(int score) {\n currentScore += score;\n }", "public static void maybeAddNewHighScore(String name, double score) throws FileNotFoundException, IOException {\n ArrayList<String> scoresAsStrings = getAllScores();\n ArrayList<HighScore> scoresAsScores = new ArrayList<>();\n \n //if there aren't enough scores, something is wrong - replace the score file with the example scores\n if (scoresAsStrings.size() < NUMBER_OF_SCORES_TO_SAVE) {\n for (String s : EXAMPLE_SCORES) {\n scoresAsStrings.add(s);\n }\n }\n \n //Parse the strings into high score objects\n for (String s : scoresAsStrings) {\n HighScore hs = new HighScore(s);\n scoresAsScores.add(hs);\n }\n \n HighScore userScore = new HighScore(name, score);\n \n //Add the user's score, sort the list of scores, then take the first 10\n scoresAsScores.add(userScore);\n Collections.sort(scoresAsScores);\n \n //Take the first 10 and write them to the file\n HighScore[] listOfScoresToSave = new HighScore[NUMBER_OF_SCORES_TO_SAVE];\n for (int i = 0; i < NUMBER_OF_SCORES_TO_SAVE; i++) {\n listOfScoresToSave[i] = scoresAsScores.get(i);\n }\n \n writeToFile(listOfScoresToSave);\n }", "public boolean highScore(int score, String name) {\n //If the list is empty or has less than 5 users, add them in!\n if(highScoreList.isEmpty() || highScoreList.size() < 5){\n User newUser = new User(name, score);\n highScoreList.add(newUser);\n saveHighscores();\n return true;\n }\n //Any other case, we have to start comparing\n for(User user : highScoreList) {\n //We found a place to put their score!\n if(score > user.score) {\n User newUser = new User(name, score);\n highScoreList.add(newUser); //Add in the new User and sort\n Collections.sort(highScoreList); //Sort the list\n //Check if there's more than 5 Users, if so, remove one\n if(highScoreList.size() > 5) {\n highScoreList.remove(0);\n //Check if the user is still there, if not, they didn't belong anyway\n if(highScoreList.contains(newUser)){\n saveHighscores();\n return true;\n }else\n return false;\n }\n }\n }\n return false;\n }", "public void addScore(Pair<String, Integer> score) {\n if (!this.list.isPresent()) {\n this.readScores();\n }\n final List<Pair<String, Integer>> list = this.list.get();\n list.add(score);\n this.sortScores(list);\n this.cutScores(list);\n this.list = Optional.of(list);\n\n this.toSave = true;\n }", "public void addScore(double _score, User _user, int _app, double _weight, String date_n_time)\r\n\t{\r\n\t\tUserProgressEstimator upe = user_knowledge_levels.findById(\r\n\t\t\t_user.getId() );\r\n\t\tif(upe==null) // add new UserProgressEstimator\r\n\t\t{\r\n\t\t\tint estimator_type = 0;\r\n\t\t\tswitch (domain.getId())\r\n\t\t\t{\r\n\t\t\t\t// concepts\r\n\t\t\t\tcase 1:\r\n\t\t\t\tcase 8:\r\n\t\t\t\tcase 9:\r\n\t\t\t\tcase 11:\r\n\t\t\t\tcase 12:\r\n\t\t\t\tcase 15:\r\n\t\t\t\tcase 16:\r\n\t\t\t\t\testimator_type = iProgressEstimator.ESTIMATOR_ASSYMPTOTIC;\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 0:\r\n\t\t\t\tbreak;\r\n\t\t\t\t// topics\r\n\t\t\t\tcase 2: \r\n\t\t\t\tcase 6: \r\n\t\t\t\tcase 7: \r\n\t\t\t\tcase 10: \r\n\t\t\t\t\testimator_type = iProgressEstimator.ESTIMATOR_MEAN;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//t \r\n\t\t\t//c \r\n\t\t\t\r\n\t\t\t\r\n\t\t\tupe = new UserProgressEstimator(_user.getId(),\r\n\t\t\t\t_user.getTitle(), _user, 0, estimator_type);\r\n\t\t\tuser_knowledge_levels.add(upe);\r\n\t\t}\r\n\t\t\r\n\t\tint level_idx = ResourceMap.mapToBloomLevelIndex(_app, _score);\r\n//\t\tif((level_idx==0) && _score<0)\r\n//\t\t\t_score = Math.abs(_score);\r\n//if(this.getId()==14)\t\t\t\r\n//{\r\n//System.out.println(\"### [CBUM] Concept.addScore C.Id=\" + this.getId() +\" _score=\" + _score + \" _weight= \" + _weight + \" outcome_w_sum=\" + outcome_w_sum); /// DEBUG\r\n//}\r\n\r\n//if(this.getId()==190)\r\n//{\r\n//System.out.println(\"### [CBUM] Concept.addScore User=\"+_user.getTitle()+\" score=\"+_score + \" weight=\" + _weight); /// DEBUG\r\n//System.out.println(\"### [CBUM] Concept.addScore \\tcog_level_name=\" + iProgressEstimator.BLOOM_NAMES[level_idx] ); /// DEBUG\r\n//System.out.println(\"### [CBUM] Concept.addScore \\tcog_level_OLD=\" + upe.getKnowledgeLevels()[level_idx].getProgress() ); /// DEBUG\r\n//}\r\n//System.out.println(this.getTitle() + \" _app = \" + _app + \" level_idx = \" + level_idx);\r\n\t\tif(level_idx != -1)\r\n\t\t\tupe.getKnowledgeLevels()[level_idx].addProgress(_score, _weight,\r\n\t\t\t\toutcome_w_sum, date_n_time);\r\n//if(this.getId()==190)\r\n//{\r\n//System.out.println(\"### [CBUM] Concept.addScore \\tcog_level_NEW=\" + upe.getKnowledgeLevels()[level_idx].getProgress() ); /// DEBUG\r\n//System.out.println(\"### [CBUM] Concept.addScore \\t domain=\" + this.getDomain().getId() + \" \" + this.getDomain().getTitle()); /// DEBUG\r\n//}\t\t\t\r\n\t\t\r\n\t}", "private void updateLeaderboard(String channelId, String userId, int scoreFactor) {\r\n Leaderboard lb = leaderboardRepository.findByChannelId(channelId);\r\n\r\n // found leaderboard\r\n if(lb != null) {\r\n\r\n // update existing user\r\n if (lb.scores.containsKey(userId)) {\r\n\r\n UserScore us = lb.scores.get(userId);\r\n us.score += scoreFactor;\r\n us.displayName = userId;\r\n\r\n // get user display name\r\n User user = getUserInfo(userId);\r\n if(user != null) {\r\n us.displayName = user.profile.display_name_normalized;\r\n if (us.displayName.length() == 0) {\r\n us.displayName = user.profile.real_name_normalized;\r\n }\r\n }\r\n\r\n lb.scores.put(userId, us);\r\n leaderboardRepository.save(lb);\r\n }\r\n // add new user\r\n else {\r\n UserScore us = new UserScore();\r\n us.score += scoreFactor;\r\n us.displayName = userId;\r\n\r\n // get user display name\r\n User user = getUserInfo(userId);\r\n if(user != null) {\r\n us.displayName = user.profile.display_name_normalized;\r\n if (us.displayName.length() == 0) {\r\n us.displayName = user.profile.real_name_normalized;\r\n }\r\n }\r\n\r\n lb.scores.put(userId, us);\r\n leaderboardRepository.save(lb);\r\n }\r\n }\r\n // create new leaderboard\r\n else {\r\n lb = new Leaderboard(channelId);\r\n\r\n UserScore us = new UserScore();\r\n us.score += scoreFactor;\r\n us.displayName = userId;\r\n\r\n // get user display name\r\n User user = getUserInfo(userId);\r\n if(user != null) {\r\n us.displayName = user.profile.display_name_normalized;\r\n if (us.displayName.length() == 0) {\r\n us.displayName = user.profile.real_name_normalized;\r\n }\r\n }\r\n\r\n lb.scores.put(userId, us);\r\n leaderboardRepository.save(lb);\r\n }\r\n }", "public void setScore(int pointsToAdd) {\n\n\t\t//Add the additional points to the existing score\n\t\tthis.score = this.score + pointsToAdd;\n\t}", "public void incrementScore(int scoreToAdd) {\n this.score += scoreToAdd;\n }", "public void addHighScore(String name, int score){\r\n // TODO: If the provided score is greater than the lowest high score,\r\n // TODO: then replace the lowest score with the new score and then\r\n // TODO: call the sortScores() method.\r\n \t\r\n \t\tscores[Settings.numScores-1]=score;\r\n \t\tnames[Settings.numScores-1]=name;\r\n \t\tsortScores();\r\n \t\t\r\n }", "public void addTestScore(int score){\n test_score.add(test_count,score);\n test_count++;\n }", "public void addOneToScore() {\r\n score++;\r\n }", "public User(String name, int score, int levelReached) {\n\t\tthis.name = name;\n\t\tthis.score = score;\n\t\tthis.levelReached = levelReached;\n\t}", "public void addScore(String addCourseName, int addScore, String addDate, double addCourseRating, int addCourseSlope)\n {\n int z = 0;\n Score temp = new Score(addCourseName, addScore, addDate, addCourseRating, addCourseSlope);\n for(int i = 0; i < scores.length; i++)\n {\n if(scores[i] != null)\n {\n z++;\n }\n }\n Score[] copy = new Score[z + 1];\n for(i = 0; i < z; i++)\n {\n copy[i] = scores[i];\n }\n copy[z] = temp;\n this.scores = copy;\n }", "public long createScoreEntry(String name, String score) {\n\n\t\tContentValues cv = new ContentValues(); \n\t\tcv.put(KEY_NAME, name);\n\t\tcv.put(KEY_SCORE, score);\n\t\treturn scoreDb.insert(DATABASE_TABLE, null, cv);\n\n\t}", "public void addReview(double score){\n totalReviews++;\n totalScore += score;\n }", "public void dataAddAppInstance() {\n String endScore = Integer.toString(pointsScore);\r\n String mLongestWordScore = Integer.toString(longestWordScore);\r\n String date = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\", Locale.US).format(new Date());\r\n\r\n // creating a new user for the database\r\n User newUser = new User(userNameString, endScore, date, longestWord, mLongestWordScore); // creating a new user object to hold that data\r\n\r\n // add new node in database\r\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\r\n mDatabase.child(token).child(userNameString).setValue(newUser);\r\n\r\n // get this device's all time high score for comparison\r\n int highScore = getInt();\r\n\r\n // if high score is achieved, send notification\r\n if ( pointsScore > highScore) {\r\n setInt(\"high score\", pointsScore);\r\n new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n sendMessageToNews();\r\n }\r\n }).start();\r\n }\r\n }", "public void addScore()\n {\n score += 1;\n }", "public void addScore(int s) {\n setScore(getScore() + s);\n }", "public void addUser(String name)\r\n\t{\r\n\t\tperson= new User(name);\r\n\t\tusers.put(name, person);\r\n\t}", "public void updateUser(){\n\n Log.d(\"ACCESS\", \"In update\");\n\n DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference();\n\n userRef = FirebaseDatabase.getInstance().getReference().child(\"users\").child(winnerName);\n\n userRef.addListenerForSingleValueEvent(new ValueEventListener(){\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n Users updateUser = dataSnapshot.getValue(Users.class);\n Log.v(\"RETRIEVEinUPDATE\", \"Name value = \" + updateUser.getName() + \"Score value = \" + updateUser.getScore());\n String scoreString = updateUser.getScore();\n\n int score = Integer.parseInt(scoreString);\n\n score++;\n updateUser.setScore(String.valueOf(score));\n userRef.setValue(updateUser);\n\n }\n @Override\n public void onCancelled(DatabaseError error) {\n // Failed to read value\n Log.d(\"ERROR TAG\", \"Failed to read value.\", error.toException());\n }\n\n\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n\n }\n\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n\n }\n\n\n // @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n\n\n\n\n\n });\n\n endGame();\n\n }", "public void addToScore(int points) {\n\t\tassert points >= 0 : \"Cannot add negative points\";\n\t\tscore += points;\n\t}", "public void addHighScore(long newScore, String name){\n if(isHighScore(newScore)){\n highScores[MAX_SCORES - 1] =newScore;\n names[MAX_SCORES-1] = name;\n sortHighScores();\n }\n }", "@Override\n public void saveUserTutorial(User user, Tutorial tutorial, @Nullable Integer score) {\n jdbcTemplate.update(\"INSERT INTO tutorial_completion (FK_user_id, FK_tutorial_id, score)\" +\n \"VALUES(?,?,?)\", new Object[]{user.getId(), tutorial.getId(), score});\n\n }", "public void addToScore(final int theScoreAddition) {\n this.myCurrentScoreInt += theScoreAddition;\n \n if (this.myCurrentScoreInt > this.myHighScoreInt) {\n this.myHighScoreInt = this.myCurrentScoreInt; \n this.persistHighScore();\n } \n }", "void addScore(double score){\n\t\tsumScore+=score;\n\t\tnumScores++;\n\t\taverage = sumScore/numScores;\n\t}", "public void addPoints(int earnedPoints) {score = score + earnedPoints;}", "@Override\r\n\tpublic boolean updateScore(int score) {\n\t\ttry {\r\n\t\t\tconn = DriverManager.getConnection(URL, USER, PASS);\r\n\t\t\tString sql = \"update member set score=score+\"+score+\" where id='\"+LoginServiceImpl.getCurrentUser().getID()+\"'\";\r\n\t\t\tps = conn.prepareStatement(sql);\r\n\t\t\t\r\n\t\t\tif(ps.executeUpdate()==0) {\r\n\t\t\t\treturn false;\r\n\t\t\t}else\r\n\t\t\t\treturn true;\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "public int addUsersTargetedSurvey() {\n\n RegisteredUserRepositoryImpl userRepository = new RegisteredUserRepositoryImpl();\n\n List<RegisteredUser> users = userRepository.getUsersByFilters(selectedDomain, selectedUsername, selectedBirthYear, selectedLocation);\n\n boolean addedSuccessfully = selectedSurvey.addUsersToGroup(users);\n\n if (!addedSuccessfully) {\n return 0;\n }\n surveyRepository = new SurveyRepositoryImpl();\n surveyRepository.merge(selectedSurvey);\n\n return users.size();\n }", "public static void addingNewPlayer(){\r\n\t\t//hard code each score includng a total.\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\t\tSystem.out.println(\"Enter the name of the Player?\");\r\n\t\t\t\t\tString name = scan.next();\r\n\t\t\t\t\t\r\n\t\t\t//establishing the connection\r\n\t\t\tstatement = connection.createStatement();\r\n\t\t\t\r\n\t\t\t//inserting the quries assign to the String variables\r\n\t\t\tString query=\"insert into \" + tableName + \" values ('\" + name +\"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\";\t\t\r\n\t\t\t\r\n\t\t\t//inserting the hard coded data into the table of the datbase\r\n\t\t\tstatement.execute(query);\r\n\t\t\t\r\n\t\t\t//closing the statement\r\n\t\t\tstatement.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t System.out.println(\"SQL Exception occurs\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "void addScore(String sessionKey, Integer levelId, Integer score) throws SessionExpiredException;", "public void add_to_score(int num){\n score+=num;\n }", "public void newUser(User user) {\n users.add(user);\n }", "@RequestMapping(method = RequestMethod.PUT, value = \"/{facebookId}\")\n public long updateScore(@PathVariable(value = \"facebookId\") String id, @RequestParam(value = \"score\") long score) {\n long currentScore = getUserScore(id);\n User user = usersRepository.findById(id);\n user.setScore(currentScore + score);\n usersRepository.save(user);\n return usersRepository.findById(id).getScore();\n }", "public void addToScore(TextView scoreTextView, int points) {\n int score = Integer.parseInt(scoreTextView.getText().toString());\n scoreTextView.setText(String.valueOf(score + points));\n }", "public void addUser(UserModel user);", "public final void addScore(int iScore) {\n\t\tscore += iScore;\n\t}", "public void addQuiz(int score) {\n\t\tif (score < 0 || score > 100) {\n\t\t\tscore = 0;\n\t\t}\n\t\telse {\n\t\t\ttotalScore = totalScore + score;\n\t\t\tquizCount++;\n\t\t}\n\t\t}", "public UserScore() {\n this(DSL.name(\"b2c_user_score\"), null);\n }", "public void addToScore(int id, int bonus){\n scores.set(id,scores.get(id) + bonus);\n }", "public void addStudent(User user) {\n\t\t\r\n\t}", "public void updateUserCreditScore(int userId, List<CreditScore> creditScores) throws SQLException {\n\t\tString delete = \"DELETE FROM applicant_credit_scores WHERE user_id = \" + userId; \r\n\t\t\r\n\t\tdqe.executeStatement(delete);\r\n\t\t\r\n\t\t// Insert the new credit scores into the user table\r\n\t\tfor(CreditScore creditScore : creditScores) {\r\n\t\t\t String insert = \r\n\t\t\t\t\t \"INSERT INTO \"\r\n\t\t\t\t\t+ \t\"applicant_credit_scores (\"\r\n\t\t\t\t\t+ \t\t\"user_id, \"\r\n\t\t\t\t\t+ \t\t\"credit_score, \"\r\n\t\t\t\t\t+ \t\t\"credit_score_source\"\r\n\t\t\t\t\t+ \") VALUES (\" \r\n\t\t\t\t\t+ \tuserId + \", \" \r\n\t\t\t\t\t+ \tcreditScore.getScore() + \", \"\r\n\t\t\t\t\t+ \t\"'\" + creditScore.getSource() + \"'\"\r\n\t\t\t\t\t+ \")\";\r\n\t\t\t \r\n\t\t\t dqe.executeStatement(insert);\r\n\t\t}\r\n\t}", "void addUser(User user);", "void addUser(User user);", "public void addUser(User user) {\n\t\t\r\n\t}", "public void addUser(User user);", "public void addUser() {\r\n PutItemRequest request = new PutItemRequest().withTableName(\"IST440Users\").withReturnConsumedCapacity(\"TOTAL\");\r\n PutItemResult response = client.putItem(request);\r\n }", "public void addToTable() {\n\n\n if (this.highScoresTable.getRank(this.scoreBoard.getScoreCounter().getValue()) <= this.highScoresTable.size()) {\n DialogManager dialog = this.animationRunner.getGui().getDialogManager();\n String name = dialog.showQuestionDialog(\"Name\", \"What is your name?\", \"\");\n\n this.highScoresTable.add(new ScoreInfo(name, this.scoreBoard.getScoreCounter().getValue()));\n File highScoresFile = new File(\"highscores.txt\");\n try {\n this.highScoresTable.save(highScoresFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n\n }", "public MatcherScores addScore(String intent, Double score)\n {\n scores.computeIfAbsent(score, k -> new TreeSet<>()).add(intent);\n return this;\n }", "private void addUser(\n int index, People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureUserIsMutable();\n user_.add(index, value);\n }", "void addPointsToScore(int points) {\n score += points;\n }", "public Score(String name, int score) {\n //set date to current date\n this.date = new Date();\n \n this.score = score;\n this.name = name;\n \n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data){\n\n\n if (requestCode == SUB_ACTIVITY_CREATE_USER && resultCode == Activity.RESULT_OK){\n Bundle extras = data.getExtras();\n if (extras != null){\n String name = extras.getString(User.USER_NAME);\n boolean gender = extras.getBoolean(User.USER_GENDER);\n\n user = new User(name,gender);\n updateUserInterface();\n }\n }\n\n if(requestCode == SUB_ACTIVITY_LEARN && resultCode == RESULT_OK){\n if(data.hasExtra(\"skillLevel\")){\n //TODO implement what to do with returned data\n skillPointInteger = data.getExtras().getInt(\"skillLevel\");\n user.skillPoints = skillPointInteger;\n Toast.makeText(this,\"New Skill Level: \"+String.valueOf(skillPointInteger),Toast.LENGTH_SHORT).show();\n\n skillPoint.setText(String.valueOf(skillPointInteger));\n }\n }\n }", "public void add(int newScore,String newName) {\n\n //adding the new score to the list\n points.add(newScore);\n for (int i = 0; i < points.size()-1; i++) {\n for (int j = i+1; j < points.size(); j++) {\n if (points.get(i) < points.get(j)) {\n int temp = points.get(i);\n points.set(i, points.get(j));\n points.set(j, temp);\n }\n }\n }\n\n //adding the new name on the list\n int k = points.indexOf(newScore);\n if (names.size()!=0) {\n String tempx = names.get(names.size() - 1);\n names.add(tempx);\n\n for (int i = names.size() - 1; i > k; i--) {\n names.set(i, names.get(i - 1));\n }\n names.set(k, newName);\n } else {\n names.add(newName);\n }\n\n //updating the files\n addOn(points);\n addOn(names);\n\n //print when the game finishes\n //new GUI(names,points,true, k);\n }", "public void displayScore(String username, int score){\n\t\tfloat rating = ((float)score)/2;\n\t\tTextView user = new TextView(this);\n\t\tuser.setText(\"\\n\"+username);\n\t\tRatingBar rb = new RatingBar(this,null,android.R.attr.ratingBarStyleSmall);\n\t\trb.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));\n\t\trb.setNumStars(5);\n\t\trb.setRating(rating);\n\t\ths.addView(user);\n\t\ths.addView(rb);\n\t}", "public UserScore(Name alias) {\n this(alias, USER_SCORE);\n }", "public void addRating(int userIndex, double rating) {\n if (!this.usersRatings.add(userIndex, rating))\n throw new IllegalArgumentException(\"Provided rating already exist in item: \" + id);\n\n min = Math.min(rating, min);\n max = Math.max(rating, max);\n average =\n (this.usersRatings.size() <= 1)\n ? rating\n : ((average * (this.usersRatings.size() - 1)) + rating) / this.usersRatings.size();\n }", "@SuppressWarnings({ \"unchecked\", \"unused\" })\n\tprivate void addUser(TextField nameField, TextField passwordField) {\n\t\t\n\t\tString name = nameField.getText();\n\t\tString password = passwordField.getText();\n\t\tname.trim();\n\t\tpassword.trim();\n\t\t\n\t\tif(name.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user name!\");\n\t\t}\n\t\telse if(password.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user password!\");\n\t\t}\n\t\telse if(admin == null) {\n\t\t\tAlertMe alert = new AlertMe(\"You must select an account type!\");\n\t\t}\n\t\telse {\n\t\t\tArrayList<Student> students = JukeBox.getUsers();\n\t\t\t\n\t\t\tif(JukeBox.locateUser(name) != -1) {\n\t\t\t\tAlertMe alert = new AlertMe(\"User \" + name + \" already exists!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tStudent newStudent;\n\t\t\t\tif(admin) {\n\t\t\t\t\tnewStudent = new Student(name, password, true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewStudent = new Student(name, password, false);\n\t\t\t\t}\n\t\t\t\tstudents.add(newStudent);\n\t\t\t\t\n\t\t\t\tnameField.setText(\"\");\n\t\t\t\tpasswordField.setText(\"\");\n\t\t\t\t\n\t\t\t\tusers.setItems(null); \n\t\t\t\tusers.layout(); \n\n\t\t\t\tObservableList<Student> data = FXCollections.observableArrayList(JukeBox.getUsers());\n\t\t\t\tusers.setItems(data);\n\t\t\t}\n\t\t}\n\t}", "public void addUser(String username, String password) {\n\t\t// Connect to database\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\t\n\t\t// Create new entry\n\t\tString newEntryString = \"INSERT INTO User (username, password, winNum, loseNum) VALUES (?, ?, 0, 0)\";\n\t\t\n\t\ttry {\n\t\t\tps = conn.prepareStatement(newEntryString);\n\t\t\tps.setString(1, username);\n\t\t\tps.setString(2, password);\n\t\t\tps.executeUpdate();\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\t// Close connections\n\t\t\ttry {\n\t\t\t\tif(rs != null)\n\t\t\t\t{\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif(ps != null)\n\t\t\t\t{\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(SQLException sqle)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sqle: \" + sqle.getMessage());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void updateUserScore(String user, int points) {\n this.onlineUsers.computeIfPresent(user, (k, v) -> {\n User updated = v.setScore(v.getScore() + points);\n if (Policy.IMMEDIATELY.equals(this.policy)) {\n this.safeUpdate(updated);\n }\n return updated;\n });\n }", "public void addNewPlayerStatsToStats(String username) throws IOException{\r\n\t\tScanner statsReader = new Scanner(new BufferedReader(new FileReader(\"statistics.txt\")));\r\n\t\tint numberOfPlayers = statsReader.nextInt();\r\n\t\tPlayerStats[] statsDirectory = new PlayerStats[numberOfPlayers];\r\n\t\t\r\n\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\tPlayerStats tempPlayerStats = new PlayerStats();\r\n\t\t\t/* load temporary stats object with stats */\r\n\t\t\treadPlayerStats(tempPlayerStats, statsReader);\r\n\t\t\t/* add new stats object to directory */\r\n\t\t\tstatsDirectory[count] = tempPlayerStats;\r\n\t\t}\r\n\t\t\r\n\t\tstatsReader.close();\r\n\t\t/* rewrite the statistics file with user stats reset */\r\n\t\tFileWriter writer = new FileWriter(\"statistics.txt\");\r\n\t\tBufferedWriter statsWriter = new BufferedWriter(writer);\r\n\t\tnumberOfPlayers++;\r\n\t\tInteger numPlayers = numberOfPlayers;\r\n\t\tstatsWriter.write(numPlayers.toString()); // write the number of players\r\n\t\tstatsWriter.write(\"\\n\");\r\n\t\tfor(int count = 0; count < numberOfPlayers - 1; count++) { // - 1 because numberOfPlayers was incremented\r\n\t\t\tstatsWriter.write(statsDirectory[count].playerStatsToString()); // write player to statistics.txt\r\n\t\t}\r\n\t\t/* add new entry with 0s at end */\r\n\t\t\tInteger zero = 0;\r\n\t\t\tstatsWriter.write(username);\r\n\t\t\tstatsWriter.write(\"\\n\");\r\n\t\t\t\r\n\t\t\tfor(int count = 0; count < 5; count++) {\r\n\t\t\t\tstatsWriter.write(zero.toString());\r\n\t\t\t\tstatsWriter.write(\"\\n\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\tstatsWriter.close();\r\n\t}", "public void addUserToFirestore() {\n if (isSignedIn()) {\n getUserTask().addOnCompleteListener(\n new OnCompleteListener<DocumentSnapshot>()\n {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSuccessful() && !task.getResult().exists()) {\n setUser(userMap(false));\n setAnalysis(analysisMap(new ArrayList<String>()));\n setSlouches(slouchMap(new ArrayList<Date>(), new ArrayList<Double>()));\n }\n }\n });\n }\n }", "public int add(Users student) {\n\t\treturn this.userDao.add(student);\n\t}", "public void addUser() {\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tframeManager.addUser(user);\r\n\t\t\tpesquisar();\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}", "public void addUser(User user){\r\n users.add(user);\r\n }", "public void addScore(int n){\n\t\tscore += n;\n\t}", "public static void addUser(String name)\n {\n userList.add(name);\n }", "public WinnerProfile(String name, int score){\n this.name=name;\n this.score=score;\n }", "public void addUser(String userName) throws Exception {\r\n try {\r\n if (users.size() < MAX_USERS) {\r\n for (int i = 0; i < users.size(); i++) {\r\n if (users.get(i).getUserName().equalsIgnoreCase(userName) && users.get(i) != null)\r\n throw new Exception(\"Error: Name Already Exist\");\r\n }\r\n users.add(new User(userName, users.size(), users.size() + 1));\r\n } else throw new Exception(\"Error: Reached Maximum User Capacity\");\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n }", "public static void incrementScore() {\n\t\tscore++;\n\t}", "private void addUserToDatabase( DatabaseReference postRef) {\n\n // check username, password cannot be null and may not have spaces\n final String usernameChecked = checkNullString(usernameText.getText().toString());\n final String password = checkNullString(passwordText.getText().toString());\n final String confirmPassword = checkNullString(confirmPasswordText.getText().toString());\n\n if (usernameChecked == null || password == null) {\n Toast.makeText(this, \"Entries may not be null, and may not have spaces!\", Toast.LENGTH_LONG).show();\n return;\n }\n\n if (!password.equals(confirmPassword)){\n Toast.makeText(this, \"Passwords do not match!\", Toast.LENGTH_LONG).show();\n return;\n }\n\n if (users.contains(usernameChecked)){\n Toast.makeText(this, \"Username is already taken\", Toast.LENGTH_LONG).show();\n return;\n }\n\n // initialize data for SentCount\n postRef\n .child(\"Users\")\n .child(usernameChecked)\n .runTransaction(new Transaction.Handler() {\n\n @NonNull\n @Override\n public Transaction.Result doTransaction(@NonNull MutableData currentData) {\n User newUser = new User(usernameChecked, password);\n currentData.setValue(newUser);\n return Transaction.success(currentData);\n }\n\n @Override\n public void onComplete(@Nullable DatabaseError error, boolean committed,\n @Nullable DataSnapshot currentData) {\n Log.d(TAG, \"postTransaction:onComplete:\" + currentData);\n Toast.makeText(getApplicationContext(), \"Sign up successful!\", Toast.LENGTH_LONG);\n finish();\n }\n });\n }", "public int insertUser(final User user);", "public void add(String[] fields) {\n // 0->reviewer, 1->Movie, 2->rating\n\n if (Integer.parseInt(fields[2]) < 1 || Integer.parseInt(\n fields[2]) > 10) {\n System.out.println(\"Bad score |\" + fields[2]\n + \"|. Scores must be between 1 and 10.\");\n return;\n }\n\n reviewerTable.insert(fields[0], \"Reviewer\");\n movieTable.insert(fields[1], \"Movie\");\n\n matrix.insert(fields[0], fields[1], Integer.parseInt(fields[2]));\n\n System.out.println(\"Rating added: |\" + fields[0] + \"|, |\" + fields[1]\n + \"|, \" + fields[2]);\n\n }", "public void updatePlayerScoreForUsername(String username) {\n for (Player P : fliegeScore.getPlayers()) {\n if (P.getPlayerName().compareTo(username) == 0) {\n P.setScore(P.getScore() + 1);\n }\n }\n }", "public void addScore(Double score) {\n this.scoreList.add(score);\n // each time a new score is added, sort it\n Collections.sort(scoreList, Collections.reverseOrder());\n }", "public int addUser(Users users);", "@Override\n\tpublic void addUser(User user) {\n mapper.addUser(user);\n\t}", "private void writeNewUser(String userId, String name, String email) {\n User user = new User(name, email);\n\n mDatabase.child(\"users\")\n .child(userId)\n .child(\"Name\").setValue(name);\n\n mDatabase.child(\"users\")\n .child(userId)\n .child(\"Email\").setValue(email);\n\n\n }", "@Override\n\tpublic void addNewUser(User user) {\n\t\tusersHashtable.put(user.getAccount(),user);\n\t}", "public static void insertNewUser(String user, int points) throws SQLException {\n try {\n Connection connection = DriverManager.getConnection(url, username, password); //Establishing connection\n String insert = \"INSERT INTO TimeAttackLeaderboard (UserName,points) VALUES(?,?)\"; //Select statement\n PreparedStatement statement = connection.prepareStatement(insert);\n statement.setString(1, user);\n statement.setInt(2, points);\n statement.executeUpdate();\n } catch (SQLException e) {\n System.out.println(\"gotta update\");\n Connection connection = DriverManager.getConnection(url, username, password); //Establishing connection\n String update = \"Update TimeAttackLeaderboard SET points=? \" +\n \"WHERE Username=? AND points<?\";\n PreparedStatement statement = connection.prepareStatement(update);\n statement.setInt(1, points);\n statement.setString(2, user);\n statement.setInt(3, points);\n\n statement.executeUpdate();\n //e.printStackTrace();\n }\n }", "public void add(String nickname) {\n\t\tscoreboard.put(nickname, 0);\n\t}", "public void addUser(String userId) {\n addUser(new IndividualUser(userId));\n }", "void addScore(LocusScore ls) {\n double weight = 1;\n final float score = ls.getScore();\n weightedSum += weight * score;\n nPts++;\n\n max = score > max ? score : max;\n }", "void addUser(Username username) throws UserAlreadyExistsException;", "public void createHighScore(String initials, int score) {\n ContentValues values = new ContentValues();\n values.put(COL_SCORE, score);\n values.put(COL_INITIALS, initials);\n\n mDb.insert(TABLE_NAME, null, values);\n }", "public User(String name) {\n\t\tthis.name = name;\n\t\tthis.score = 0;\n\t\tthis.levelReached = 0;\n\t}", "public void addNewUser(String email) {\n String userName = email.split(\"@\")[0];\n mUsersRef.child(userName).setValue(userName);\n userRef = db.getReference(\"users/\" + getUsername());\n userRef.child(\"email\").setValue(email);\n userSigns = new HashMap<String, UserSign>();\n }" ]
[ "0.69722396", "0.691513", "0.66834414", "0.65502065", "0.65175223", "0.6512603", "0.64405453", "0.64362645", "0.64338666", "0.63837147", "0.63625765", "0.63575685", "0.6355846", "0.63298935", "0.6318499", "0.63165075", "0.62822276", "0.62810546", "0.6280093", "0.6192406", "0.6097311", "0.6082522", "0.6066754", "0.6066287", "0.6065748", "0.6020863", "0.60057795", "0.6002224", "0.59944195", "0.59628487", "0.595934", "0.59562004", "0.5943529", "0.59402645", "0.5913405", "0.58859867", "0.5875395", "0.58744675", "0.586985", "0.5841715", "0.58111787", "0.58023876", "0.5798963", "0.579685", "0.5795749", "0.5781123", "0.57706636", "0.576395", "0.57572764", "0.57376105", "0.57372266", "0.5728196", "0.5726382", "0.5723788", "0.57164526", "0.5713334", "0.5713334", "0.5710625", "0.56965095", "0.5684804", "0.5682018", "0.5679346", "0.56773734", "0.5674334", "0.5673122", "0.566866", "0.5661661", "0.565789", "0.5654117", "0.5647", "0.5630796", "0.56296015", "0.5623086", "0.5620138", "0.5614209", "0.5612429", "0.5606591", "0.5603137", "0.5602775", "0.5593987", "0.55937463", "0.5585217", "0.55797994", "0.5579486", "0.557846", "0.55771625", "0.55758506", "0.55730563", "0.55702746", "0.5568506", "0.5566108", "0.55640006", "0.55582786", "0.5554866", "0.5553446", "0.55527395", "0.5543233", "0.55428636", "0.55423677", "0.55394906" ]
0.74965274
0
Opens a server and a port for the game to be played. Each new connection is handled as a thread.
public static void main(String[] args) throws Exception { ServerSocket socket = new ServerSocket(port); System.out.println("Port "+port+" open"); Server server = new Server(); new ScoreThread().start(); while(true){ Socket client = socket.accept(); new ServerThread(client, server).start(); System.out.println("New connection with client "+client.getInetAddress().getHostAddress()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void runServer()\n\t{\n\t\taddText(\"Server started at \" + LocalDateTime.now());\n\t\t\n\t\tint cnt = 0;\n\t\twhile(true)\n\t\t{\n\t\t\ttry {\n\t\t\t\t// Accept a request\n\t\t\t\taddText(\"Server is waiting for connection....\");\n\t\t\t\tSocket client = server.accept();\n\t\t\t\tConnectionThread connect = new ConnectionThread(client);\n\t\t\t\t\n\t\t\t\t// Show message\n\t\t\t\taddText(\"Server is connect!\");\n\t\t\t\taddText(\"Player\" + cnt + \"'s IP address is\" + client.getInetAddress());\n\t\t\t\tcnt++;\n\t\t\t\t\n\t\t\t\t// Add to List\n\t\t\t\tconnectionPool.add(connect);\n\t\t\t\t\n\t\t\t\t// If at least two players, Start the game\n\t\t\t\taddText(\"Pool has \" + connectionPool.size() + \" connection\");\n\t\t\t\tif(connectionPool.size() >= 2)\n\t\t\t\t\tclientStart();\n\t\t\t\t\n\t\t\t\t// Start connectionThread\n\t\t\t\tconnect.start();\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void openServer() {\n try {\n this.serverSocket = new ServerSocket(this.portNumber);\n } catch (IOException ex) {\n System.out.println(ex);\n }\n }", "public void startServer() {\n\r\n try {\r\n echoServer = new ServerSocket(port);\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n // Whenever a connection is received, start a new thread to process the connection\r\n // and wait for the next connection.\r\n while (true) {\r\n try {\r\n clientSocket = echoServer.accept();\r\n numConnections++;\r\n ServerConnection oneconnection = new ServerConnection(clientSocket, numConnections, this);\r\n new Thread(oneconnection).start();\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }\r\n\r\n }", "public void start() {\n // set player number\n playerNumber = clientTUI.getInt(\"set player number (2-4):\");\n while (true) {\n try {\n game = new Game();\n game.setPlayerNumber(playerNumber - 1);\n host = this.clientTUI.getString(\"server IP address:\");\n port = this.clientTUI.getInt(\"server port number:\");\n clientName = this.clientTUI.getString(\"your name:\");\n player = clientTUI.getBoolean(\"are you human (or AI): (true/false)\") ?\n new HumanPlayer(clientName) : new ComputerPlayer(clientName);\n game.join(player);\n // initialize the game\n game.init();\n while (clientName.indexOf(' ') >= 0) {\n clientName = this.clientTUI.getString(\"re-input your name without space:\");\n }\n this.createConnection();\n this.sendJoin(clientName);\n this.handleJoin();\n if (handshake) {\n run();\n } else {\n if (!this.clientTUI.getBoolean(\"Do you want to open a new connection?\")) {\n shutdown();\n break;\n }\n }\n } catch (ServerUnavailableException e) {\n clientTUI.showMessage(\"A ServerUnavailableException error occurred: \" + e.getMessage());\n if (!clientTUI.getBoolean(\"Do you want to open a new connection?\")) {\n shutdown();\n break;\n }\n }\n }\n clientTUI.showMessage(\"Exiting...\");\n }", "@Override\n public final void run() {\n try {\n this.serverSocket = new ServerSocket(port);\n Socket clientSocket = serverSocket.accept();\n this.panel.setVisible(false);\n this.control.createServerGame(clientSocket);\n } catch (IOException ex) {\n Logger.getLogger(ServerThread.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n public void run() {\n new Thread(() -> {\n int port = config.getPort();\n try (ServerSocket server = new ServerSocket(port)) {\n List<ClientConnection> clientlist = new ArrayList<>();\n System.out.println(\"Game Server waiting on Port \" + port + \"!\");\n while (true) {\n Socket client = server.accept();\n\n synchronized (clientlist) {\n ClientConnection cc = new ClientConnection(client, playerId);\n int playerNr = (int) (playerId % 2) + 1;\n cc.start();\n\n clientlist.add(cc);\n System.out.println(\"Client \" + playerNr + \" (playerID: \" + playerId + \") accepted!\");\n\n playerId++; // increase playerId;\n if (clientlist.size() == 2) {\n synchronized (games) { // TODO no sync needed?\n Game game = new Game(clientlist);\n game.start();\n games.add(game);\n clientlist.clear(); // wait for two new clients\n }\n }\n }\n }\n\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }).start();\n }", "public ServerGame(int port)\r\n\t{\r\n\t\tsuper(NetworkMode.SERVER);\r\n\t\tserver = new Server(port, getWorld());\r\n\t}", "public synchronized void start() {\n\t\trunning=true;\n\t\tnew Thread(this).start();\n\t\t\n\t\tif(JOptionPane.showConfirmDialog(this, \"Do you want to run the server\")==0){\n\t\t\tsocketServer = new GameServer(this);\n\t\t\tsocketServer.start();\n\t\t\t\n\t\t}\n\t\tsocketClient=new GameClient(this, \"localhost\");\n\t\tsocketClient.start();\n\t}", "private void runServer()\n\t{\n\t\tif(sm == null)\n\t\t{\n\t\t\tsm = new ServerManager();\n\t\t}\n\t\t\n\t\tint port = 1209;\n\t\ttry \n\t\t{\n\t\t\twaitUser(sm, port);\n\t\t\t//이 아래 로직이 실행된다는건 유저가 다 들어왔다는 뜻임. 즉 게임 시작할 준비 되었음을 의미함\t\t\t\n\t\t\tGame.getInstance().runGame();\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"[Server.runServer()] error >>> : \" + e.getMessage());\n\t\t}\n\t}", "public void Connect() {\n run = new Thread(\"Connect\") {\n @Override\n public void run() {\n running = true;\n try {\n server = new ServerSocket(9080);\n waitingForConnection();\n } catch (IOException ex) {\n Logger.getLogger(Dashboard.class\n .getName()).log(Level.SEVERE, null, ex);\n }\n }\n };\n run.start();\n }", "public void startRunning(){\r\n\t\ttry{\r\n\t\t\twhile( true ){\r\n\t\t\t\tserver = new ServerSocket(PORT);\r\n\t\t\t\ttry{\r\n\t\t\t\t\twaitForClient(1);\r\n\t\t\t\t\twaitForClient(2);\r\n\t\t\t\t\tnew ServerThread(connectionClient1, connectionClient2, this).start();\r\n\t\t\t\t}\r\n\t\t\t\tcatch( EOFException e ){\r\n\t\t\t\t\tshowMessage(\"\\nServer ended the connection\");\r\n\t\t\t\t}\r\n\t\t\t\tfinally {\r\n\t\t\t\t\tserver.close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch( IOException e ){\r\n\t\t}\r\n\t}", "private void createGame(int port, String playername) throws UnableToCreateSocketException, UnknownHostException, IOException, ClassNotFoundException, UnableToStartGameException\n\t{\n\t\tgameServer = new GameServer(port);\n\t\tnew Thread(gameServer).start();\n\t\tjoinGame(\"localhost\", port, playername);\n\t}", "public void connectToServerPVP() {\n\n\t\ttry \n\t\t{\n\t\t\tSocket socket = new Socket(host, 8001);\n\t\t\tfromServer = new DataInputStream(socket.getInputStream());\n\t\t\ttoServer = new DataOutputStream(socket.getOutputStream());\n\n\t\t\ttoServer.writeInt(vsPLAYER);\n\n\t\t} catch (IOException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\n\t\tThread thread = new Thread(new clientHandlingPlayer(fromServer, toServer));\n\t\tthread.start();\n\t}", "public TCPGameClient(String host, int port)\n throws IOException {\n this.host = host;\n this.port = port;\n\n done = false;\n thread = new Thread(this);\n\n setupSocketToUse(new Socket(host, port));\n }", "public void startConnection(String ip, int port) {\n try {\n clientSocket = new Socket(ip, port);\n Debugger.logConnect(String.format(\"Client bind to IP:%s PORT:%d\",ip,port));\n out = new ObjectOutputStream(clientSocket.getOutputStream());\n in = new ObjectInputStream(clientSocket.getInputStream());\n this.gameLoop();\n }\n catch (IOException e)\n {\n Debugger.logError(e.getMessage());\n } catch (InterruptedException e) {\n Debugger.logError(e.getMessage());\n } catch (ClassNotFoundException e) {\n Debugger.logError(e.getMessage());\n }\n finally {\n\n }\n\n }", "@Override\n public void run() {\n Thread.currentThread().setName(\"Game logic thread\");\n\n // Wait until all players are connected\n List<Player> players = new ArrayList<Player>(playerCount);\n try (ServerSocket server = new ServerSocket(port)) {\n System.out.println(\"Wizard Server running and waiting for connections...\");\n while (players.size() != playerCount) {\n Socket client = server.accept();\n synchronized(players) {\n ClientConnectionHandler con = new ClientConnectionHandler(client);\n new Thread(con).start();\n\n Player player = new Player(playerNames[players.size()], con);\n players.add(player);\n\n System.out.printf(\"New player connected: %s\\n\", player);\n }\n }\n } catch (IOException e) {\n System.err.println(\"IOException - Error when waiting for clients to connect!\");\n e.printStackTrace();\n return;\n }\n\n // All players are connected - starting the game\n\n Game game = new Game(players);\n game.play();\n System.out.println(\"Game Over!\");\n }", "public void start()\n {\n isRunning = true;\n try\n {\n //metoden opretter en ny socket for serveren på den valgte port\n ServerSocket serverSocket = new ServerSocket(port);\n //mens serveren kører venter den på en client\n while (isRunning)\n {\n serverDisplay(\"Serveren venter på clienter på port: \" + port);\n //accepterer clienten på socketen\n Socket socket = serverSocket.accept();\n\n if (!isRunning)\n {\n break;\n }\n // laver en ny thread til clienten med socketen der er blevet accepteret\n HandleClientThread handleClientThread = new HandleClientThread(socket);\n\n // her blever tråden tilføjet til arryet af clienter\n clientThreadArrayList.add(handleClientThread);\n // Starer handleclient tråden som håndtere clienter\n handleClientThread.start();\n }\n try\n {\n //Her lukker serveren socketen\n serverSocket.close();\n for (int i = 0; i < clientThreadArrayList.size() ; i++)\n {\n HandleClientThread hct = clientThreadArrayList.get(i);\n try\n {\n hct.inputStream.close();\n hct.outputStream.close();\n hct.socket.close();\n }\n catch (IOException e)\n {\n System.out.println(\"Uknowen command \" + e);\n }\n }\n }\n catch (Exception e)\n {\n serverDisplay(\"Kunne ikke lukke serveren og clienterne pga. \" + e);\n }\n }\n catch (IOException e)\n {\n String message = dateFormat.format(new Date()) + \"Fejl på ny server socket\" + e + \"\\n\";\n serverDisplay(message);\n }\n }", "private static void startConnection_RunApplication(int port) {\n ServerSocket s1;\n Socket s2;\n int id = 1;\n ServerApplication s2_thread;\n boolean error = false;\n\n s1 = startServer(port);\n if (s1 != null) {\n // iterate almost infinitely\n while (!error) {\n try {\n // accepts connection and creates client socket\n s2 = s1.accept();\n System.out.println(\"Client [ \" + id + \" ] \" + \"connection established: \" + s2.getInetAddress());\n // starts a new thread with the new client socket\n // this way the main thread here can iterate and wait for new connections\n s2_thread = new ServerApplication(s2, id);\n s2_thread.start();\n id++;\n } catch (IOException ex) {\n System.err.println(\"Closing connection... An error has occurred during execution.\");\n error = true;\n }\n }\n try {\n s1.close();\n } catch (IOException ex) {\n System.err.println(\"Error closing server socket\");\n }\n } else {\n print_help();\n }\n }", "public void runServer(){\n try {\n serverSocket = new ServerSocket(portNumber);\n } catch (IOException ioe){\n System.out.println(ioe.getMessage());\n }\n \n while (true) { \n try {\n Socket clientSocket = serverSocket.accept();\n InetAddress inetAddress = clientSocket.getInetAddress();\n System.out.println(\"Connected with \" + inetAddress.getHostName()+ \".\\n IP address: \" + inetAddress.getHostAddress() + \"\\n\");\n new Thread(new RequestHandlerRunnable(clientSocket, database)).start();\n } catch (IOException ioe){\n System.out.println(ioe.getMessage());\n }\n }\n \n }", "public void startRunning(){\n\t\ttry{\n\t\t\tserver = new ServerSocket(6789, 100);\n\t\t\t//int Port Number int 100 connections max (backlog / queue link)\n\t\t\twhile(true){\n\t\t\t\ttry{\n\t\t\t\t\twaitForConnection();\n\t\t\t\t\tsetupStreams();\n\t\t\t\t\twhileChatting();\n\t\t\t\t\t//connect and have conversation\n\t\t\t\t}catch(EOFException eofe){\n\t\t\t\t\tshowMessage(\"\\n Punk Ass Bitch.\");\n\t\t\t\t}finally{\n\t\t\t\t\tcloseChat();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(IOException ioe){\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}\n\t}", "public static void serverConnection(String port) throws IOException{\n\t\t\n\t\t//Extract the port number\n\t\tint port_num;\n\t\tif (port.length() != 0) {\n\t\t\tport_num = Integer.parseInt(port); \n\t\t}\n\t\telse {\n\t\t\tport_num = 4444; \n\t\t}\n\t\t\n\t\t\n\t\t//Create server socket\n\t\tServerSocket serverSocket = null; \n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(port_num);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Could not listen to port: \" + port); \n\t\t}\n\t\t\n\t\t//Accept client socket\n\t\tSocket clientSocket = null; \n\t\tboolean open = true;\n\t\twhile(open) {\n\t\t\ttry {\n\t\t\t\tclientSocket = serverSocket.accept(); \n\n\t\t\t}catch(IOException e) {\n\t\t\t\tif (!open) {\n\t\t\t\t\tSystem.err.println(\"Server not running\");\n\t\t\t}\t\n\t\t }\t\n\t\t}\t\t\n\t}", "public void onlineGame(Integer portNumber, String serverName, boolean server, boolean human) {\n\t\t// log as network game:\n\t\tnetworkGame = true;\n\t\t// boolean to record game progress:\n\t\tgameFinished = false;\n\t\t// establish player type, construct controller\n\t\tif (server) {\n\t\t\tplayerType = 1;\n\t\t} else {\n\t\t\tplayerType = 2;\n\t\t}\n\t\tcontroller = new MultiController(playerType,human,game,controller.newGame());\n\n\t\t// server-side setup\n\t\tif (server) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"setting up server... \");\n\t\t\t\tServerSocket serverSocket = new ServerSocket(portNumber);\n\t\t\t\tSystem.out.println(\"awaiting client...\");\n\t\t\t\tconnection = serverSocket.accept();\n\t\t\t\tSystem.out.println(\"connection established as server.\");\n\t\t\t\toutput = new ObjectOutputStream(connection.getOutputStream());\n\t\t\t\tinput = new ObjectInputStream(connection.getInputStream());\t\n\t\t\t\tSystem.out.println(\"streams established as server.\");\n\t\t\t\t// we move, don't read\n\t\t\t\tthis.reader = false;\n\t\t\t\tcontroller.move();\n\t\t\t} catch (IOException x) {\n\t\t\t\tx.printStackTrace();\n\t\t\t}\n\t\t} // client-side setup\n\t\telse {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"setting up client...\");\n\t\t\t\tconnection = new Socket(serverName,portNumber);\n\t\t\t\tSystem.out.println(\"connection established as client.\");\n\t\t\t\toutput = new ObjectOutputStream(connection.getOutputStream());\n\t\t\t\tinput = new ObjectInputStream(connection.getInputStream());\n\t\t\t\t// we read before we move\n\t\t\t\tthis.reader = true;\n\t\t\t\tSystem.out.println(\"streams established as client.\");\n\t\t\t} catch (Exception x) {\n\t\t\t\tx.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void start()\r\n {\r\n System.out.print(\"Server host? [localhost]: \");\r\n String host = scanner.nextLine().trim();\r\n if(host.length() == 0)\r\n {\r\n host = \"localhost\";\r\n }\r\n \r\n System.out.print(\"Server port? [2345]: \");\r\n String portString = scanner.nextLine().trim();\r\n if(portString.length() == 0)\r\n {\r\n portString = \"2345\";\r\n }\r\n int port = Integer.parseInt(portString);\r\n //trying to establish connection through the socket\r\n try(Socket socket = new Socket(host, port))\r\n {\r\n //creating i/o streams\r\n outputStream = new ObjectOutputStream(socket.getOutputStream());\r\n HelloRequest request = new HelloRequest();\r\n request.setName(\"world\");\r\n outputStream.writeObject(request);\r\n inputStream = new ObjectInputStream(socket.getInputStream());\r\n inputStream.readObject();\r\n System.out.println(\"Server connected.\");\r\n \r\n // login.\r\n while(!this.login())\r\n {\r\n ;\r\n }\r\n \r\n // Executing users input\r\n options:\r\n while(true)\r\n {\r\n try\r\n {\r\n int option = this.readOption(\"1. Create a game 2. Set commands 3. Get high scores 4. Delete a game 5. Start a game 6. Show a game 7. Logout : \", 1, 7);\r\n switch(option)\r\n {\r\n case 1: this.createGame(); break;\r\n case 2: this.setCommands(); break;\r\n case 3: this.getHighScores(); break;\r\n case 4: this.deleteGame(); break;\r\n case 5: this.startGame(); break;\r\n case 6: this.showGame(); break;\r\n case 7: this.logout(); break options;\r\n }\r\n }catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }\r\n }catch(Exception e)\r\n {\r\n throw new RuntimeException(e);\r\n }\r\n }", "public void start() {\n\t\t\n\t\ttry {\n\t\t\tmainSocket = new DatagramSocket(PORT_NUMBER);\n\t\t}\n\t\tcatch(SocketException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t//Lambda expression to shorten the run method\n\t\tThread serverThread = new Thread( () -> {\n\t\t\tlisten();\n\t\t});\n\t\t\n\t\tserverThread.start();\n\t}", "public void connect(String host, int port) {\n\t\t\n\t\ttry {\n\t\t\tconnection = new Socket(host, port);\n\t\t\tdis = new DataInputStream(connection.getInputStream()); // get data from sever\n\t\t\tdos = new DataOutputStream(connection.getOutputStream()); // get data to server\n\t\t\t\t\t\t\n\t\t\tJDialog.setDefaultLookAndFeelDecorated(true);\n\t\t Object[] selectionValues = { \"Chess\", \"Mill\"};\n\t\t String initialSelection = \"Chess\";\n\t\t selection = JOptionPane.showInputDialog(null, \"Select a Game\",\n\t\t \"Select a game\", JOptionPane.QUESTION_MESSAGE, null, selectionValues, initialSelection);\n\n\t\t setupStates();\t\t\n\t\t\tthis.start();\n\t\t\t\n\t\t} catch (IOException ieo) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Server is not running\", \"Connection Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t}", "private void startServer(){\n clients = new ArrayList<ClientThread>();\n ServerSocket ClientSocket = null;\n try {\n ClientSocket = new ServerSocket(ClientPort);\n ClientSocketConnection(ClientSocket);\n } catch (IOException e){\n e.printStackTrace();\n System.exit(1);\n }\n }", "@Override\n\tpublic void run() \n\t{\n\t\tcommunicator = com.zeroc.Ice.Util.initialize();\n GameServerPrx clientPrx = GameServerPrx.checkedCast(\n communicator.stringToProxy(\"client:default -h 58.167.142.74 -p 10002\")).ice_twoway().ice_secure(false).ice_collocationOptimized(false).ice_compress(true);\n\n if(clientPrx == null)\n {\n //If connection is failed due to server problems\n System.err.println(\"SB Connect: \" + \"Invalid proxy\");\n return;\n }\n System.out.println(\"SB Connect: \" + \"Connected\");\n Server server = new Server();\n server.address = ServerInfo.ADDRESS;\n server.UUID = ServerInfo.UUID;\n server.port = ServerInfo.PORT;\n server.name = ServerInfo.NAME;\n server.players = (short) players;\n\t\tclientPrx.sendServerDetails(server);\n\t\tSystem.out.println(\"SB Connect: \" + \"Data sent\");\n\t}", "public GameServer(int portNum)\n\t{\n\t\tport = portNum;\n\t}", "public void start()\r\n\t\t{\r\n\t\tDebug.assert(serverSocket != null, \"(Server/123)\");\r\n\r\n \t// flag the server as running\r\n \tstate = RUNNING;\r\n\r\n // Loop while still listening, accepting new connections from the server socket\r\n while (state == RUNNING)\r\n \t{\r\n // Get a connection from the server socket\r\n\t\t\tSocket socket = null;\r\n\t\t\ttry {\r\n socket = serverSocket.accept();\r\n \tif (state == RUNNING) \r\n \t createLogin(socket);\r\n }\r\n \r\n // The socket timeout allows us to check if the server has been shut down.\r\n // In this case the state will not be RUNNING and the loop will end.\r\n\t\t catch ( InterruptedIOException e )\r\n\t\t \t{\r\n\t\t \t// timeout happened\r\n\t\t \t}\r\n\t\t \r\n\t\t // This shouldn't happen...\r\n \t catch ( IOException e )\r\n \t \t{\r\n log(\"Server: Error creating Socket\");\r\n \t \tDebug.printStackTrace(e);\r\n \t }\r\n\t }\r\n\t \r\n\t // We've finished, clean up\r\n disconnect();\r\n\t\t}", "private static void openServerSocket(int port) {\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(port);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Server Error\");\n\t\t}\n\t}", "public void run() {\n try {\n this.listener = new ServerSocket(port);\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n // On new connections, start a new thread to handle communications.\n try {\n while(true) {\n new Handler(this.listener.accept()).start();\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n this.listener.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public void start(int port)\n\t{\n\t\t// Initialize and start the server sockets. 08/10/2014, Bing Li\n\t\tthis.port = port;\n\t\ttry\n\t\t{\n\t\t\tthis.socket = new ServerSocket(this.port);\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Initialize a disposer which collects the server listener. 08/10/2014, Bing Li\n\t\tMyServerListenerDisposer disposer = new MyServerListenerDisposer();\n\t\t// Initialize the runner list. 11/25/2014, Bing Li\n\t\tthis.listenerRunnerList = new ArrayList<Runner<MyServerListener, MyServerListenerDisposer>>();\n\t\t\n\t\t// Start up the threads to listen to connecting from clients which send requests as well as receive notifications. 08/10/2014, Bing Li\n\t\tRunner<MyServerListener, MyServerListenerDisposer> runner;\n\t\tfor (int i = 0; i < ServerConfig.LISTENING_THREAD_COUNT; i++)\n\t\t{\n\t\t\trunner = new Runner<MyServerListener, MyServerListenerDisposer>(new MyServerListener(this.socket, ServerConfig.LISTENER_THREAD_POOL_SIZE, ServerConfig.LISTENER_THREAD_ALIVE_TIME), disposer, true);\n\t\t\tthis.listenerRunnerList.add(runner);\n\t\t\trunner.start();\n\t\t}\n\n\t\t// Initialize the server IO registry. 11/07/2014, Bing Li\n\t\tMyServerIORegistry.REGISTRY().init();\n\t\t// Initialize a client pool, which is used by the server to connect to the remote end. 09/17/2014, Bing Li\n\t\tClientPool.SERVER().init();\n\t}", "@Test\r\n public void startServerAndThreads() throws IOException {\r\n //init\r\n InetAddress iPAddress = InetAddress.getByName(\"localhost\");\r\n int port = 99;\r\n\r\n Server server = new Server(port, iPAddress);\r\n server.start();\r\n }", "@Override\n\tpublic void run() {\n\n\t\tServerSocket sSocket;\n\t\ttry {\n\t\t\tsSocket = new ServerSocket(15001);\n\t\t\tSystem.out.println(\"server listening at \" + sSocket.getLocalPort());\n\t\t\twhile (true) {\n\t\t\t\t// this is an unique socket for each client\n\t\t\t\tSocket socket = sSocket.accept();\n\t\t\t\tSystem.out.println(\"Client with port number: \" + socket.getPort() + \" is connected\");\n\t\t\t\t// start a new thread for handling requests from the client\n\t\t\t\tClientRequestHandler requestHandler = new ClientRequestHandler(sketcher, socket, scene, playerMap);\n\t\t\t\tnew Thread(requestHandler).start();\n\t\t\t\t// start a new thread for handling responses for the client\n\t\t\t\tClientResponseHandler responseHandler = new ClientResponseHandler(socket, scene, playerMap);\n\t\t\t\tnew Thread(responseHandler).start();\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t}\n\t}", "public void startListener() throws IOException {\n\t\tthis.listener = new ServerSocket(this.port);\n\n Runnable serverThread = new Runnable() {\n @Override\n public void run() {\n try {\n System.out.println(\"Waiting for clients to connect...\");\n\n while (true) {\n \t// Wait for connections\n Socket newSocket = listener.accept();\n\n // Init new peer and add it to our list\n PeerCommunicator newCommunication = new PeerCommunicator(id, \"\", newSocket);\n activePeers.add(newCommunication);\n\n // Span new thread\n Thread clientThread = new Thread(new ReceivedConnection(newCommunication, fm));\n clientThread.start();\n }\n } catch (Exception e) {\n System.err.println(\"Unable to process incoming client\");\n e.printStackTrace();\n }\n }\n };\n\n // Start it up\n (new Thread(serverThread)).start();\n\n // Once everything's good, mark server as running\n //this.status = Status.RUNNING;\n\t}", "public void startServer() throws Exception\n {\n\t\t\tString SERVERPORT = \"ServerPort\";\n\t\t\tint serverport = Integer.parseInt(ConfigurationManager.getConfig(SERVERPORT));\n\t\t\t\n \n Srvrsckt=new ServerSocket ( serverport );\n while ( true )\n {\n Sckt =Srvrsckt.accept();\n new Thread ( new ConnectionHandler ( Sckt ) ).start();\n }\n \n \n\n\n }", "private JavashipsServer() {\n\t\ttry {\n\t\t\tServerSocket server = new ServerSocket(PORT);\n\n\t\t\tSystem.out.println(new Date().toString() + \" - Now accepting clients.\");\n\n\t\t\t/* Listen for connecting players */\n\t\t\twhile (true) {\n\t\t\t\tSystem.out.println(\"Waiting for 2 players to connect.\");\n\n\t\t\t\t/* Intercept the first player. */\n\t\t\t\tPlayer player1 = new Player(server.accept(), \"Player 1\");\n\t\t\t\tSystem.out.println(new Date().toString() +\n\t\t\t\t\t\t\" - First player has been found: \" +\n\t\t\t\t\t\tplayer1.playerSocket.getInetAddress().getHostAddress() +\n\t\t\t\t\t\t\"/\" +\n\t\t\t\t\t\tplayer1.playerSocket.getPort());\n\n\t\t\t\tplayer1.setFirstAttacker();\n\n\t\t\t\t/* Intercept the second player. */\n\t\t\t\tPlayer player2 = new Player(server.accept(), \"Player 2\");\n\t\t\t\tSystem.out.println(new Date().toString() +\n\t\t\t\t\t\t\" - Second player has been found: \" +\n\t\t\t\t\t\tplayer2.playerSocket.getInetAddress().getHostAddress() +\n\t\t\t\t\t\t\"/\" +\n\t\t\t\t\t\tplayer2.playerSocket.getPort());\n\n\t\t\t\t/* Let the players know who to talk to when talking to their opponent. */\n\t\t\t\tplayer1.setOpponent(player2);\n\t\t\t\tplayer2.setOpponent(player1);\n\n\t\t\t\tplayer1.start();\n\t\t\t\tplayer2.start();\n\t\t\t}\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void startClientServer() {\n try {\n this.server_socket = new ServerSocket( port );\n this.start();\n } catch (IOException e ) {\n System.err.println( \"Failure: Socket couldn't OPEN! -> \" + e );\n } finally {\n System.out.println( \"Success: Server socket is now Listening on port \" + port + \"...\" );\n }\n }", "public void startServer(){\r\n try {\r\n\r\n while(true){\r\n\r\n s = sc.accept();\r\n new ServerThread(s).start();\r\n }\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n finally {\r\n try {\r\n sc.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "private static void startServer() {\n new Thread() {\n public void run() {\n Server server = new Server();\n server.startUDP();\n }\n }.start();\n }", "public boolean startClient(OnlineScene game) {\n InetSocketAddress hostAddress = new InetSocketAddress(Client.address, port);\n try {\n client = SocketChannel.open(hostAddress);\n client.configureBlocking(true);\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n\n name = Scene.userInfo != null ? Scene.userInfo.getUserID() : UIHandler.username;\n\n log(\"started\");\n this.game = game;\n\n startThreads();\n sendRegisterMessage();\n return true;\n }", "void startServer(int port) throws Exception;", "public DungeonServer(int port){\n\t\t/*Constructor sets the server up and defaults class fields. \n\t\t * Assigns the programme to run on the argument port*/\n\t \ttry{\n\t server = new ServerSocket(port);\n\t game = new GameLogic(\"SmallMap.txt\");\n\t }\n\t \tcatch(IOException | ParseException e){\n\t\t System.out.println(\"Sorry, there was an error in construction! \");\n\t \t}\n\t}", "@Override\n public void initClient(final String hostName, final String serverAddr, \n final int serverPort) {\n final GameBoard gameBoard = new GameBoard(Controller.DEFAULT_GRID_SIZE);\n gameBoard.setVisible(true);\n gameBoard.toConsole(\"Hello \" + hostName);\n gameBoard.toConsole(\"Connecting to server...\");\n \n SwingWorker socketWorker = new SwingWorker<Socket, Integer>() {\n\n @Override\n protected Socket doInBackground() throws Exception {\n \n Socket socket = null;\n try {\n //attempt to connect to the server\n socket = new Socket(serverAddr, serverPort);\n \n gameBoard.toConsole(\"Connection successful!!\");\n gameBoard.toConsole(\"Waiting for opponent...\");\n \n /* Open an input stream to read messages from the server.\n * If we are the first of two players attempting a connection\n * then we will get two messages from the server - one to \n * let us know the server is waiting for an opponent and \n * another to let us know two clients are connected. There\n * is also the possibility that the \n */\n \n DataInputStream in = new DataInputStream(socket.getInputStream());\n \n int messageCode = in.readInt();\n String controlFlag = Controller.GO_SECOND;\n \n if(messageCode == WAITING_CODE) {\n gameBoard.toConsole(\"Waiting for opponent...\");\n messageCode = in.readInt();\n controlFlag = Controller.GO_FIRST;\n }\n\n if(messageCode == ALL_OPPONENTS_READY) {\n \n new Controller(hostName, controlFlag, socket, gameBoard);\n }\n else if(messageCode == ERROR_CODE){\n //get the error message\n gameBoard.toConsole(in.readUTF());\n }\n \n }\n catch(UnknownHostException e) {\n gameBoard.toConsole(e.toString());\n }\n catch(IOException e) {\n System.out.println(e);\n }\n \n return socket;\n }\n \n };\n \n socketWorker.execute();\n \n }", "public OOXXServer(){\n\t\ttry\n\t\t{\n\t\t\tserver = new ServerSocket(port);\n\t\t\t\n\t\t}\n\t\tcatch(java.io.IOException e)\n\t\t{\n\t\t}\n\t}", "public void runServer() {\n\t\tint i = 0;\n\n\t\tclientList = new ArrayList<>();\n\t\ttry {\n\t\t\tServerSocket listener = new ServerSocket(port);\n\n\t\t\tSocket server;\n\n\t\t\tprintDetails();\n\n\t\t\twhile ((i++ < maxConnections) || (maxConnections == 0)) {\n\n\t\t\t\tserver = listener.accept();\n\t\t\t\tSession session = new Session(server, this.storageLocation );\n\n\t\t\t\tnew Thread(session).start();\n\n\t\t\t\tString name = session.getName();\n\t\t\t\tSystem.out.printf(\"%s STARTED\\r\\n\", name );\n\t\t\t\tclientList.add( session );\n\t\t\t\tdoGC();\n\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"IOException on socket listen: \" + ioe);\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "void connectToServer(String serverName, int serverPort){\n try{\n this.socket = new Socket(serverName, serverPort);\n } catch(IOException e){\n e.printStackTrace();\n }\n \n }", "private void start(String[] args){\n\t\tServerSocket listenSocket;\n\n\t\ttry {\n\t\t\tlistenSocket = new ServerSocket(Integer.parseInt(args[0])); //port\n\t\t\tSystem.out.println(\"Server ready...\");\n\t\t\twhile (true) {\n\t\t\t\tSocket clientSocket = listenSocket.accept();\n\t\t\t\tSystem.out.println(\"Connexion from:\" + clientSocket.getInetAddress());\n\t\t\t\tClientThread ct = new ClientThread(this,clientSocket);\n\t\t\t\tct.start();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error in EchoServer:\" + e);\n\t\t}\n\t}", "public void makeConnection() {\n\t\ttry {\n\t\t\tif(sock != null) {\n\t\t\t\ttable.printMsg(\"Cannot join a server twice! You've already connected.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsock = new Socket(serverIP, serverPort);\n\t\t\toos = new ObjectOutputStream(sock.getOutputStream());\n\t\t\tois = new ObjectInputStream(sock.getInputStream());\n\t\t\tThread thread = new Thread(new ServerHandler());\n\t\t\tthread.start();\n\t\t} catch(Exception e) {\n\t\t\ttable.printMsg(\"Cannot Join Server.\");\n\t\t\tsock = null;\n\t\t\ttable.repaint();\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void run(){\n\n\t\tServerSocket socketEcoute;\n\t\ttry {\n\t\t\tsocketEcoute = new ServerSocket();\n\t\t\tsocketEcoute.bind(new InetSocketAddress(this.defaultPort));\n\t\t\tSystem.out.println(\"Port manager started on : \"+this.defaultPort);\n\t\t\twhile(true){\n\t\t\t\tSocket socketConnexion = socketEcoute.accept();\n\t\t\t\tSystem.out.println(\"Someone is connected on PortManager\");\n\t\t\t\t\n\t\t\t\tnew PortManagerThread(socketConnexion,this.ctrl).start();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void connection() {\n boolean connect;\n try {\n connect = true;\n this.jTextArea1.setText(\"Server starts...\");\n server = new MultiAgentServer(this);\n String ip = \"\";\n int errorBit = 256;\n for (int i = 0; i < server.getIpAddr().length; i++) {\n int currentIP = server.getIpAddr()[i];\n if (currentIP < 0) {\n currentIP += errorBit;\n }\n ip += currentIP + \".\";\n }\n ip = ip.substring(0, ip.length() - 1);\n System.out.println(ip);\n Naming.rebind(\"//\" + ip + \"/server\", server);\n this.jTextArea1.setText(\"Servername: \" + ip);\n this.jTextArea1.append(\"\\nServer is online\");\n } catch (MalformedURLException | RemoteException e) {\n this.jTextArea1.append(\"\\nServer is offline, something goes wrong!!!\");\n connect = false;\n }\n if (dialog.getMusicBox().isSelected()) {\n sl = new SoundLoopExample();\n }\n reconnectBtn.setEnabled(!connect);\n }", "public void run() {\n\t\tServerSocket serverSocket = null;\n\t\texecutor = Executors.newCachedThreadPool();\n\t\t\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(PORT);\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.log(Level.SEVERE, \"Server won't start\", e);\n\t\t}\n\t\t\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tplayers = new ArrayList<ClientInfo>();\n\t\t\t\tfor (activeConnections = 0; activeConnections < PLAYERSPERGAME;) {\n\t\t\t\t\tSocket socket = serverSocket.accept();\n\t\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\t\t\tString nickname = in.readLine();\n\t\t\t\t\tboolean newPlayer = true;\n\t\t\t\t\tfor (ClientInfo client: playersInGame) {\n\t\t\t\t\t\tif (nickname.equals(client.getNickname())) {\n\t\t\t\t\t\t\tif (!client.isOnline()) {\n\t\t\t\t\t\t\t\tplayerBackInGame(client,socket);\n\t\t\t\t\t\t\t\tnewPlayer= false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tString response = null;\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tclient.getOutputStream().println(Command.PING);\n\t\t\t\t\t\t\t\t\tresponse = client.getInputStream().readLine();\n\t\t\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t\t\tLOGGER.log(Level.INFO, \"Ping unsuccessful\", e1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (response == null) {\n\t\t\t\t\t\t\t\t\tplayerBackInGame(client,socket);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tPrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())), true);\n\t\t\t\t\t\t\t\tout.println(Message.NICK_ALREADY_IN_USE);\n\t\t\t\t\t\t\t\tnewPlayer = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (newPlayer && !players.isEmpty()) {\n\t\t\t\t\t\tfor (ClientInfo player : players) {\n\t\t\t\t\t\t\tif (player.getNickname().equals(nickname)) {\n\t\t\t\t\t\t\t\tnewPlayer=false;\n\t\t\t\t\t\t\t\tPrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())), true);\n\t\t\t\t\t\t\t\tout.println(Message.NICK_ALREADY_IN_USE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif (newPlayer) {\n\t\t\t\t\t\tif (activeConnections == 0) {\n\t\t\t\t\t\t\tstartNewTimer();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tClientInfo client = new ClientInfo(nickname, socket);\n\t\t\t\t\t\tplayers.add(client);\n\t\t\t\t\t\tactiveConnections++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (timer.isAlive()) {\n\t\t\t\t\ttimer.interrupt();\n\t\t\t\t\tstartNewGame(players);\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tLOGGER.log(Level.SEVERE, \"Can't estabilish connection\", e);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\texecutor.shutdown();\n\t\ttry {\n\t\t\t// Chiude la comunicazione lato server\n\t\t\tserverSocket.close();\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.log(Level.WARNING, \"Can't close server socket\", e);\n\t\t}\n\t}", "public void run() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tSocket s= ss.accept();\n\t\t\t\tif (DEBUG) System.out.println(s.getInetAddress() + \":\" + s.getPort() + \" connected\");\n\t\t\t\tPlayerHandler ph= new PlayerHandler(s); \n\t\t\t\tph.start();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace(); // Default\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "private void startServer() throws IOException {\n while (true) {\n System.out.println(\"[1] Waiting for connection...\");\n\n client = server.accept();\n System.out.println(\"[2] Connection accepted from: \" + client.getInetAddress());\n\n in = new BufferedReader(new InputStreamReader(client.getInputStream()));\n out = new PrintStream(client.getOutputStream(), true);\n\n while (!in.ready()) ;\n\n String line = in.readLine();\n ManageConnections connection = new ManageConnectionsFactory().getConnection(line);\n\n connection.goConnect(client, in, out);\n }\n }", "public void run() {\n\t\t//if this is the server side, create a server socket\n\t\tif( parent.whichPlayer.equals(\"server\") ){\n\t\t\t//create serverSocket on port 1234\n\t\t\ttry {\n\t\t\t\tss = new ServerSocket(1234);\n\t\t\t\tsock = ss.accept();\n\t\t\t\tsc = new Scanner(sock.getInputStream());\n\t\t\t\tpw = new PrintWriter(sock.getOutputStream());\n\t\t\t}catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.out.println(\"Server Socket not able to be established on port 1234\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Input stream created, waiting for input from foreign socket\");\n\t\t}\n\n\t\t//if this is the client side, create a normal socket\n\t\telse{\n\t\t\t//try to create a socket on 1234\n\t\t\ttry {\n\t\t\t\tsock = new Socket(parent.hostnameField.getText(),1234);//create a socket on the IP specified by the player in the hostname box\n\t\t\t\tsc = new Scanner( sock.getInputStream() );\n\t\t\t\tpw = new PrintWriter(sock.getOutputStream());\n\t\t\t}catch(Exception e) {\n\t\t\t\tSystem.out.println(\"Could not create connection on localhost\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t//send a single line with name to other side\n\t\tpw.println(\"N \" + parent.myName);\n\t\tpw.flush();\n\t\t\n\t\t//read single line for name`\n\t\t//wait for input from client side\n\t\tString input = sc.nextLine();\n\t\tprocessInput(input);\n\t\tparent.displayInstruction.setText(\"Connection Established, It is \" + parent.playerOneTextField.getText() + \"'s turn\");\n\t\tparent.beginGame = true;\n\t\t\n\t\t//loop and continue to read from the other side\n\t\twhile( sc.hasNextLine() ) {\n\t\t\tinput = sc.nextLine();\n\t\t\tSystem.out.println(\"Read \" + input + \" from the client side\");\n\t\t\tprocessInput(input);\n\t\t}\n\t\t\n\t\t//close all of the scanners and sockets\n\t\t//This should already be handled by the quit button, but in case the player just exits the window\n\t\ttry {\n\t\t\tsock.close();\n\t\t\tpw.close();\n\t\t\tss.close();\n\t\t\tsc.close();\n\t\t}catch(Exception e) {\n\t\t\tSystem.out.println(\"Could not close the sockets/scanner\");\n\t\t}\n\t\t\n\t\tSystem.out.println(\"All sockets and scanners successfully closed\");\n\t\tparent.displayInstruction.setText(\"Connect Lost, Ending Gamplay\");\n\t\tparent.beginGame = false;\n\t\t\n\t}", "public void startServer()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tserverSocket = new ServerSocket(port);\r\n\t\t}\r\n\t\tcatch (IOException e1)\r\n\t\t{\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Waiting for client connection.\");\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tSocket socket = serverSocket.accept();\r\n\t\t\tSystem.out.println(\"Client connects.\");\r\n\r\n\t\t\tObjectInputStream ois = null;\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tois = new ObjectInputStream(new BufferedInputStream(socket.getInputStream()));\r\n\t\t\t\tObject o = ois.readObject();\r\n\t\t\t\tif (!(o instanceof Message))\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception(\"Received information is not message. Skip.\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmessage = (Message) o;\r\n\t\t\t\tSystem.out.println(\"Message received: \" + message);\r\n\t\t\t}\r\n\t\t\tcatch (IOException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tcatch (ClassNotFoundException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tfinally\r\n\t\t\t{\r\n\t\t\t\tCloseUtil.closeAll(ois, socket, serverSocket);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void startRunning() {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tserver = new ServerSocket(6789, 100); //6789 is the port number for docking(Where to connect). 100 is backlog no, i.e how many people can wait to access it.\n\t\t\t\twhile (true) {\n\t\t\t\t\t//This will run forever.\n\t\t\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\t\n\t\t\t\t\t\twaitForConnection();\n\t\t\t\t\t\tsetupStreams();\n\t\t\t\t\t\twhileChatting();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tcatch(EOFException eofException) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tshowMessage(\"\\n The server has ended the connection!\");\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfinally {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcloseAll();\n\t\t\t\t\t\t//Housekeeping.\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tcatch(IOException ioException ) {\n\t\t\t\t\n\t\t\t\tioException.printStackTrace();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void initial() {\n\t\ttry {\r\n\t\t\tserverSocket = new ServerSocket(port);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// System.out.println(\"LocalProxy run on \" + port);\r\n\t}", "@SuppressWarnings(\"resource\")\r\n public void run() {\r\n try {\r\n ServerSocket server = new ServerSocket(ConfigurationFile.getClientPort()[clientNumber-1]);\r\n while(true) {\r\n Socket socket =server.accept();\r\n Thread thread = new Thread(new Connection(socket,hashtable));\r\n thread.start();\r\n }\r\n }\r\n catch(IOException e) {\r\n System.out.println(\"Server socket could not be created. Check configuration file.\");\r\n }\r\n }", "private void joinGame(String server, int port, String playername) throws UnknownHostException, IOException, ClassNotFoundException, UnableToStartGameException\n\t{\n\t\tsocket = new Socket(server, port);\n\t\tobjectInputStream = new ObjectInputStream(socket.getInputStream());\n\t\tObject object = objectInputStream.readObject();\n\t\t//Spielerid empfangen\n\t\tif (object instanceof ClientId)\n\t\t{\n\t\t\tClientId clientId = (ClientId) object;\n\t\t\tplayerId = clientId.getClientId();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new UnableToStartGameException(\"Konnte die Spielerid nicht empfangen.\");\n\t\t}\n\t\t\n\t\t//Dem Server unseren Namen mitteilen\n\t\tthis.objectOutputStream = new ObjectOutputStream(socket.getOutputStream());\n\t\tobjectOutputStream.writeObject(new PlayerName(playername, playerId));\n\t\t\n\t}", "public void setup(){\n\t\ttry{\n\t\t\tSocket serverSocket;\n\t\t\tboolean serverRunning = true;\n\t\t\twhile(serverRunning == true){\n\t\t\t\t serverSocket = server.accept();\n\t\t\t\t System.out.println(\"Connected to the server!\");\n\t\t\t\t DungeonClient connectedClient = new DungeonClient(serverSocket, game);\n\t\t\t\t connectedClient.start();\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e){\n\t\t\tSystem.out.println(\"Sorry, there was an IOException!\");\n\t\t}\n\t}", "private static ServerSocket startServer(int port) {\n if (port != 0) {\n ServerSocket serverSocket;\n try {\n serverSocket = new ServerSocket(port);\n System.out.println(\"Server listening, port: \" + port + \".\");\n System.out.println(\"Waiting for connection... \");\n return serverSocket;\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return null;\n }", "private void listen() {\n\t\ttry {\n\t\t\tServerSocket servSocket = new ServerSocket(PORT);\n\t\t\tSocket clientSocket;\n\t\t\twhile(true) {\n\t\t\t\tclientSocket = servSocket.accept();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error - Could not open connection\");\n\t\t}\n\t\t\n\t}", "public OnlineTicTacToeFrame( InetAddress addr, int port ) {\n // set up a TCP connection with my counterpart\n \ttry {\n \t server = new ServerSocket( port );\n // ITEM 1: set the server non-blocking, (i.e. time out beyon 1000) \n \t server.setSoTimeout(1000);\n \t \n \t} catch ( Exception e ) {\n \t error( e );\n \t}\n \t\n \tboolean isO;\n \t\n \t// While accepting a remote request, try to send my connection request\n \twhile ( true ) {\n \t try {\n \t\t\n \t \t// ITEM 2: Try to accept a connection as a server\n \t \t//The accept method waits until a client starts up and requests a\n \t \t//connection on the host and port of this server\n \t \tclient = server.accept();\n \t } catch ( SocketTimeoutException ste ) {\n \t\t// Couldn't receive a connection request withtin INTERVAL\n \t } catch ( IOException ioe ) {\n \t\terror( ioe );\n \t }\n \t // Check if a connection was established. If so, leave the loop\n \t if ( client != null ) {\n \t \tSystem.out.println( \"Successfully acquired connection by listenting\" );\n \t \tisO = false;\n \t \t\n \t \tbreak;\n \t }\n\n \t try {\n \t // ITEM 3: Try to request a connection as a client\n \t\t client = new Socket(addr,port); \n \t\t \n \t } catch ( IOException ioe ) {\n \t\t// Connection refused\n \t }\n \t // Check if a connection was established, If so, leave the loop\n \t if ( client != null ) {\n \t \tSystem.out.println( \"Successfully acquired connection by sending request\" );\n \t \tisO = true;\n \t \n \t \tbreak;\n \t }\n \t} \t\n \t\n \t// Exchange a message with my counter part.\n \ttry {\n \t System.out.println( \"TCP connection established...\" );\n \t /* ITEM 4: Create an ObjectOutputStream object */;\n \t output= new ObjectOutputStream(client.getOutputStream()); \n \t /* ITEM 5: Create an InputOutputStream Object */ ;\n \t input= new ObjectInputStream( client.getInputStream( ) ); \n \t \n \t} catch ( Exception e ) {\n \t error( e );\n \t}\n \t\n \t\n \t// set up a window\n makeWindow( isO ); // or makeWindow( false );\n // start my counterpart thread\n Counterpart counterpart = new Counterpart(input,this);\n counterpart.start();\n }", "public void init() throws IOException {\r\n try {\r\n serverSocket = new ServerSocket(PORT);\r\n this.running = true;\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }", "public GameHandler(int serverPort, String ip, int caseNr, String hostName) {\n\t\tthis.serverPort = serverPort;\n\t\tthis.hostName = hostName;\n\t\tthis.caseNr = caseNr;\n\t\tthis.ip = ip;\n\t\t\n\t\texecutorService = Executors.newFixedThreadPool(1); // Lager et pool av threads for bruk\n\t\t\n\t\tconnect();\n\t\tcreateNewLobby();\n\t}", "private void runServer() {\n while(true) {\n // This is a blocking call and waits until a new client is connected.\n Socket clientSocket = waitForClientConnection();\n handleClientInNewThread(clientSocket);\n } \n }", "public void go(){\n\n Socket client = null;\n try{\n serverSock = new ServerSocket(this.port);\n serverSock.setSoTimeout(0);\n while(Server.running){\n if((this.scp == null) || (this.town == null)){\n client = serverSock.accept();\n System.out.println(\"Client\");\n \n //both scp and town null, meaning first player to connect\n if((this.scp == null) && (this.town == null)){\n //assign at random\n double rand = Math.random(); \n if(rand > 0.5){\n this.scp = new ClientHandler(client);\n this.scpThread = new Thread(this.scp);\n this.scpThread.start();\n this.scp.sendMessage(\"<w>\");\n System.out.println(\"SCP\");\n }else{\n this.town = new ClientHandler(client);\n this.townThread = new Thread(this.town);\n this.townThread.start();\n this.town.sendMessage(\"<w>\");\n System.out.println(\"Town\");\n }\n //if scp is not taken\n }else if(this.scp == null){\n //assigns scp\n this.scp = new ClientHandler(client);\n this.scpThread = new Thread(this.scp);\n this.scpThread.start();\n this.scp.sendMessage(\"<w>\");\n System.out.println(\"SCP\");\n startGame();\n //if town is not taken\n }else if(this.town == null){\n //assigns town\n this.town = new ClientHandler(client);\n this.townThread = new Thread(this.town);\n this.townThread.start();\n this.town.sendMessage(\"<w>\");\n System.out.println(\"Town\");\n startGame();\n }\n }\n System.out.println(\"Server is running\");\n }\n System.out.println(\"Game finished\");\n }catch(Exception e){ \n System.out.println(\"Error accepting connection\");\n e.printStackTrace();\n }\n try{\n client.close();\n }catch (Exception e){ \n System.out.println(\"Failed to close socket\");\n }\n System.exit(-1);\n }", "void open(String nameNport) {\n\tString[] token=nameNport.split(\":\");\n\tString host=token[0];\n\tint port=Integer.parseInt(token[1]);\n\tint proceedFlag=1;\n\tIterator<Socket> iterator=Connection.connections.iterator();\n\tif(host.equalsIgnoreCase(\"localhost\") || host.equals(\"127.0.0.1\"))\n\t\thost=simpella.infoSocket.getLocalAddress().getHostAddress();\n\tif((host.equalsIgnoreCase(simpella.infoSocket.getLocalAddress().getHostAddress())||host.equalsIgnoreCase(simpella.infoSocket.getLocalAddress().getCanonicalHostName()))&&(simpella.serverPortNo==port || simpella.downloadPortNo==port)){\n\t\tproceedFlag=0;\n\t\tSystem.out.println(\"Client: Self Connect not allowed\");\n\t\t}\n\twhile(iterator.hasNext() && proceedFlag==1)\n\t{\n\t\tSocket sock=(Socket)iterator.next();\n\t\t\n\t\tif((host.equalsIgnoreCase(sock.getInetAddress().getHostAddress()) || host.equalsIgnoreCase(sock.getInetAddress().getCanonicalHostName())) && port==sock.getPort()){\n\t\t\tproceedFlag=0; \n\t\t\tSystem.out.println(\"Client: Duplicate connection to same IP/port not allowed\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\tif(proceedFlag==1)\n\t\t{\n\t\n\t\n\tbyte type=04;\n\tMessage msg=new Message(type);\n\ttry {\n\t\tConnection.outgoingConnPackRecv[noOfConn]=0;\n\t\tConnection.outgoingConnPackSent[noOfConn]=0;\n\t\tConnection.outgoingConnPackSentSize[noOfConn]=0;\n\t\tConnection.outgoingConnPackRecvSize[noOfConn]=0;\n\t\t\n\t\tclientSideSocket[noOfConn]=new Socket(host,port);\n\t\tSystem.out.println(\"Client:TCP Connection established...Begin handshake\");\n\t\toutToServer[noOfConn]=new ObjectOutputStream(clientSideSocket[noOfConn].getOutputStream());\n\t\tinFromServer[noOfConn]=new ObjectInputStream(clientSideSocket[noOfConn].getInputStream());\n\t\tString strToServer=\"SIMPELLA CONNECT/0.6\\r\\n\";\n\t\tbyte[] byteArray= strToServer.getBytes(\"UTF-16LE\");\n\t\tmsg.setPayload(byteArray);\n \t\n\t\tSystem.out.println(\"Client:\"+new String(byteArray));\n\t\t//outToServer.writeUTF(\"SIMPELLA CONNECT/0.6\\r\\n\");\n\t\tConnection.outgoingConnPackSent[noOfConn]++;\n\t\tConnection.outgoingConnPackSentSize[noOfConn]+=byteArray.length+23;\n\t\toutToServer[noOfConn].writeObject((Object)msg);\n\t\tConnection.outgoingConnPackRecv[noOfConn]++;\n\t\t\n\t\tMessage msg1=(Message) inFromServer[noOfConn].readObject();\n\t\tbyte[] fromServer=msg1.getPayload();\n\t\tConnection.outgoingConnPackRecvSize[noOfConn]+=fromServer.length+23;\n\t\tString strFromServer=new String(fromServer);\n\t\tSystem.out.println(\"Server:\"+strFromServer);\n\t\tif(msg1.getMessage_type()==05)\n\t\t\t{\n\t\t\tstrToServer=\"SIMPELLA/0.6 200 thank you for accepting me\\r\\n\";\n\t\t\tbyte[] byteArray1= strToServer.getBytes(\"UTF-16LE\");\n\t\t\tMessage m=new Message((byte)05);\n\t\t\tm.setPayload(byteArray1);\n\t\t\tConnection.outgoingConnPackSent[noOfConn]++;\n\t\t\tConnection.outgoingConnPackSentSize[noOfConn]+=byteArray1.length+23;\n\t\t\toutToServer[noOfConn].writeObject((Object)m);\n\t\t\t\n\t\t\tConnection.connections.add(clientSideSocket[client.noOfConn]);\n\t\t\tConnection.outgoingConnection[client.noOfConn]=clientSideSocket[client.noOfConn];\n\t\t\tConnection.clientOutStream[client.noOfConn]=outToServer[client.noOfConn];\n\t\t\tnew clientSocketListen(clientSideSocket[noOfConn],outToServer[noOfConn],inFromServer[noOfConn]);\n\t\t\tupdate();\n\t\t\tnoOfConn++;\n\t\t\t//System.out.println(\"Client:num of conn=\"+noOfConn);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"<open>:Cannot open connection to \"+host+\" at this time\");\n\t\t\t\tclientSideSocket[noOfConn].close();\n\t\t\t\tinFromServer[noOfConn].close();\n\t\t\t\toutToServer[noOfConn].close();\n//\t\t\t\tSystem.out.println(\"Client:num of conn=\"+noOfConn);\n\t\t\t}\n\t\t\n\t\t\n\t} catch (UnknownHostException e) {\n\t\tSystem.out.println(\"Unknown Host: Destination host unreachable\");\n\t\t//e.printStackTrace();\n\t} catch (Exception e) {\n\t\tSystem.out.println(\"Connection Refused/Destination host unreachable\");\n\t}\n\t\t}\n\t}", "@Override\n public void run() {\n try {\n registerWithServer();\n initServerSock(mPort);\n listenForConnection();\n\t} catch (IOException e) {\n Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, e);\n setTextToDisplay(\"run(): \" + e.getMessage());\n setConnectedStatus(false);\n\t}\n }", "private void runServer() {\n while(true) {\n try {\n SSLSocket socket = (SSLSocket)listener.accept();\n\n this.establishClient(socket);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public void creatSocket() {\n\n try {\n\n server = new ServerSocket(PORT);\n\n mExecutorService = Executors.newCachedThreadPool();\n\n while (true) {\n\n Socket client = server.accept();\n\n mExecutorService.execute(new SockectService(client));\n\n Log.d(TAG, \"Creating Socket\" );\n\n }\n\n } catch (Exception e) {\n\n e.printStackTrace();\n\n }\n\n }", "public void start() throws IOException {\n\t\tserverSocket = new ServerSocket(port);\n\t\tserverCallbacks.forEach(c -> c.onServerStarted(this, port));\n\t}", "public static void startServer() throws IOException {\n ServerSocket serverSocket = new ServerSocket(port_number);\n\n System.out.println(\"Server Up\");\n System.out.println(\"Port number: \" + port_number);\n\n Thread loop = loopClients(serverSocket);\n loop.start();\n\n while (running) {\n try {\n Thread.sleep(1000l);\n\n } catch (Exception e) {\n\n }\n }\n\n loop.stop();\n removeAllClients();\n }", "private void openSocket(String host, int port) throws IOException {\n \t\t// Debug - attempting connection\n \n \t\tclientSocket = new Socket(InetAddress.getByName(host), port);\n \n \t\toutput = new BufferedWriter(new OutputStreamWriter(\n \t\t\t\tclientSocket.getOutputStream()));\n \t\toutput.flush();\n \n \t\tfileOutput = new BufferedOutputStream(clientSocket.getOutputStream());\n \n \t\tinput = new BufferedReader(new InputStreamReader(\n \t\t\t\tclientSocket.getInputStream()));\n \n \t\t// Debug - done\n \t}", "private void connectToTheGameServer(String addPort) {\n\t\tString[] add = addPort.split(\":\");\n\t\tString address = add[0];\n\t\tString port = add[1];\n\t\tInetAddress intaddr;\n\t\tSystem.out.println(\"connectToTheGameServer: @:\" + address + \", port:\" + port);\n\n\t\ttry {\n\t\t\tif(address.equals(\"127.0.0.1\")){\n\t\t\t\tintaddr = socket.getInetAddress();\n\t\t\t}else{\n\t\t\t\tintaddr = InetAddress.getByName(address);\n\t\t\t}\n\t\t\tthis.gameServerSocket = new Socket(intaddr, Integer.valueOf(port));\n\t\t\tSystem.out.println(\"connectToTheGameServer: connected\");\n\t\t\tClient.myState = Client.Current_state.client_client;\n\t\t\tClient.myRole = current_role.client;\n\t\t\tClient.myPlatforme = new Platforme();\n\t\t\tClient.sendMessagesToServer(Client.ok, osServ);\n\t\t\tClient.myPlatforme.show();\n\t\t\tif (Client.myPlatforme == null) {\n\t\t\t\tSystem.out.println(\"ici null\");\n\t\t\t}\n\t\t\tstartClientClientListener(gameServerSocket, false);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"client message: \" + e.getMessage().toString());\n\t\t}\n\t}", "private void runServer()\n {\n int port = Integer.parseInt(properties.getProperty(\"port\"));\n String ip = properties.getProperty(\"serverIp\");\n \n Logger.getLogger(ChatServer.class.getName()).log(Level.INFO, \"Server started. Listening on: {0}, bound to: {1}\", new Object[]{port, ip});\n try\n {\n serverSocket = new ServerSocket();\n serverSocket.bind(new InetSocketAddress(ip, port));\n do\n {\n Socket socket = serverSocket.accept(); //Important Blocking call\n Logger.getLogger(ChatServer.class.getName()).log(Level.INFO, \"Connected to a client. Waiting for username...\");\n ClientHandler ch = new ClientHandler(socket, this);\n clientList.add(ch);\n ch.start();\n } while (keepRunning);\n } catch (IOException ex)\n {\n Logger.getLogger(ChatServer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\tpublic void run() {\n try {\n serverSocket = new ServerSocket(port);\n \n while (true) {\n System.out.println(\"[GenericServer.run] Waiting for connections on Port #\" + port);\n socket = serverSocket.accept();\n System.out.println(\"[GenericServer.run] A connection to a client is established!\");\n processConnection(socket);\n }\n\n } catch (IOException ioe) {\n System.err.println(\"IOException\" + ioe.getMessage());\n ioe.printStackTrace();\n }\n }", "private void connectToServer() {\n\t\ttry {\n\t\t\tsocket = new Socket(InetAddress.getLocalHost(), Server.SERVER_PORT);\n\t\t\tin = new BufferedReader(new InputStreamReader(\n\t\t\tsocket.getInputStream()));\n\t\t\tout = new PrintWriter(socket.getOutputStream());\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"CLIENT: Cannot connect to server\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}", "public void startServer() {\n // configure the server properties\n int maxThreads = 20;\n int minThreads = 2;\n int timeOutMillis = 30000;\n\n // once routes are configured, the server automatically begins\n threadPool(maxThreads, minThreads, timeOutMillis);\n port(Integer.parseInt(this.port));\n this.configureRoutesAndExceptions();\n }", "public void run()\n {\n Utilities.debugLine(\"WebServer.run(): Runing Web Server\", DEBUG);\n\n running = true;\n\n ServerSocketConnection ssc;\n try\n {\n ssc = (ServerSocketConnection) Connector.open(\"socket://:\" + PORT);\n\n do\n {\n Utilities.debugLine(\"WebServer.run(): Socket Opened, Waiting for Connection...\", DEBUG);\n SocketConnection sc = null;\n sc = (SocketConnection) ssc.acceptAndOpen();\n Thread t = new Thread(new ConnectionHandler(sc));\n t.setPriority(Thread.MIN_PRIORITY);\n t.start();\n\n//--------------------------------------- DEBUG THREAD NUMBER ---------------------------------\n try\n {\n System.out.println(\"Active Threads: \" + Thread.activeCount());\n }\n catch (Exception e)\n {\n System.out.println(\"There was an eror getting the thread count.\");\n }\n//--------------------------------------- DEBUG THREAD NUMBER ---------------------------------\n\n }\n while (running);\n ssc.close();\n }\n\n catch (Exception e)\n {\n Utilities.debugLine(e.toString() + e.getMessage(), true);\n }\n }", "public int start() throws IOException{\n\t\tClientThread listenerThread = new ClientThread(this);\n\t\tlistenerSock = listenerThread.initSocket();\n\t\tint newPort = listenerSock.getLocalPort();\n\t\tclientPort = newPort;\n\t\tt = new Thread(listenerThread);\n\t\tt.start();\n\t\tsock = new Socket(serverIP, port);\n\t\treturn newPort;\n\t}", "protected void startConnect() {\n if (tcp) {\n connection = new TCPConnection(this);\n } else {\n connection = new UDPConnection(this, udpSize);\n }\n connection.connect(remoteAddr, localAddr);\n }", "private static void runServer(InetAddress address, int port, int nclients, int broadcastClock, int uid, Game game, int level){\t\t\n\t\t// Listen for connections\n\t\tSystem.out.println(\"SERVER LISTENING ON PORT \" + port);\n\t\tSystem.out.println(\"SERVER AWAITING \" + nclients + \" CLIENTS\");\n\t\ttry {\n\t\t\tMaster[] connections = new Master[nclients];\n\t\t\t//Add a new connection for the number of clients requested\n\t\t\tServerSocket ss = new ServerSocket(port);\n\t\t\tSystem.out.println(ss.getInetAddress());\n\t\t\tSystem.out.println(\"SERVER HOST INET ADDRESS\" + ss.getInetAddress().getLocalHost().getHostAddress());\n\t\t\tfor(int i=0; i < nclients; i++){\n\t\t\t\tSocket s = ss.accept();\n\t\t\t\t//game.addPlayer(uid++);\n\t\t\t\tconnections[i] = new Master(broadcastClock, s, uid, game, level);\n\t\t\t\tconnections[i].start();\n\t\t\t\tnclients--;\n\t\t\t}\t\t\t\n\t\t\t\tif(nclients == 0) {\n\t\t\t\t\tSystem.out.println(\"ALL CLIENTS ACCEPTED --- GAME BEGINS\");\n\t\t\t\t\treturn; // done\n\t\t\t\t}\n\t\t} \n\t\tcatch(IOException e) {\n\t\t\tSystem.err.println(\"I/O error: \" + e.getMessage());\n\t\t} \n\t}", "public Server() throws IOException\n {\n socket = new ServerSocket(port);\n }", "private void establishServerConnection() {\n int lb_port = Integer.parseInt(gui.getLBPort_Text().getText());\n gui.getLBPort_Text().setEnabled(false);\n String lb_ip = gui.getLBIP_Text().getText();\n gui.getLBIP_Text().setEnabled(false);\n int server_port = Integer.parseInt(gui.getServerPort_Text().getText());\n gui.getServerPort_Text().setEnabled(false);\n String server_ip = gui.getServerIP_Text().getText();\n gui.getServerIP_Text().setEnabled(false);\n obtainId(server_ip, server_port);\n lbInfo = new ConnectionInfo(lb_ip, lb_port, 3);\n\n if (connection.startServer(server_port)) {\n connectionHandler = new ServerConnections(connection, lbInfo, requestsAnswered, processingRequests, gui.getCompleted_Text(), gui.getProcessing_Text());\n new Thread(connectionHandler).start();\n\n requestServerId();\n scheduler.scheduleAtFixedRate(heartbeat, 10, 10, TimeUnit.SECONDS);\n } else {\n gui.getLBPort_Text().setEnabled(true);\n gui.getLBIP_Text().setEnabled(true);\n gui.getServerPort_Text().setEnabled(true);\n gui.getServerIP_Text().setEnabled(true);\n gui.getButton_Connect().setEnabled(true);\n }\n }", "private void initServerSock(int port) throws IOException {\n\tserver = new ServerSocket(port);\n\tserver.setReuseAddress(true);\n }", "ChatServer (int port) throws IOException \n {\n\t//create new server socket \n ServerSocket server = new ServerSocket(port);\n \n //confirmation message that server is connected\n System.out.println(\"The Chat Server is now connected to port \" + port + \".\");\n System.out.println(\"Waiting for clients to connect...\");\n\n //looks for new clients and adds them to linkedList\n while (true) \n {\n client = server.accept();\n linkedList.add(client);\n \n //creates new participant(ChatClient) in discussion\n //with associated socket as argument\n ChatClient chatterer = new ChatClient(client);\n \n //starts the thread\n chatterer.start();\n \n //prints message on server console including # of the client is and\n //where they are connected from\n System.out.println(\"New client #\" + linkedList.size() + \" on client's port \" \n \t\t + client.getPort());\n }\n }", "public ChatServer()\n {\n try\n {\n ServerSocket socketServidor = new ServerSocket(PORT);\n while (true)\n {\n Socket client = socketServidor.accept();\n Runnable nuevoCliente = new ClientThread(chat, client);\n Thread thread = new Thread(nuevoCliente);\n thread.start();\n }\n } catch (Exception e)\n {\n e.getMessage();\n }\n }", "public void connect() {\n BotConnector newBot = new BotConnector();\n newBot.setEmail(this.email);\n newBot.setAuthenticationKey(key);\n newBot.setBotName(name);\n newBot.setRoom(room);\n //Start Listener Thread\n this.serverListener = new Thread(newBot, \"serverListener\");\n this.serverListener.start();\n }", "public HostRouter(int port, int maxPlayers) {\n try {\n this.serverSocket = new ServerSocket(port);\n } catch (IOException e) {\n log.error(\"Error establishing host socket\", e);\n System.exit(-1);\n }\n this.clients = new HashMap<Integer, Client>();\n this.maxPlayers = maxPlayers;\n setLocalPlayerId(0);\n \n registeredMoves = new HashMap<Player, PlayerCommand>();\n pool = Executors.newFixedThreadPool(SevenWonders.MAX_PLAYERS+2);\n \n start();\n }", "public void connect(String ip,int port){\r\n this.ip = ip;\r\n this.port = port;\r\n try {\r\n socket = new Socket(ip,port);\r\n System.out.println(\"Connected with \"+ip+\":\"+port);\r\n ClientListener listener = new ClientListener(socket,this.receivedMessages);\r\n Thread listenerThread = new Thread(listener);\r\n listenerThread.start();\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Creating new connection....\");\r\n }\r\n }", "private void launchRemote(Stage stage) throws Exception { \n\t\tmenuMessage.setText(\"Game will start as soon as the client is connected...\"); \n\t\t\n\t\t// thread of the server connecting to the game and of the game \n\t\tThread serverThread = new Thread(() -> { \n\t\t\tRemotePlayerServer server = new RemotePlayerServer(new GraphicalPlayerAdapter()); \n\t\t\tserver.run(); \n\t\t }); \n\t\tserverThread.setDaemon(true); \n\t\tserverThread.start(); \n\t }", "public Server(int port) {\n this.port = port;\n try {\n socket = new DatagramSocket(port);\n } catch (SocketException e) {\n e.printStackTrace();\n }\n run = new Thread(this, \"Server\");\n run.start();\n }", "public void start() {\n\t\tif (serverStarted.get()) {\n\t\t\tthrow new IllegalStateException(\"Server already started. \" + toString());\n\t\t}\n\t\tCallable<Boolean> task;\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(port);\n\t\t\tserverSocket.setSoTimeout(soTimeout);\n\t\t\tport = serverSocket.getLocalPort();\n\t\t\tnotifyListener(\"Server started. \" + toString());\n\t\t\tserverStarted.set(true);\n\t\t\ttask = new Callable<Boolean>() {\n\t\n\t\t\t\tpublic Boolean call() {\n\t\t\t\t\tnotifyListener(\"Starting server thread. \" + toString());\n\t\t\t\t\tstopFlag.set(false);\n\t\t\t\t\twhile (!stopFlag.get()) {\n\t\t\t\t\t\tSocket connection = null;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconnection = serverSocket.accept();\n\t\t\t\t\t\t\tnotifyListener(\"Connection accepted on port. \" + toString());\n\t\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t\t\tnotifyListener(\"Connection closed on port. \" + toString());\n\t\t\t\t\t\t\tpingCounter.incrementAndGet();\n\t\t\t\t\t\t} catch (SocketTimeoutException e) {\n\t\t\t\t\t\t\tnotifyListener(\"Server accept timed out. Retrying. \" + toString());\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tnotifyListener(\"Server accept caused exception [message=\" + e.getMessage() + \"]. Retrying. \" + toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnotifyListener(\"Server socket closed. \" + toString());\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t};\n\t\t} catch (IOException e) {\n\t\t\tstopFlag.set(true);\n\t\t\tthrow new IllegalStateException(\"Unable to open socket on port. \" + toString(), e);\n\t\t}\n\t\tserverActivity = scheduler.submit(task);\n\t\tnotifyListener(\"Waiting for server to fully complete start. \" + toString());\n\t\tfor (;;) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(100);\n\t\t\t\tif (isStarted()) {\n\t\t\t\t\tnotifyListener(\"Server started. \" + toString());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) {\n\n\t\t\t}\n\t\t}\n\t}", "public TCPServer(int port) throws IOException {\n\tthis.socket = new ServerSocket(port);\n\tthis.clients = new ArrayList();\n\n\tSystem.out.println(\"SERVER: Started\");\n }", "public void connect() {\n try {\n socket = new Socket(serverAddress, serverPort);\n outputStream = new ObjectOutputStream(socket.getOutputStream());\n inputStream = new ObjectInputStream(socket.getInputStream());\n //A thread which will constantly listen for updates from the server and forward them to Client\n new Thread(() -> {\n while (socket.isConnected()) {\n try {\n Renderable message = (Renderable) inputStream.readObject();\n if(message != null) {\n //logger.info(\"Received \" + message.getClass().getSimpleName() + \" from server.\");\n renderablePublisher.submit(message);\n }\n } catch (IOException | ClassNotFoundException e) {\n renderablePublisher.submit(new ServerOfflineUpdate());\n break;\n }\n }\n }).start();\n } catch (IOException e) {\n renderablePublisher.submit(new ServerOfflineUpdate());\n }\n }", "private void startServer() {\n\t\ttry {\n//\t\t\tserver = new Server();\n//\t\t\tserver.start();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: add message in UI for user\n\t\t}\n\t}", "public static void main(String[] args){\n\n GameClientImpl client = new GameClientImpl();\n client.startConnection(\"127.0.0.1\", ProtocolConfiguration.PORT);\n\n }", "private static void startServer(){\n try{\n MMServer server=new MMServer(50000);\n }catch (IOException ioe){\n System.exit(0);\n }\n \n }" ]
[ "0.72684103", "0.7265996", "0.71917707", "0.7004608", "0.6993108", "0.69432193", "0.692229", "0.6910051", "0.6875152", "0.6852528", "0.68432283", "0.6838847", "0.6793116", "0.6757296", "0.67003036", "0.6695924", "0.66699696", "0.6642751", "0.6634671", "0.6626196", "0.66126937", "0.6601888", "0.658869", "0.65846", "0.6581786", "0.65738744", "0.65679264", "0.65567756", "0.65551496", "0.6546376", "0.65344244", "0.6532696", "0.65031904", "0.6495186", "0.64880407", "0.64865583", "0.64657295", "0.64625245", "0.6456921", "0.6430227", "0.64232284", "0.6399226", "0.6395073", "0.6394326", "0.6391673", "0.63846695", "0.6384669", "0.63827", "0.6382687", "0.6379085", "0.63787466", "0.63732135", "0.63674116", "0.6339628", "0.6336063", "0.6333812", "0.632684", "0.63214314", "0.63210285", "0.6313885", "0.6313571", "0.63076997", "0.6306671", "0.62958324", "0.62954646", "0.6285579", "0.6284478", "0.62715626", "0.62691367", "0.6260931", "0.6259555", "0.6255", "0.62451303", "0.6234747", "0.62224454", "0.62150246", "0.62117916", "0.6193741", "0.61883193", "0.6164985", "0.6148272", "0.6144537", "0.6137432", "0.6128142", "0.61270815", "0.61236745", "0.611806", "0.6110128", "0.6109009", "0.61032957", "0.60962814", "0.60950786", "0.60914254", "0.6089919", "0.6080903", "0.6060098", "0.60542226", "0.60535777", "0.60535413", "0.6052832" ]
0.6144724
81
This interface represents the contract that any continuous multivariate distribution must implement
public interface MultivariateDistribution extends Cloneable, Serializable { /** * Computes the log of the probability density function. If the probability of * the input is zero, the log of zero would be {@link Double#NEGATIVE_INFINITY}. * Instead, -{@link Double#MAX_VALUE} is returned. * * @param x the array for the vector the get the log probability of * @return the log of the probability. * @throws ArithmeticException if the vector is not the correct length, or the * distribution has not yet been set */ default public double logPdf(double... x) { return logPdf(DenseVector.toDenseVec(x)); } /** * Computes the log of the probability density function. If the probability of * the input is zero, the log of zero would be {@link Double#NEGATIVE_INFINITY}. * Instead, -{@link Double#MAX_VALUE} is returned. * * @param x the vector the get the log probability of * @return the log of the probability. * @throws ArithmeticException if the vector is not the correct length, or the * distribution has not yet been set */ public double logPdf(Vec x); /** * Returns the probability of a given vector from this distribution. By * definition, the probability will always be in the range [0, 1]. * * @param x the array of the vector the get the log probability of * @return the probability * @throws ArithmeticException if the vector is not the correct length, or the * distribution has not yet been set */ default public double pdf(double... x) { return pdf(DenseVector.toDenseVec(x)); } /** * Returns the probability of a given vector from this distribution. By * definition, the probability will always be in the range [0, 1]. * * @param x the vector the get the log probability of * @return the probability * @throws ArithmeticException if the vector is not the correct length, or the * distribution has not yet been set */ default public double pdf(Vec x) { return Math.exp(logPdf(x)); } /** * Sets the parameters of the distribution to attempt to fit the given list of * vectors. All vectors are assumed to have the same weight. * * @param <V> the vector type * @param dataSet the list of data points * @return <tt>true</tt> if the distribution was fit to the data, or * <tt>false</tt> if the distribution could not be fit to the data set. */ default public <V extends Vec> boolean setUsingData(List<V> dataSet) { return setUsingData(dataSet, false); } /** * Sets the parameters of the distribution to attempt to fit the given list of * vectors. All vectors are assumed to have the same weight. * * @param <V> the vector type * @param dataSet the list of data points * @param parallel {@code true} if the training should be done using * multiple-cores, {@code false} for single threaded. * @return <tt>true</tt> if the distribution was fit to the data, or * <tt>false</tt> if the distribution could not be fit to the data set. */ public <V extends Vec> boolean setUsingData(List<V> dataSet, boolean parallel); /** * Sets the parameters of the distribution to attempt to fit the given list of * data points. The {@link DataPoint#getWeight() weights} of the data points * will be used. * * @param dataPoints the list of data points to use * @return <tt>true</tt> if the distribution was fit to the data, or * <tt>false</tt> if the distribution could not be fit to the data set. */ default public boolean setUsingDataList(List<DataPoint> dataPoints) { return setUsingData(dataPoints.stream().map(d -> d.getNumericalValues()).collect(Collectors.toList())); } /** * Sets the parameters of the distribution to attempt to fit the given list of * data points. The {@link DataPoint#getWeight() weights} of the data points * will be used. * * @param dataSet the data set to use * @return <tt>true</tt> if the distribution was fit to the data, or * <tt>false</tt> if the distribution could not be fit to the data set. */ default public boolean setUsingData(DataSet dataSet) { return setUsingData(dataSet, false); } /** * Sets the parameters of the distribution to attempt to fit the given list of * data points. The {@link DataPoint#getWeight() weights} of the data points * will be used. * * @param dataSet the data set to use * @param parallel the source of threads for computation * @return <tt>true</tt> if the distribution was fit to the data, or * <tt>false</tt> if the distribution could not be fit to the data set. */ default public boolean setUsingData(DataSet dataSet, boolean parallel) { return setUsingData(dataSet.getDataVectors(), parallel); } public MultivariateDistribution clone(); /** * Performs sampling on the current distribution. * * @param count the number of iid samples to draw * @param rand the source of randomness * @return a list of sample vectors from this distribution */ public List<Vec> sample(int count, Random rand); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IDistribution extends IUncertainty {\n\tstatic interface IParameter extends IUncertainty {};\n\n}", "public interface UnivariateIntegrator {\n\n /**\n * Get the relative accuracy.\n *\n * @return the accuracy\n */\n double getRelativeAccuracy();\n\n /**\n * Get the absolute accuracy.\n *\n * @return the accuracy\n */\n double getAbsoluteAccuracy();\n\n /**\n * Get the min limit for the number of iterations.\n *\n * @return the actual min limit\n */\n int getMinimalIterationCount();\n\n /**\n * Get the upper limit for the number of iterations.\n *\n * @return the actual upper limit\n */\n int getMaximalIterationCount();\n\n /**\n * Integrate the function in the given interval.\n *\n * @param maxEval Maximum number of evaluations.\n * @param f the integrand function\n * @param min the lower bound for the interval\n * @param max the upper bound for the interval\n * @return the value of integral\n * @throws org.apache.commons.math4.legacy.exception.TooManyEvaluationsException if the maximum number of function\n * evaluations is exceeded\n * @throws org.apache.commons.math4.legacy.exception.MaxCountExceededException if the maximum iteration count is exceeded\n * or the integrator detects convergence problems otherwise\n * @throws org.apache.commons.math4.legacy.exception.MathIllegalArgumentException if {@code min > max} or the endpoints do not\n * satisfy the requirements specified by the integrator\n * @throws org.apache.commons.math4.legacy.exception.NullArgumentException if {@code f} is {@code null}.\n */\n double integrate(int maxEval, UnivariateFunction f, double min, double max);\n\n /**\n * Get the number of function evaluations of the last run of the integrator.\n *\n * @return number of function evaluations\n */\n int getEvaluations();\n\n /**\n * Get the number of iterations of the last run of the integrator.\n *\n * @return number of iterations\n */\n int getIterations();\n}", "public MultivariateGaussianDM() {\n\t}", "public interface Statistic {\n\n\tpublic double stat(double[] xs);\n}", "public interface TraitFromDimensions\n{\n /**\n * Number of dimensions needed to initialize an object (e.g., 1 for a\n * Sphere).\n *\n * @return number of required double values\n */\n int numberOfDimensions();\n\n /**\n * Take an array of size {@code this.numberOfDimensions} and re-set all\n * dimensions.\n *\n * @param theDims array of double values\n */\n void fromDimensions(double[] theDims);\n}", "public abstract C a(DiscreteDomain<C> discreteDomain);", "public interface DataDistribution {\n\n /**\n * Sample a {@code PredictionInput} from this distribution.\n * \n * @return a prediction input\n */\n PredictionInput sample();\n\n /**\n * Sample a number of {@code PredictionInputs} from this distribution.\n * \n * @return a list of prediction inputs\n */\n List<PredictionInput> sample(int sampleSize);\n\n /**\n * Get all the {@code PredictionInputs} from this distribution.\n * \n * @return a list of prediction inputs\n */\n List<PredictionInput> getAllSamples();\n\n /**\n * Get separate (independent) distributions for each feature.\n * \n * @return a list of feature distributions\n */\n List<FeatureDistribution> asFeatureDistributions();\n}", "public interface EnergyDistribution {\n\n void calculateEnergy(Growth growth, Grid grid, int energyInside, int energyOnEdges);\n void showEnergy(Growth growth, Grid grid, int energyInside, int energyOnEdges);\n void showMicrostructure(Growth growth, Grid grid, int energyInside, int energyOnEdges);\n}", "public interface LinopTransform extends Transform {\r\n public double[][] getMat();\r\n}", "public abstract C b(DiscreteDomain<C> discreteDomain);", "public interface InvertibleCumulativeDistributionFunction<NumberType extends Number>\n extends CumulativeDistributionFunction<NumberType>\n{\n\n /**\n * Computes the inverse of the CDF for the given probability. That is,\n * compute the value \"x\" such that p=CDF(x).\n * @param probability\n * Probability to invert.\n * @return\n * Inverse of the CDF for the given probability.\n */\n public NumberType inverse(\n final double probability );\n\n}", "public interface PointsGenerator {\r\n\t/**\r\n\t * Creates a <code>Series</code> object, which supplies the points.\r\n\t * \r\n\t * @param dimension dimension of the unit cube from which the points are selected\r\n\t * @return <code>Series</code> iterator\r\n\t * @see de.torstennahm.series.Series\r\n\t */\r\n\tSeries<double[]> makeSeries(int dimension);\r\n}", "public interface JacobiFunction {\n\n double[][] f(double[] x, double[] params);\n}", "public interface FeatureFunction {\n double value(Vector vector, MultiLabel multiLabel);\n}", "public abstract ModuleDistributions distributions();", "public UnivariateStatsData() {\n super();\n }", "public abstract double covariance(double x1, double x2);", "public interface IDimension {\n\n /**\n * Gets the type of this dimension (Height, Width, etc.).\n * @return the type of this dimension.\n */\n String getType();\n\n /**\n * Gets the value of this dimension.\n * @return the value of this dimension.\n */\n float getValue();\n}", "public HypergeometricDistribution(){\n\t\tthis(100, 50, 10);\n\t}", "static interface FittingFunction {\r\n\r\n /**\r\n * Returns the value of the function for the given array of parameter\r\n * values.\r\n */\r\n double evaluate(double[] argument);\r\n\r\n /**\r\n * Returns the number of parameters.\r\n */\r\n int getNumParameters();\r\n }", "public interface Particle extends VisualValue, Point\n{\n}", "public interface ClusterMeasure {\n\n /**\n * Returns an index to measure the quality of clustering.\n * @param y1 the cluster labels.\n * @param y2 the alternative cluster labels.\n */\n public double measure(int[] y1, int[] y2);\n\n}", "public interface FunctionDataModel {\n\n /**\n * Return output data range. called by PlotModel during auto scaling if\n * the funtion is y=2x and given referenceRange is (0,3), this method should\n * return RealRange(0,0,3,6).\n * \n * @param referenceRange\n * reference range to calculate data range\n * @retrun output data range calculated from reference range.\n */\n public RealRange getReferenceRange(RealRange referenceRange);\n\n /**\n * Return output dimensions. Here x == 0, y == 1, and z == 2. The rest\n * dimensions mean input parameter. For example, if the data model is like\n * 'y=f(x)', getOutputDimension() == {1}. If 'x=f(y,z)', the result is {0}.\n * \n * @retrun output dimensions.\n */\n public int[] getOutputDimensions();\n\n}", "public interface IntegralFunction{\n \tdouble function(double x);\n}", "public interface Aggregator {\n /**\n * Determines the final class recognized\n * @param confidence Confidence values produced by a recognizer\n * (one confidence value per class)\n * @return The final prediction given by a classifier\n */\n public Prediction apply( double[] confidence );\n\n}", "@RoughSet\npublic interface FeatureImportance4ActiveSampleSelection<V> \n\textends FeatureImportance<V>\n{\n\tFeatureImportance4ActiveSampleSelection<V> calculate(Collection<EquivalenceClass> equClasses);\n}", "public interface INonMolt {\n\tvoid growthNormal();\n}", "public LogNormalDistribution(){\n\t\tthis(0, 1);\n\t}", "public interface GenerateNumber {\r\n\t\r\n\t/**\r\n\t * This method generates a number given certain parameters.\r\n\t * @param par parameters\r\n\t * @return generated number\r\n\t */\r\n\tpublic double Generate(double[] par);\r\n}", "public interface Series {\n\n\t/**\n\t * @return the number of points in the series\n\t */\n\tint size();\n\n\t/**\n\t * @param i index of the point\n\t * @return the x coordinate of the i'th point\n\t */\n\tdouble x(int i);\n\n\t/**\n\t * @param i index of the point.\n\t * @return the y coordinate of the i'th point\n\t */\n\tdouble y(int i);\n\n\t/**\n\t * @return an Interval object representing the minimum and maximum x-values.\n\t */\n\tInterval xRange();\n\n\t/**\n\t * @return an Interval object representing the minimum and maximum y-values.\n\t */\n\tInterval yRange();\n\n\t/**\n\t * @return an Interval2D object representing the minimum and maximum x and y\n\t * values.\n\t */\n\tInterval2D range();\n}", "public interface Scalable {\n public void scale(TimeTick base, double ratio);\n}", "public interface DimensionSimilarity {\n double similarity(double left, double right);\n}", "public interface ILinearSystem {\n\n /**\n * Sets the coefficient matrix {@code a}.\n *\n * @param a a square matrix\n */\n public void setMatrix(IDoubleArray A);\n\n /**\n * Sets the coefficient vector {@code b}.\n *\n * @param b the coefficient vector\n */\n public void setCoefficientVector(IDoubleArray b);\n\n /**\n * Solve linear system.\n *\n * @return the vector {@code x}, solution of Ax = b.\n */\n public void perform();\n\n /**\n * Get solution x of A*x = b.\n *\n * @return solution\n */\n public IDoubleArray getSolutionVector();\n\n}", "public interface Inferencer {\n\t\n\t/**\n\t * Compute and return the Distribution of RandomVariable X given evidence\n\t * e using the distribution encoded by the given BayesianNetwork.\n\t */\n\t\n\tpublic Distribution query(RandomVariable X, Assignment e, BayesianNetwork network);\n\t\t\n}", "private interface IPsi {\n public double f(int n);\n }", "public interface CurveMeasure extends Measure{\n\t\n\t/**\n\t * Returns a MeasureSet object that contains the measure result to all topic and atValues specified on the run selected. \n\t * @param run - name of run\n\t * @param xValues - atValues array. \n\t * @return MeasureSet - The object that encapsulates the measure result. \n\t * @throws IOException -If happened a problem when open the result file\n\t * @throws InterruptedException - \n\t * @throws InvalidItemNameException - If the data is not a number.\n\t * @throws ItemNotFoundException - If a topic does not exist. \n\t * @throws InvalidItemNameException - If a topics with the same name exists. \n\t */\n\tpublic MeasureSet getValue(String run, String [] xValues)\n\t\t\tthrows IOException, InterruptedException, NumberFormatException, ItemNotFoundException, \n\t\t\tInvalidItemNameException, QrelItemNotFoundException, TopicNotFoundException,\n\t\t\tInvalidQrelFormatException;\n\n\t/**\n\t * Returns a MeasureSet object that contains the measure result to selected topics and atValues specified on the run selected. \n\t * @param run - name of run\n\t * @param xValues - atValues array. \n\t * @param topicNumbers - selected topic name array \n\t * @return MeasureSet - The object that encapsulates the measure result. \n\t * @throws IOException -If happened a problem when open the result file\n\t * @throws InterruptedException - \n\t * @throws InvalidItemNameException - If the data is not a number.\n\t * @throws ItemNotFoundException - If a topic does not exist. \n\t * @throws InvalidItemNameException - If a topics with the same name exists. \n\t */\n\tpublic MeasureSet getValue(String run, String [] xValues, String[] topicNumbers) throws IOException,\n\t\t\tInterruptedException, NumberFormatException, ItemNotFoundException, InvalidItemNameException, \n\t\t\tQrelItemNotFoundException, TopicNotFoundException,\n\t\t\tInvalidQrelFormatException;\n}", "public interface Norm<TypeOfValue> extends Function<TypeOfValue, Double> {\n /**\n * Returns this norm of the specified value.\n * @param value Value.\n * @return Norm.\n */\n @Override\n public Double value(TypeOfValue value);\n}", "public MultivariateGaussianDM(int dimen) {\n\t\tx = new DMatrixRMaj(dimen, 1);\n\t\tP = new DMatrixRMaj(dimen, dimen);\n\t}", "public boolean isDiscrete() {\n return this.isDiscrete;\n }", "public interface StatisticsAggregator {\r\n\t\t// This is an input. Make note of this price.\r\n\t\tpublic void putNewPrice(String symbol, double price);\r\n\r\n\t\t// Get the average price\r\n\t\tpublic double getAveragePrice(String symbol);\r\n\r\n\t\t// Get the total number of prices recorded\r\n\t\tpublic int getTickCount(String symbol);\r\n\t}", "public interface IMatrix {\n\n /**\n * Set coefficient\n * @param y row (0..height-1)\n * @param x column (0..width-1)\n * @param v value\n */\n public void set(int y, int x, double v);\n /**\n * Get coefficient from matrix, by returning coeff[y*width + x].\n * @param y row (0..height-1)\n * @param x column (0..width-1)\n * @return coefficient\n */\n public double get(int y, int x);\n\n /**\n * Clear matrix to zeros\n */\n public void clear();\n\n /**\n * Get array of coefficients.\n * They are indexed by [y*height + x].\n * Not all classes support this method.\n * @return array of coefficients\n */\n public double[] coeff();\n\n /**\n * Get width of matrix\n * @return width\n */\n public int width();\n\n /**\n * Get height of matrix\n * @return height\n */\n public int height();\n}", "public interface ProcessModel {\n\t\n\t\n\t\n\t/** \n\t * Returns the initial covariance matrix.\n\t * @return the initial covariance matrix.\n\t */\n\tpublic Matrix P0 ();\n\n\t/**\n\t * Returns the process noise matrix.\n\t * @param t time\n\t * @param dt dt = current time - previous time.\n\t * @param x current state vector\n\t * @return the process noise matrix.\n\t */\n\tpublic Matrix Q (double t, double dt, EstSTM x);\n\n\n\t/** \n\t * Returns the initial reference state.\n\t * @return the initial reference state.\n\t */\n\tpublic VectorN xref0 ();\n\t\n\t/**\n\t * Returns the number of states.\n\t * @return the number of states.\n\t */\t\n\tpublic int numberOfStates();\n\t\n\t/** \n\t * Propagate the state and state transition matrix to the next measurement time.\n\t * @param t0 previous time\n\t * @param xin array containing state and state transition matrix at previous time.\n\t * @param tf next time\n\t */\t\n\tpublic double[] propagate( double t0, double[] xin, double tf);\n\t\n\t/**\n\t * Print out the state and covariance data\n\t * @param t time\n\t * @param state state vector\n\t * @param covariance covariance matrix\n\t */\n\tpublic void print(double t, VectorN state, Matrix covariance);\n\t\n\t/**\n\t * Print out the residuals\n\t * @param t time\n\t * @param resid1 residual before the measurement update\n\t * @param resid2 residual after the measurement update\n\t */\n\tpublic void printResiduals(double t, double resid1, double resid2);\n\t\n\t/**\n\t * Close all open LinePrinters\n\t */\n\tpublic void closeLinePrinter();\n\n}", "public interface ChannelSignal {\r\n\r\n /**\r\n * Channel enum used to define which channel a signal applies to if needed\r\n * in one of the textures.\r\n */\r\n public enum Channel {\r\n\r\n RED, GREEN, BLUE, ALPHA;\r\n }\r\n\r\n /**\r\n * \r\n * @param u\r\n * u Component used to determine the output signal value\r\n * @param v\r\n * v Component used to determine the output signal value\r\n * @return\r\n * the value of the output signal\r\n */\r\n double getValue(double u, double v);\r\n}", "public abstract Cut<C> a(BoundType boundType, DiscreteDomain<C> discreteDomain);", "public interface FiniteSemiGroup extends DiscreetSemiGroup {\r\n\r\n\t/**\r\n\t *\r\n\t * Method to obtain a map to the elements.\r\n\t *\r\n\t * @return the map.\r\n\t */\r\n\tMap<Double, Element> getElements();\r\n\r\n\t@Override\r\n\tdefault Integer getOrder() {\r\n\t\treturn this.getElements().size();\r\n\t}\r\n\r\n\t/**\r\n\t * Method to obtain the matrix of multiplication.\r\n\t *\r\n\t * @return the multiplication matrix.\r\n\t */\r\n\tMap<Element, Map<Element, Element>> getOperationMap();\r\n\r\n\t/**\r\n\t * method to present the monoid.\r\n\t */\r\n\tdefault void print() {\r\n\t\tGenerator.getInstance().getLogger().debug(\"Operation matrix:\\r\");\r\n\t\tString ans = \" operation \";\r\n\t\tfor (double i = 0; i < this.getOperationMap().keySet().size(); i++) {\r\n\t\t\tfinal Element element1 = this.get(i);\r\n\t\t\tans += element1 + \" \";\r\n\t\t}\r\n\t\tLogManager.getLogger(FiniteSemiGroup.class).debug(ans);\r\n\t\tfor (double i = 0; i < this.getOperationMap().keySet().size(); i++) {\r\n\t\t\tfinal Element element1 = this.get(i);\r\n\t\t\tans = element1 + \" \";\r\n\t\t\tfor (double j = 0; j < this.getOperationMap().keySet().size(); j++) {\r\n\t\t\t\tfinal Element element2 = this.get(j);\r\n\t\t\t\tans += \" \" + this.getOperationMap().get(element1).get(element2) + \" \";\r\n\t\t\t}\r\n\t\t\tLogManager.getLogger(FiniteSemiGroup.class).debug(ans);\r\n\t\t}\r\n\t}\r\n\r\n}", "public ExpressionDistributionChart(ExpSet expSet)\r\n\t{\r\n\t\tsuper(\"Distribution of Expressions\");\r\n\t\tthis.expSet = expSet;\r\n\t}", "public interface Numeric extends DataType {\n}", "public interface MDataType extends MClassifier\r\n{\r\n}", "public SimpleRegression(TDistribution t) {\n super();\n setDistribution(t);\n }", "public interface DistanceMetric extends Comparable<DistanceMetric> {\n\n public enum SparcseMetricModes {\n /** Mode where both vector elements have to be non-zero. */\n BOTH_NON_ZERO,\n /** Mode where only the first vector element has to be non-zero. */\n FIRST_NON_ZERO,\n /** Mode where only the second vector element has to be non-zero. */\n SECOND_NON_ZERO\n }\n\n /**\n * Calculates the distance between two vectors provided by argument <code>vector1</code> and <code>vector2</code>. A\n * <code>MetricException</code> is thrown, if the dimensionalities of the two vectors differ.\n * \n * @param vector1 first vector.\n * @param vector2 second vector.\n * @return the distance between <code>vector1</code> and <code>vector2</code>.\n * @throws MetricException if the dimensionalities of the two vectors differ.\n */\n public double distance(double[] vector1, double[] vector2) throws MetricException;\n\n /**\n * Calculates the distance between two vectors provided by argument <code>vector1</code> and <code>vector2</code>. A\n * <code>MetricException</code> is thrown, if the dimensionalities of the two vectors differ.\n * \n * @param vector1 first vector.\n * @param vector2 second vector.\n * @return the distance between <code>vector1</code> and <code>vector2</code>.\n * @throws MetricException if the dimensionalities of the two vectors differ.\n */\n public double distance(double[] vector1, DoubleMatrix1D vector2) throws MetricException;\n\n /**\n * Calculates the distance between two vectors provided by argument <code>vector</code> and <code>datum</code>. A\n * <code>MetricException</code> is thrown, if the dimensionalities of the two vectors differ.\n * \n * @param vector first vector.\n * @param datum input datum.\n * @return the distance between <code>vector</code> and <code>datum</code>.\n * @throws MetricException if the dimensionalities of the two vectors differ.\n */\n public double distance(double[] vector, InputDatum datum) throws MetricException;\n\n /**\n * Calculates the distance between two vectors provided by argument <code>vector1</code> and <code>vector2</code>. A\n * <code>MetricException</code> is thrown, if the dimensionalities of the two vectors differ.\n * \n * @param vector1 first vector.\n * @param vector2 second vector.\n * @return the distance between <code>vector1</code> and <code>vector2</code>.\n * @throws MetricException if the dimensionalities of the two vectors differ.\n */\n public double distance(DoubleMatrix1D vector1, double[] vector2) throws MetricException;\n\n /**\n * Calculates the distance between two vectors provided by argument <code>vector1</code> and <code>vector2</code>. A\n * <code>MetricException</code> is thrown, if the dimensionalities of the two vectors differ.\n * \n * @param vector1 first vector.\n * @param vector2 second vector.\n * @return the distance between <code>vector1</code> and <code>vector2</code>.\n * @throws MetricException if the dimensionalities of the two vectors differ.\n */\n public double distance(DoubleMatrix1D vector1, DoubleMatrix1D vector2) throws MetricException;\n\n /**\n * Calculates the distance between two vectors provided by argument <code>vector</code> and <code>datum</code>. A\n * <code>MetricException</code> is thrown, if the dimensionalities of the two vectors differ.\n * \n * @param vector first vector.\n * @param datum input datum.\n * @return the distance between <code>vector</code> and <code>datum</code>.\n * @throws MetricException if the dimensionalities of the two vectors differ.\n */\n public double distance(DoubleMatrix1D vector, InputDatum datum) throws MetricException;\n\n /**\n * Calculates the distance between two vectors provided by argument <code>datum</code> and <code>vector</code>. A\n * <code>MetricException</code> is thrown, if the dimensionalities of the two vectors differ.\n * \n * @param datum input datum.\n * @param vector first vector.\n * @return the distance between <code>datum</code> and <code>vector</code>.\n * @throws MetricException if the dimensionalities of the two vectors differ.\n */\n public double distance(InputDatum datum, double[] vector) throws MetricException;\n\n /**\n * Calculates the distance between two vectors provided by argument <code>datum</code> and <code>vector</code>. A\n * <code>MetricException</code> is thrown, if the dimensionalities of the two vectors differ.\n * \n * @param datum input datum.\n * @param vector first vector.\n * @return the distance between <code>datum</code> and <code>vector</code>.\n * @throws MetricException if the dimensionalities of the two vectors differ.\n */\n public double distance(InputDatum datum, DoubleMatrix1D vector) throws MetricException;\n\n /**\n * Calculates the distance between two vectors provided by argument <code>datum</code> and <code>datum2</code>. A\n * <code>MetricException</code> is thrown, if the dimensionalities of the two vectors differ.\n * \n * @param datum first input datum.\n * @param datum2 second input datum.\n * @return the distance between <code>datum</code> and <code>vector</code>.\n * @throws MetricException if the dimensionalities of the two vectors differ.\n */\n public double distance(InputDatum datum, InputDatum datum2) throws MetricException;\n\n public double transformValue(double value);\n\n public double[] transformVector(double[] vector);\n\n /**\n * Sets additional parameters needed for the metric. The format of the parameter string is unspecified and depends\n * on the specific sub-class.\n */\n public void setMetricParams(String metricParamString) throws SOMToolboxException;\n\n}", "public interface ErrorMeasure {\r\n\r\n /**\r\n * Measure the errors for the given output and target\r\n * @param output the output\r\n * @param example the example\r\n * @return the errors\r\n */\r\n public abstract double value(Instance output, Instance example);\r\n\r\n}", "public interface Weighted {\r\n\r\n}", "public interface IDataSource {\n\n Mat getX();\n\n Mat getY();\n\n List<Mat> getThetas();\n\n}", "public interface IDataset extends Serializable{\n\t\n\t/**\n\t * Retrieve the data of the data set.\n\t * \n\t * @return an iterator over all data set items in the data set.\n\t */\n\tpublic Iterator<IDatasetItem> iterateOverDatasetItems();\n\t\n\t/**\n\t * Gets a normalizer for the data set.\n\t * \n\t * @return the corresponding normalizer.\n\t */\n\tpublic INormalizer getNormalizer();\n\t\n\t/**\n\t * Gets a immutable map that indicates for each attribute (-tag) if it should be used for clustering.\n\t * @return map of attribute-tags to boolean values \n\t */\n\tpublic ImmutableMap<String, Boolean> getAttributeClusteringConfig();\n\t\n\t/**\n\t * Scales the passed value to the range defined in the data set property files.\n\t * @param value a normalized value\n\t * @param attributeTag the identifier of the attribute\n\t * @return the attribute value in the original scale\n\t */\n\tpublic double denormalize(double value, String attributeTag);\n\t\n}", "public interface TiSensorService {\n void publishDatapoint(TiSensorDatapoint datapoint);\n}", "public interface ObjectiveFunctionI {\n public void setData(chromosome chromosome1, int indexOfObjective);\n public void setOriginalSolution(chromosome originalChromosome);\n\n public void setFirstImplement(boolean firstImplement);\n public void calcObjective();\n public chromosome getchromosome();\n //public double[] getObjectiveValues(int index);\n //public double getMinObjectiveValue();\n //public double getMaxObjectiveValue();\n}", "public interface TransferFunction {\n\t\n\t/**\n\t * The transfer function takes the array of inputs and weights and performs some computation to produce \n\t * a single output which will be fed in to an activation function. \n\t * \n\t * The arrays of inputs and outputs must be of the same length.\n\t * @param inputs An array of double values.\n\t * @param weights An array of double values.\n\t * @return a single double value for use with an activation function.\n\t */\n\tpublic double transfer(double[] inputs, double[] weights) throws Exception; //TODO: make this a self-defined exception.\n\n}", "public interface GaussMatrix {\n /**\n * Input the matrix from a file or a command line interface up to streamOpt param.\n * @param streamOpt\n */\n void read(StreamOption streamOpt);\n\n /**\n * Output the matrix to a file or a command line interface up to streamOpt param.\n * @param streamOpt\n */\n void write(StreamOption streamOpt);\n\n /**\n * Generate random matrix\n */\n void seedMatrix(int n);\n\n /**\n * @return original matrix\n */\n BigDecimal[][] getOriginalMatrix();\n\n /**\n * Reduce the matrix to triangular form.\n * @return triangular form\n */\n BigDecimal[][] toTriangular();\n\n /**\n * Compute matrix's determinants.\n * @return determinant\n */\n BigDecimal computeDet();\n\n /**\n * Compute solution of linear system represented in matrix form.\n * @return solution of the linear system\n */\n List<BigDecimal> computeSol();\n\n /**\n * Compute residual of solution of linear system representd in matrix form.\n * @return residual of the linear system\n */\n List<BigDecimal> computeRes();\n}", "public interface ISurfaceInterpolator {\n /**\n * Gets an interpolated value in a agiven position, from a set of control values.\n * \n * @param controlPoints all the controlpoints to consider to evaluate the interpolated point.\n * @param interpolated the coordinate in which to interpolate.\n * @return the interpolated z value.\n */\n public double getValue( Coordinate[] controlPoints, Coordinate interpolated );\n \n \n public double getBuffer();\n}", "public FunctionJet2Adapter(int baseDimension) \n {\n super(baseDimension); \n hessian = new double[baseDimension];\n }", "public interface IGenerator {\n int[][] generate(int n, int m);\n}", "public interface IScalarDistance {\n\n /**\n * Calculates the distance between two scalars.\n */\n public double distance(double x, double y);\n}", "public interface IYieldCurve {\r\n public double getInterestRate(double time);\r\n public double getForwardRate(double t0, double t1);\r\n public double getDiscountFactor(double t);\r\n\r\n public void addBond(Bond bond);\r\n public void calculate();\r\n}", "@FunctionalInterface\r\npublic interface DiscreteDoubleMap2D {\r\n\r\n\t/**\r\n\t * Get the value at given discrete point.\r\n\t * \r\n\t * @param x the x coordinate\r\n\t * @param y the y coordinate\r\n\t * @return the value at the specified point\r\n\t */\r\n\tdouble getValueAt(int x, int y);\r\n\r\n\t\r\n\t/**\r\n\t * Consider this map as a map of {@link Double}s.\r\n\t * \r\n\t * @return this map as {@link Double} map\r\n\t */\r\n\tdefault DiscreteObjectMap2D<Double> asObjectMap() {\r\n\t\treturn pushForwardToObject(Double::new);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the map that applies a function to the results of this map.\r\n\t * \r\n\t * @param function the function\r\n\t * @return double map with remapped values\r\n\t */\r\n\tdefault DiscreteDoubleMap2D pushForward(DoubleUnaryOperator function) {\r\n\t\treturn (x, y) -> function.applyAsDouble(getValueAt(x, y));\r\n\t}\r\n\r\n\t/**\r\n\t * Get the integer map that applies a function to the results of this map.\r\n\t * \r\n\t * @param function the function\r\n\t * @return integer map with remapped values\r\n\t */\r\n\tdefault DiscreteIntMap2D pushForwardToInt(DoubleToIntFunction function) {\r\n\t\treturn (x, y) -> function.applyAsInt(getValueAt(x, y));\r\n\t}\r\n\r\n\t/**\r\n\t * Get the object map that applies a function to the results of this map.\r\n\t * \r\n\t * @param function the function\r\n\t * @return object map with remapped values\r\n\t */\r\n\tdefault <T> DiscreteObjectMap2D<T> pushForwardToObject(DoubleFunction<T> function) {\r\n\t\treturn (x, y) -> function.apply(getValueAt(x, y));\r\n\t}\r\n\r\n\t/**\r\n\t * Get the pullback of this map under the given transformation.\r\n\t * \r\n\t * @param transformation the transformation\r\n\t * @return the pullback of this map\r\n\t */\r\n\tdefault DiscreteDoubleMap2D pullback(DiscreteTransformation2D transformation) {\r\n\t\treturn (x, y) -> {\r\n\t\t\tint xTransformed = transformation.transformX(x, y);\r\n\t\t\tint yTransformed = transformation.transformY(x, y);\r\n\t\t\treturn this.getValueAt(xTransformed, yTransformed);\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Make this map operable, using the given {@link OperableDiscreteSet2D} as operating set.\r\n\t * \r\n\t * @param range the set that handles operations\r\n\t * @return operable version of this map\r\n\t */\r\n\tdefault <S extends OperableDiscreteSet2D> OperableDiscreteDoubleMap2D<S> asOperable(S range) {\r\n\t\treturn new WrapperOperableDiscreteDoubleMap2D<>(this, range);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the set of points satisfying a condition.\r\n\t * \r\n\t * @param condition the condition\r\n\t * @return the set of points satisfying the condition\r\n\t */\r\n\tdefault DiscreteSet2D pointsSatisfying(DoublePredicate condition) {\r\n\t\treturn (x, y) -> condition.test(getValueAt(x, y));\r\n\t}\r\n\r\n\t/**\r\n\t * Get the level set for given value.\r\n\t * Contains the points for which this maps's value equals the given value.\r\n\t * \r\n\t * @param value the value\r\n\t * @return level set for given value\r\n\t */\r\n\tdefault DiscreteSet2D levelSet(double value) {\r\n\t\treturn pointsSatisfying(d -> d == value);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the sub-level set for given value.\r\n\t * Contains the points for which this maps's value is less than or equals the given value.\r\n\t * \r\n\t * @param value the value\r\n\t * @return sub-level set for given value\r\n\t */\r\n\tdefault DiscreteSet2D subLevelSet(double value) {\r\n\t\treturn pointsSatisfying(d -> d <= value);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the super-level set for given value.\r\n\t * Contains the points for which this maps's value is greater than or equals the given value.\r\n\t * \r\n\t * @param value the value\r\n\t * @return super-level set for given value\r\n\t */\r\n\tdefault DiscreteSet2D superLevelSet(double value) {\r\n\t\treturn pointsSatisfying(d -> d >= value);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the support of this map.\r\n\t * Contains the points for which this maps's value is zero.\r\n\t * \r\n\t * @return this map's support\r\n\t */\r\n\tdefault DiscreteSet2D support() {\r\n\t\treturn pointsSatisfying(d -> d != 0);\r\n\t}\r\n\t\r\n\r\n\t/**\r\n\t * Get the point-wise sum of this map and the given map.\r\n\t * \r\n\t * @param other the other map\r\n\t * @return point-wise sum map\r\n\t */\r\n\tdefault DiscreteDoubleMap2D plus(DiscreteDoubleMap2D other) {\r\n\t\treturn (x, y) -> this.getValueAt(x, y) + other.getValueAt(x, y);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the point-wise sum of this map and the given value.\r\n\t * \r\n\t * @param value the value\r\n\t * @return point-wise sum map\r\n\t */\r\n\tdefault DiscreteDoubleMap2D plus(double value) {\r\n\t\treturn pushForward(d -> d + value);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the point-wise difference of this map and the given map.\r\n\t * \r\n\t * @param other the other map\r\n\t * @return point-wise difference map\r\n\t */\r\n\tdefault DiscreteDoubleMap2D minus(DiscreteDoubleMap2D other) {\r\n\t\treturn (x, y) -> this.getValueAt(x, y) - other.getValueAt(x, y);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the point-wise difference of this map and the given value.\r\n\t * \r\n\t * @param value the value\r\n\t * @return point-wise difference map\r\n\t */\r\n\tdefault DiscreteDoubleMap2D minus(double value) {\r\n\t\treturn pushForward(d -> d - value);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the point-wise product of this map and the given map.\r\n\t * \r\n\t * @param other the other map\r\n\t * @return point-wise product map\r\n\t */\r\n\tdefault DiscreteDoubleMap2D times(DiscreteDoubleMap2D other) {\r\n\t\treturn (x, y) -> this.getValueAt(x, y) * other.getValueAt(x, y);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the point-wise product of this map and the given value.\r\n\t * \r\n\t * @param value the value\r\n\t * @return point-wise product map\r\n\t */\r\n\tdefault DiscreteDoubleMap2D times(double value) {\r\n\t\treturn pushForward(d -> d * value);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the point-wise quotient of this map and the given map.\r\n\t * \r\n\t * @param other the other map\r\n\t * @return point-wise quotient map\r\n\t */\r\n\tdefault DiscreteDoubleMap2D dividedBy(DiscreteDoubleMap2D other) {\r\n\t\treturn (x, y) -> this.getValueAt(x, y) / other.getValueAt(x, y);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the point-wise quotient of this map and the given value.\r\n\t * \r\n\t * @param value the value\r\n\t * @return point-wise quotient map\r\n\t */\r\n\tdefault DiscreteDoubleMap2D dividedBy(double value) {\r\n\t\treturn pushForward(d -> d / value);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the point-wise minimum map of this map and the given one.\r\n\t * \r\n\t * @param other the other map\r\n\t * @return point-wise minimum map\r\n\t */\r\n\tdefault DiscreteDoubleMap2D pointWiseMinimum(DiscreteDoubleMap2D other) {\r\n\t\treturn (x, y) -> Math.min(this.getValueAt(x, y), other.getValueAt(x, y));\r\n\t}\r\n\t\r\n\t/**\r\n\t * Get the point-wise minimum map of this map and the given value.\r\n\t * \r\n\t * @param value the value\r\n\t * @return point-wise minimum map\r\n\t */\r\n\tdefault DiscreteDoubleMap2D pointWiseMinimum(double value) {\r\n\t\treturn (x, y) -> Math.min(this.getValueAt(x, y), value);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the point-wise maximum map of this map and the given one.\r\n\t * \r\n\t * @param other the other map\r\n\t * @return point-wise maximum map\r\n\t */\r\n\tdefault DiscreteDoubleMap2D pointWiseMaximum(DiscreteDoubleMap2D other) {\r\n\t\treturn (x, y) -> Math.max(this.getValueAt(x, y), other.getValueAt(x, y));\r\n\t}\r\n\r\n\t/**\r\n\t * Get the point-wise maximum map of this map and the given value.\r\n\t * \r\n\t * @param value the value\r\n\t * @return point-wise maximum map\r\n\t */\r\n\tdefault DiscreteDoubleMap2D pointWiseMaximum(double value) {\r\n\t\treturn (x, y) -> Math.max(this.getValueAt(x, y), value);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the point-wise absolute value map.\r\n\t * \r\n\t * @return point-wise absolute value map\r\n\t */\r\n\tdefault DiscreteDoubleMap2D absoluteValue() {\r\n\t\treturn pushForward(Math::abs);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the point-wise negative of this map.\r\n\t * \r\n\t * @return this map's negative\r\n\t */\r\n\tdefault DiscreteDoubleMap2D negative() {\r\n\t\treturn pushForward(d -> - d);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the point-wise reciprocal of this map.\r\n\t * \r\n\t * @return this map's reciprocal\r\n\t */\r\n\tdefault DiscreteDoubleMap2D reciprocal() {\r\n\t\treturn (x, y) -> 1. / this.getValueAt(x, y);\r\n\t}\r\n\r\n\t/**\r\n\t * Get this map's non-negative part.\r\n\t * Maps to zero if this map has negative value.\r\n\t * \r\n\t * @return non-negative part map\r\n\t */\r\n\tdefault DiscreteDoubleMap2D nonNegativePart() {\r\n\t\treturn pointWiseMaximum(ZERO);\r\n\t}\r\n\r\n\t/**\r\n\t * Get this map's non-positive part.\r\n\t * Maps to zero if this map has positive value.\r\n\t * \r\n\t * @return non-positive part map\r\n\t */\r\n\tdefault DiscreteDoubleMap2D nonPositivePart() {\r\n\t\treturn pointWiseMinimum(ZERO);\r\n\t}\r\n\t\r\n\r\n\t/**\r\n\t * Get the double map that has values either the first or the second maps, determined by the condition.\r\n\t * \r\n\t * @param condition the condition\r\n\t * @param thenMap value map for points for which the condition is satisfied\r\n\t * @param elseMap value map for points for which the condition is not satisfied\r\n\t * @return\r\n\t */\r\n\tstatic DiscreteDoubleMap2D ifThenElse(DiscretePredicate2D condition, DiscreteDoubleMap2D thenMap, DiscreteDoubleMap2D elseMap) {\r\n\t\treturn (x, y) -> {\r\n\t\t\tif(condition.test(x, y))\r\n\t\t\t\treturn thenMap.getValueAt(x, y);\r\n\t\t\telse\r\n\t\t\t\treturn elseMap.getValueAt(x, y);\r\n\t\t};\r\n\t}\r\n\t\r\n\r\n\t// the zero map\r\n\tfinal DiscreteDoubleMap2D ZERO = ofConstant(0);\r\n\r\n\t/**\r\n\t * Get the map with constant value.\r\n\t * \r\n\t * @param constant the value\r\n\t * @return the constant map\r\n\t */\r\n\tstatic DiscreteDoubleMap2D ofConstant(double constant) {\r\n\t\treturn (x, y) -> constant;\r\n\t}\r\n}", "public interface IGestureMotion {\n\n int[] requiredSensors ();\n}", "public interface VDimension extends VDataReference {\r\n\r\n /**\r\n * Whether the dimension is a summable dimension which\r\n * could be used for dragging into the visualization\r\n * or not.\r\n *\r\n * @return Whether the dimension is a summable dimension\r\n * or not.\r\n */\r\n public Boolean isSummable();\r\n\r\n /**\r\n * Sets whether the dimension is a summable dimension\r\n * which could be used for dragging into the visualization\r\n * or not.\r\n *\r\n * @param summable Whether the dimension is a summable\r\n * dimension or not.\r\n */\r\n public void setSummable(Boolean summable);\r\n\r\n /**\r\n * Flag when the dimension is dropped into the graph.\r\n *\r\n * @return Whether the dimension is dropped or not.\r\n */\r\n public boolean isDropped();\r\n\r\n /**\r\n * Sets whether the dimension is dropped or not in the graph.\r\n *\r\n * @param dropped Whether the dimension is dropped or not in the graph.\r\n */\r\n public void setDropped(boolean dropped);\r\n\r\n /**\r\n * Returns whether the dimension contains data for parentable\r\n * usage or not.\r\n *\r\n * @return Whether the dimension contains parentable data or\r\n * not.\r\n */\r\n public Boolean isParentable();\r\n\r\n\r\n /**\r\n * Sets whether the dimension contains data for parentable\r\n * usage or not.\r\n *\r\n * @param parentable Whether the dimension contains parentable\r\n * data or not.\r\n */\r\n public void setParentable(Boolean parentable);\r\n\r\n /**\r\n * Returns whether the dimension is visible or unvisible.\r\n *\r\n * @return Whether the dimension is visible or unvisible.\r\n */\r\n public Boolean isVisible();\r\n\r\n /**\r\n * Sets whether the dimension is visible or unvisible.\r\n *\r\n * @param visible Whether the dimension is visible or unvisible.\r\n */\r\n public void setVisible(Boolean visible);\r\n\r\n /**\r\n * Returns the cubes that supports this dimension.\r\n *\r\n * @return The cubes that supports this dimension.\r\n */\r\n public Set<VCube> getSupportedCubes();\r\n\r\n /**\r\n * Sets the cubes that supports this dimension.\r\n *\r\n * @param supportedCubes The cubes that supports this\r\n * dimension.\r\n */\r\n public void setSupportedCubes(Set<VCube> supportedCubes);\r\n\r\n /**\r\n * Returns the identifiers of the selected values.\r\n *\r\n * @return The identifiers of the selected values.\r\n */\r\n public Set<Filterable> getSelections();\r\n\r\n /**\r\n * Sets the identifiers of the selected values.\r\n *\r\n * @param selections The identifiers of the selected\r\n * values.\r\n */\r\n public void setSelections(Set<Filterable> selections);\r\n\r\n /**\r\n * Returns the size of the selected values.\r\n *\r\n * @return The size of the selected values.\r\n */\r\n public int getSelectionSize();\r\n\r\n /**\r\n * Returns whether the selection of the dimension was changed\r\n * or not.\r\n *\r\n * @return Whether the selection of the dimension was changed\r\n * or not.\r\n */\r\n public boolean isSelectionChanged();\r\n\r\n /**\r\n * Sets whether the selection of the dimension was changed\r\n * or not.\r\n *\r\n * @param selectionChanged Whether the selection of the dimension\r\n * was changed or not.\r\n */\r\n public void setSelectionChanged(boolean selectionChanged);\r\n\r\n /**\r\n * Returns the <code>VDimension</code> that is close to the\r\n * cube.\r\n *\r\n * @return The blueprint that is close to the cube.\r\n */\r\n public VDimension getBlueprint();\r\n}", "public interface InitializeGmm_F64 {\n\n\t/**\n\t * Initializes internal data structures. Must be called first.\n\t * @param pointDimension Number of degrees of freedom in each point.\n\t * @param randomSeed Seed for any random number generators used internally.\n\t */\n\tpublic void init( int pointDimension, long randomSeed );\n\n\t/**\n\t *\n\t * @param points (input) Set of points which is to be clustered.\n\t * @param seeds (output) List containing storage for the initial Gaussians.\n\t */\n\tpublic void selectSeeds( List<double[]> points, List<GaussianGmm_F64> seeds );\n\n\t/**\n\t * Turn on verbose output to standard out\n\t */\n\tvoid setVerbose( boolean verbose );\n}", "public abstract double getConstraintFitness();", "public interface FunctionGradient {\n\n /**\n * Gradient vector at the given point.\n *\n * @param point where the gradient is evaluated\n * @return the calculated gradient\n */\n Gradient gradientAt(Point point);\n}", "public interface Measurable {\n double getMeasure();\n}", "public interface IMultiImageSource extends IImageSource {\n\n\n public IMultiImageSource next();\n\n public IMultiImageSource previous();\n\n public IImageData load(int index, ProgressListener plistener) throws BrainFlowException;\n\n public IImageData load(int index) throws BrainFlowException;\n\n public IImageSource getDataSource(int index);\n\n public int size();\n\n \n\n\n\n\n}", "AlgDistribution getDistribution();", "public abstract double[] getUpperBound();", "public interface IterableSeries<M extends Moment> {\n\n SeriesIterator<? extends IterableSeries<M>,M> begin ();\n\n SeriesIterator<? extends IterableSeries<M>,M> beginFrom (int index);\n\n M getMoment (int index);\n\n int getMomentCount ();\n\n TimeSeries unwrapSeries ();\n\n}", "public interface IMul {\n Var mul(Var var);\n\n}", "public interface Visitable {\n\n\tpublic double accept(Visitor visitor);\n}", "public interface ComponentInterface {\n\t\n\t/** \n\t * Execute component once and calculate metric values\n\t * \n\t * @param inputData Input data set\n\t * @return List of Objects containing component outputs\n\t */\n\t public java.util.List<Object> execute(java.util.List<Object> inputData);\n\t \n\t /** \n\t * Calculate metrics\n\t * \n\t * @param outputValues Output values of component execution\n\t * @param truthValues Component-generated truth values\n\t * @return List of Objects containing computed values of metrics\n\t */\n\t public java.util.List<Object> calculateMetrics(java.util.List<Object> outputValues, java.util.List<Object> truthValues);\n\t \n\t /**\n\t * Generate an input data set\n\t * @param genericProperties Generic parameters for data set generation (e.g., number of data points)\n\t * @return List of Objects containing generated input values\n\t */\n\t public java.util.List<Object> generateDataSet(java.util.List<Object> genericProperties);\n\t \n\t /**\n\t * Generate truth values \n\t * \n\t * @return List of Objects containing generated truth values\n\t */\n\t public java.util.List<Object> generateTruthValues();\n\t \n\t /**\n\t * Generate values for control variables\n\t * \n\t * @return List of Objects containing generated control variable values\n\t */\n\t public java.util.List<Object> generateControlVars();\n\t \n\t /**\n\t * Set control variable values to use in subsequent executions\n\t * \n\t * @param controlValues Values for control variables\n\t */\n\t public void setControlVars(java.util.List<Object> controlValues);\n\n}", "public abstract double getValue();", "public interface Scale {\r\n void setScale(Cell[] board, int key);\r\n}", "public interface CoordinateSystem<T extends CoordinateSystem<T>> {\n\n /**\n * Gets the dimensionality of a coordinate system.\n *\n * @return The dimensionality of a coordinate system.\n */\n int dimensionality();\n\n /**\n * Converts between one coordinate system enum and another.\n *\n * @param coordinateSystem The coordinate system to convert to.\n * @return The function converting a set of coordinates in one system to a set of coordinates in another system.\n */\n Function<double[], double[]> convertTo(T coordinateSystem);\n}", "public interface Semigroup<G, T> extends Magma<G, T>, Semigroupoid<G, T> {\r\n}", "public interface Term {\n\t\n\t/**\n\t * Get the coefficient of a term\n\t * @return the coefficient \n\t */\n\tpublic double getCoefficient();\n\t\n\t/**\n\t * Get the exponent of a term\n\t * @return the exponent\n\t */\n\tpublic int getExponent();\n\t\n\t/**\n\t * Evaluate a term by a given value. c = constant, a(c)^n \n\t * @param x The value to be evaluated \n\t * @return The result of the evaluated term \n\t */\n\tpublic double evaluate(double x);\n\t\n}", "public abstract double computeValue(Density density);", "public interface VectorOperations extends MatrixOperations\n{\n /**\n * \n * Multiplies the vectors in a specific way, not sure of the term\n * \n * @param a\n * @param b\n * @return\n */\n public static Vector tensorProduct( final Vector a , final Vector b)\n {\n return a.tensorProduct(b);\n }\n \n /**\n * \n * Makes the tensor product of this and a\n * \n * @param a\n * @return\n */\n public Vector tensorProduct( final Vector a);\n \n /**\n * \n * Pretty much like List.sublist\n * \n * @param indexFrom\n * @param indexTo\n * @return\n */\n public Vector get( final int indexFrom, final int indexTo );\n \n /**\n * \n * @return size of the vector\n */\n public int size();\n}", "public interface NeatFitness {\n\n\tpublic double calculate(Network network);\n\t\n}", "public interface UniMathOp {\n public double run(double a);\n}", "public LinearGaussian(double[] values) {\n\t\tsuper();\n\t\tthis.values = values;\n\t\t\n\t\t/*calculate mean*/\n\t\tmean = Utilities.averageValueOfArray(values);\n\t\tvariance = Utilities.averageValueOfArray(varianceArray());\n\t}", "public abstract Double getDataValue();", "@Override\n\tpublic void setDimensions() {\n\t\t\n\t}", "public interface IAggregator<T> {\r\n void aggregate(Collection<T> batch);\r\n}", "public interface InterTripleCut {\n\tvoid tripleCut();\n}", "public interface ScalarFilter extends Filter<Double, Double> {\n\n /**\n * Returns a filtered value of type Double from the specified value of type Double.\n * The method of filtering the specified value depends on\n * the implementation.\n *\n * @param value - specified value to filter\n * @return value filtered as type Double\n * @throws exception.NullValueException - if the input value is null\n * @throws exception.EmptyListException - if any lists under operation are empty\n * @throws exception.IncorrectSizeException - if any variable sizes are out of necessary operating range\n */\n public Double filter(Double value) throws NullValueException, EmptyListException, IncorrectSizeException;\n\n /**\n * Resets the scalar filter implementation with a Double value equivalent to zero.\n */\n public void reset();\n}", "public interface FitnessCalc1 {\n public double utilityFunction(Individual X);\n public double function(double x, Individual X);\n}", "public interface FrequencyConstraintShapeType extends ExternalConstraintShapeType {\n}", "public interface NonScalable extends Parameter\n{\n}", "public interface Regressor {\n\n String name();\n\n float recognize(final float[] pixels);\n}", "public interface DoubleType extends NumericType {\n}", "public interface XYItemRenderer {\n\n /**\n * Called for each item to be plotted.\n * @param g2 The graphics device.\n * @param plotArea The area within which the plot is being drawn.\n * @param plot The plot (can be used to obtain standard color information etc).\n * @param horizontalAxis The horizontal axis.\n * @param verticalAxis The vertical axis.\n * @param data The dataset.\n * @param series The series index.\n * @param item The item index.\n * @param translatedRangeZero Zero on the range axis (supplied so that, if it is required, it\n * doesn't have to be calculated repeatedly).\n */\n public void drawItem(Graphics2D g2, Rectangle2D plotArea,\n Plot plot, ValueAxis horizontalAxis, ValueAxis verticalAxis,\n XYDataset data, int series, int item,\n double translatedRangeZero);\n\n}", "@Override\n\tboolean computeDimensions() {\n\t\treturn true;\n\t}", "public abstract Cut<C> b(BoundType boundType, DiscreteDomain<C> discreteDomain);" ]
[ "0.67038566", "0.6486874", "0.63540256", "0.6247372", "0.6156247", "0.60435736", "0.5962638", "0.5892589", "0.5874431", "0.5873108", "0.5839887", "0.57511604", "0.5741457", "0.5717243", "0.56481814", "0.5638393", "0.5630785", "0.5583368", "0.5541353", "0.5535158", "0.55309564", "0.5467008", "0.54553574", "0.54098827", "0.53864217", "0.5375039", "0.53508794", "0.53395313", "0.53012526", "0.5289452", "0.5257709", "0.52558845", "0.5248596", "0.524729", "0.52418405", "0.52352726", "0.5233194", "0.52083904", "0.5189833", "0.5175967", "0.5170076", "0.51656157", "0.51575273", "0.5135965", "0.5134395", "0.51287013", "0.5125734", "0.5111711", "0.51060796", "0.5092576", "0.5083122", "0.50720716", "0.50714654", "0.5054909", "0.5053661", "0.5052901", "0.5050521", "0.50463384", "0.5044893", "0.50430375", "0.5033435", "0.50333416", "0.5032121", "0.50228804", "0.5015743", "0.50056225", "0.49967286", "0.4995069", "0.49942547", "0.4994002", "0.4992473", "0.49919406", "0.49902862", "0.4987614", "0.4986132", "0.49853328", "0.49834722", "0.4982231", "0.4980811", "0.49594855", "0.49526772", "0.49395707", "0.49388263", "0.4937503", "0.49318767", "0.49289387", "0.49190935", "0.4918895", "0.4914745", "0.49146724", "0.4913685", "0.49117094", "0.4907353", "0.4906446", "0.49026316", "0.490054", "0.48987445", "0.489009", "0.4885423", "0.4881765" ]
0.74888945
0
Returns the probability of a given vector from this distribution. By definition, the probability will always be in the range [0, 1].
default public double pdf(double... x) { return pdf(DenseVector.toDenseVec(x)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setProbability(double v) {\n probability = v;\n }", "public double getProbability() {\n return probability;\n }", "public double probability(double x){\n\t\tdouble firstTerm = 1.0 / Math.sqrt(2 * Math.PI * variance);\n\t\tdouble secondTerm = Math.exp( -(Math.pow((x-mean),2.0)) / (2 * variance) );\n\t\treturn firstTerm * secondTerm;\n\t}", "default double predictClassProb(Vector vector, int classIndex){\n return predictClassProbs(vector)[classIndex];\n }", "public double getProb(double value) {\n checkHasParams();\n if (value < 0) {\n return 0;\n } else {\n return (lambda * Math.exp((-lambda) * value));\n }\n }", "@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}", "public double getProbability() {\r\n\t\treturn Probability;\r\n\t}", "public double getProbabilityP() {\n return this.mProbabilityP;\n }", "public final double Probability(double val)\r\n\t{\r\n\t\tif (byKernels)\r\n\t\t{\r\n\t\t\treturn dEst.Probability(val);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn normalDist.pNorm(val, mean, sd);\r\n\t\t}\r\n\t}", "float getSpecialProb();", "private double probCountVector(double[] alpha) {\n\t\tdouble result = 0.0;\n\t\tdouble sumCountVector = 0.0;\n\t\tdouble sumAlpha = 0;\n\t\tif(countVector.length != alpha.length) {\n\t\t\tthrow new RuntimeException(\"the length of count vector and alpha should be same\");\n\t\t}\n\t\tfor(int i = 0; i < countVector.length; i++) {\n\t\t\tsumCountVector += countVector[i];\n\t\t\tsumAlpha += alpha[i] * scale;\n\t\t}\n\t\tresult = GammaDistrib.lgamma(sumCountVector + 1) + GammaDistrib.lgamma(sumAlpha) - GammaDistrib.lgamma(sumCountVector + sumAlpha);\n\t\tfor(int i = 0; i < countVector.length; i++) {\n\t\t\tresult += GammaDistrib.lgamma(countVector[i] + alpha[i] * scale) - GammaDistrib.lgamma(countVector[i] + 1) - GammaDistrib.lgamma(alpha[i] * scale);\n\t\t}\n\t\treturn result;\n\t}", "public Bounds getProbabilityBounds();", "@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}", "public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}", "public double getLogProb(double value) {\n checkHasParams();\n if (value < 0) {\n return Double.NEGATIVE_INFINITY;\n } else {\n return logLambda - lambda * value;\n }\n }", "private double calculaz(double v) { //funcion de densidad de probabilidad normal\n double N = Math.exp(-Math.pow(v, 2) / 2) / Math.sqrt(2 * Math.PI);\n return N;\n }", "abstract double rightProbability();", "public BernoulliDistribution(double p){\n\t\tsuper(1, p);\n\t}", "private double[] evaluateProbability(double[] data) {\n\t\tdouble[] prob = new double[m_NumClasses], v = new double[m_NumClasses];\n\n\t\t// Log-posterior before normalizing\n\t\tfor (int j = 0; j < m_NumClasses - 1; j++) {\n\t\t\tfor (int k = 0; k <= m_NumPredictors; k++) {\n\t\t\t\tv[j] += m_Par[k][j] * data[k];\n\t\t\t}\n\t\t}\n\t\tv[m_NumClasses - 1] = 0;\n\n\t\t// Do so to avoid scaling problems\n\t\tfor (int m = 0; m < m_NumClasses; m++) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (int n = 0; n < m_NumClasses - 1; n++)\n\t\t\t\tsum += Math.exp(v[n] - v[m]);\n\t\t\tprob[m] = 1 / (sum + Math.exp(-v[m]));\n\t\t\tif (prob[m] == 0)\n\t\t\t\tprob[m] = 1.0e-20;\n\t\t}\n\n\t\treturn prob;\n\t}", "private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}", "private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }", "@Override\r\n\tpublic void setProbability(double probability) {\n\t\tthis.probability = probability;\r\n\t}", "abstract double leftProbability();", "public void calculateProbabilities(){\n\t}", "default public double pdf(Vec x) {\n return Math.exp(logPdf(x));\n }", "@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}", "default double[] predictAssignmentProbs(Vector vector, List<MultiLabel> assignments){\n return Arrays.stream(predictLogAssignmentProbs(vector, assignments)).map(Math::exp).toArray();\n }", "public double measurementProb(float[] measurement) {\r\n double prob = 1.0;\r\n for(int i=0;i<landmarks.length;i++) {\r\n float dist = (float) MathX.distance(x, y, landmarks[i].x, landmarks[i].y); \r\n prob *= MathX.Gaussian(dist, senseNoise, measurement[i]); \r\n } \r\n \r\n probability = prob;\r\n \r\n return prob;\r\n }", "public ProbabilityDistribution() {\n\t\trandom_ = new Random();\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "protected ProbabilityDistribution getDistribution()\r\n\t{\r\n\t\treturn this.distribution;\r\n\t}", "public static RuntimeValue bernoulli(RuntimeValue p) throws RuntimeException {\n if (isDiscreteFloatSample(p) && hasSingleValue(p.getDiscreteFloatSample())) {\n return new RuntimeValue(\n RuntimeValue.Type.DISTRIBUTION,\n new BernoulliDistribution(p.getDiscreteFloatSample().single())\n );\n }\n\n throw new RuntimeException(\"Unable to create Bernoulli distribution\");\n }", "public double getSentenceProbability(List<String> sentence) {\n\tList<String> stoppedSentence = new ArrayList<String>(sentence);\n\tstoppedSentence.add(0, START);\n\tstoppedSentence.add(0, START);\n\tstoppedSentence.add(STOP);\n\tdouble probability = 1.0;\n\tfor (int index = 2; index < stoppedSentence.size(); index++) {\n\t probability *= getWordProbability(stoppedSentence, index);\n\t}\n\treturn probability;\n }", "public double getProbabilityOf(T aData) {\n\t\tdouble freq = this.getFrequencyOf(aData);\n\t\tdouble dblSize = numEntries;\n\t\treturn freq/dblSize;\n\t}", "public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}", "public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }", "public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }", "public ProbabilityDistribution(Random random) {\n\t\trandom_ = random;\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "public ProbabilityDistribution<T> bindProbs(boolean binary) {\n\t\tProbabilityDistribution<T> clone = clone();\n\n\t\t// Calculate the average\n\t\tdouble average = 0.5;\n\t\tif (!binary) {\n\t\t\taverage = 1.0 / size();\n\t\t}\n\n\t\t// Set those below the average to 0 and (if binary) above to 1\n\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\tif (getProb(element) < average) {\n\t\t\t\tclone.set(element, 0);\n\t\t\t} else if (binary) {\n\t\t\t\tclone.set(element, 1);\n\t\t\t}\n\t\t}\n\n\t\t// Normalise if not binary\n\t\tif (!binary)\n\t\t\tclone.normaliseProbs();\n\t\treturn clone;\n\t}", "public double[] getProbabilities() { return getProbabilities((int[])null); }", "private Double getProzent(Double points)\r\n \t{\r\n \t\treturn points / totalPoints;\r\n \t}", "public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}", "public boolean isHappening(int probability){\n return r.nextDouble() <= probability / 100.0;\n }", "public float getProbCross () {\r\n return cross_prob;\r\n }", "public BernoulliDistribution(){\n\t\tthis(0.5);\n\t}", "@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}", "public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }", "public double getPowerUpProbabilityBox() {\n \t\treturn 0.4;\n \t}", "public static boolean chance(int prob) {\n Random random = new Random();\n return random.nextInt(prob) == 1;\n // Do I really need to explain this??\n }", "public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}", "public double pathProb(S[] path) {\r\n\t\t// there is an equal probability to start in any state\r\n\t\tdouble prob = 1 / states.length;\r\n\t\t// loop over all state-pairs\r\n\t\tfor (int i = 0; i < path.length - 1; ++i)\r\n\t\t\t// multiply prob by this transition probability\r\n\t\t\tprob *= transProb(path[i], path[i + 1]);\r\n\t\t\r\n\t\treturn prob;\r\n\t}", "private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}", "public float getProbMut () {\r\n return mut_prob;\r\n }", "public static int geometric( double p ) {\n // using algorithm given by Knuth\n return (int) Math.ceil( Math.log( uniform() ) / Math.log( 1.0 - p ) );\n }", "@Test\n public void testP() {\n System.out.println(\"p\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(0.027, instance.p(0), 1E-7);\n assertEquals(0.0567, instance.p(1), 1E-7);\n assertEquals(0.07938, instance.p(2), 1E-7);\n assertEquals(0.09261, instance.p(3), 1E-7);\n assertEquals(0.05033709, instance.p(10), 1E-7);\n }", "public float getSpecialProb() {\n return specialProb_;\n }", "public static double uniform() {\r\n return random.nextDouble();\r\n }", "public float getSpecialProb() {\n return specialProb_;\n }", "public static double uniform() {\n return random.nextDouble();\n }", "public double prom () {\n return this.sum()/this.size();\n }", "public Builder setSamplingProbability(double value) {\n \n samplingProbability_ = value;\n onChanged();\n return this;\n }", "public void setProbabilityEnabled(boolean probabilityEnabled) {\n isProbabilityEnabled = probabilityEnabled;\n }", "public double sample_value() {\n checkHasParams();\n return -Math.log(Util.random()) / this.lambda;\n }", "public double aProbability(int iPrime, int i, int I){\n\t\tif (targetLengthSet.contains(I))\n\t\t\treturn a[iPrime][i][I];\n\t\telse{\n\t\t\treturn 1.0/I;\n\t\t}\n\t}", "public abstract float getProbability(String singleToken);", "public double getAbandonmentProbability() {\n return Math.random();\n }", "double getExtremeSpikeProbability();", "public abstract float getProbability(String[] tokens);", "public String CPUDepartProb()\r\n\t{\r\n\t\tdouble prob = Math.random();\r\n\t\t//System.out.println(\"prob: \" + prob);\r\n\t\t\r\n\t\tif(prob<=0.5) //0.5 chance\r\n\t\t{\r\n\t\t\treturn (\"Leave system\");\r\n\t\t}\r\n\t\telse if(prob>0.5 && prob<=(0.5+0.1)) //0.1 chance\r\n\t\t{\r\n\t\t\treturn (\"To Disk\");\r\n\t\t}\r\n\t\telse\t//0.4 chance\r\n\t\t{\r\n\t\t\treturn (\"To network\");\r\n\t\t}\r\n\t}", "static double getNormalDistribution(double x) {\n return (1 / Math.sqrt(2 * Math.PI)) * Math.exp(-1 * x * x / 2.0);\n }", "public static void checkProbParamMethod(final double probability) {\n if (probability > 100 || probability < 0)\n throw new IllegalArgumentException(\n String.format(\"probParam must be between 0 and 100 found %s\", probability));\n }", "@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "private int spinTheWheel()\r\n {\r\n\tint i;\r\n\t// generate a random number from 0 to 1\r\n\tdouble r = Math.random();\r\n\t// find the index where the random number lie in the \r\n\t// probability array\r\n\tfor(i = 0; i < prob.length && r > prob[i]; i++);\r\n\r\n\t// sometimes, due to the rounding error, the last \r\n\t// accumulate probability is less than 1 and the search\r\n\t// will fail. \r\n\t// when this case happen, return the last index\r\n\tif(i == prob.length)\r\n\t i--;\r\n\treturn i;\r\n }", "protected double clusterProbability(List<Node> cluster) {\n float p = LogMath.LOG_ZERO;\n LogMath logMath = LogMath.getInstance();\n\n for (Node node : cluster)\n p = logMath.addAsLinear(p, (float)node.getPosterior());\n\n return p;\n }", "public static int getRandomTask() {\n double p = rand.nextDouble(); // required probs given in Question\n for (int i = 0; i < 6; i++) {\n if (p <= prob[i])\n return i;\n }\n return 1;\n }", "public static double cumulativeDistributionFunction(double d) {\r\n NormalDistribution normal = new NormalDistribution();\r\n return normal.cumulativeProbability(d);\r\n }", "protected double get_breeding_probability()\n {\n return breeding_probability;\n }", "@Test\n\tpublic void testPoisson() throws Exception {\n\t\tPoissonDistribution p = new PoissonDistributionImpl(1);\n\t\tRandom random = new Random();\n\t\tint[] counts = new int[500];\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\tcounts[p.inverseCumulativeProbability(random.nextDouble()) + 1]++;\n\t\t}\n\t\tdouble delta = 0.03;\n\t\tassertEquals(0.367879, counts[0] / 10000d, delta);\n\t\tassertEquals(0.367879, counts[1] / 10000d, delta);\n\t\tassertEquals(0.183940, counts[2] / 10000d, delta);\n\t\tassertEquals(0.061313, counts[3] / 10000d, delta);\n\t\tassertEquals(0.015328, counts[4] / 10000d, delta);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.0) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.1) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.2) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.3) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.4) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.5) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.6) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.7) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.8) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.9) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.95) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.975) + 1, 0);\n\t\tassertEquals(4, p.inverseCumulativeProbability(0.99) + 1, 0);\n\n\t\t// Poisson dist with t = 0.86\n\t\tp = new PoissonDistributionImpl(0.86);\n\t\tcounts = new int[500];\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\tcounts[p.inverseCumulativeProbability(random.nextDouble()) + 1]++;\n\t\t}\n\t\tdelta = 0.03;\n\t\tassertEquals(0.423162, counts[0] / 10000d, delta);\n\t\tassertEquals(0.363919, counts[1] / 10000d, delta);\n\t\tassertEquals(0.156485, counts[2] / 10000d, delta);\n\t\tassertEquals(0.044819, counts[3] / 10000d, delta);\n\t\tassertEquals(0.009645, counts[4] / 10000d, delta);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.0) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.1) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.2) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.3) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.4) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.5) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.6) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.7) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.8) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.9) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.95) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.975) + 1, 0);\n\t\tassertEquals(4, p.inverseCumulativeProbability(0.99) + 1, 0);\n\t}", "private int getPoisson() {\n\t\treturn (int) (-INCOMING_MY * Math.log(Math.random()));\n\t}", "public double getRatio() {\n return (double) vector.length / size;\n }", "public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}", "SimpleProbabilityValue (float value) {\r\n\t\t\tthis.value = value;\r\n\t\t\tthis.setFixedValue(true);\r\n\t\t}", "private double norm(IDictionary<String, Double> vector) {\n\t\t double output = 0.0;\n\t\t for (KVPair<String, Double> pair : vector) {\n\t\t\t double score = pair.getValue();\n\t\t output = output + (score * score);\n\t\t }\n\t return Math.sqrt(output);\t \n }", "protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}", "float genChance();", "public void setProbMut (float value) {\r\n mut_prob= value;\r\n }", "@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }", "protected float computeProbs(int n)\n\t{\n\t\tfloat Cmi = 0;\n\t\t// Compute probabilities\n\t\tfor (int k = 0; k < bins; k++)\n\t\tfor (int l = 0; l < bins; l++)\n\t\t{\n\t\t float Pkl = Puv[k*bins+l];\n\t\t if (Pkl > 0)\n\t\t\t Cmi -= Pkl / n * Math.log(n * Pkl / (Pu[k] * Pv[l]));\n\t\t}\n\t\treturn Cmi;\n\t}", "double getBranchProbability();", "public double normDot(SparseVector vector) {\n double dot = this.dot(vector);\n double d = Math.sqrt(this.size() * vector.size());\n if (d > 0) {\n dot /= d;\n }\n return dot;\n }", "private double getMinInitProb(){\r\n\t\treturn probThreshold;\r\n\t}", "public double getProbabilityQ() {\n return this.mProbabilityQ;\n }", "public void setProbability(double pProbability) throws Exception{\r\n\t\tif (pProbability >= 0) probability = pProbability;\r\n\t\telse throw new Exception(\"02; sPro,ProEle\");\r\n\t}", "public ArrayList<Double> getProbability(int index) {\n ArrayList<Double> result = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n result.add(state[i][index]);\n }\n return result;\n }", "private double condProb(String stateGiven, String stateFind){\n HashMap probs = genAllProb(stateGiven);\n return (double) probs.get(stateFind);\n }", "@Override\n\tpublic float dot(Vector vector) {\n\t\tif(vector instanceof Vec2){\n\t\t\tVec2 vect = (Vec2)vector;\n\t\t\treturn x*vect.x+y*vect.y;//z and w are 0\n\t\t}else if(vector instanceof Vec3){\n\t\t\tVec3 vect = (Vec3)vector;\n\t\t\treturn x*vect.x+y*vect.y+z*vect.z;//w is 0\n\t\t}else{\n\t\t\tVec4 vect = (Vec4)vector;\n\t\t\treturn x*vect.x+y*vect.y+z*vect.z;//w doesn't exist\n\t\t}\n\t}", "double getTransProb();", "public static double probabilityOneSix() {\n int count = 0;\n for (int j = 0; j < 10000; j++) {\n for (int i = 0; i < 6; i++) {\n if ((int) (Math.random() * 6) + 1 == 6) {\n count++;\n break; } }\n }\n return ((double) count / (double) 10000) * 100;\n }", "public static int poisson(double[] parameters) {\r\n // using algorithm given by Knuth\r\n // see http://en.wikipedia.org/wiki/Poisson_distribution\r\n double lambda;\r\n lambda = parameters[0];\r\n int k = 0;\r\n double p = 1.0;\r\n double L = Math.exp(-lambda);\r\n do {\r\n k++;\r\n p *= uniform();\r\n } while (p >= L);\r\n return k-1;\r\n }", "public static double random() {\r\n return uniform();\r\n }" ]
[ "0.6741553", "0.66061974", "0.66060185", "0.6319646", "0.63169026", "0.626332", "0.62605363", "0.6189797", "0.6139653", "0.60093844", "0.5934466", "0.5895922", "0.5868302", "0.5858696", "0.5814643", "0.58141696", "0.5678036", "0.56477326", "0.56334716", "0.56243587", "0.56148964", "0.56120926", "0.5600594", "0.55696416", "0.55611384", "0.55381334", "0.5537418", "0.54999197", "0.5485839", "0.5484045", "0.54647064", "0.54534024", "0.54428166", "0.54134685", "0.54007393", "0.5389267", "0.5387667", "0.5378474", "0.53614473", "0.53374416", "0.53316957", "0.53049695", "0.52960414", "0.5290668", "0.5287861", "0.5286797", "0.52793443", "0.5257059", "0.52548563", "0.5232708", "0.5225241", "0.52020955", "0.51952815", "0.5186086", "0.51806664", "0.51619405", "0.5158762", "0.5147619", "0.5146721", "0.5129852", "0.512698", "0.5121277", "0.5109237", "0.51076657", "0.50996006", "0.5091019", "0.5078165", "0.5052569", "0.50369745", "0.50192434", "0.5015417", "0.50089395", "0.5003435", "0.49969724", "0.4989191", "0.4989127", "0.49633807", "0.49594295", "0.4953582", "0.49462044", "0.4939988", "0.49363258", "0.49283502", "0.49243924", "0.49242005", "0.4921918", "0.49218947", "0.491419", "0.49105406", "0.49097106", "0.4904838", "0.49021724", "0.49009913", "0.4897376", "0.48969352", "0.48840994", "0.4883934", "0.4883437", "0.48796186", "0.48784262" ]
0.5278295
47
Returns the probability of a given vector from this distribution. By definition, the probability will always be in the range [0, 1].
default public double pdf(Vec x) { return Math.exp(logPdf(x)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setProbability(double v) {\n probability = v;\n }", "public double probability(double x){\n\t\tdouble firstTerm = 1.0 / Math.sqrt(2 * Math.PI * variance);\n\t\tdouble secondTerm = Math.exp( -(Math.pow((x-mean),2.0)) / (2 * variance) );\n\t\treturn firstTerm * secondTerm;\n\t}", "public double getProbability() {\n return probability;\n }", "default double predictClassProb(Vector vector, int classIndex){\n return predictClassProbs(vector)[classIndex];\n }", "public double getProb(double value) {\n checkHasParams();\n if (value < 0) {\n return 0;\n } else {\n return (lambda * Math.exp((-lambda) * value));\n }\n }", "@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}", "public double getProbability() {\r\n\t\treturn Probability;\r\n\t}", "public double getProbabilityP() {\n return this.mProbabilityP;\n }", "public final double Probability(double val)\r\n\t{\r\n\t\tif (byKernels)\r\n\t\t{\r\n\t\t\treturn dEst.Probability(val);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn normalDist.pNorm(val, mean, sd);\r\n\t\t}\r\n\t}", "float getSpecialProb();", "private double probCountVector(double[] alpha) {\n\t\tdouble result = 0.0;\n\t\tdouble sumCountVector = 0.0;\n\t\tdouble sumAlpha = 0;\n\t\tif(countVector.length != alpha.length) {\n\t\t\tthrow new RuntimeException(\"the length of count vector and alpha should be same\");\n\t\t}\n\t\tfor(int i = 0; i < countVector.length; i++) {\n\t\t\tsumCountVector += countVector[i];\n\t\t\tsumAlpha += alpha[i] * scale;\n\t\t}\n\t\tresult = GammaDistrib.lgamma(sumCountVector + 1) + GammaDistrib.lgamma(sumAlpha) - GammaDistrib.lgamma(sumCountVector + sumAlpha);\n\t\tfor(int i = 0; i < countVector.length; i++) {\n\t\t\tresult += GammaDistrib.lgamma(countVector[i] + alpha[i] * scale) - GammaDistrib.lgamma(countVector[i] + 1) - GammaDistrib.lgamma(alpha[i] * scale);\n\t\t}\n\t\treturn result;\n\t}", "public Bounds getProbabilityBounds();", "@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}", "public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}", "private double calculaz(double v) { //funcion de densidad de probabilidad normal\n double N = Math.exp(-Math.pow(v, 2) / 2) / Math.sqrt(2 * Math.PI);\n return N;\n }", "public double getLogProb(double value) {\n checkHasParams();\n if (value < 0) {\n return Double.NEGATIVE_INFINITY;\n } else {\n return logLambda - lambda * value;\n }\n }", "abstract double rightProbability();", "public BernoulliDistribution(double p){\n\t\tsuper(1, p);\n\t}", "private double[] evaluateProbability(double[] data) {\n\t\tdouble[] prob = new double[m_NumClasses], v = new double[m_NumClasses];\n\n\t\t// Log-posterior before normalizing\n\t\tfor (int j = 0; j < m_NumClasses - 1; j++) {\n\t\t\tfor (int k = 0; k <= m_NumPredictors; k++) {\n\t\t\t\tv[j] += m_Par[k][j] * data[k];\n\t\t\t}\n\t\t}\n\t\tv[m_NumClasses - 1] = 0;\n\n\t\t// Do so to avoid scaling problems\n\t\tfor (int m = 0; m < m_NumClasses; m++) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (int n = 0; n < m_NumClasses - 1; n++)\n\t\t\t\tsum += Math.exp(v[n] - v[m]);\n\t\t\tprob[m] = 1 / (sum + Math.exp(-v[m]));\n\t\t\tif (prob[m] == 0)\n\t\t\t\tprob[m] = 1.0e-20;\n\t\t}\n\n\t\treturn prob;\n\t}", "private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}", "private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }", "@Override\r\n\tpublic void setProbability(double probability) {\n\t\tthis.probability = probability;\r\n\t}", "abstract double leftProbability();", "public void calculateProbabilities(){\n\t}", "default double[] predictAssignmentProbs(Vector vector, List<MultiLabel> assignments){\n return Arrays.stream(predictLogAssignmentProbs(vector, assignments)).map(Math::exp).toArray();\n }", "@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}", "public double measurementProb(float[] measurement) {\r\n double prob = 1.0;\r\n for(int i=0;i<landmarks.length;i++) {\r\n float dist = (float) MathX.distance(x, y, landmarks[i].x, landmarks[i].y); \r\n prob *= MathX.Gaussian(dist, senseNoise, measurement[i]); \r\n } \r\n \r\n probability = prob;\r\n \r\n return prob;\r\n }", "public ProbabilityDistribution() {\n\t\trandom_ = new Random();\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "protected ProbabilityDistribution getDistribution()\r\n\t{\r\n\t\treturn this.distribution;\r\n\t}", "public static RuntimeValue bernoulli(RuntimeValue p) throws RuntimeException {\n if (isDiscreteFloatSample(p) && hasSingleValue(p.getDiscreteFloatSample())) {\n return new RuntimeValue(\n RuntimeValue.Type.DISTRIBUTION,\n new BernoulliDistribution(p.getDiscreteFloatSample().single())\n );\n }\n\n throw new RuntimeException(\"Unable to create Bernoulli distribution\");\n }", "public double getSentenceProbability(List<String> sentence) {\n\tList<String> stoppedSentence = new ArrayList<String>(sentence);\n\tstoppedSentence.add(0, START);\n\tstoppedSentence.add(0, START);\n\tstoppedSentence.add(STOP);\n\tdouble probability = 1.0;\n\tfor (int index = 2; index < stoppedSentence.size(); index++) {\n\t probability *= getWordProbability(stoppedSentence, index);\n\t}\n\treturn probability;\n }", "public double getProbabilityOf(T aData) {\n\t\tdouble freq = this.getFrequencyOf(aData);\n\t\tdouble dblSize = numEntries;\n\t\treturn freq/dblSize;\n\t}", "public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}", "public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }", "public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }", "public ProbabilityDistribution(Random random) {\n\t\trandom_ = random;\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "public ProbabilityDistribution<T> bindProbs(boolean binary) {\n\t\tProbabilityDistribution<T> clone = clone();\n\n\t\t// Calculate the average\n\t\tdouble average = 0.5;\n\t\tif (!binary) {\n\t\t\taverage = 1.0 / size();\n\t\t}\n\n\t\t// Set those below the average to 0 and (if binary) above to 1\n\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\tif (getProb(element) < average) {\n\t\t\t\tclone.set(element, 0);\n\t\t\t} else if (binary) {\n\t\t\t\tclone.set(element, 1);\n\t\t\t}\n\t\t}\n\n\t\t// Normalise if not binary\n\t\tif (!binary)\n\t\t\tclone.normaliseProbs();\n\t\treturn clone;\n\t}", "public double[] getProbabilities() { return getProbabilities((int[])null); }", "private Double getProzent(Double points)\r\n \t{\r\n \t\treturn points / totalPoints;\r\n \t}", "public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}", "public boolean isHappening(int probability){\n return r.nextDouble() <= probability / 100.0;\n }", "public float getProbCross () {\r\n return cross_prob;\r\n }", "public BernoulliDistribution(){\n\t\tthis(0.5);\n\t}", "@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}", "public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }", "public double getPowerUpProbabilityBox() {\n \t\treturn 0.4;\n \t}", "default public double pdf(double... x) {\n return pdf(DenseVector.toDenseVec(x));\n }", "public static boolean chance(int prob) {\n Random random = new Random();\n return random.nextInt(prob) == 1;\n // Do I really need to explain this??\n }", "public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}", "public double pathProb(S[] path) {\r\n\t\t// there is an equal probability to start in any state\r\n\t\tdouble prob = 1 / states.length;\r\n\t\t// loop over all state-pairs\r\n\t\tfor (int i = 0; i < path.length - 1; ++i)\r\n\t\t\t// multiply prob by this transition probability\r\n\t\t\tprob *= transProb(path[i], path[i + 1]);\r\n\t\t\r\n\t\treturn prob;\r\n\t}", "private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}", "public float getProbMut () {\r\n return mut_prob;\r\n }", "public static int geometric( double p ) {\n // using algorithm given by Knuth\n return (int) Math.ceil( Math.log( uniform() ) / Math.log( 1.0 - p ) );\n }", "@Test\n public void testP() {\n System.out.println(\"p\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(0.027, instance.p(0), 1E-7);\n assertEquals(0.0567, instance.p(1), 1E-7);\n assertEquals(0.07938, instance.p(2), 1E-7);\n assertEquals(0.09261, instance.p(3), 1E-7);\n assertEquals(0.05033709, instance.p(10), 1E-7);\n }", "public float getSpecialProb() {\n return specialProb_;\n }", "public static double uniform() {\r\n return random.nextDouble();\r\n }", "public float getSpecialProb() {\n return specialProb_;\n }", "public static double uniform() {\n return random.nextDouble();\n }", "public double prom () {\n return this.sum()/this.size();\n }", "public Builder setSamplingProbability(double value) {\n \n samplingProbability_ = value;\n onChanged();\n return this;\n }", "public void setProbabilityEnabled(boolean probabilityEnabled) {\n isProbabilityEnabled = probabilityEnabled;\n }", "public double sample_value() {\n checkHasParams();\n return -Math.log(Util.random()) / this.lambda;\n }", "public double aProbability(int iPrime, int i, int I){\n\t\tif (targetLengthSet.contains(I))\n\t\t\treturn a[iPrime][i][I];\n\t\telse{\n\t\t\treturn 1.0/I;\n\t\t}\n\t}", "public abstract float getProbability(String singleToken);", "public double getAbandonmentProbability() {\n return Math.random();\n }", "double getExtremeSpikeProbability();", "public abstract float getProbability(String[] tokens);", "public String CPUDepartProb()\r\n\t{\r\n\t\tdouble prob = Math.random();\r\n\t\t//System.out.println(\"prob: \" + prob);\r\n\t\t\r\n\t\tif(prob<=0.5) //0.5 chance\r\n\t\t{\r\n\t\t\treturn (\"Leave system\");\r\n\t\t}\r\n\t\telse if(prob>0.5 && prob<=(0.5+0.1)) //0.1 chance\r\n\t\t{\r\n\t\t\treturn (\"To Disk\");\r\n\t\t}\r\n\t\telse\t//0.4 chance\r\n\t\t{\r\n\t\t\treturn (\"To network\");\r\n\t\t}\r\n\t}", "static double getNormalDistribution(double x) {\n return (1 / Math.sqrt(2 * Math.PI)) * Math.exp(-1 * x * x / 2.0);\n }", "public static void checkProbParamMethod(final double probability) {\n if (probability > 100 || probability < 0)\n throw new IllegalArgumentException(\n String.format(\"probParam must be between 0 and 100 found %s\", probability));\n }", "@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "private int spinTheWheel()\r\n {\r\n\tint i;\r\n\t// generate a random number from 0 to 1\r\n\tdouble r = Math.random();\r\n\t// find the index where the random number lie in the \r\n\t// probability array\r\n\tfor(i = 0; i < prob.length && r > prob[i]; i++);\r\n\r\n\t// sometimes, due to the rounding error, the last \r\n\t// accumulate probability is less than 1 and the search\r\n\t// will fail. \r\n\t// when this case happen, return the last index\r\n\tif(i == prob.length)\r\n\t i--;\r\n\treturn i;\r\n }", "protected double clusterProbability(List<Node> cluster) {\n float p = LogMath.LOG_ZERO;\n LogMath logMath = LogMath.getInstance();\n\n for (Node node : cluster)\n p = logMath.addAsLinear(p, (float)node.getPosterior());\n\n return p;\n }", "public static int getRandomTask() {\n double p = rand.nextDouble(); // required probs given in Question\n for (int i = 0; i < 6; i++) {\n if (p <= prob[i])\n return i;\n }\n return 1;\n }", "public static double cumulativeDistributionFunction(double d) {\r\n NormalDistribution normal = new NormalDistribution();\r\n return normal.cumulativeProbability(d);\r\n }", "protected double get_breeding_probability()\n {\n return breeding_probability;\n }", "@Test\n\tpublic void testPoisson() throws Exception {\n\t\tPoissonDistribution p = new PoissonDistributionImpl(1);\n\t\tRandom random = new Random();\n\t\tint[] counts = new int[500];\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\tcounts[p.inverseCumulativeProbability(random.nextDouble()) + 1]++;\n\t\t}\n\t\tdouble delta = 0.03;\n\t\tassertEquals(0.367879, counts[0] / 10000d, delta);\n\t\tassertEquals(0.367879, counts[1] / 10000d, delta);\n\t\tassertEquals(0.183940, counts[2] / 10000d, delta);\n\t\tassertEquals(0.061313, counts[3] / 10000d, delta);\n\t\tassertEquals(0.015328, counts[4] / 10000d, delta);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.0) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.1) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.2) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.3) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.4) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.5) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.6) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.7) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.8) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.9) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.95) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.975) + 1, 0);\n\t\tassertEquals(4, p.inverseCumulativeProbability(0.99) + 1, 0);\n\n\t\t// Poisson dist with t = 0.86\n\t\tp = new PoissonDistributionImpl(0.86);\n\t\tcounts = new int[500];\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\tcounts[p.inverseCumulativeProbability(random.nextDouble()) + 1]++;\n\t\t}\n\t\tdelta = 0.03;\n\t\tassertEquals(0.423162, counts[0] / 10000d, delta);\n\t\tassertEquals(0.363919, counts[1] / 10000d, delta);\n\t\tassertEquals(0.156485, counts[2] / 10000d, delta);\n\t\tassertEquals(0.044819, counts[3] / 10000d, delta);\n\t\tassertEquals(0.009645, counts[4] / 10000d, delta);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.0) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.1) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.2) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.3) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.4) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.5) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.6) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.7) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.8) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.9) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.95) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.975) + 1, 0);\n\t\tassertEquals(4, p.inverseCumulativeProbability(0.99) + 1, 0);\n\t}", "private int getPoisson() {\n\t\treturn (int) (-INCOMING_MY * Math.log(Math.random()));\n\t}", "public double getRatio() {\n return (double) vector.length / size;\n }", "public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}", "SimpleProbabilityValue (float value) {\r\n\t\t\tthis.value = value;\r\n\t\t\tthis.setFixedValue(true);\r\n\t\t}", "private double norm(IDictionary<String, Double> vector) {\n\t\t double output = 0.0;\n\t\t for (KVPair<String, Double> pair : vector) {\n\t\t\t double score = pair.getValue();\n\t\t output = output + (score * score);\n\t\t }\n\t return Math.sqrt(output);\t \n }", "float genChance();", "protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}", "public void setProbMut (float value) {\r\n mut_prob= value;\r\n }", "@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }", "public double normDot(SparseVector vector) {\n double dot = this.dot(vector);\n double d = Math.sqrt(this.size() * vector.size());\n if (d > 0) {\n dot /= d;\n }\n return dot;\n }", "protected float computeProbs(int n)\n\t{\n\t\tfloat Cmi = 0;\n\t\t// Compute probabilities\n\t\tfor (int k = 0; k < bins; k++)\n\t\tfor (int l = 0; l < bins; l++)\n\t\t{\n\t\t float Pkl = Puv[k*bins+l];\n\t\t if (Pkl > 0)\n\t\t\t Cmi -= Pkl / n * Math.log(n * Pkl / (Pu[k] * Pv[l]));\n\t\t}\n\t\treturn Cmi;\n\t}", "double getBranchProbability();", "private double getMinInitProb(){\r\n\t\treturn probThreshold;\r\n\t}", "public void setProbability(double pProbability) throws Exception{\r\n\t\tif (pProbability >= 0) probability = pProbability;\r\n\t\telse throw new Exception(\"02; sPro,ProEle\");\r\n\t}", "public double getProbabilityQ() {\n return this.mProbabilityQ;\n }", "public ArrayList<Double> getProbability(int index) {\n ArrayList<Double> result = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n result.add(state[i][index]);\n }\n return result;\n }", "private double condProb(String stateGiven, String stateFind){\n HashMap probs = genAllProb(stateGiven);\n return (double) probs.get(stateFind);\n }", "@Override\n\tpublic float dot(Vector vector) {\n\t\tif(vector instanceof Vec2){\n\t\t\tVec2 vect = (Vec2)vector;\n\t\t\treturn x*vect.x+y*vect.y;//z and w are 0\n\t\t}else if(vector instanceof Vec3){\n\t\t\tVec3 vect = (Vec3)vector;\n\t\t\treturn x*vect.x+y*vect.y+z*vect.z;//w is 0\n\t\t}else{\n\t\t\tVec4 vect = (Vec4)vector;\n\t\t\treturn x*vect.x+y*vect.y+z*vect.z;//w doesn't exist\n\t\t}\n\t}", "double getTransProb();", "public static double probabilityOneSix() {\n int count = 0;\n for (int j = 0; j < 10000; j++) {\n for (int i = 0; i < 6; i++) {\n if ((int) (Math.random() * 6) + 1 == 6) {\n count++;\n break; } }\n }\n return ((double) count / (double) 10000) * 100;\n }", "public static double random() {\r\n return uniform();\r\n }", "public static int poisson(double[] parameters) {\r\n // using algorithm given by Knuth\r\n // see http://en.wikipedia.org/wiki/Poisson_distribution\r\n double lambda;\r\n lambda = parameters[0];\r\n int k = 0;\r\n double p = 1.0;\r\n double L = Math.exp(-lambda);\r\n do {\r\n k++;\r\n p *= uniform();\r\n } while (p >= L);\r\n return k-1;\r\n }" ]
[ "0.6742187", "0.6603976", "0.6602262", "0.6319094", "0.63147247", "0.62595904", "0.6256412", "0.6185116", "0.6136931", "0.6006732", "0.5933682", "0.58945817", "0.58640665", "0.5855923", "0.58150953", "0.58135587", "0.56755435", "0.5645544", "0.5630077", "0.562031", "0.56137484", "0.5610575", "0.5598277", "0.55669457", "0.55392516", "0.553363", "0.5496371", "0.54834586", "0.54798675", "0.5462825", "0.5452029", "0.54370356", "0.54110694", "0.5397439", "0.5386173", "0.5385911", "0.5377654", "0.5358582", "0.5334609", "0.5328476", "0.53039616", "0.5293689", "0.5288882", "0.52849734", "0.52830195", "0.5277594", "0.5275889", "0.52552265", "0.5250871", "0.52315545", "0.522159", "0.51986665", "0.5193924", "0.51840883", "0.51766914", "0.5160788", "0.5154731", "0.5146419", "0.5143449", "0.5128554", "0.5124529", "0.51197416", "0.51061934", "0.5105065", "0.50969166", "0.508885", "0.5075908", "0.5051358", "0.5035821", "0.50181156", "0.5012248", "0.5005646", "0.500186", "0.4993989", "0.49879542", "0.4987198", "0.49593502", "0.4957161", "0.49516824", "0.4945032", "0.49355894", "0.4934662", "0.4930427", "0.4922803", "0.4921022", "0.49202377", "0.49185926", "0.49120677", "0.49110797", "0.49084744", "0.49026567", "0.4899216", "0.48985404", "0.4895653", "0.4893961", "0.4885946", "0.4881948", "0.48807445", "0.48775765", "0.4877442" ]
0.55598575
24
Sets the parameters of the distribution to attempt to fit the given list of vectors. All vectors are assumed to have the same weight.
default public <V extends Vec> boolean setUsingData(List<V> dataSet) { return setUsingData(dataSet, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void setParameters(double[] parameters) {\n\tthis.parameters = parameters;\n }", "public void fit(ArrayList trainData) {\n this.trainingData = trainData;\n }", "public Vector(boolean useGiven, double... elems) {\n\t\tif (useGiven) {\n\t\t\tthis.elements = elems;\n\t\t} else {\n\t\t\tthis.elements = new double[elems.length];\n\t\t\tfor (int i = elems.length - 1; i >= 0; i--) {\n\t\t\t\tthis.elements[i] = elems[i];\n\t\t\t}\n\t\t}\n\t\tdimensions = elems.length;\n\t}", "public void setVectorW(double[] w) {\r\n this.w=w;\r\n }", "public void setIndependentParameters(ParameterList list);", "public interface MultivariateDistribution extends Cloneable, Serializable {\n /**\n * Computes the log of the probability density function. If the probability of\n * the input is zero, the log of zero would be {@link Double#NEGATIVE_INFINITY}.\n * Instead, -{@link Double#MAX_VALUE} is returned.\n *\n * @param x the array for the vector the get the log probability of\n * @return the log of the probability.\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n default public double logPdf(double... x) {\n return logPdf(DenseVector.toDenseVec(x));\n }\n\n /**\n * Computes the log of the probability density function. If the probability of\n * the input is zero, the log of zero would be {@link Double#NEGATIVE_INFINITY}.\n * Instead, -{@link Double#MAX_VALUE} is returned.\n *\n * @param x the vector the get the log probability of\n * @return the log of the probability.\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n public double logPdf(Vec x);\n\n /**\n * Returns the probability of a given vector from this distribution. By\n * definition, the probability will always be in the range [0, 1].\n *\n * @param x the array of the vector the get the log probability of\n * @return the probability\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n default public double pdf(double... x) {\n return pdf(DenseVector.toDenseVec(x));\n }\n\n /**\n * Returns the probability of a given vector from this distribution. By\n * definition, the probability will always be in the range [0, 1].\n *\n * @param x the vector the get the log probability of\n * @return the probability\n * @throws ArithmeticException if the vector is not the correct length, or the\n * distribution has not yet been set\n */\n default public double pdf(Vec x) {\n return Math.exp(logPdf(x));\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * vectors. All vectors are assumed to have the same weight.\n *\n * @param <V> the vector type\n * @param dataSet the list of data points\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public <V extends Vec> boolean setUsingData(List<V> dataSet) {\n return setUsingData(dataSet, false);\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * vectors. All vectors are assumed to have the same weight.\n *\n * @param <V> the vector type\n * @param dataSet the list of data points\n * @param parallel {@code true} if the training should be done using\n * multiple-cores, {@code false} for single threaded.\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n public <V extends Vec> boolean setUsingData(List<V> dataSet, boolean parallel);\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * data points. The {@link DataPoint#getWeight() weights} of the data points\n * will be used.\n *\n * @param dataPoints the list of data points to use\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public boolean setUsingDataList(List<DataPoint> dataPoints) {\n return setUsingData(dataPoints.stream().map(d -> d.getNumericalValues()).collect(Collectors.toList()));\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * data points. The {@link DataPoint#getWeight() weights} of the data points\n * will be used.\n *\n * @param dataSet the data set to use\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public boolean setUsingData(DataSet dataSet) {\n return setUsingData(dataSet, false);\n }\n\n /**\n * Sets the parameters of the distribution to attempt to fit the given list of\n * data points. The {@link DataPoint#getWeight() weights} of the data points\n * will be used.\n *\n * @param dataSet the data set to use\n * @param parallel the source of threads for computation\n * @return <tt>true</tt> if the distribution was fit to the data, or\n * <tt>false</tt> if the distribution could not be fit to the data set.\n */\n default public boolean setUsingData(DataSet dataSet, boolean parallel) {\n return setUsingData(dataSet.getDataVectors(), parallel);\n }\n\n public MultivariateDistribution clone();\n\n /**\n * Performs sampling on the current distribution.\n *\n * @param count the number of iid samples to draw\n * @param rand the source of randomness\n * @return a list of sample vectors from this distribution\n */\n public List<Vec> sample(int count, Random rand);\n}", "protected void initIndependentParamLists() {\n\n\t\t// params that the mean depends upon\n\t\tmeanIndependentParams.clear();\n\t\tmeanIndependentParams.addParameter(distanceJBParam);\n\t\tmeanIndependentParams.addParameter(willsSiteParam);\n\t\tmeanIndependentParams.addParameter(magParam);\n\t\tmeanIndependentParams.addParameter(fltTypeParam);\n\t\tmeanIndependentParams.addParameter(componentParam);\n\n\t\t// params that the stdDev depends upon\n\t\tstdDevIndependentParams.clear();\n\t\tstdDevIndependentParams.addParameter(stdDevTypeParam);\n\t\tstdDevIndependentParams.addParameter(componentParam);\n\t\tstdDevIndependentParams.addParameter(magParam);\n\n\t\t// params that the exceed. prob. depends upon\n\t\texceedProbIndependentParams.clear();\n\t\texceedProbIndependentParams.addParameter(distanceJBParam);\n\t\texceedProbIndependentParams.addParameter(willsSiteParam);\n\t\texceedProbIndependentParams.addParameter(magParam);\n\t\texceedProbIndependentParams.addParameter(fltTypeParam);\n\t\texceedProbIndependentParams.addParameter(componentParam);\n\t\texceedProbIndependentParams.addParameter(stdDevTypeParam);\n\t\texceedProbIndependentParams.addParameter(this.sigmaTruncTypeParam);\n\t\texceedProbIndependentParams.addParameter(this.sigmaTruncLevelParam);\n\n\t\t// params that the IML at exceed. prob. depends upon\n\t\timlAtExceedProbIndependentParams.addParameterList(\n\t\t\t\texceedProbIndependentParams);\n\t\timlAtExceedProbIndependentParams.addParameter(exceedProbParam);\n\n\t}", "public Vector(double... elems) {\n\t\tthis(false, elems);\n\t}", "public void setParameters(ArrayList parameters) {\n this.parameters = parameters;\n }", "public void setValues(ArrayList<Double> allValues)\n {\n this.minimumValue = getMinNumber(allValues);\n this.maximumValue = getMaxNumber(allValues);\n this.allValues = allValues;\n }", "public void learnVector(final Calendar when, final List<Double> vals);", "public void setParameters(List<ConstraintParameter> parameters) {\n\t\tif (parameters != null) {\n\t\t\tm_parameters = parameters;\n\t\t}\n\t\telse {\n\t\t\tm_parameters = new ArrayList<ConstraintParameter>();\n\t\t}\n\t\t\n\t\t// rebuild the parameter string based on the new list\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (ConstraintParameter param : m_parameters) {\n\t\t\tsb.append(\" :\").append(param.toString());\n\t\t}\n\t\tm_parameterString = sb.toString();\n\t}", "public final void setClassificationParams(Vector oParams)\n\t{\n\t\tsetParams(oParams, CLASSIFICATION);\n\t}", "void setParameters(List<DeployerParameterTemplate> parameters);", "public synchronized final void setClassificationParams(Vector poParams) {\n setParams(poParams, CLASSIFICATION);\n }", "public void setWeights(float[] w) {\n _w1D = w;\n _weights = true;\n }", "public void setWeights(double[] w) {\n\t\t\tweights = w;\n\t\t}", "protected void initParameters(List<ParameterWrapper> params) {\n\t\tparameters = new SchemaParameterCollection();\n\t\tif (params != null) {\n\t\t\tIParameter par;\n\t\t\tfor (ParameterWrapper parwrap : params) {\n\t\t\t\tpar = ParameterFactory.createParameter(parwrap);\n\t\t\t\tparameters.addParameter(par);\n\t\t\t}\n\t\t}\n\t}", "private void setWeightsUniformly(RandomDataImpl rnd, double eInit) {\n\t\tfor (int i = 0; i < weights.length; i++) {\t\t\n\t\t\tweights[i] = rnd.nextUniform(-eInit, eInit);\n\t\t}\n\t}", "public void setParameterValues(List parameterValues) {\r\n\t\tthis.parameterValues = parameterValues;\r\n\t}", "public void setParameters(GeoNumeric[] parameters) {\n\t\tthis.parameters = parameters;\n\t\tsettingChanged();\n\t}", "public org.apache.spark.mllib.linalg.Vector optimize (org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, org.apache.spark.mllib.linalg.Vector>> data, org.apache.spark.mllib.linalg.Vector initialWeights) ;", "public void setVec(float[] vec) {\n this.vec = vec;\n }", "public void setBoxWeights(float boxVal, int itmin, int itmax, int ntf) {\n float[] w = zerofloat(ntf);\n for (int i=itmin; i<=itmax; ++i) {\n w[i] = boxVal;\n }\n _w1D = w;\n _weights = true;\n }", "public static void setVector(double[] v, double c0, double c1, double c2) {\n v[0] = c0;\n v[1] = c1;\n v[2] = c2;\n }", "public void setParameters(ArrayList<ParameterEntry<String, String>> params) {\n parameters = params;\n }", "public void specifyParams (double[] _params){\n\t\t\n\t\tif (_params.length != this.getNumParameters2Calib()) {\n\t\t\tSystem.err.println(\n\t\t\t\t\t\"Error when getting parameters from a double array. \"\n\t\t\t\t\t+ \"We don't have + \" + this.getNumParameters2Calib() \n\t\t\t\t\t+ \" parameters\\n\");\n\t\t}\n\t\t\n\t\tint i = 0;\n\t\t\n\t\t// first decode the SN to set\n\t\tint numberSN = (int)Math.round(_params[i++]);\n\t\t\n\t\tif (numberSN >= this.graphsFromFiles.size() || numberSN < 0) {\n\t\t\tSystem.err.println(\n\t\t\t\t\t\"Error when getting the SN integer parameter. Mismatch between SNs \"\n\t\t\t\t\t+ \"and the gene: params = \" + numberSN + \" and we have \" +\n\t\t\t\t\tthis.graphsFromFiles.size() + \" SNs loaded from files\\n\");\n\t\t}\n\t\t\n\t\t// set the specific graph to the parameters\n\t\tsetSelectedSN(numberSN);\n\t\t\t\t\t\t\n\t\t// then, the parameters for the segments\n\n\t\tfor (int k = 0; k < this.getNumSegments(); k++) {\n\n\t\t\t// THIS PARAMETERS HAS NO EFFECT: -1 \n\t\t\tsetSegmentConnectivity(k, -1);\n\t\t\t\n\t\t\t// loading probability for new friends \n\t\t\tsetSegmentDailyProbNewFriend(k, _params[i++]);\n\t\t\t\n\t\t\t// loading probability for losing friends \n\t\t\tsetSegmentDailyProbLoseFriend(k, _params[i++]);\n\n\t\t\t// loading probability for obtain subscription\n\t\t\tsetSegmentDailyProbObtainSubscription(k, _params[i++]);\n\n\t\t\t// loading probability for playing during the weekend \n\t\t\tsetSegmentDailyProbPlayWeekend(k, _params[i++]);\n\t\t\t\n\t\t\t// loading probability for playing during weekdays\n\t\t\tsetSegmentDailyProbPlayNoWeekend(k, _params[i++]);\n\n\t\t\t// loading social parameter for adoption \n\t\t\tsetSegmentSocialAdoptionParam(k, _params[i++]);\n\t\t\t\n\t\t}\n\t\t\t\t\t\n\t\tif (controller.CalibrationController.DEBUG_CALIB) {\n\t\t\t\n\t\t\tPrintWriter writer = new PrintWriter(System.out);\n\t\t\tthis.printParamters2Calib(writer);\n\t\t\twriter.close();\n\t\t\t\t\t\n\t\t}\n\t}", "protected abstract void setValues(double[] values);", "public void setWeights(float[][] w) {\n _w2D = w;\n _weights = true;\n }", "public void setAdjustableParams(ParameterList paramList);", "public Builder vectorCalcThreads(int vectorCalcThreads) {\n super.vectorCalcThreads(vectorCalcThreads);\n return this;\n }", "@Override\n public Builder setVectorsListeners(@NonNull Collection<VectorsListener<VocabWord>> vectorsListeners) {\n super.setVectorsListeners(vectorsListeners);\n return this;\n }", "public void learnVector(final Calendar when, final List<Double> vals) {\n throw new UnsupportedOperationException(\"Don't know what to do....\");\n }", "public void setValues(Parameter[] values) {\n if (values == null || values.length < 4) {\n throw new IllegalArgumentException(\"Invalid values:\" + values);\n }\n if (this.values == null) {\n this.values = new Parameter[values.length];\n }\n int index = 0;\n for (Parameter p : values) {\n this.values[index++] = p;\n }\n validateValues();\n }", "public void setBoxWeights(float boxVal, int itmin, int itmax, int ixmin, int ixmax, \n int ntf, int nx) {\n float[][] w = zerofloat(ntf,nx);\n for (int ix = ixmin; ix<=ixmax; ++ix) {\n for (int it=itmin; it<=itmax; ++it) { \n w[ix][it] = boxVal;\n }\n }\n _w2D = w;\n _weights = true;\n }", "public void setWeights(Weight[] weights) {\n this.weights = weights;\n }", "public Vector3 (double[] values) {\n set(values);\n }", "public void setInputs(ArrayList<Double> inputs)\n {\n this.inputs = inputs;\n }", "public org.apache.spark.ml.param.ParamPair<double[]> w (java.util.List<java.lang.Double> value) { throw new RuntimeException(); }", "public void adaptProductVector() {\t\t\r\n\t\tHashMap<Integer, Integer> neighboursAdaption = new HashMap<Integer, Integer>();\r\n\t\t\r\n\t\tdouble threshold = Parameters.adaptationThreshold / 100.0;\r\n\t\tint neighbours = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < Parameters.vectorSpaceSize; i++) {\r\n\t\t\tneighboursAdaption.put(i, 0);\r\n\t\t}\r\n\t\t\r\n\t\tfor (Object o: network.getAdjacent(this)) {\t\t\r\n\t\t\tif (o instanceof Customer) {\r\n\t\t\t\tCustomer c = (Customer)o;\r\n\t\t\t\t\r\n\t\t\t\tfor (int i = 0; i < Parameters.vectorSpaceSize; i++) {\r\n\t\t\t\t\tint count = neighboursAdaption.get(i);\r\n\t\t\t\t\tif (c.getDemandVector()[i] == 1) {\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tneighboursAdaption.put(i, count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tneighbours++;\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = 0; i < Parameters.vectorSpaceSize; i++) {\r\n\t\t\tif ((double)neighboursAdaption.get(i) / neighbours >= threshold ) {\r\n\t\t\t\tdemandVector[i] = 1;\r\n\t\t\t}\r\n\t\t}\t\t \r\n\t}", "public void learnVector(final Calendar when, final double[] vals);", "private void setWeight() {\n \tthis.trainWeight = (this.trainCars*TRAIN_WEIGHT) + (this.crew + this.numPassengers) * AVE_PASSENGER_WEIGHT;\n }", "public Vector3 set (double[] values) {\n return set(values[0], values[1], values[2]);\n }", "public void setFittedOffers(ArrayList<Offer> fittedOffers) {\r\n\t\tFittedOffers = fittedOffers;\r\n\t}", "public void setDefaultParameters()\n {\n parameters = new Vector(); // must do this to clear any old parameters\n\n Parameter parameter = new Parameter( \"DataSet to Divide\",\n DataSet.EMPTY_DATA_SET );\n addParameter( parameter );\n\n parameter = new Parameter( \"Create new DataSet?\", new Boolean(false) );\n addParameter( parameter );\n }", "public void initializeDemandVector() {\r\n\t\tdouble marketSplit = Parameters.marketSplit / 100.0;\r\n\t\tfor (int i = 0; i < demandVector.length; i++) {\r\n\t\t\t\r\n\t\t\tdouble r = RandomHelper.nextDoubleFromTo(0, 1);\r\n\t\t\t\r\n\t\t\tdemandVector[i] = r < marketSplit ? 1 : 0;\r\n\t\t}\r\n\t}", "protected void setFormalParameters(List params) {\n this._formalParameters = params;\n }", "public void set(int $param_int_1, int $param_int_2, double[] $param_arrayOf_double_3) {\n java.lang.Object $__result = null;\n try {\n if ($__directInvocation)\n super.set( $param_int_1, $param_int_2, $param_arrayOf_double_3);\n else {\n java.util.ArrayList<Object> $__params = new java.util.ArrayList<Object>();\n String $__method = \"public void boofcv.struct.image.InterleavedF64.set(int,int,double...)\";\n $__params.add($param_int_1);\n $__params.add($param_int_2);\n $__params.add($param_arrayOf_double_3);\n $__result = $__client.onRPC($__method, $__params);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public SelectionWheel( RandomData random, List<Float> chances, List<T> entries ) {\n this( random );\n\n if( chances.size() != entries.size() )\n throw new IllegalArgumentException( \"Both lists must have equal number of elements\" );\n\n for( int i = 0; i < chances.size(); i++ ) {\n this.addEntry( chances.get( i ), entries.get( i ) );\n }\n }", "protected void Initialize (double[] pars) {\n for (int j = 0; j < scalarn; j++) {\n vectorXBeta[j] = 0;\n for (int i = 0; i <= scalarK; i++)\n vectorXBeta[j] += matrixX[j][i] * pars[i];\n }\n\n double y;\n for (int j = 0; j < scalarn; j++) {\n // Yjk, Phijk, Njk\n if (vectorY[j] == scalarM) {\n vectorPhiDiff[j] = 1.0;\n vectorNk[j] = 0.0;\n vectorNYk[j] = 0.0;\n } else {\n if (vectorY[j] == 1)\n y = 0.0 - vectorXBeta[j];\n else\n // pars[scalarK+1] is for mu_2 and\n y = pars[scalarK + vectorY[j] - 1] - vectorXBeta[j];\n vectorPhiDiff[j] = NormalDistribution.CDF (y);\n vectorNk[j] = NormalDistribution.PDF (y);\n vectorNYk[j] = vectorNk[j] * y;\n }\n\n // Yj(k-1), Phij(k-1), Nj(k-1)\n if (vectorY[j] == 1) {\n vectorNk1[j] = 0.0;\n vectorNYk1[j] = 0.0;\n } else {\n if (vectorY[j] == 2)\n y = 0.0 - vectorXBeta[j];\n else\n y = pars[scalarK + vectorY[j] - 2] - vectorXBeta[j];\n vectorPhiDiff[j] = vectorPhiDiff[j] - NormalDistribution.CDF (y);\n vectorNk1[j] = NormalDistribution.PDF (y);\n vectorNYk1[j] = vectorNk1[j] * y;\n }\n }\n }", "public void setRandomValues(float avg, float distr) {\n\t\tfor(int i = 0; i < size; i++)\n\t\t\tvector[i] = avg+MathUtils.randomTriangular()*distr;\n\t}", "public void fillVector(){\n int n = min.length;\n for (int i = 0; i < n; i++) {\n this.x[i] = min.x[i] + (max.x[i] - min.x[i])*rn.uniformDeviate();\n }\n }", "public void set(VectorFloat values) {\n for (int i = 0; i < values.storage.length; i++) {\n storage[i] = values.storage[i];\n }\n }", "public Vector(double x, double y, double z, double w) {\n super(new double[][] {\n { x },\n { y },\n { z },\n { w }\n });\n }", "protected void init(Collection<Double> data) {\n\t\tList<Attribute> attList = Util.newList();\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tAttribute att = new Attribute(\"w\" + i, Type.real);\n\t\t\tattList.add(att);\n\t\t}\n\t\tsetAttRef(AttributeList.create(attList));\n\t\t\n\t\tint i = 0;\n\t\tfor (double value : data) {\n\t\t\tsetValue(i, value);\n\t\t\ti++;\n\t\t}\n\t}", "public void setValues(Parameter min, Parameter mag, Parameter wrapS, Parameter wrapT) {\n if (values == null) {\n values = new Parameter[4];\n }\n values[MIN_FILTER_INDEX] = min;\n values[MAG_FILTER_INDEX] = mag;\n values[WRAP_S_INDEX] = wrapS;\n values[WRAP_T_INDEX] = wrapT;\n validateValues();\n }", "void setParameters(IParameterCollection parameters);", "private void generateParameterValues()\n\t{\n\t\t/*\n\t\t * Initialize variables for storage of the actual parameter data and prepare the histogram bins aggregating them. \n\t\t */\n\t\t\n\t\t// Init storage.\n\t\tparameterValues.clear();\n\t\tparameterValues.put(\"alpha\", new ArrayList<Double>(numberOfDivisions));\n\t\tparameterValues.put(\"eta\", new ArrayList<Double>(numberOfDivisions));\n\t\tparameterValues.put(\"kappa\", new ArrayList<Double>(numberOfDivisions));\n\t\t\n\t\t// Init bins.\n\t\tfinal int numberOfBins \t\t\t\t\t= 50;\n\t\tMap<String, int[]> parameterBinLists\t= new HashMap<String, int[]>();\n\t\tparameterBinLists.put(\"alpha\", new int[numberOfBins]);\n\t\tparameterBinLists.put(\"eta\", new int[numberOfBins]);\n\t\tparameterBinLists.put(\"kappa\", new int[numberOfBins]);\n\t\t\n\t\t// Init random number generator.\n\t\tRandom randomGenerator\t= new Random();\n\t\t\n\t\t/*\n\t\t * Generate numberOfDivisions values for each parameter.\n\t\t */\n\t\t\n\t\tswitch (sampling_combobox.getValue())\n\t\t{\n\t\t\tcase \"Random\":\n\t\t\t\t// Generated values are allowed to be up to rangeSlider.getHighValue() and as low as rangeSlider.getLowValue().\n\t\t\t\tdouble intervalAlpha \t= rangeSliders.get(\"alpha\").getHighValue() - rangeSliders.get(\"alpha\").getLowValue();\n\t\t\t\tdouble intervalEta\t\t= rangeSliders.get(\"eta\").getHighValue() - rangeSliders.get(\"eta\").getLowValue();\n\t\t\t\tdouble intervalKappa\t= rangeSliders.get(\"kappa\").getHighValue() - rangeSliders.get(\"kappa\").getLowValue();\n\t\t\t\t\n\t\t\t\t// Generate random parameter values.\t\t\n\t\t\t\tfor (int i = 0; i < numberOfDivisions; i++) {\n\t\t\t\t\tparameterValues.get(\"alpha\").add(rangeSliders.get(\"alpha\").getLowValue() + randomGenerator.nextFloat() * intervalAlpha);\n\t\t\t\t\tparameterValues.get(\"eta\").add(rangeSliders.get(\"eta\").getLowValue() + randomGenerator.nextFloat() * intervalEta);\n\t\t\t\t\tparameterValues.get(\"kappa\").add(rangeSliders.get(\"kappa\").getLowValue() + randomGenerator.nextFloat() * intervalKappa);\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"Cartesian\":\n\t\t\t\tfor (String param : LDAConfiguration.SUPPORTED_PARAMETERS) {\n\t\t\t\t\tfinal double interval = (rangeSliders.get(param).getHighValue() - rangeSliders.get(param).getLowValue()) / (numberOfDivisions);\n\t\t\t\t\t\n\t\t\t\t\tfor (int i = 0; i < numberOfDivisions; i++) {\n\t\t\t\t\t\tparameterValues.get(param).add(rangeSliders.get(param).getLowValue() + interval * i + interval / 2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"Latin Hypercube\":\n\t\t\t\tfor (String param : LDAConfiguration.SUPPORTED_PARAMETERS) {\n\t\t\t\t\t// Calcualte bin interval.\n\t\t\t\t\tfinal double interval \t\t= (rangeSliders.get(param).getHighValue() - rangeSliders.get(param).getLowValue()) / (numberOfDivisions);\n\n\t\t\t\t\tfor (int i = 0; i < numberOfDivisions; i++) {\n\t\t\t\t\t\t// Minimal value allowed for current bin.\n\t\t\t\t\t\tfinal double currentBinMin = rangeSliders.get(param).getLowValue() + interval * i;\n\t\t\t\t\t\t// Generate value for this bin.\n\t\t\t\t\t\tparameterValues.get(param).add(currentBinMin + randomGenerator.nextFloat() * interval);\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t//\t\t\t\t\tto do:\n\t//\t\t\t\t\t\t- test: check generate.txt.\n\t//\t\t\t\t\t\t- after that: START WRITING PAPER (SATURDAY!).\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t/*\n\t\t * Bin data for use in histograms/scented widgets.\n\t\t */\n\t\t\n\t\t// Bin data.\n\t\tfor (Map.Entry<String, ArrayList<Double>> entry : parameterValues.entrySet()) {\n\t\t\tdouble binInterval = (rangeSliders.get(entry.getKey()).getMax() - rangeSliders.get(entry.getKey()).getMin()) / numberOfBins;\n\t\t\t\n\t\t\t// Check every value and assign it to the correct bin.\n\t\t\tfor (double value : entry.getValue()) {\n\t\t\t\tint index_key = (int) ( (value - rangeSliders.get(entry.getKey()).getMin()) / binInterval);\n\t\t\t\t// Check if element is highest allowed entry.\n\t\t\t\tindex_key = index_key < numberOfBins ? index_key : numberOfBins - 1;\n\t\t\t\t\n\t\t\t\t// Increment content of corresponding bin.\n\t\t\t\tparameterBinLists.get(entry.getKey())[index_key]++;\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t * Transfer data to scented widgets.\n\t\t */\n\t\t\n\t\t// Clear old data.\n\t\talpha_barchart.getData().clear();\n\t\teta_barchart.getData().clear();\n\t\tkappa_barchart.getData().clear();\n\n\t\t// Add data series to barcharts.\n\t\talpha_barchart.getData().add(generateParameterHistogramDataSeries(\"alpha\", parameterBinLists, numberOfBins));\n\t\teta_barchart.getData().add(generateParameterHistogramDataSeries(\"eta\", parameterBinLists, numberOfBins));\n\t\tkappa_barchart.getData().add(generateParameterHistogramDataSeries(\"kappa\", parameterBinLists, numberOfBins));\n\t}", "public synchronized final void setFeatureExtractionParams(Vector poParams) {\n setParams(poParams, FEATURE_EXTRACTION);\n }", "@Test\n public void set() {\n float[] a = new float[] {1.001f, 2.002f, 3.003f, 4.004f, 5.005f, 6.006f}; \n float[] b = new float[] {2.0f, 1.0f, 6.0f, 3.0f, 4.0f, 5.0f};\n float[] expect = new float[] {1.0f, 6.0f, 3.0f, 4.0f};\n Vec4f.set(a, 2, b, 1);\n assertTrue(Vec4f.equals(a, 2, expect, 0));\n \n float[] expect2 = new float[] {2.0f, 1.0f, 6.0f, 3.0f};\n Vec4f.set(a, b);\n assertTrue(Vec4f.equals(a, expect2));\n \n \n float[] a3 = new float[] {1.001f, 2.002f, 3.003f, 4.004f, 5.005f, 6.006f}; \n float[] expect3 = new float[] {2.0f, 1.0f, 6.0f, 4.0f};\n Vec4f.set(a3,2, 2.0f, 1.0f, 6.0f, 4.0f );\n assertTrue(Vec4f.equals(a3, 2, expect3, 0));\n \n float[] a4 = new float[4]; \n float[] expect4 = new float[] {2.0f, 1.0f, 6.0f, 4.0f};\n Vec4f.set(a4, 2.0f, 1.0f, 6.0f, 4.0f );\n assertTrue(Vec4f.equals(a4, expect4));\n }", "public void testSetWeight()\n {\n WeightedKernel<Vector> instance = new WeightedKernel<Vector>();\n assertEquals(WeightedKernel.DEFAULT_WEIGHT, instance.getWeight());\n \n double weight = RANDOM.nextDouble();\n instance.setWeight(weight);\n assertEquals(weight, instance.getWeight());\n \n weight = 0.0;\n instance.setWeight(weight);\n assertEquals(weight, instance.getWeight());\n \n weight = 4.7;\n instance.setWeight(weight);\n assertEquals(weight, instance.getWeight());\n \n boolean exceptionThrown = false;\n try\n {\n instance.setWeight(-1.0);\n }\n catch ( IllegalArgumentException ex )\n {\n exceptionThrown = true;\n }\n finally\n {\n assertTrue(exceptionThrown);\n }\n \n }", "protected void setParams (double mu, double sigma) {\n if (sigma <= 0)\n throw new IllegalArgumentException (\"sigma <= 0\");\n this.mu = mu;\n this.sigma = sigma;\n }", "public static void WeightedVector() throws FileNotFoundException {\n int doc = 0;\n for(Entry<String, List<Integer>> entry: dictionary.entrySet()) {\n List<Integer> wtg = new ArrayList<>();\n List<Double> newList = new ArrayList<>();\n wtg = entry.getValue();\n int i = 0;\n Double mul = 0.0;\n while(i<57) {\n mul = wtg.get(i) * idfFinal.get(doc);\n newList.add(i, mul);\n i++;\n }\n wtgMap.put(entry.getKey(),newList);\n doc++;\n }\n savewtg();\n }", "@TestMethod(value=\"testSetParameters_arrayObject\")\n public void setParameters(Object[] params) throws CDKException {\n if (params.length > 1) {\n throw new CDKException(\"PartialSigmaChargeDescriptor only expects one parameter\");\n }\n if (!(params[0] instanceof Integer)) {\n throw new CDKException(\"The parameter 1 must be of type Integer\");\n }\n maxIterations = (Integer) params[0];\n }", "public final void setFeatureExtractionParams(Vector oParams)\n\t{\n\t\tsetParams(oParams, FEATURE_EXTRACTION);\n\t}", "public Vector2f set (float[] values)\n {\n return set(values[0], values[1]);\n }", "@Override\n\tpublic void setParameters(Map<String, Double> data) {\n\t\tprobCatch = data.get(PROBCATCH_PARAMETER_LABEL);\n\t\tprobCatchBounds.set(1, probCatch);\n\t\tcreateParametersBounds();\n\t}", "public void setWeights() {\n for (Square[] square : squares) {\n for (Square square1 : square) {\n try {\n int i = Integer.parseInt(square1.getText());\n square1.setV(new Vertex(square1.getXcoor(), square1.getYcoor(), i));\n } catch (NumberFormatException e) {\n square1.setV(new Vertex(square1.getXcoor(), square1.getYcoor(), 1));\n }\n }\n }\n }", "public final void setPreprocessingParams(Vector oParams)\n\t{\n\t\tsetParams(oParams, PREPROCESSING);\n\t}", "@Override\n\tpublic void setParameters(Collection<CompoundVariable> arg0)\n\t\t\tthrows InvalidVariableException {\n\t\tcheckParameterCount(arg0,0); //检查参数的个数是否正确\n\t}", "public synchronized final void setPreprocessingParams(Vector poParams) {\n setParams(poParams, PREPROCESSING);\n }", "public abstract void assign(ParameterVector pv) throws SolverException;", "protected void setForceNormalVector() {\n\t\tvn = forceNormalVector(v1, v2);\n\t}", "public void setParamValues(Object[] values);", "public void setDistribution(String s, double param) {\n distribution = s;\n parametr = param;\n timeServ = parametr; // додано 26.12.2011, тоді, якщо s==null, то передається час обслуговування\n }", "private void fillVector()\r\n {\r\n // The x and y coordinates of a point\r\n int xPoint;\r\n int yPoint;\r\n \r\n // The x and y coordinates of a point with the displacement of the plot \r\n // origin from the component origin taken into consideration\r\n int xPointOffset, yPointOffset;\r\n \r\n // The point to be stored in the vector\r\n SPlotPoint plotPoint;\r\n\r\n\r\n // Get the max of the data types to figure out how to scale plot\r\n maxX_ = (new Double(xData_.getMax())).intValue();\r\n maxY_ = (new Double(yData_.getMax())).intValue();\r\n \r\n // Want max axes to be max of 200. Need to calculate the scaling factor\r\n xFactor_ = maxX_/MAX_AXIS_LENGTH;\r\n yFactor_ = maxY_/MAX_AXIS_LENGTH;\r\n \r\n // Extract x and y values, generate SPlotPoints and store in vector\r\n for (int i = 0; i < xSize_; i++)\r\n {\r\n xPoint = (int)(xData_.getValue(i) / xFactor_);\r\n yPoint = (int)(yData_.getValue(i) / yFactor_); \r\n\r\n\r\n // The xy coordinates where to plot the point (after taking the \r\n // offset btn the plot origin and the component origin into account\r\n xPointOffset = xPoint+OFFSET;\r\n yPointOffset = yPoint+OFFSET;\r\n \r\n // Generate SPlotPoints and store in vector\r\n plotPoint = new SPlotPoint(xPointOffset,\r\n yPointOffset);\r\n \r\n // Set the id of the scatter plot point (corresponds to the row\r\n // number in the .dbf\r\n // Must add one to compensate for geodata starting at 1 and vector\r\n // index starting at 0\r\n plotPoint.setId(i+1);\r\n \r\n pointVector_.addElement(plotPoint);\r\n }\r\n }", "public void setParameters(\n\t\t\tVector3D centrePosition,\n\t\t\tVector3D horizontalSpanVector,\n\t\t\tVector3D verticalSpanVector,\n\t\t\tint detectorPixelsHorizontal,\n\t\t\tint detectorPixelsVertical\n\t\t)\n\t{\n\t\tsetCentrePosition(centrePosition);\n\t\tsetSpanVectors(horizontalSpanVector, verticalSpanVector);\n\t\tsetDetectorPixelsHorizontal(detectorPixelsHorizontal);\n\t\tsetDetectorPixelsVertical(detectorPixelsVertical);\n\t\t\n\t\t// set corner position\n\t\tvalidate();\n\t}", "public void setParameters(ParameterList params) {\n\t\t_parameters = params;\n\n\t\tif (DEBUG)\n\t\t\t_log.debug(\"Created AXMessage from parameter list:\\n\" + params);\n\n\t}", "public void SetVector(int[] v){ this.vector=v;}", "public static void setVectors( Body body, StateVector state ) {\r\n\r\n body.lastState.copyStateVectors( body.currentState );\r\n body.currentState.x = state.x;\r\n body.currentState.y = state.y;\r\n body.currentState.z = state.z;\r\n body.currentState.vx = state.vx;\r\n body.currentState.vy = state.vy;\r\n body.currentState.vz = state.vz;\r\n\r\n }", "public void setWeitereVerwendungszwecke(String[] list) throws RemoteException;", "public void learnVector(final Calendar when, final double[] vals) {\n throw new UnsupportedOperationException(\"Don't know what to do....\");\n }", "@Override\n\tprotected void setParameterValues() {\n\t}", "@Override\n\t\tpublic void setParameters(Object[] parameters) {\n\t\t\t\n\t\t}", "public static void setParameters(PreparedStatement p, int offset, Vector columns, Vector values)\n throws SQLException\n {\n for (int i = 0; i < values.size(); i++)\n {\n setParameter(p, i + offset + 1, (Column)columns.elementAt(i), values.elementAt(i));\n }\n }", "public void setRandomItems(ArrayList<RandomItem> items);", "public void setWeights(double ACC, double ARM, double EVA, double HP, double INT,\n\t\t\tdouble LCK, double MAG, double MRE, double STR, double SP)\n\t{\n\t\tthis.statWeights = new double[10];\n\t\tstatWeights[0] = ACC;\n\t\tstatWeights[1] = ARM;\n\t\tstatWeights[2] = EVA;\n\t\tstatWeights[3] = HP;\n\t\tstatWeights[4] = INT;\n\t\tstatWeights[5] = LCK;\n\t\tstatWeights[6] = MAG;\n\t\tstatWeights[7] = MRE;\n\t\tstatWeights[8] = STR;\n\t\tstatWeights[9] = SP;\n\t}", "private void internalSetPoints(List<Point3D> points) {\n if (points.size() < MINIMUM_SIZE) {\n throw new IllegalArgumentException();\n }\n mPoints = points;\n }", "public void initParams(List<String> list) {\n if ((list.size() & 1) != 0) {\n throw new IllegalArgumentException(\"list size must be a multiple of 2\");\n }\n for (int i = 0; i < list.size(); ) {\n addParam(list.get(i++), list.get(i++));\n }\n }", "public void setInstances(List<double[]> features) {\n\t\tthis.instances = features;\n\t}", "public void setVertices(List<double[]> newVertices) {\n vertexLayer.clear();\n for (int i = 0; i < newVertices.size(); i++) {\n double[] eachCoords = newVertices.get(i);\n //invert the y-axis\n vertexLayer.add(new Vertex(eachCoords[0], -eachCoords[1], DEFAULT_DOT_RADIUS, DEFAULT_STROKE_WIDTH, \"C\"+i, DEFAULT_DOT_FILL, DEFAULT_DOT_STROKE, DEFAULT_LABEL_COLOR));\n }\n vertexLayer.requestRedraw();\n }", "public static void generateWordVectorsAndWordList(Set<String> filenames, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tString contentDirectory, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tString wordListFileName, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tfidfFileName, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tString outputDirectory,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tint minFrequency,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tint maxFrequency,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tboolean useStemming,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tString language\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) throws Exception {\r\n\r\n\t\t\t// Create the word vector tool\r\n\t\t\tWVTool wvt = new WVTool(true);\r\n\t\t\tWVTFileInputList list = new WVTFileInputList(filenames.size());\r\n\t\t\t\r\n\t\t\t// Add all the files\r\n\t\t\tint cnt = 0;\r\n\t\t\tfor (String filename : filenames) {\r\n\t\t\t\tlist.addEntry(new WVTDocumentInfo(contentDirectory + \"/\" + filename, \"txt\",\"\",\"language\"));\r\n\t\t\t\tcnt++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Processed \" + cnt + \" files\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// Stemming\r\n\t\t\tWVTConfiguration config = new WVTConfiguration();\r\n\t\t\t\r\n\t\t\tif (useStemming) {\r\n\t\t\t\tif (\"german\".equals(language)) {\r\n\t\t\t\t\tconfig.setConfigurationRule(WVTConfiguration.STEP_STEMMER, new WVTConfigurationFact(new FastGermanStemmer()));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tconfig.setConfigurationRule(WVTConfiguration.STEP_STEMMER, new WVTConfigurationFact(new PorterStemmerWrapper()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// create the word list\r\n\t\t\tWVTWordList wordList = wvt.createWordList(list, config);\r\n\r\n\t\t\t// pruning seems to be necessary? \r\n\t\t\twordList.pruneByFrequency(minFrequency, maxFrequency);\r\n\t\t\t\r\n\t\t\t// Store the results somewhere\r\n\t\t\twordList.storePlain(new FileWriter(outputDirectory + \"/\" + wordListFileName));\r\n\t\t\t\r\n\t\t\t// Also the outputs\r\n\t\t\tString tempFile = contentDirectory + tfidfFileName + \".temp\";\r\n\t\t\tSystem.out.println(\"Trying to write to \" + tempFile);\r\n\t\t\t\r\n\t\t\tFileWriter fileWriter = new FileWriter(tempFile);\r\n\t\t\tWordVectorWriter wvw = new WordVectorWriter(fileWriter, true);\r\n\t\t\tconfig.setConfigurationRule( WVTConfiguration.STEP_OUTPUT, new WVTConfigurationFact(wvw));\r\n\t\t\tconfig.setConfigurationRule(WVTConfiguration.STEP_VECTOR_CREATION, new WVTConfigurationFact(new TFIDF()));\r\n\r\n\t\t\t// Create everything and go\r\n\t\t\twvt.createVectors(list, config, wordList);\r\n\t\t\t\r\n\t\t\twvw.close();\r\n\t\t\tfileWriter.close();\r\n\r\n\t\t\t// Now delete all the files we have created\r\n\t\t\tFile fileToDelete;\r\n\t\t\tfor (String filename : filenames) {\r\n\t\t\t\tfileToDelete = new File(filename);\r\n\t\t\t\tfileToDelete.delete();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// transform the outputfile and only keep the id instead of the filename\r\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(tempFile));\r\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(outputDirectory + tfidfFileName));\r\n\t\t\tString line = reader.readLine();\r\n\t\t\tint idx1 = -1;\r\n\t\t\tint idx2 = -1;\r\n\t\t\tString fname;\r\n\t\t\tString id;\r\n\t\t\twhile (line != null) {\r\n\t\t\t\tidx1 = line.indexOf(\";\");\r\n\t\t\t\tfname = line.substring(0,idx1);\r\n\t\t\t\t// find the \r\n\t\t\t\tidx2 = line.lastIndexOf(\"/\");\r\n\t\t\t\tid = fname.substring(idx2+1);\r\n\t\t\t\twriter.write(id + \";\" + line.substring(idx1+1) + \"\\n\");\r\n\t\t\t\tline = reader.readLine();\r\n\t\t\t}\r\n\t\t\treader.close();\r\n\t\t\twriter.close();\r\n\t\t\tfileToDelete = new File(tempFile);\r\n\t\t\tfileToDelete.delete();\r\n\r\n\t}", "public void add(LorentzVector... vects) {\n\t\tfor (LorentzVector vect : vects) {\n\t\t\tthis.vector.add(vect.vect());\n\t\t\tthis.energy = this.e() + vect.e();\n\t\t}\n\t}", "public void setNewWeights(boolean clearWeights) {\n Random randomEngine = new Random();\n if (clearWeights) {\n for (int i = 0; i <= inputs; ++i) {\n weights[i] = 0.0;\n exWeights[i] = 0.0;\n changes[i] = 0.0;\n }\n }\n else {\n for (int i = 0; i <= inputs; ++i) {\n weights[i] = randomEngine.nextDouble() - 0.5;\n exWeights[i] = 0.0;\n changes[i] = 0.0;\n }\n }\n }", "public void add(ArrayList<PVector> vectors) {\n\t\tfor (int i = 0; i < vectors.size(); i++) {\n\t\t\tpoints.add(new GPoint(vectors.get(i)));\n\t\t}\n\t}", "public void setAllSpieler(Vector<Spieler> spielerListe) {\n\t\tspieler.setAllSpieler(spielerListe);\n\t}", "public DocumentVector(Collection<Double> data) {\n\t\tinit(data);\n\t}", "public void updateParameters(){\n\t\tp = RunEnvironment.getInstance().getParameters();\n\t\tmaxFlowerNectar = (double)p.getValue(\"maxFlowerNectar\");\n\t\tlowMetabolicRate = (double)p.getValue(\"lowMetabolicRate\");\n\t\thighMetabolicRate = (double)p.getValue(\"highMetabolicRate\");\n\t\tcolonySize = (int)p.getValue(\"colonySize\");\n\t}", "@Override\n\tpublic void createLSH(Set<FeatureVector<? extends Number>> randomVectors) {\n\t\tthis.localitySensitiveHashed = new ComparableBitSetSignatureVector(\n\t\t\t\tthis.getId(), randomVectors.size());\n\t\t// Do d number of classifications\n\t\tint i = 0;\n\t\tfor (FeatureVector<? extends Number> weightVector : randomVectors) {\n\t\t\tthis.getLocalitySensitiveHashed().setValue(i,\n\t\t\t\t\tnew Bit(classify(weightVector)));\n\t\t\ti++;\n\t\t}\n\t}", "public void setParameterList(String parName,\n Collection<?> parVal) throws HibException ;", "private void setupFitter() throws FittingException {\n mFitter.setFunctionEvaluator(\n new LevenbergMarquardtMultiDimensionFunctionEvaluator() {\n @Override\n public int getNumberOfDimensions() {\n return NonLinearLeastSquaresLaterationSolver.this.getNumberOfDimensions();\n }\n\n @Override\n public double[] createInitialParametersArray() {\n final int dims = getNumberOfDimensions();\n final double[] initial = new double[dims];\n\n if (mInitialPosition == null) {\n //use centroid of positions as initial value\n final int numSamples = mPositions.length;\n\n for (int i = 0; i < dims; i++) {\n initial[i] = 0.0;\n for (final P position : mPositions) {\n initial[i] += position.getInhomogeneousCoordinate(i) / (double) numSamples;\n }\n }\n } else {\n //use provided initial position\n for (int i = 0; i < dims; i++) {\n initial[i] = mInitialPosition.getInhomogeneousCoordinate(i);\n }\n }\n\n return initial;\n }\n\n @Override\n public double evaluate(\n final int i, final double[] point, final double[] params,\n final double[] derivatives) {\n //we want to estimate the position contained as inhomogeneous coordinates in params array.\n //the function evaluates the distance to provided point respect to current parameter\n // (estimated position)\n //sqrDist = (x - px)^2 + (y - py)^2\n //grad = [2*(x - px), 2*(y - py)]\n final int dims = getNumberOfDimensions();\n double result = 0.0;\n double diff;\n double param;\n for (int j = 0; j < dims; j++) {\n param = params[j];\n diff = param - point[j];\n result += diff * diff;\n derivatives[j] = 2.0 * diff;\n }\n\n return result;\n }\n });\n\n final int dims = getNumberOfDimensions();\n double dist;\n\n try {\n final Matrix x = new Matrix(mPositions.length, dims);\n final double[] y = new double[mPositions.length];\n for (int i = 0; i < mPositions.length; i++) {\n for (int j = 0; j < dims; j++) {\n x.setElementAt(i, j, mPositions[i].getInhomogeneousCoordinate(j));\n }\n\n dist = mDistances[i];\n y[i] = dist * dist;\n }\n\n mFitter.setInputData(x, y, mDistanceStandardDeviations);\n } catch (final AlgebraException ignore) {\n //never happens\n }\n }" ]
[ "0.58944273", "0.5611645", "0.5563069", "0.55253583", "0.55056894", "0.5481275", "0.5445802", "0.5445598", "0.5413929", "0.5344797", "0.5327492", "0.5315057", "0.5296695", "0.5278388", "0.52701867", "0.5264778", "0.52607155", "0.52522033", "0.5221286", "0.51907647", "0.5181764", "0.5181726", "0.51724476", "0.5154165", "0.5129203", "0.5118691", "0.5103592", "0.5099744", "0.50602895", "0.50581753", "0.5055245", "0.5045361", "0.49771574", "0.4972223", "0.49720386", "0.49710637", "0.49703014", "0.49667317", "0.49623865", "0.49616215", "0.49497825", "0.4937176", "0.49286395", "0.4910289", "0.49032176", "0.48819664", "0.48800683", "0.48760062", "0.48757818", "0.48722956", "0.48621544", "0.48614794", "0.48588315", "0.48541808", "0.48443812", "0.4840983", "0.48322552", "0.48187587", "0.48165444", "0.48082024", "0.48072913", "0.4803872", "0.48030972", "0.48030606", "0.48017773", "0.48009652", "0.47999552", "0.47961816", "0.47941813", "0.47917816", "0.47908655", "0.4787152", "0.4781634", "0.4778226", "0.4771494", "0.47694448", "0.47676903", "0.47653753", "0.47632828", "0.47619477", "0.47546542", "0.47509485", "0.4746978", "0.4741033", "0.4739733", "0.47334412", "0.47306606", "0.47303975", "0.47204676", "0.47184816", "0.47147232", "0.47142214", "0.47112912", "0.47043943", "0.47005594", "0.46903428", "0.468793", "0.4686136", "0.4681783", "0.4671547", "0.46703166" ]
0.0
-1
Performs sampling on the current distribution.
public List<Vec> sample(int count, Random rand);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sample() {\n getFunctionEstimator().sample();\n }", "@Override\n public Builder sampling(double sampling) {\n super.sampling(sampling);\n return this;\n }", "public abstract double sample();", "double sample();", "@Override\n protected void produceSample(SamplingContext context) {\n context.sampleWeight = 1.0;\n int actionIndex = context.rand.nextInt(this.resamplingActions.size());\n MCMCResamplingAction action = this.resamplingActions.get(actionIndex);\n action.resample(context);\n this.sampledVarsToXYVarsMapper.map(context.sampledVarsAssignment, context.XYVarsAssignment);\n }", "public void sample(RandomGenerator rng) {\n\t\tdouble rate = priorRate;\n\t\tint sumTk = 0;\n\t\tfor (ProbabilityNode node : tiedNodes) {\n\t\t\tBetaDistribution betaD = new BetaDistribution(rng, this.c, node.marginal_nk);\n\t\t\tdouble q = Math.max(1e-75, betaD.sample());\n\t\t\trate += FastMath.log(1.0 / q);\n\t\t\tsumTk += node.marginal_tk;\n\t\t}\n\t\tdouble scale = 1.0 / rate;\n\t\t// marginal nk here is \\sum_{child}child.marginal_tk\n\t\tGammaDistribution gammaD = new GammaDistribution(rng, sumTk + priorShape, scale);\n\t\tthis.setConcentration(gammaD.sample());\n\t}", "@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }", "public void sample()\n\t{\n\t\tint nd = interval.numDimensions();\n\n\t\t// the order in which mpicbg expects\n\t\tp = new double[ nd ][ (int) N ];\n\t\tq = new double[ nd ][ (int) N ];\n\n\t\tdouble[] src = new double[ nd ];\n\t\tdouble[] tgt = new double[ nd ];\n\n\t\tint i = 0;\n\t\tIntervalIterator it = new IntervalIterator( interval );\n\t\twhile ( it.hasNext() )\n\t\t{\n\t\t\tit.fwd();\n\t\t\tit.localize( src );\n\t\t\txfm.apply( src, tgt );\n\n\t\t\tfor ( int d = 0; d < nd; d++ )\n\t\t\t{\n\t\t\t\tp[ d ][ i ] = src[ d ];\n\t\t\t\tq[ d ][ i ] = tgt[ d ];\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}", "public static void sample() {\n System.out.println(\"# 1\");\n Observable.fromIterable(sData)\n .timestamp()\n .sample(1000, TimeUnit.MICROSECONDS)\n .subscribe(new MyObserver<>());\n\n /*\n Emission controlled by sampler inner observable\n */\n System.out.println(\"# 2\");\n Observable.fromIterable(sData)\n .sample((observer) -> {\n System.out.println(\"emitter\");\n Observable.just(\"123\").subscribe(observer);\n }, true).subscribe(new MyObserver<>());\n }", "@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }", "public Builder setSamplingProbability(double value) {\n \n samplingProbability_ = value;\n onChanged();\n return this;\n }", "@Override\r\n\tpublic Item sample() {\r\n\t\tint index = StdRandom.uniform(count);\r\n\t\tItem item = arr[index];\r\n\t\treturn item;\r\n\t}", "private void sample() {\n Number value = gauge.get();\n this.inner.set(value != null ? value.doubleValue() : 0);\n }", "static void run_sample(int i)\r\n\t{\r\n\t}", "public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}", "int nextSample(final double mean);", "private void run() {\n\t\tfor (int i = 0; i < 1000; i++){\n\t\t\t\n\t\t\tdouble sample = Math.random()*2.0;\n\t\t\tdataset.addObservation(sample);\n\t\t\t\n\t\t\t// stats\n\t\t\tsum += sample;\n\t\t\tn++;\n\t\t\tav = sum/n;\n\n\t\t\t// create new xy dataset\n\t\t\n\t\t\ttry {Thread.sleep(1000L);} catch (Exception e) {}\n\t\t\t\n\t\t}\n\t\t\n\t\t \n\t}", "public abstract double samplingFrequency();", "double sample()\n\t{\n\t\treturn rb.peek();\n\t}", "public static double doubleSample() {\n return random_.nextDouble();\n }", "@Override\n public SampleResult sample(Entry e) {\n return sample();\n }", "@Override\n public SampleResult sample(Entry e) {\n return sample();\n }", "void enableSampledStatistics();", "public double sample_value() {\n checkHasParams();\n return -Math.log(Util.random()) / this.lambda;\n }", "public Item sample() {\n if (size == 0) throw new NoSuchElementException();\n return array[StdRandom.uniform(size)];\n }", "public Item sample() {\n\n\t\tif (isEmpty())\n\t\t\tthrow new NoSuchElementException();\n\n\t\tint random = (int)(StdRandom.uniform() * N);\n\t\treturn arr[random];\n\t}", "DoubleMatrix1D nextSample(){\n for(int u=0; u<useFrequency; u++){\n while(true) {//draw until acceptable candidate found\n DoubleMatrix1D y = nextCandidate();\n if(checkCandidate(y))//accept\n break;\n }\n }\n \n return x.copy();\n }", "public final double sample(double x) {\n\t\t//System.out.println(a+\"*x*x*x + \"+b+\"*x*x + \"+d);\n\t\treturn a*x*x*x + b*x*x + d;\n\t}", "private static void sample2(ScoredDocIDs collection, int collectionSize, int[] sample, long[] times) \n throws IOException {\n if (returnTimings) {\n times[0] = System.currentTimeMillis();\n }\n int sampleSize = sample.length;\n IntPriorityQueue pq = new IntPriorityQueue(sampleSize);\n /*\n * Convert every value in the collection to a hashed \"weight\" value, and insert\n * into a bounded PQ (retains only sampleSize highest weights).\n */\n ScoredDocIDsIterator it = collection.iterator();\n while (it.next()) {\n pq.insertWithReuse((int)(it.getDocID() * PHI_32) & 0x7FFFFFFF);\n }\n if (returnTimings) {\n times[1] = System.currentTimeMillis();\n }\n /*\n * Extract heap, convert weights back to original values, and return as integers.\n */\n Object[] heap = pq.getHeap();\n for (int si = 0; si < sampleSize; si++) {\n sample[si] = (int)(((IntPriorityQueue.MI)(heap[si+1])).value * PHI_32I) & 0x7FFFFFFF;\n }\n if (returnTimings) {\n times[2] = System.currentTimeMillis();\n }\n }", "public Item sample() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n return a[StdRandom.uniform(N)];\n }", "@java.lang.Override\n public io.envoyproxy.envoy.type.v3.FractionalPercent getRandomSampling() {\n return randomSampling_ == null ? io.envoyproxy.envoy.type.v3.FractionalPercent.getDefaultInstance() : randomSampling_;\n }", "public Item sample(){\n if(size == 0){\n throw new NoSuchElementException();\n }\n int ri = StdRandom.uniform(size);\n \n Iterator<Item> it = this.iterator();\n \n for(int i = 0; i < ri; i++){\n it.next();\n }\n \n return it.next();\n }", "@Override\n protected void initializeSample(SamplingContext context) {\n for(int i = 0 ; i < this.EVars.length ; i++) {\n Variable EVar = this.EVars[i];\n int EVal = this.EVals[i];\n int EIndex = Toolkit.indexOf(this.sampledVars, EVar);\n context.sampledVarsAssignment[EIndex] = EVal;\n }\n // produce a few samples to get the network into a more \"normal\" state\n for(int i = 0 ; i < this.resamplingActions.size() * 2 ; i++)\n this.produceSample(context);\n context.sampleWeight = 1.0;\n\n /*WeightedSampleProducer weightedSampler = new WeightedSampleProducer(\n this.bn, this.XVars, this.YVars, this.EVars, this.EVals);\n // the variable values are preserved after the following call\n weightedSampler.produceSample(context); // evidence is correctly set\n context.sampleWeight = 1.0;*/\n }", "@Override\r\n\tpublic int[] getSample(Random rng) {\r\n\t\tif (!ready)\r\n\t\t\tthrow new RuntimeException(\"must normalize first\");\r\n\t\t\r\n\t\tint bins[] = new int[no_goods];\r\n\t\t\r\n\t\tfor (int i = 0; i<no_goods; i++) {\r\n\t\t\tdouble[] pmf = prob[i].get(r_tmp[i]);\r\n\t\r\n\t\t\t// choose a random spot on the cdf\r\n\t\t\tdouble random = rng.nextDouble();\r\n\t\t\t\r\n\t\t\t// compute cdf. todo: maybe we should precompute inverse of cdf in normalize() so that\r\n\t\t\t// we can avoid a loop here?\r\n\t\t\tdouble cdf = 0.0;\r\n\t\t\tfor (int j = 0; j<pmf.length; j++) {\r\n\t\t\t\tcdf += pmf[j];\r\n\t\t\t\t\r\n\t\t\t\tif (cdf >= random) {\r\n\t\t\t\t\tbins[i] = j;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// add index to realized so that in next round we get the pmf conditional\r\n\t\t\t\t\t// on our result for this round\r\n\t\t\t\t\tfor (int k = 0; k<=i; k++)\r\n\t\t\t\t\t\tr_tmp[i+1].d[k] = bins[k];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// go onto next good\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// sanity check: make sure we picked something. \r\n\t\t}\r\n\t\t\r\n\t\treturn bins;\r\n\t}", "public static <T, U> Observable<T> sample(\r\n\t\t\tObservable<? extends T> source, \r\n\t\t\tObservable<? extends U> sampler) {\r\n\t\treturn new Sample.ByObservable<T, U>(source, sampler);\r\n\t}", "public Sample SelectSample() {\n\t\t\n\t\tif(sample_map.size() == 0) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tfloat sum = 0;\n\t\tfloat min = Float.MAX_VALUE;\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tmin = Math.min(min, ptr.s.weight);\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tmin = Math.abs(min) + 1;\n\t\tptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tsum += ptr.s.weight + min;\n\t\t\tif(ptr.s.weight + min < 0) {\n\t\t\t\tSystem.out.println(\"neg val\");System.exit(0);\n\t\t\t}\n\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tfloat val = (float) (Math.random() * sum);\n\n\t\tsum = 0;\n\t\tptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tsum += ptr.s.weight + min;\n\n\t\t\tif(sum >= val) {\n\t\t\t\treturn ptr.s;\n\t\t\t}\n\t\t\t\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\tSystem.out.println(\"error\");System.exit(0);\n\t\treturn null;\n\t}", "public Item sample() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n double rand = Math.random() * N;\n int idx = (int) Math.floor(rand);\n Item item = s[idx];\n return item;\n }", "public Item sample() {\n if (n == 0) throw new NoSuchElementException();\n return arr[StdRandom.uniform(n)];\n }", "public Item sample() {\n if (N == 0) throw new java.util.NoSuchElementException();\n return collection[rnd.nextInt(N)];\n }", "public Item sample()\r\n {\r\n if (isEmpty()) throw new NoSuchElementException(\"Empty randomized queue\");\r\n\r\n int randomizedIdx = StdRandom.uniform(n);\r\n\r\n return a[randomizedIdx];\r\n }", "public void setDistribution(int distribution) {\n this.distribution = distribution;\n }", "private void sample() {\n gaugeSet.values().forEach((key, value) ->\n this.inner.labels(key).set(value != null ? value.doubleValue() : 0));\n }", "public Item sample()\n {\n checkNotEmpty();\n\n return items[nextIndex()];\n }", "@Override\n\tpublic void run() {\n\t\tMPMergeSortTest.MPParallelRandomGen(start, end, r, data);\n\n\t}", "public void setSamplingRate( int samplingRate ) {\r\n this.samplingRate = samplingRate;\r\n }", "public void updateSamples();", "public Item sample() {\n if(isEmpty()) throw new NoSuchElementException();\n int idx = StdRandom.uniform(size);\n return arr[idx];\n }", "public Item sample() {\n \t\tif (size == 0) {\n \t\t\tthrow new NoSuchElementException();\n \t\t}\n \t\treturn (Item) items[StdRandom.uniform(size)];\n \t}", "public Item sample() {\r\n\t\tif (isEmpty()) {\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn queue[StdRandom.uniform(0,n)];\r\n\t\t}\r\n\t}", "public Item sample() {\n if (isEmpty()) throw new NoSuchElementException(\"Empty queue\");\n\n int rdm = StdRandom.uniform(n);\n return a[rdm];\n }", "public Position sampleRandomGaussianPosition();", "public Item sample() {\n if (N == 0) throw new NoSuchElementException();\n int idx = StdRandom.uniform(N);\n return s[first + idx];\n }", "public void setSampleMode( SampleMode sampleMode );", "Sample start();", "protected void DoGibbsSampling(){\n\t\twhile (gibbs_sample_num <= num_gibbs_total_iterations){\t\t\t\n\t\t\tDoOneGibbsSample();\n\t\t\t//now flush the previous previous gibbs sample to not leak memory\n\t\t\tFlushDataForSample(gibbs_samples_of_bart_trees[gibbs_sample_num - 1]);\n\t\t\t//keep one previous for interaction constraints\n//\t\t\tif (gibbs_sample_num > 1) {\n//\t\t\t\tFlushDataForSample(gibbs_samples_of_bart_trees[gibbs_sample_num - 2]);\n//\t\t\t}\t\t\t\n\t\t\tDeleteBurnInsOnPreviousSamples();\n\t\t\tgibbs_sample_num++;\n\t\t}\n\t}", "public final Object getSample()\n { return(this.sample); }", "@SuppressWarnings(\"boxing\")\n private void sample(Instances bigger, Instances smaller, ArrayList<double[]> values) {\n // we want to at keep the indices we select the same\n int indices_to_draw = smaller.size();\n ArrayList<Integer> indices = new ArrayList<>();\n Random rand = new Random();\n while (indices_to_draw > 0) {\n\n int index = rand.nextInt(bigger.size() - 1);\n\n if (!indices.contains(index)) {\n indices.add(index);\n indices_to_draw--;\n }\n }\n\n // now reduce our values to the indices we choose above for every attribute\n for (int att = 0; att < bigger.numAttributes() - 1; att++) {\n\n // get double for the att\n double[] vals = values.get(att);\n double[] new_vals = new double[indices.size()];\n\n int i = 0;\n for (Iterator<Integer> it = indices.iterator(); it.hasNext();) {\n new_vals[i] = vals[it.next()];\n i++;\n }\n\n values.set(att, new_vals);\n }\n }", "private void sampleAndUpdate(int[] profileToSample, GameObserver gameObs) {\n double[] samplePayoffs = gameObs.getSample(profileToSample);\n eGame.addSample(profileToSample, samplePayoffs);\n deviationTestOrder.update(profileToSample, samplePayoffs);\n }", "public double sampleDouble() {\n double x = sample01();\n if ( x < (b-a)/(c-a))\n x = Math.sqrt(x*(b-a)*(c-a)) + a;\n else\n x = c- Math.sqrt((1-x)*(c-a)*(c-b));\n return x;\n }", "public Position sampleRandomUniformPosition();", "private void sampleFromMarkovBlanket(RandomVariable Zi, Assignment x, BayesianNetwork bn){\n Distribution distribution = new Distribution(Zi);\n Assignment copy = x.copy();\n\n for (Object ob: Zi.getDomain()){\n // For each object in random variable, make copy, get children,\n // and get initial probability of domain variable\n copy.set(Zi, ob);\n Set<RandomVariable> children = bn.getChildren(Zi);\n double product= bn.getProb(Zi, copy);\n for (RandomVariable child: children){\n // For each child, multiply initial prob bny child's\n // probability\n product *= bn.getProb(child, copy);\n\n // Place final product in distribution\n product *= bn.getProb(child, copy);\n }\n distribution.put(ob, product);\n }\n // Normalize and set assignment\n distribution.normalize();\n x.set(Zi, distribution.randomSample());\n }", "private void random() {\n\n\t}", "public void run() {\n RandomizedContext current = RandomizedContext.current();\n try {\n current.push(c.randomness);\n runSingleTest(notifier, c);\n } catch (Throwable t) {\n Rethrow.rethrow(augmentStackTrace(t)); \n } finally {\n current.pop();\n }\n }", "public static double random() {\r\n return uniform();\r\n }", "private static void sample1(ScoredDocIDs collection, int collectionSize, int[] sample, long[] times) \n throws IOException {\n ScoredDocIDsIterator it = collection.iterator();\n if (returnTimings) {\n times[0] = System.currentTimeMillis();\n }\n int sampleSize = sample.length;\n int prime = findGoodStepSize(collectionSize, sampleSize);\n int mod = prime % collectionSize;\n if (returnTimings) {\n times[1] = System.currentTimeMillis();\n }\n int sampleCount = 0;\n int index = 0;\n for (; sampleCount < sampleSize;) {\n if (index + mod < collectionSize) {\n for (int i = 0; i < mod; i++, index++) {\n it.next();\n }\n } else {\n index = index + mod - collectionSize;\n it = collection.iterator();\n for (int i = 0; i < index; i++) {\n it.next();\n }\n }\n sample[sampleCount++] = it.getDocID();\n }\n if (returnTimings) {\n times[2] = System.currentTimeMillis();\n }\n }", "public Item sample() {\n if (this.isEmpty()) {\n throw new NoSuchElementException();\n }\n if (this.size == 1) {\n return this.storage[0];\n }\n else {\n return this.storage[StdRandom.uniform(this.currentIndex)];\n }\n }", "public ProbabilityDistribution() {\n\t\trandom_ = new Random();\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "public Builder clearSamplingProbability() {\n \n samplingProbability_ = 0D;\n onChanged();\n return this;\n }", "public Item sample() {\n if (size == 0) throw new NoSuchElementException();\n return queue[StdRandom.uniform(size)];\n }", "public static void logSampleToSelf(double[] alpha, RandomGenerator rnd) {\n\t\tGammaDistribution.sampleToSelf(alpha, rnd);\n\t\tDoubleArrays.logToSelf(alpha);\n\t\tDoubleArrays.logNormalizeToSelf(alpha);\n\t}", "public ProbabilityDistribution(Random random) {\n\t\trandom_ = random;\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "public Item sample() {\n\t\tif (size == 0)\n\t\t\tthrow new java.util.NoSuchElementException();\n\n\t\tint index = StdRandom.uniform(size);\n\t\treturn queue[index];\n\t}", "private void distribute() {\n\t\t\tfor (Entry<String, List<String>> r : groups.entrySet()) {\n\t\t\t\tRandom random = new Random();\n\t\t\t\tint randomIndex = random.nextInt(r.getValue().size());\n\t\t\t\tdistribution.put(r.getKey(), r.getValue().get(randomIndex));\n\t\t\t}\n\t\t}", "public void addSample(double value){\n num_samples += 1;\n signal = signal*damping + value;\n }", "public double getNextRawSample();", "public static void main(String[] args) {\n int available = Integer.parseInt(args[0]);\n\n // the number of quadrats we need to sample\n int needed = Integer.parseInt(args[1]);\n\n // the number of quadrats that we've sampled so far\n int sampled = 0;\n\n // this array will associate true or false with each possible quadrat\n // (true if the quadrat has already been sampled)\n boolean[] seenBefore = new ______________________;\n\n // keep sampling until we reach the desired number of quadrats\n while (____________ < ____________) {\n // pick a random quadrat number\n int quadratNum = ___________________________________;\n\n // if we've seen this quadratNum before, skip this iteration\n if (_____________________) continue;\n\n // update seenBefore[], for future iterations of this loop\n seenBefore[____________] = ____________;\n\n // print out the sampled quadrat number\n StdOut.print(quadratNum + \", \");\n sampled++;\n }\n\n StdOut.println();\n }", "void burnIn(DoubleMatrix1D startingPoint){\n \n System.out.println(\"Starting burn-in for SubThreshSampler. x=\"+startingPoint);\n \n x = startingPoint;\n\n initScale();\n \n if(!adaptiveScale)\n tuneScale();//want to start out with a good scale\n \n //ok now let's burn in until the first and second half of our burn-in periods\n //have nicely overlapping distributions (say, the difference in means is less than \n //half the st. dev. for each variable (using the less of 1st, 2nd half st. dev.))\n ArrayList<DoubleMatrix1D> burnInSamp = new ArrayList<>();\n DoubleMatrix1D firstHalfSum = DoubleFactory1D.dense.make(numDOFs);\n DoubleMatrix1D secondHalfSum = DoubleFactory1D.dense.make(numDOFs);\n DoubleMatrix1D firstHalfSumSq = DoubleFactory1D.dense.make(numDOFs);\n DoubleMatrix1D secondHalfSumSq = DoubleFactory1D.dense.make(numDOFs);\n \n boolean done = false;\n\n int nhalf = 0;\n \n for(int b=0; !done; b++){//burn-in samples\n \n while(true) {//draw until acceptable candidate found\n DoubleMatrix1D y = nextCandidate();\n if(checkCandidate(y))//accepting\n break;\n }\n \n burnInSamp.add(x);\n secondHalfSum.assign(x,Functions.plus);\n DoubleMatrix1D xsq = x.copy().assign(Functions.square);\n secondHalfSumSq.assign(xsq,Functions.plus);\n \n if(b%2==1){//stuff to be done after every pair of samples\n \n //update first and second halves\n DoubleMatrix1D y = burnInSamp.get(b/2);\n firstHalfSum.assign(y,Functions.plus);\n secondHalfSum.assign(y,Functions.minus);\n DoubleMatrix1D ysq = y.copy().assign(Functions.square);\n firstHalfSumSq.assign(ysq,Functions.plus);\n secondHalfSumSq.assign(ysq,Functions.minus);\n \n //now sums are up to date\n //let's try the overlap condition (except right at beginning, hence b>10)\n if(b>10){\n nhalf = b/2+1;//number of samples in each half\n DoubleMatrix1D meanDiff = secondHalfSum.copy().assign(firstHalfSum,Functions.minus);\n meanDiff.assign(Functions.mult(1./nhalf));\n\n DoubleMatrix1D std1 = getStDVec(firstHalfSum,firstHalfSumSq,nhalf);\n DoubleMatrix1D std2 = getStDVec(secondHalfSum,secondHalfSumSq,nhalf);\n\n\n done = true;//overlap condition met\n for(int dof=0; dof<numDOFs; dof++){\n if( meanDiff.get(dof) > 0.5*Math.min(std1.get(dof),std2.get(dof)) ){\n done = false;\n break;\n }\n }\n }\n }\n \n if(done)\n System.out.println(\"Burn-in complete at sample \"+b);\n else if( (b+1)%1000000 == 0 )\n System.out.println(\"Burn-in sample \"+b+\" done. x: \"+x);\n }\n \n //we can get a useFrequency from the second half\n DoubleMatrix1D var = getStDVec(secondHalfSum,secondHalfSumSq,nhalf).assign(Functions.square);//full-sequence variance\n DoubleMatrix1D mean = secondHalfSum.copy().assign(Functions.mult(1./nhalf));\n \n //autocorrelation can get a little messy for high shifts\n //but if each dimension's autocorrelation has dropped below 0.1*var for some useFrequency < uf\n //then uf should be a good thinning (minimally correlated samples, for each dimension)\n //we'll use dimGood to keep track of which dimensions have had this\n BitSet dimGood = new BitSet();\n double bestAutorat[] = new double[numDOFs];//to keep track of progress in each dimension (best so far)\n \n \n for(int uf=1; uf<nhalf; uf++){\n \n //calculate autocorrelation (in the sense of covariance of sequence with shifted sequence)\n DoubleMatrix1D autocorr = DoubleFactory1D.dense.make(numDOFs);\n for(int s=nhalf; s<2*nhalf-uf; s++){//start with cross-sum\n DoubleMatrix1D crossTerm = burnInSamp.get(s).copy().assign(mean,Functions.minus);\n DoubleMatrix1D relSamp2 = burnInSamp.get(s+uf).copy().assign(mean,Functions.minus);;\n crossTerm.assign( relSamp2, Functions.mult );\n autocorr.assign( crossTerm, Functions.plus );\n }\n //normalize\n autocorr.assign(Functions.mult(1./(nhalf-uf)));\n \n //for each DOF,\n //autocorr is now the average product of sequence*(sequence shifted by uf)\n //minus the square of the mean of the sequence\n \n DoubleMatrix1D autorat = autocorr.copy().assign( var, Functions.div );\n \n for(int dim=0; dim<numDOFs; dim++){\n if(autorat.get(dim)<0.1)\n dimGood.set(dim);\n bestAutorat[dim] = Math.min(bestAutorat[dim],autorat.get(dim));\n }\n \n if(dimGood.cardinality()==numDOFs){//all dimensions good\n //if( autorat.zSum()/numDOFs < 0.1 ){//on average, autocorrelation not more than 0.1x variance\n //autocorrelation should ultimately drop to 0, and it may have negative values\n //but it may be comparable to variance for very small uf\n useFrequency = uf;\n System.out.println(\"Setting useFrequency=\"+useFrequency+\". Variance: \"+var+\" Autocorr: \"+autocorr);\n break;\n }\n \n if(uf==nhalf-1){\n useFrequency = uf;\n System.out.println(\"Warning: high autocorrelation detected at all useFrequencies! \"\n + \"Setting useFrequency=\"+uf);\n }\n else if( (uf+1)%1000000 == 0 ){\n System.out.print(\"Trying useFrequency \"+uf+\n \". Best autocorrelation/variance ratios so far: \");\n for(int dof=0; dof<numDOFs; dof++)\n System.out.print(bestAutorat[dof]+\" \");\n System.out.println();\n }\n }\n }", "private void updateSignal() {\n getGlobals().informationSignal =\n getContext().getPrng().gaussian(0,getGlobals().volatilityInfo).sample();\n\n }", "public interface Sampler<T> {\n\n T sample();\n}", "WeightedRandomSampling(double[] w){\n int len = w.length;\n aggregatedW = new double[len];\n counts = new int[len];\n double temp = 0;\n\n for(int i=0; i<len; i++){\n aggregatedW[i] = temp;\n //System.out.println(aggregatedW[i]);\n temp+= w[i];\n }\n }", "public Item sample() {\n if (size == 0) \n throw new NoSuchElementException(\"the RandomizedQueue is empty\");\n return rqArrays[StdRandom.uniform(0, size)];\n }", "protected void setDistribution(ProbabilityDistribution distribution)\r\n\t{\r\n\t\tthis.distribution = distribution;\r\n\t}", "public void iterate() {\n\n\t\tArrayList<int[]> pts = new ArrayList<int[]>();\n\t\tfor (int i = 0; i < POINTS_PER_ITER; i++) {\n\t\t\tint x = Window.mathRandom.nextInt(width);\n\t\t\tint y = Window.mathRandom.nextInt(width);\n\t\t\tpts.add(new int[] { x, y });\n\t\t}\n\n\t\tint[] bestPoint = new int[] {};\n\t\tdouble maxDist = 0;\n\t\tfor (int[] point : pts) {\n\t\t\tdouble dist = getDistFromOthers(point);\n\t\t\tif (dist > maxDist) {\n\t\t\t\tmaxDist = dist;\n\t\t\t\tbestPoint = point;\n\t\t\t}\n\t\t}\n\t\tif (check(bestPoint)) {\n\t\t\tpoints.add(bestPoint);\n\t\t} else {\n\t\t\tremainingPoints += 1;\n\t\t}\n\t}", "public void probabiltDistribution() {\r\n\t\tfor (int k = 0; k < 1000; k++) {\r\n\t\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\t\tfor (int j = 0; j < 11; j++) {\r\n\t\t\t\t\trandomGrid[i][j] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdeployComputerShips();\r\n\t\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\t\tfor (int j = 0; j < 11; j++) {\r\n\t\t\t\t\tprobabilityGrid[i][j] = probabilityGrid[i][j] + randomGrid[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public InverseTransformSampling(ProbabilityDistribution distribution, RandomLongGenerator uniform) {\n this.distribution = distribution;\n this.uniform = uniform;\n }", "public void addSample( final double value ) {\n\t\tfinal double weight = getWeight( ++_population );\n\t\t_mean = weight * value + ( 1 - weight ) * _mean;\n\t\t_meanSquare = weight * value * value + ( 1 - weight ) * _meanSquare;\n\t}", "public static void resample(){\n System.out.println(\"Type in how many random people you want in the db\");\n String s = sc.nextLine();\n int sampleSize = getValidSampleCount(s);\n Db.getDb().resampleDb(sampleSize);\n System.out.println(\"New sample of \" + s + \" generated.\");\n }", "void initScale(){\n samplingScale = getScaleAdaptive(x);\n }", "public Item sample() {\n\t\t\n\t\tif(isEmpty()) throw new NoSuchElementException();\n\t\t\n\t\tint index = StdRandom.uniform(N);\n\t\t\t\n\t\t\t/*while(items[index] == null) {\n\t\t\t\tindex = StdRandom.uniform(length());\n\t\t\t}*/\n\n\t\treturn items[index];\n\t}", "@Test\n public void simulatedStepByStepSamplingCollection() throws Exception {\n\n long samplingInterval = 10 * 1000L; // 10 seconds to allow us time to experiment\n\n // the sampling task run interval is 0, meaning no timer task will be registered\n SamplerImpl s = new SamplerImpl(0L, samplingInterval);\n s.registerOperation(MockSamplerOperation.class);\n\n MockSamplingConsumer msc = new MockSamplingConsumer();\n s.registerConsumer(msc);\n\n assertTrue(s.getLastRunTimestamp() <= 0);\n\n // we're not actually starting anything because the sampling task interval is 0, but the sampler will look\n // like it started; this will also run the first initialization run()\n s.start();\n\n assertTrue(s.isStarted());\n\n assertTrue(s.getLastRunTimestamp() > 0);\n SamplingInterval current = s.getCurrent();\n assertNotNull(current);\n\n s.run(); // first run, should not collect anyting\n\n long ts = current.getStartMs();\n\n // make sure it's rounded on the second\n assertEquals(0L, ts - ((ts / 1000) * 1000L));\n\n s.run(); // second collection run, should not collect anything\n\n current = s.getCurrent();\n assertEquals(ts, current.getStartMs()); // insure it's the same sampling interval\n assertEquals(samplingInterval, current.getDurationMs());\n Set<Class<? extends Operation>> operationTypes = current.getOperationTypes();\n assertEquals(1, operationTypes.size());\n assertTrue(operationTypes.contains(MockSamplerOperation.class));\n assertTrue(current.getAnnotations().isEmpty());\n CounterValues cvs = current.getCounterValues(MockSamplerOperation.class);\n assertEquals(0L, cvs.getSuccessCount());\n assertEquals(0L, cvs.getSuccessCumulatedDurationNano());\n assertEquals(0L, cvs.getFailureCount());\n assertEquals(0L, cvs.getFailureCumulatedDurationNano());\n\n // record a success and a failure\n s.record(System.currentTimeMillis(), 1L, 2L, new MockSamplerOperation()); // 1\n s.record(System.currentTimeMillis(), 3L, 5L, new MockSamplerOperation(), new SocketException()); // 2\n\n // another collection run, it should collect both the success and the failure\n s.run();\n\n current = s.getCurrent();\n assertEquals(ts, current.getStartMs()); // insure it's the same sampling interval\n assertEquals(samplingInterval, current.getDurationMs());\n operationTypes = current.getOperationTypes();\n assertEquals(1, operationTypes.size());\n assertTrue(operationTypes.contains(MockSamplerOperation.class));\n assertTrue(current.getAnnotations().isEmpty());\n cvs = current.getCounterValues(MockSamplerOperation.class);\n assertEquals(1L, cvs.getSuccessCount());\n assertEquals(1L, cvs.getSuccessCumulatedDurationNano());\n assertEquals(1L, cvs.getFailureCount());\n assertEquals(2L, cvs.getFailureCumulatedDurationNano());\n Set<Class<? extends Throwable>> failureTypes = cvs.getFailureTypes();\n assertEquals(1, failureTypes.size());\n assertTrue(failureTypes.contains(SocketException.class));\n assertEquals(1L, cvs.getFailureCount(SocketException.class));\n assertEquals(2L, cvs.getFailureCumulatedDurationNano(SocketException.class));\n\n // record a success, the same type a failure, and an annotation\n s.record(System.currentTimeMillis(), 6L, 9L, new MockSamplerOperation()); // 3\n s.record(System.currentTimeMillis(), 10L, 14L, new MockSamplerOperation(), new SocketException()); // 4\n s.annotate(\"annotation 1\");\n\n // another collection run\n s.run();\n\n current = s.getCurrent();\n assertEquals(ts, current.getStartMs()); // insure it's the same sampling interval\n assertEquals(samplingInterval, current.getDurationMs());\n operationTypes = current.getOperationTypes();\n assertEquals(1, operationTypes.size());\n assertTrue(operationTypes.contains(MockSamplerOperation.class));\n List<String> annotations = current.getAnnotations();\n assertEquals(1, annotations.size());\n assertTrue(annotations.contains(\"annotation 1\"));\n cvs = current.getCounterValues(MockSamplerOperation.class);\n assertEquals(2L, cvs.getSuccessCount());\n assertEquals(1L + 3L, cvs.getSuccessCumulatedDurationNano());\n assertEquals(2L, cvs.getFailureCount());\n assertEquals(2L + 4L, cvs.getFailureCumulatedDurationNano());\n failureTypes = cvs.getFailureTypes();\n assertEquals(1, failureTypes.size());\n assertTrue(failureTypes.contains(SocketException.class));\n assertEquals(2L, cvs.getFailureCount(SocketException.class));\n assertEquals(2L + 4L, cvs.getFailureCumulatedDurationNano(SocketException.class));\n\n // record a success, a different type a failure, and another annotation\n s.record(System.currentTimeMillis(), 15L, 20L, new MockSamplerOperation()); // 5\n s.record(System.currentTimeMillis(), 21L, 27L, new MockSamplerOperation(), new ConnectException()); // 6\n s.annotate(\"annotation 2\");\n\n // another collection run\n s.run();\n\n current = s.getCurrent();\n assertEquals(ts, current.getStartMs()); // insure it's the same sampling interval\n assertEquals(samplingInterval, current.getDurationMs());\n operationTypes = current.getOperationTypes();\n assertEquals(1, operationTypes.size());\n assertTrue(operationTypes.contains(MockSamplerOperation.class));\n annotations = current.getAnnotations();\n assertEquals(2, annotations.size());\n assertEquals(\"annotation 1\", annotations.get(0));\n assertEquals(\"annotation 2\", annotations.get(1));\n cvs = current.getCounterValues(MockSamplerOperation.class);\n assertEquals(3L, cvs.getSuccessCount());\n assertEquals(1L + 3L + 5L, cvs.getSuccessCumulatedDurationNano());\n assertEquals(3L, cvs.getFailureCount());\n assertEquals(2L + 4L + 6L, cvs.getFailureCumulatedDurationNano());\n failureTypes = cvs.getFailureTypes();\n assertEquals(2, failureTypes.size());\n assertTrue(failureTypes.contains(SocketException.class));\n assertTrue(failureTypes.contains(ConnectException.class));\n assertEquals(2L, cvs.getFailureCount(SocketException.class));\n assertEquals(2L + 4L, cvs.getFailureCumulatedDurationNano(SocketException.class));\n assertEquals(1L, cvs.getFailureCount(ConnectException.class));\n assertEquals(6L, cvs.getFailureCumulatedDurationNano(ConnectException.class));\n }", "public Item sample() {\n \t if (size==0){\n \t \tthrow new NoSuchElementException();\n \t }\n \t int index = StdRandom.uniform(size);\n // System.out.println(\"The index of the number is: \" + index);\n int k = 0;\n \t Node p=sentinel.next.next;\n \t for (int i = 0; i < index; i++){\n p = p.next; \n \t }\n \t return p.item;\n }", "protected void DoOneGibbsSample(){\n\t\t//this array is the array of trees for this given sample\n\t\tfinal bartMachineTreeNode[] bart_trees = new bartMachineTreeNode[num_trees];\t\t\t\t\n\t\tfinal TreeArrayIllustration tree_array_illustration = new TreeArrayIllustration(gibbs_sample_num, unique_name);\n\n\t\t//we cycle over each tree and update it according to formulas 15, 16 on p274\n\t\tdouble[] R_j = new double[n];\n\t\tfor (int t = 0; t < num_trees; t++){\n\t\t\tif (verbose){\n\t\t\t\tGibbsSampleDebugMessage(t);\n\t\t\t}\n\t\t\tR_j = SampleTree(gibbs_sample_num, t, bart_trees, tree_array_illustration);\n\t\t\tSampleMusWrapper(gibbs_sample_num, t);\t\t\t\t\n\t\t}\n\t\t//now we have the last residual vector which we pass on to sample sigsq\n\t\tSampleSigsq(gibbs_sample_num, getResidualsFromFullSumModel(gibbs_sample_num, R_j));\n\t\tif (tree_illust){\n\t\t\tillustrate(tree_array_illustration);\n\t\t}\n\t}", "private void process(double sample)\r\n {\n System.arraycopy(samples, 0, samples, 1, sampleSize - 1);\r\n samples[0] = sample;\r\n\r\n currentValue = AnalysisUtil.rms(samples);\r\n }", "RandomnessSource copy();", "public SampledPolicy() {\r\n super(ExecutablePolicyType.SAMPLED);\r\n }", "public T sample() {\r\n if (this.isEmpty()) {\r\n return null;\r\n }\r\n \r\n Random r = new Random();\r\n int rValue = r.nextInt(size);\r\n return elements[rValue];\r\n }", "public io.envoyproxy.envoy.type.v3.FractionalPercent getRandomSampling() {\n if (randomSamplingBuilder_ == null) {\n return randomSampling_ == null ? io.envoyproxy.envoy.type.v3.FractionalPercent.getDefaultInstance() : randomSampling_;\n } else {\n return randomSamplingBuilder_.getMessage();\n }\n }", "@Override\r\n\tpublic float getSample(long us) {\n\t\treturn 0;\r\n\t}", "@Override\n public void run() {\n\n int sum = 0;\n\n for (int count = 1; count <= 10; count++) {\n try {\n Thread.sleep(generator.nextInt(3000)); // random sleep\n sharedLocation.set(count); // set value in buffer\n sum += count; // increment sum of values\n System.out.printf(\"\\t%2d\\n\", sum);\n } // end try\n catch (InterruptedException exception) {\n exception.printStackTrace();\n } // end catch\n } // end for\n\n System.out.println(\"Producer done producing\\nTerminating Producer\");\n }", "private double randn(){\r\n\t\t//* http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.html\r\n\t\t//RandomNumber rnd = new RandomNumber(System.currentTimeMillis());\r\n\t\t//return rnd.normal();\r\n\t\treturn rnd.nextGaussian();\r\n\t\t//return 0;\r\n\t}" ]
[ "0.7234162", "0.67689776", "0.6578034", "0.65335625", "0.6420349", "0.6292707", "0.6266309", "0.62118554", "0.61923957", "0.61847687", "0.6152722", "0.6126906", "0.6077594", "0.6045744", "0.60137624", "0.59516823", "0.5910335", "0.5894071", "0.5830093", "0.5776616", "0.5764982", "0.5764982", "0.5759055", "0.5706298", "0.5690827", "0.5629868", "0.56269073", "0.5611242", "0.55643654", "0.55602163", "0.5545445", "0.5540872", "0.5533833", "0.55315655", "0.55253226", "0.55079806", "0.5506382", "0.55042905", "0.54922855", "0.54871345", "0.54780674", "0.5475458", "0.5466927", "0.54662067", "0.54594857", "0.54458165", "0.54444945", "0.54409766", "0.5422668", "0.54167724", "0.5411476", "0.5404482", "0.53774345", "0.53682846", "0.5366604", "0.5355593", "0.53348076", "0.5300599", "0.52945983", "0.5292185", "0.5257466", "0.52546304", "0.5248319", "0.5248168", "0.5243994", "0.52409923", "0.52398205", "0.522921", "0.5226829", "0.5219102", "0.5213759", "0.521075", "0.5205261", "0.5204161", "0.519693", "0.519398", "0.51888627", "0.51883924", "0.51857144", "0.51841545", "0.5180507", "0.516764", "0.51636827", "0.5158329", "0.51520705", "0.5143191", "0.51303947", "0.51298636", "0.51280856", "0.5126086", "0.5121189", "0.51035684", "0.51028174", "0.5100676", "0.5098158", "0.50890744", "0.50863045", "0.50718254", "0.5068525", "0.5065428" ]
0.6260432
7
Close drawer layout Check condition
public static void closeDrawer(DrawerLayout drawerLayout) { if(drawerLayout.isDrawerOpen(GravityCompat.START)){ //When drawer is open //Close drawer drawerLayout.closeDrawer(GravityCompat.START); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void closeDrawer(){\n if (drawerLayout.isDrawerOpen(GravityCompat.START)){\n drawerLayout.closeDrawer(GravityCompat.START);\n }\n }", "private boolean closeDrawer() {\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n if (drawer.isDrawerOpen(GravityCompat.START)) {\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }\n\n return false;\n }", "@Override\n public void onDrawerClosed() {\n if (lnr_option_pen.getVisibility() == View.VISIBLE)\n lnr_option_pen.setVisibility(View.GONE);\n\n if (lnr_option_brush.getVisibility() == View.VISIBLE)\n lnr_option_brush.setVisibility(View.GONE);\n\n if (lnr_option_size.getVisibility() == View.VISIBLE)\n lnr_option_size.setVisibility(View.GONE);\n }", "public void closeDrawer() {\n final DrawerLayout mDrawerLayout;\n\n mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);\n\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n mDrawerLayout.closeDrawer(GravityCompat.START);\n hideAddFeed();\n\n }\n }, 200);\n }", "@Override\n\t\t\tpublic void onDrawerClosed() {\n\t\t\t\tlayoutParams = new FrameLayout.LayoutParams(\n\t\t\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);\n\t\t\t\tslidingDrawer.setLayoutParams(layoutParams);\n\t\t\t\tbottomLayout.setVisibility(View.VISIBLE);\n\t\t\t}", "public void onDrawerClosed(View view) {\n }", "@Override\n public void onClick(View v) {\n drawerLayout.closeDrawer(Gravity.LEFT);\n }", "@Override\n public void closePreferences() {\n drawerLayout.closeDrawer(Gravity.END);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n }", "public void onDrawerClosed(View drawerView) {\n\n }", "@Override\n\t\t\tpublic void onDrawerOpened() {\n\t\t\t\tbottomLayout.setVisibility(View.INVISIBLE);\n\t\t\t}", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n\n\n }", "public static void closeDrawer(DrawerLayout drawerLayout) {\n if (drawerLayout.isDrawerOpen(GravityCompat.START)) {\n //when drawer is open\n //close drawer\n drawerLayout.closeDrawer(GravityCompat.START);\n }\n }", "protected abstract void closeLayout( );", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n Log.d(TAG, \"onDrawerClosed\");\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n\n }", "public void onDrawerClosed(View view) {\n getActionBar().setTitle(\"Closed Drawer\");\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n linearLayout.removeAllViews();\n linearLayout.invalidate();\n }", "@Override\n\t\t\tpublic void onDrawerClosed() {\n\t\t\t\tshowUp();\n\t\t\t}", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n // Do whatever you want here\n }", "private void closeFABMenu(){\n isFABOpen=false;\n\n layoutFabProject.animate().translationY(0);\n layoutFabNote.animate().translationY(0);\n layoutFabTask.animate().translationY(0).setListener(new Animator.AnimatorListener() {\n\n @Override\n public void onAnimationStart(Animator animator) {\n\n }\n\n @Override\n public void onAnimationEnd(Animator animator) {\n if (!isFABOpen) {\n layoutFabProject.setVisibility(View.GONE);\n layoutFabNote.setVisibility(View.GONE);\n layoutFabTask.setVisibility(View.GONE);\n }\n }\n\n @Override\n public void onAnimationCancel(Animator animator) {\n\n }\n\n @Override\n public void onAnimationRepeat(Animator animator) {\n\n }\n });\n }", "public void closeCashDrawer(CashDrawer cd);", "public final void close() {\r\n\t\tlayout.removeComponent(this);\r\n\t\tlayout.removeComponent(menu);\r\n\t}", "private void closeFABMenu(){\n isFABOpen=false;\n rotateFabBackward();\n fab1.hide();\n labelFab1.setVisibility(View.INVISIBLE);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n invalidateOptionsMenu();\n Log.d(\"Apps Main\", \"Close drawer \");\n }", "private void closeFragment() {\n dateET.setText(\"\");\n timeET.setText(\"\");\n descET.setText(\"\");\n locET.setText(\"\");\n\n emotionRadioGroup.clearCheck();\n for (int i = 0; i < emotionRadioGroup.getChildCount(); i++) {\n RadioButton currentButton = (RadioButton) emotionRadioGroup.getChildAt(i);\n currentButton.getBackground().setColorFilter(Color.WHITE, PorterDuff.Mode.MULTIPLY);\n }\n\n if (navController != null)\n navController.navigate(R.id.navigation_own_list);\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n //change toolbar title to the app's name\n toolbar.setTitle(getResources().getString(R.string.app_name));\n\n //hide the add feed menu option\n hideAddFeed();\n\n }", "public void onDrawerClosed(View view) {\n if (Build.VERSION.SDK_INT >= 11) {\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n } else {\n //Call it directly on gingerbread.\n onPrepareOptionsMenu(mMenu);\n }\n\n// startFullscreenIfNeeded();\n }", "public void onDrawerClosed(View view) {\n\t\t\t\t\t invalidateOptionsMenu(); \n\t\t\t\t\t }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n\tpublic boolean onContentTouchedWhenOpening() {\n\t\t// the content area is touched when sidebar opening, close sidebar\n\t\tLog.d(TAG, \"going to close sidebar\");\n\t\tmLayout.closeSidebar();\n\t\treturn true;\n\t}", "boolean isCloseButtonDisplayed();", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n getActionBar().setTitle(R.string.drawer_close);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tif(menu_Drawder.isOpened()){\n\t\t\tmenu_Drawder.close();\n\t\t}\n\t}", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n// getActionBar().setTitle(\"WXTJ Student Radio\");\n }", "public void onDrawerClosed(View view) {\n invalidateOptionsMenu();\n }", "public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n switch (item.getItemId()) {\n\n case R.id.MARIUS: {\n mDrawerLayout.closeDrawers();\n break;\n\n }\n case R.id.settings: {\n goSettings(); mDrawerLayout.closeDrawers();\n break;\n\n }\n\n case R.id.abouts : {\n goAboutUs(); mDrawerLayout.closeDrawers();\n break;\n }\n }\n //close navigation drawer\n\n return true;\n }", "public void closeDrawerHome(View view) {\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_home_layout);\n if (drawer.isDrawerOpen(GravityCompat.START)) {\n drawer.closeDrawer(GravityCompat.START);\n }\n\n }", "public boolean onClose() {\n\t\t\n\t\t TransitionContext transition = new TransitionContext(TransitionContext.TRANSITION_SLIDE);\n\t transition.setIntAttribute(TransitionContext.ATTR_DURATION, 200);\n\t transition.setIntAttribute(TransitionContext.ATTR_DIRECTION, TransitionContext.DIRECTION_RIGHT);\n\t transition.setIntAttribute(TransitionContext.ATTR_STYLE, TransitionContext.STYLE_PUSH);\n\t \n\t UiEngineInstance engine = Ui.getUiEngineInstance();\n\t engine.setTransition(this, null, UiEngineInstance.TRIGGER_PUSH, transition);\n\t // openScreen(new Menu());\n\t\treturn true;\n\t}", "public boolean onClose() {\n\t\topenScreen(new Noticias());\n\t\treturn true ;\n\t}", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n invalidateOptionsMenu();\n }", "@Override\n public void onBackPressed() {\n DrawerLayout drawer = (DrawerLayout)findViewById(R.id.menu);\n if(drawer.isDrawerOpen(Gravity.START)) {\n drawer.closeDrawer(Gravity.START);\n }\n else logoutClick(findViewById(android.R.id.home));\n }", "public void doorClose(){\n this.setRoadBlock(true);\n this.setRender(true);\n }", "@Override\n public void onBackPressed() {\n if (dragLayMenuLateral.isDrawerOpen(GravityCompat.START)) {\n dragLayMenuLateral.closeDrawer(GravityCompat.START);\n } else {\n super.onBackPressed();\n }\n }", "@Override\n public void onBackPressed() {\n if (drawerLayout.isDrawerOpen(GravityCompat.START)) {\n drawerLayout.closeDrawer(GravityCompat.START);\n\n } else {\n customDialog();\n }\n }", "@Override\n public boolean onNavigationItemSelected(MenuItem menuItem) {\n menuItemClicked = menuItem;\n drawerLayout.closeDrawers();\n return true;\n }", "@Override\n public void onBackPressed() {\n if (drawerLayout.isDrawerVisible((GravityCompat.START)))\n drawerLayout.closeDrawer(GravityCompat.START);\n else\n super.onBackPressed();\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\r\n @Override\r\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\r\n drawer.closeDrawer(GravityCompat.END);\r\n return true;\r\n }", "public void onDrawerClosed(View view) {\r\n super.onDrawerClosed(view);\r\n invalidateOptionsMenu();\r\n }", "@Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_logout) {\n // Handle the unratify action\n mPresenter.unratifyConstitution();\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "private boolean isDrawerOpen() {\n return mDrawerLayout != null && mDrawerLayout.isDrawerOpen(Gravity.LEFT);\n }", "@Override\n public void onBackPressed() {\n if (mNavigationView.getVisibility() == View.VISIBLE) mDrawerLayout.closeDrawers();\n else super.onBackPressed();\n }", "public void onDrawerClosed(View view) {\n menuvalue = 0;\n getSupportActionBar().setHomeAsUpIndicator(R.mipmap.menu);\n }", "@Override\n public boolean onNavigationItemSelected(MenuItem item) {\n CommonMethods.navigationItemSelectedAction(this,item.getItemId());\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "private void toggleDrawer() {\n DrawerLayout drawer = (DrawerLayout)findViewById(R.id.menu);\n if(drawer.isDrawerOpen(Gravity.START)) {\n drawer.closeDrawer(Gravity.START);\n }\n else drawer.openDrawer(Gravity.START);\n }", "@Override\n public void onBackPressed() {\n if (result != null && result.isDrawerOpen()) {\n result.closeDrawer();\n } else {\n super.onBackPressed();\n }\n }", "@Override\n public void onBackPressed() {\n if (result != null && result.isDrawerOpen()) {\n result.closeDrawer();\n } else {\n super.onBackPressed();\n }\n }", "@Override\n public void onBackPressed() {\n if (drawerLayout.isDrawerOpen(GravityCompat.START)){\n drawerLayout.closeDrawer(GravityCompat.START);\n }else {\n super.onBackPressed();\n }\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onBackPressed(){\n if(drawer.isDrawerOpen(Gravity.LEFT)){\n drawer.closeDrawer(Gravity.LEFT);\n }else {\n super.onBackPressed();\n }\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onBackPressed() {\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n if (drawer.isDrawerOpen(GravityCompat.START)) {\n drawer.closeDrawer(GravityCompat.START);\n }\n else {\n selector();\n }\n }", "@Override\r\n public void onBackPressed() {\r\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout_view_chat);\r\n if (drawer.isDrawerOpen(GravityCompat.START)) {\r\n drawer.closeDrawer(GravityCompat.START);\r\n } else {\r\n super.onBackPressed();\r\n finish();\r\n }\r\n }", "private void closeMenu() {\n if (!isMenuOpen()) {\n return;\n }\n\n if (mIsVersionI || mIsVersionJ || mIsVersionK) {\n // Click menu button to close menu (this is NOT for taking pictures)\n String uiMenuButton = (mIsVersionK)? UI_MENU_BUTTON_ID_4X:UI_MENU_BUTTON_ID_3X;\n UiObject2 backButton = mDevice.findObject(By.res(UI_PACKAGE_NAME, uiMenuButton));\n if (backButton != null) {\n backButton.click();\n }\n } else {\n // Click shutter button to close menu (this is NOT for taking pictures)\n UiObject2 shutter = mDevice.findObject(By.res(UI_PACKAGE_NAME, UI_SHUTTER_BUTTON_ID_2X));\n if (shutter != null) {\n shutter.click();\n }\n }\n }", "@Override\n public void onBackPressed() {\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n if (drawer.isDrawerOpen(GravityCompat.START)) {\n drawer.closeDrawer(GravityCompat.START);\n } else {\n super.onBackPressed();\n }\n }", "@Override\n public void onBackPressed() {\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n if (drawer.isDrawerOpen(GravityCompat.START)) {\n drawer.closeDrawer(GravityCompat.START);\n } else {\n super.onBackPressed();\n }\n }", "@Override\n public void onBackPressed() {\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n if (drawer.isDrawerOpen(GravityCompat.START)) {\n drawer.closeDrawer(GravityCompat.START);\n } else {\n super.onBackPressed();\n }\n }", "private final void closePanel() {\r\n\r\n\t\tthis.pnlMain.getRootPane().getParent().setVisible(false);\r\n\t\t\r\n\t}", "@Override\n public void onBackPressed() {\n if (drawer != null && drawer.isDrawerOpen()) {\n drawer.closeDrawer();\n } else {\n super.onBackPressed();\n }\n }", "@Override\n public void onBackPressed() {\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n if (drawer.isDrawerOpen(GravityCompat.START)) {\n drawer.closeDrawer(GravityCompat.START);\n } else {\n super.onBackPressed();\n }\n }", "@Override\n public void onBackPressed() {\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n if (drawer.isDrawerOpen(GravityCompat.START)) {\n drawer.closeDrawer(GravityCompat.START);\n } else {\n super.onBackPressed();\n }\n }", "@Override\n public void onBackPressed() {\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n if (drawer.isDrawerOpen(GravityCompat.START)) {\n drawer.closeDrawer(GravityCompat.START);\n } else {\n super.onBackPressed();\n }\n }", "@Override\n public void onBackPressed() {\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n if (drawer.isDrawerOpen(GravityCompat.START)) {\n drawer.closeDrawer(GravityCompat.START);\n } else {\n super.onBackPressed();\n }\n }", "@Override\n public void onBackPressed() {\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n if (drawer.isDrawerOpen(GravityCompat.START)) {\n drawer.closeDrawer(GravityCompat.START);\n } else {\n super.onBackPressed();\n }\n }", "@Override\n public void onBackPressed() {\n if (drawerLayout.isDrawerOpen(GravityCompat.START)) {\n drawerLayout.closeDrawer(GravityCompat.START);\n }\n // If drawer is already close -- Do not override original functionality\n else {\n super.onBackPressed();\n }\n }", "public void closeLink() {\n this.titleBarEnabled = false;\n fadeOutView(this.scrollView);\n fadeOutView(this.composerLayout);\n fadeOutView(this.titleBar);\n supportFinishAfterTransition();\n }", "@Override\n public void onClick(View view) {\n mDrawer.closeDrawers();\n\n nCurrentIndex = 1;\n changeFragment(messageFragment);\n }", "@Override\n\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\t\t\tif (hasFocus) {\n\n\t\t\t\t\tslidingDrawer.close();\n\t\t\t\t} else {\n\n\t\t\t\t}\n\t\t\t}", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }" ]
[ "0.7674817", "0.74036145", "0.72760075", "0.70914537", "0.6949456", "0.6876029", "0.679927", "0.6797897", "0.6593818", "0.6593818", "0.65774775", "0.65295637", "0.64839", "0.6468931", "0.6445397", "0.64367944", "0.64065725", "0.6404532", "0.6402511", "0.6401158", "0.6401158", "0.6395125", "0.63856375", "0.63680667", "0.6351961", "0.6350375", "0.6317177", "0.6308939", "0.6300364", "0.62962216", "0.6285357", "0.62618184", "0.6244029", "0.61838114", "0.61838114", "0.61838114", "0.61838114", "0.61838114", "0.61838114", "0.61838114", "0.61838114", "0.61838114", "0.61838114", "0.61838114", "0.61838114", "0.61838114", "0.61838114", "0.61770725", "0.61593014", "0.6124861", "0.61191684", "0.60924846", "0.60760754", "0.6004464", "0.5996541", "0.5977437", "0.59725183", "0.5950811", "0.5948369", "0.594091", "0.5939707", "0.5933588", "0.592565", "0.5915539", "0.5912971", "0.59091854", "0.59076095", "0.5906406", "0.59045434", "0.58909076", "0.5885031", "0.58804", "0.58804", "0.58804", "0.5875554", "0.58743644", "0.58654803", "0.58654803", "0.5864432", "0.58582735", "0.58487976", "0.5835617", "0.58308196", "0.5821739", "0.5796016", "0.57952327", "0.57952327", "0.57952327", "0.5786363", "0.57840836", "0.578349", "0.578349", "0.578349", "0.578349", "0.578349", "0.5771717", "0.5770701", "0.5766945", "0.5764231", "0.5756682" ]
0.6570233
11
Redirect activity to Vtube
public void ClickVtube(View view){ redirectActivity(this,Vtube.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ClickVtube(View view){\n MainActivity.redirectActivity(this,Vtube.class);\n\n\n }", "@Override\n public void onClick(View v) {\n Intent it = new Intent(Intent.ACTION_VIEW);\n Uri uri = Uri.parse(\"http://\"+ PostUrl.Media+\":8080/upload/\"+item.getMediaPath().get(0).split(\"\\\\.\")[0]+\".mp4\");\n it.setDataAndType(uri, \"video/mp4\");\n context.startActivity(it);\n\n }", "public void gotoVideoLandingPage(){\r\n\t\twebAppDriver.get(baseUrl+\"/videos.aspx\");\r\n\t\t//need to add verification text\r\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(context, MainVideo.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}", "private void redirectTO() {\n\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n\n finish();\n }", "public void goToVideoViewer(Uri vidURI) {\n Log.i(\"progress\",\"goToViewer\");\n\n Intent playerIntent = new Intent(this, VideoActivity.class);\n\n //attaches the video's uri\n playerIntent.putExtra(INTENT_MESSAGE, vidURI.toString());\n startActivity(playerIntent);\n }", "public void VolverVentana(View view){\n Intent volver = new Intent(this, MainActivity.class);\n startActivity(volver);\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()){\n case R.id.trainingVideoButton:\n if(skill != null){\n String link = (String) skill.getLink();\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(link));\n getContext().startActivity(i);\n }\n break;\n }\n }", "public void toExistingVirus() {\n Intent toExistingVirus = new Intent(this, activity_existing_virus.class);\n startActivity(toExistingVirus);\n }", "public void gotoUitgaven(View v){\n Intent uitgaven;\n uitgaven = new Intent(getBaseContext(),UitgavenActivity.class);\n startActivity(uitgaven);\n }", "public void onClick(View v) {\n\t\t\t\tSystem.out.println(\"to video_set\");\n\t\t\t\tIntent intent = new Intent(MainMenuActivity.this,\n\t\t\t\t\t\tapp_video_Activity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(View view) {\n String rtmpUrl = \"rtmp://202.69.69.180:443/webcast/bshdlive-pc\";\n if (TextUtils.isEmpty(rtmpUrl)) {\n Toast.makeText(MainActivity.this, \"请输入播放地址\", Toast.LENGTH_SHORT).show();\n } else {\n Intent intent = new Intent(MainActivity.this, PlayerAty.class);\n intent.putExtra(\"rtmp_url\", rtmpUrl);\n startActivity(intent);\n }\n }", "@Override\n public void onClick(View v) {\n Uri uri = Uri.parse(url);\n //Se crea un intent implicito para visualizar los links en un navegador\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);\n //Se inicia la actividad del navegador\n activityt.startActivity(intent);\n }", "void redirect();", "public void playerView(View view) {\n PlayerCapabilityFacade pcf = new PlayerCapabilityFacade();\n Intent intent;\n if(pcf.isTournamentActive()) {\n intent = new Intent(ModeSelectionActivity.this, PlayerTourneyActivity.class);\n } else {\n intent = new Intent(ModeSelectionActivity.this, PlayerTotalsActivity.class);\n }\n\n startActivity(intent);\n\n //else onclick go to PlayerTourneyActivity\n }", "public void goWebSite() {\n\n if (mIsFirst) {\n mSnackbar.setText(getString(R.string.please_wait)).show();\n } else {\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(mSiteData.getUrl()));\n //intent.putExtra(\"url\", webData.getUrl());\n //startActivity(intent);\n startActivityForResult(intent, 100);\n //showToolbarProgressBar();\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMap<String,String>map=new HashMap<String,String>();\n\t\t\t\tmap.put(\"videoID\", object.videoID);\n\t\t\t\tmap.put(\"videoname\", object.videoname);\n\t\t\t\tString albumVideoImgUrl=CommonUrl.baseUrl + object.videoImgUrl +\".small\"+ object.suffix;\n\t\t\t\tmap.put(\"videoImgUrl\", albumVideoImgUrl);\n\t\t\t\tCommonUtil.jumpToPlayerActivity(context, map);\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.youtube.com/watch?v=\"+tmp.get(position).key)));\n\n\n\n }", "public void redirectToPlan() {\n setResponsePage( new RedirectPage( \"plan\" ) );\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\tIntent i = new Intent(Intent.ACTION_VIEW, Uri\n\t\t\t\t\t\t\t\t\t\t.parse(fullsitelink));\n\t\t\t\t\t\t\t\tstartActivity(i);\n\n\t\t\t\t\t\t\t}", "private void startARActivity()\n {\n Intent itent = new Intent();\n \n itent.setClassName(\"com.qualcomm.vuforia.samples.VideoPlayback.app.\", \"VideoPlayback\");\n \n startActivity(itent);\n }", "private void Login()\n {\n Intent loginIntent = new Intent (LoginActivity.this, VVPActivity.class);\n startActivity(loginIntent);\n finish();\n }", "public void toBeam(){\n Intent intent = new Intent(this, Beam.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent httpIntent = new Intent(Intent.ACTION_VIEW);\n httpIntent.setData(Uri.parse(\"http://bvmengineering.ac.in\"));\n\n startActivity(httpIntent);\n\n }", "private void redirectStore(String updateUrl) {\n final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(updateUrl));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent videoIntent = new Intent(SearchVideoListActivity.this,\r\n\t\t\t\t\t\tSearchActivity.class);\r\n\r\n\t\t\t\tAnimatedActivity parentActivity = (AnimatedActivity) SearchVideoListActivity.this\r\n\t\t\t\t\t\t.getParent();\r\n\t\t\t\tparentActivity\r\n\t\t\t\t\t\t.startChildActivity(\"LiveStreamoter\", videoIntent);\r\n\t\t\t}", "private void showViewToursActivity() {\n//\t\tIntent intent = new intent(this, ActivityViewTours.class);\n System.out.println(\"Not Yet Implemented\");\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString url = \"http://www.hoteltrip.com/\";\n\t\t\t\tIntent i = new Intent(Intent.ACTION_VIEW);\n\t\t\t\ti.setData(Uri.parse(url));\n\t\t\t\tstartActivity(i);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=201\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(NowPlaying.this, classDestination);\n // starting new activity\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n String url = \"https://ownshopz.com/mobile-360-degree/\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n }", "@Override\n public void onClick(View view) {\n // Create a new intent\n Intent new_release_intent = new Intent(VietPopActivity.this, MainActivity.class);\n new_release_intent.putExtra(\"uniqueid\",\"from_viet\");\n // Start the new activity\n startActivity(new_release_intent);\n }", "@Override\n public void onClick(View v) {\n Intent opnWebIntent = new Intent(getActivity(), WebViewActivity.class);\n opnWebIntent.putExtra(\"url\", \"http://www.mbtabackontrack.com/performance/index.html#/home\");\n startActivity(opnWebIntent);\n }", "private void redirectToMain() {\n\t\tIntent intent = new Intent(this, Main.class);\r\n\t\tstartActivity(intent);\r\n\t\tfinish();\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=209\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent Getintent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://feedback.avriant.com\"));\n startActivity(Getintent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=217\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=213\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(ActivityIndex.this, ActivityTrialMessage.class);\n intent.putExtra(\"fromIndex\", true);\n startActivity(intent);\n }", "public void onClick(View v) {\n\n Intent visitSite_intent = new Intent(MainActivity.this, DetailActivity.class);\n visitSite_intent.putExtra(\"url\",\"http://aanm-vvrsrpolytechnic.ac.in/\");\n startActivity(visitSite_intent);\n }", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/\"));\n startActivity(browserIntent);\n }", "public abstract String redirectTo();", "void redirect(Reagent reagent);", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent web = new Intent(Intent.ACTION_VIEW);\n\t\t\t\tweb.setData(Uri.parse(url));\n\t\t\t\tstartActivity(web);\n\t\t\t}", "public void redirectHome(View v) {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "@Override\r\n public void onClick(View v) {\n String path = \"http://techslides.com/demos/sample-videos/small.mp4\";\r\n// Uri uri=Uri.parse(path);\r\n// videoView.setVideoURI(uri);\r\n //MediaController mc = new MediaController(TransformDetailActivity.this);\r\n\r\n //videoView.start();\r\n// videoView.setOnTouchListener(new View.OnTouchListener() {\r\n// @Override\r\n// public boolean onTouch(View v, MotionEvent event) {\r\n// System.out.print(videoView.isPlaying());\r\n// if(videoView.isPlaying()) {\r\n// stopPosition[0] = videoView.getCurrentPosition();\r\n// videoView.pause();\r\n// } else {\r\n// videoView.seekTo(stopPosition[0]);\r\n// videoView.start();\r\n// }\r\n// return false;\r\n// }\r\n// });\r\n// String path = \"android.resource://\" + getPackageName() + \"/\" + R.raw.welcome;\r\n// Uri videoUri = Uri.parse(path);\r\n// Intent intent = new Intent(Intent.ACTION_VIEW, videoUri);\r\n// intent.setDataAndType(videoUri, \"video/*\");\r\n// startActivity(intent);\r\n\r\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(path));\r\n intent.setDataAndType(Uri.parse(path), \"video/mp4\");\r\n startActivity(intent);\r\n }", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.example.thirdapp.LocationActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"4\");\n\t\t\t}", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.SamePlacesCommunity.Main.FeedServiceActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"1\");\n\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tIntent intent = new Intent(mContext, ChangeClarityActivity.class);\n\t\t\t\t\tintent.putExtra(ChangeClarityActivity.VIDEOPATH, videoPath);\n\t\t\t\t\tmContext.startActivity(intent);\n\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=207\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "public void funcionAppian(View v){\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(\"https://ustglobalspaindemo.appiancloud.com/suite/tempo/news\"));\n if(intent.resolveActivity(getPackageManager())!= null){\n startActivity(intent);\n }\n }", "public void Volver(View view){\n Intent principal = new Intent(this, Principal.class);\n startActivity(principal);\n finish();\n }", "@Override\n public void onClick(View v) {\n mFragment.setFadingEnabled(false);\n long programId = ((RecordedProgram) v.getTag()).getId();\n if (DEBUG) Log.d(TAG, \"Play Related Recording:\" + programId);\n Intent intent = new Intent(getContext(), DvrPlaybackActivity.class);\n intent.putExtra(Utils.EXTRA_KEY_RECORDED_PROGRAM_ID, programId);\n getContext().startActivity(intent);\n }", "public void onView(View v) {\n //switch to render view\n Intent intent = new Intent(this, Playback.class);\n startActivity(intent);\n }", "private void toWebViewActivity(){\n Intent toWebViewActivity = new Intent(this, AmazonActivity.class);\n startActivity(toWebViewActivity);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tUri webpage = Uri.parse(currentItem.getStoryUrl());\n\n\t\t\t\t// Create web browser intent\n\t\t\t\tIntent storyOnWebIntent = new Intent(Intent.ACTION_VIEW, webpage);\n\n\t\t\t\t// Check web activity can be handled by the device and start activity\n\t\t\t\tif (storyOnWebIntent.resolveActivity(mContext.getPackageManager()) != null) {\n\t\t\t\t\tmContext.startActivity(storyOnWebIntent);\n\t\t\t\t}\n\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(mContext, FullScreenActivity.class);\n\t\t\t\tintent.putExtra(\"videoPathType\", \"3\");\n\t\t\t\tintent.putExtra(\"type\", \"videoFragment\");\n\t\t\t\tstartActivity(intent);\n\t\t\t\tgetActivity().finish();\n\t\t\t}", "public void sendToTrivia() {\n Intent intent = new Intent(getApplicationContext(), TriviaActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n }", "@Override\n public void onClick(View view) {\n Intent browser = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://petobesityprevention.org/\"));\n startActivity(browser);\n }", "public void goToStageActivity(View view)\n {\n Stage thisStage = stageHandler.getStage(1);\n if (thisStage != null)\n {\n Intent intent = new Intent(MainActivity.this, StageActivity.class);\n startActivity(intent);\n }\n else\n {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(MainActivity.this);\n alertDialog.setMessage(getString(R.string.noStages)).create().show();\n }\n }", "public void proximaTela2(View view) {\n\n Intent intent = new Intent(this, Activity3.class);\n startActivity(intent);\n\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(mContext, FullScreenActivity.class);\n\t\t\t\tintent.putExtra(\"videoPathType\", \"1\");\n\t\t\t\tintent.putExtra(\"type\", \"videoFragment\");\n\t\t\t\tstartActivity(intent);\n\t\t\t\tgetActivity().finish();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(mContext, FullScreenActivity.class);\n\t\t\t\tintent.putExtra(\"videoPathType\", \"2\");\n\t\t\t\tintent.putExtra(\"type\", \"videoFragment\");\n\t\t\t\tstartActivity(intent);\n\t\t\t\tgetActivity().finish();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.SamePlacesCommunity.Main.UserServiceActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"2\");\n\t\t\t}", "public native void redirect(String url) /*-{\r\n \r\n \r\n\t$wnd.open(url,\"mainwindow\");\r\n\t\r\n }-*/;", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(mContext, FullScreenActivity.class);\n\t\t\t\tintent.putExtra(\"videoPathType\", \"4\");\n\t\t\t\tintent.putExtra(\"type\", \"videoFragment\");\n\t\t\t\tstartActivity(intent);\n\t\t\t\tgetActivity().finish();\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent cambioVentana = new Intent(Portada.this, MainActivity.class);\n startActivity(cambioVentana);\n }", "private static void redirectActivity(Activity activity, Class aClass) {\n Intent intent = new Intent(activity, aClass);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n activity.startActivity(intent);\n }", "private void goToUrl (String url) {\n Intent launchWebview = new Intent(this, ManualWebviewActivity.class);\n launchWebview.putExtra(\"url\", url);\n startActivity(launchWebview);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent temptIntent=new Intent();\n\t\t\t\ttemptIntent.setClass(Login.this, ECGmain.class);\n\t\t\t\ttemptIntent.putExtra(USER, \"temp\");\n\t\t\t\tstartActivity(temptIntent);\n\t\t\t\tLogin.this.finish();\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent rpIntent = new Intent(Intent.ACTION_VIEW);\n // Set the URL to be used.\n rpIntent.setData(Uri.parse(\"http://www.rp.edu.sg\"));\n startActivity(rpIntent);\n }", "void onSuccessRedirection(int taskID);", "private void startControlRobotActivity(){\n Intent intent = new Intent(this, ControlRobotActivity.class );\n startActivity(intent);\n finish();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i_Alert = new Intent(AndroidExamples.this, RssActivity.class);\n\t\t\t\tstartActivity(i_Alert);\n\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\tIntent webIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.google.com\"));\n\t\t\t\t\tcontext.startActivity(webIntent);\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void onSuccess(Location location) {\n createVideo(location);\n }", "@Override\n public void onSuccess(Location location) {\n createVideo(location);\n }", "protected void startVideoCall() {\n if (!EMClient.getInstance().isConnected())\n Toast.makeText(ChatDetailsActivity.this, R.string.not_connect_to_server, Toast.LENGTH_SHORT).show();\n else {\n startActivity(new Intent(ChatDetailsActivity.this, VideoCallActivity.class).putExtra(\"username\", mBean.getMobile())\n .putExtra(\"isComingCall\", false).putExtra(\"nickname\", mBean.getUser_nickname()));\n // videoCallBtn.setEnabled(false);\n// inputMenu.hideExtendMenuContainer();\n }\n }", "void onSuccessRedirection(Response object, int taskID);", "public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, Setup.class);\n startActivity(intent);\n }", "public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, Setup.class);\n startActivity(intent);\n }", "public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, Setup.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = MainActivity.newIntent(getActivity(), mMonitor.getId());\n startActivity(intent);\n\n }", "@Override\r\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tIntent browseIntent = new Intent( Intent.ACTION_VIEW , Uri.parse(urlStr) );\r\n startActivity(Intent.createChooser(browseIntent, \"Connecting...\"));\r\n \t\t\t}", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.zhy.socket.SocketClientDemoActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"1\");\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(activity, Honour_Activity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}", "public void startViewTripActivity() {\r\n\t\t\r\n\t\t// TODO - fill in here\r\n Intent intent = new Intent(this,TripHistoryActivity.class);\r\n startActivity(intent);\r\n\t}", "@Override\n public void onClick(View v) {\n String Url= currentNews.getWebUrl();\n //sent intent to the website\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW);\n intent.addCategory(Intent.CATEGORY_BROWSABLE);\n intent.setData(Uri.parse(Url));\n getContext().startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent viewTripIntent = new Intent(MainActivity.this,\n\t\t\t\t\t\tTripHistoryActivity.class);\n\t\t\t\tstartActivity(viewTripIntent);\n\t\t\t}", "public void toNeedymap (View v){\n Intent i = new Intent(Startup_menu_activity.this,web_page.class);\n startActivity(i);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n final Channel channel;\n channel = channels.get(position);\n\n this.setupStalkerClient();\n\n String url = UrlSettings.getResUrl() + this.user_id + \"/tv-channels/\"+channel.channel_id + \"/link\";\n\n getAPILoader().loader(url, new StalkerLoader.OnJSONResponseCallback() {\n @Override\n public void onJSONResponse(boolean success, JSONObject response) {\n\n try {\n if (response.has(\"status\")) {\n\n String channelLink = response.getString(\"results\");\n Log.d(TAG, \"Channel LINK is: \" + channelLink);\n\n Intent player = new Intent();\n player.setAction(Intent.ACTION_VIEW);\n\n player.setDataAndType(Uri.parse(channelLink), \"video/*\");\n player.putExtra(\"title\", channel.name);\n player.putExtra(\"secure_uri\", true);\n startActivity(player);\n }\n\n if (response.has(\"error\")) {\n\n Toast.makeText(getActivity().getApplicationContext(), response.getString(\"error\"), Toast.LENGTH_LONG).show();\n }\n\n } catch (JSONException e) {\n\n Toast.makeText(getActivity().getApplicationContext(), \"Error in code..((\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n\n }\n\n Log.d(TAG, \"GET CHANNELS REQUEST COMPLETE: \" + response.toString());\n }\n });\n\n }", "public void goToPreviousStagesActivity(View view)\n {\n Stage thisStage = stageHandler.getStage(1);\n if (thisStage != null)\n {\n Intent intent = new Intent(MainActivity.this, PreviousStagesActivity.class);\n startActivity(intent);\n }\n else\n {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(MainActivity.this);\n alertDialog.setMessage(getString(R.string.noStages)).create().show();\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(DoneUploadActivity.this,\n\t\t\t\t\t\tStreamActivity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/services\"));\n startActivity(browserIntent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t intent = new Intent(MainActivity.this, NLUActivity.class);\n\t\t\t\t if(intent != null) {\n\t\t\t\t\t startActivity(intent);\n\t\t\t\t\t }\n\t\t\t\t }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), Gametwofive.class);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (TextUtils.isEmpty(AppofferUtil.getIntsance().getList().get(0).getPackageName())) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tUri uri = Uri.parse(\"market://details?id=\"\n\t\t\t\t\t\t+ AppofferUtil.getIntsance().getList().get(0).getPackageName());\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_VIEW, uri);\n\t\t\t\tif (isPkgInstalled(AlertVideoActivity.this, \"com.android.vending\")) {\n\t\t\t\t\tintent.setPackage(\"com.android.vending\");\n\t\t\t\t}else{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\tAlertVideoActivity.this.startActivity(intent);\n\t\t\t}", "public void toNextPage(View v) {\n Intent i = new Intent(MainActivity.this, SecondActivity.class);\n i.putExtra(\"is_played\", is_played);\n startActivity(i);\n }", "public void ClickScanner(View view){\n MainActivity.redirectActivity(this,Scanner.class);\n\n }", "public void volver(View view){\n Intent i = new Intent(this,MainActivity.class);\n startActivity(i);\n finish();\n }" ]
[ "0.7372226", "0.6474005", "0.6446206", "0.64357686", "0.6388018", "0.6254938", "0.61702365", "0.61496526", "0.61272454", "0.6086346", "0.6033082", "0.60135037", "0.5957779", "0.5940819", "0.593154", "0.59227216", "0.5895747", "0.58616215", "0.58613974", "0.5849705", "0.58466154", "0.5841134", "0.5824022", "0.58152", "0.58046585", "0.58045", "0.5797264", "0.5794169", "0.57889724", "0.5788783", "0.5782827", "0.57803833", "0.5779521", "0.57753754", "0.57683957", "0.5765737", "0.57580155", "0.5754549", "0.5747457", "0.5743182", "0.57420456", "0.5741662", "0.57210183", "0.5714923", "0.5713494", "0.5712198", "0.5707586", "0.5706124", "0.5696897", "0.56935483", "0.5686368", "0.567344", "0.566907", "0.5656844", "0.5655382", "0.5651421", "0.56358343", "0.5634105", "0.56322575", "0.56271136", "0.5627095", "0.562664", "0.5624825", "0.56116134", "0.56034505", "0.5602965", "0.5598677", "0.5587061", "0.55764437", "0.5572305", "0.5571213", "0.5566147", "0.55633426", "0.55604833", "0.5559753", "0.5558067", "0.5558067", "0.5557651", "0.55573726", "0.5550403", "0.5550403", "0.5550403", "0.5548782", "0.5548766", "0.5544217", "0.55440134", "0.55410635", "0.55407053", "0.55385005", "0.55350214", "0.5533844", "0.55186224", "0.55143183", "0.5514285", "0.5513546", "0.5513164", "0.5510931", "0.5509276", "0.5506689", "0.5504994" ]
0.7202401
1
Redirect activity to Vtube service
public void ClickVtube_Customer_service(View view){ redirectActivity(this,Vtube_Customer_service.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ClickVtube(View view){\n MainActivity.redirectActivity(this,Vtube.class);\n\n\n }", "public void ClickVtube(View view){\n redirectActivity(this,Vtube.class);\n }", "public void ClickVtube_Customer_service(View view){\n MainActivity.redirectActivity(this,Vtube_Customer_service.class);\n\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(context, MainVideo.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}", "public void VolverVentana(View view){\n Intent volver = new Intent(this, MainActivity.class);\n startActivity(volver);\n }", "public void gotoVideoLandingPage(){\r\n\t\twebAppDriver.get(baseUrl+\"/videos.aspx\");\r\n\t\t//need to add verification text\r\n\t}", "@Override\n public void onClick(View v) {\n Intent it = new Intent(Intent.ACTION_VIEW);\n Uri uri = Uri.parse(\"http://\"+ PostUrl.Media+\":8080/upload/\"+item.getMediaPath().get(0).split(\"\\\\.\")[0]+\".mp4\");\n it.setDataAndType(uri, \"video/mp4\");\n context.startActivity(it);\n\n }", "private void redirectTO() {\n\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n\n finish();\n }", "public void goToVideoViewer(Uri vidURI) {\n Log.i(\"progress\",\"goToViewer\");\n\n Intent playerIntent = new Intent(this, VideoActivity.class);\n\n //attaches the video's uri\n playerIntent.putExtra(INTENT_MESSAGE, vidURI.toString());\n startActivity(playerIntent);\n }", "public void toExistingVirus() {\n Intent toExistingVirus = new Intent(this, activity_existing_virus.class);\n startActivity(toExistingVirus);\n }", "@Override\n public void onClick(View view) {\n String rtmpUrl = \"rtmp://202.69.69.180:443/webcast/bshdlive-pc\";\n if (TextUtils.isEmpty(rtmpUrl)) {\n Toast.makeText(MainActivity.this, \"请输入播放地址\", Toast.LENGTH_SHORT).show();\n } else {\n Intent intent = new Intent(MainActivity.this, PlayerAty.class);\n intent.putExtra(\"rtmp_url\", rtmpUrl);\n startActivity(intent);\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString url = \"http://www.hoteltrip.com/\";\n\t\t\t\tIntent i = new Intent(Intent.ACTION_VIEW);\n\t\t\t\ti.setData(Uri.parse(url));\n\t\t\t\tstartActivity(i);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.SamePlacesCommunity.Main.FeedServiceActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"1\");\n\t\t\t}", "private void redirectStore(String updateUrl) {\n final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(updateUrl));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()){\n case R.id.trainingVideoButton:\n if(skill != null){\n String link = (String) skill.getLink();\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(link));\n getContext().startActivity(i);\n }\n break;\n }\n }", "public void onClick(View v) {\n\t\t\t\tSystem.out.println(\"to video_set\");\n\t\t\t\tIntent intent = new Intent(MainMenuActivity.this,\n\t\t\t\t\t\tapp_video_Activity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/services\"));\n startActivity(browserIntent);\n }", "public void gotoUitgaven(View v){\n Intent uitgaven;\n uitgaven = new Intent(getBaseContext(),UitgavenActivity.class);\n startActivity(uitgaven);\n }", "protected void startVideoCall() {\n if (!EMClient.getInstance().isConnected())\n Toast.makeText(ChatDetailsActivity.this, R.string.not_connect_to_server, Toast.LENGTH_SHORT).show();\n else {\n startActivity(new Intent(ChatDetailsActivity.this, VideoCallActivity.class).putExtra(\"username\", mBean.getMobile())\n .putExtra(\"isComingCall\", false).putExtra(\"nickname\", mBean.getUser_nickname()));\n // videoCallBtn.setEnabled(false);\n// inputMenu.hideExtendMenuContainer();\n }\n }", "public void funcionAppian(View v){\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(\"https://ustglobalspaindemo.appiancloud.com/suite/tempo/news\"));\n if(intent.resolveActivity(getPackageManager())!= null){\n startActivity(intent);\n }\n }", "@Override\n public void onClick(View v) {\n if(v==btnStartCloud) {\n activityIntent.putExtra(\"isOnline\", true);\n activityIntent.putExtra(\"isVadLoad\", true);\n activityIntent.setClass(this, SelectActivity.class);}\n startActivity(activityIntent);\n }", "@Override\n public void onClick(View v) {\n Uri uri = Uri.parse(url);\n //Se crea un intent implicito para visualizar los links en un navegador\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);\n //Se inicia la actividad del navegador\n activityt.startActivity(intent);\n }", "private void Login()\n {\n Intent loginIntent = new Intent (LoginActivity.this, VVPActivity.class);\n startActivity(loginIntent);\n finish();\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\tIntent i = new Intent(Intent.ACTION_VIEW, Uri\n\t\t\t\t\t\t\t\t\t\t.parse(fullsitelink));\n\t\t\t\t\t\t\t\tstartActivity(i);\n\n\t\t\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent videoIntent = new Intent(SearchVideoListActivity.this,\r\n\t\t\t\t\t\tSearchActivity.class);\r\n\r\n\t\t\t\tAnimatedActivity parentActivity = (AnimatedActivity) SearchVideoListActivity.this\r\n\t\t\t\t\t\t.getParent();\r\n\t\t\t\tparentActivity\r\n\t\t\t\t\t\t.startChildActivity(\"LiveStreamoter\", videoIntent);\r\n\t\t\t}", "public void playerView(View view) {\n PlayerCapabilityFacade pcf = new PlayerCapabilityFacade();\n Intent intent;\n if(pcf.isTournamentActive()) {\n intent = new Intent(ModeSelectionActivity.this, PlayerTourneyActivity.class);\n } else {\n intent = new Intent(ModeSelectionActivity.this, PlayerTotalsActivity.class);\n }\n\n startActivity(intent);\n\n //else onclick go to PlayerTourneyActivity\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=201\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "private void showViewToursActivity() {\n//\t\tIntent intent = new intent(this, ActivityViewTours.class);\n System.out.println(\"Not Yet Implemented\");\n }", "private void startARActivity()\n {\n Intent itent = new Intent();\n \n itent.setClassName(\"com.qualcomm.vuforia.samples.VideoPlayback.app.\", \"VideoPlayback\");\n \n startActivity(itent);\n }", "public void goWebSite() {\n\n if (mIsFirst) {\n mSnackbar.setText(getString(R.string.please_wait)).show();\n } else {\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(mSiteData.getUrl()));\n //intent.putExtra(\"url\", webData.getUrl());\n //startActivity(intent);\n startActivityForResult(intent, 100);\n //showToolbarProgressBar();\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n }\n }", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.SamePlacesCommunity.Main.UserServiceActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"2\");\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (TextUtils.isEmpty(AppofferUtil.getIntsance().getList().get(0).getPackageName())) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tUri uri = Uri.parse(\"market://details?id=\"\n\t\t\t\t\t\t+ AppofferUtil.getIntsance().getList().get(0).getPackageName());\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_VIEW, uri);\n\t\t\t\tif (isPkgInstalled(AlertVideoActivity.this, \"com.android.vending\")) {\n\t\t\t\t\tintent.setPackage(\"com.android.vending\");\n\t\t\t\t}else{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\tAlertVideoActivity.this.startActivity(intent);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=209\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent viewTripIntent = new Intent(MainActivity.this,\n\t\t\t\t\t\tTripHistoryActivity.class);\n\t\t\t\tstartActivity(viewTripIntent);\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent httpIntent = new Intent(Intent.ACTION_VIEW);\n httpIntent.setData(Uri.parse(\"http://bvmengineering.ac.in\"));\n\n startActivity(httpIntent);\n\n }", "public void redirectHome(View v) {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent Getintent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://feedback.avriant.com\"));\n startActivity(Getintent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=213\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "void redirect();", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=217\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(View view) {\n String url = \"https://ownshopz.com/mobile-360-degree/\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n }", "@Override\n public void onClick(View view) {\n // Create a new intent\n Intent new_release_intent = new Intent(VietPopActivity.this, MainActivity.class);\n new_release_intent.putExtra(\"uniqueid\",\"from_viet\");\n // Start the new activity\n startActivity(new_release_intent);\n }", "void onSuccessRedirection(Response object, int taskID);", "@Override\n public void onClick(View v) {\n Intent opnWebIntent = new Intent(getActivity(), WebViewActivity.class);\n opnWebIntent.putExtra(\"url\", \"http://www.mbtabackontrack.com/performance/index.html#/home\");\n startActivity(opnWebIntent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent web = new Intent(Intent.ACTION_VIEW);\n\t\t\t\tweb.setData(Uri.parse(url));\n\t\t\t\tstartActivity(web);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMap<String,String>map=new HashMap<String,String>();\n\t\t\t\tmap.put(\"videoID\", object.videoID);\n\t\t\t\tmap.put(\"videoname\", object.videoname);\n\t\t\t\tString albumVideoImgUrl=CommonUrl.baseUrl + object.videoImgUrl +\".small\"+ object.suffix;\n\t\t\t\tmap.put(\"videoImgUrl\", albumVideoImgUrl);\n\t\t\t\tCommonUtil.jumpToPlayerActivity(context, map);\n\t\t\t}", "void onSuccessRedirection(int taskID);", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(ActivityIndex.this, ActivityTrialMessage.class);\n intent.putExtra(\"fromIndex\", true);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=207\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "public void redirectToPlan() {\n setResponsePage( new RedirectPage( \"plan\" ) );\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(FxService.this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(FxService.this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "public abstract String redirectTo();", "@Override\n\t\t\tpublic void onClick(View v){\n\t\t\t\tif (receiver==null) {\n\t\t\t\t\treceiver = new myReceiver();\n\t\t\t\t\tIntentFilter filter=new IntentFilter();\n\t\t\t\t\tfilter.addAction(\"com.chris.hadoop v\");\n\t\t\t\t\tmActivity.registerReceiver(receiver, filter);\n\t\t\t\t}\n\t\t\t\tIntent intent=new Intent(getActivity(),trafficMonitorService.class);\n\t\t\t\tmActivity.startService(intent);\n\t\t\t\tToast.makeText(mActivity,\" \",Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n final Channel channel;\n channel = channels.get(position);\n\n this.setupStalkerClient();\n\n String url = UrlSettings.getResUrl() + this.user_id + \"/tv-channels/\"+channel.channel_id + \"/link\";\n\n getAPILoader().loader(url, new StalkerLoader.OnJSONResponseCallback() {\n @Override\n public void onJSONResponse(boolean success, JSONObject response) {\n\n try {\n if (response.has(\"status\")) {\n\n String channelLink = response.getString(\"results\");\n Log.d(TAG, \"Channel LINK is: \" + channelLink);\n\n Intent player = new Intent();\n player.setAction(Intent.ACTION_VIEW);\n\n player.setDataAndType(Uri.parse(channelLink), \"video/*\");\n player.putExtra(\"title\", channel.name);\n player.putExtra(\"secure_uri\", true);\n startActivity(player);\n }\n\n if (response.has(\"error\")) {\n\n Toast.makeText(getActivity().getApplicationContext(), response.getString(\"error\"), Toast.LENGTH_LONG).show();\n }\n\n } catch (JSONException e) {\n\n Toast.makeText(getActivity().getApplicationContext(), \"Error in code..((\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n\n }\n\n Log.d(TAG, \"GET CHANNELS REQUEST COMPLETE: \" + response.toString());\n }\n });\n\n }", "public void Volver(View view){\n Intent principal = new Intent(this, Principal.class);\n startActivity(principal);\n finish();\n }", "private void redirectToMain() {\n\t\tIntent intent = new Intent(this, Main.class);\r\n\t\tstartActivity(intent);\r\n\t\tfinish();\r\n\t}", "public void onClick(View v) {\n\n Intent visitSite_intent = new Intent(MainActivity.this, DetailActivity.class);\n visitSite_intent.putExtra(\"url\",\"http://aanm-vvrsrpolytechnic.ac.in/\");\n startActivity(visitSite_intent);\n }", "public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, Setup.class);\n startActivity(intent);\n }", "public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, Setup.class);\n startActivity(intent);\n }", "public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, Setup.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n mFragment.setFadingEnabled(false);\n long programId = ((RecordedProgram) v.getTag()).getId();\n if (DEBUG) Log.d(TAG, \"Play Related Recording:\" + programId);\n Intent intent = new Intent(getContext(), DvrPlaybackActivity.class);\n intent.putExtra(Utils.EXTRA_KEY_RECORDED_PROGRAM_ID, programId);\n getContext().startActivity(intent);\n }", "@Override\n public void onServerStart(String videoStreamUrl)\n {\n\n\n\n Log.d(\"Activity\",\"URL: \"+ videoStreamUrl);\n\n\n video = (VideoView)findViewById(R.id.video);\n\n Uri uri = Uri.parse(videoStreamUrl);\n video.setVideoURI(uri);\n video.start();\n\n\n\n }", "@Override\r\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tIntent browseIntent = new Intent( Intent.ACTION_VIEW , Uri.parse(urlStr) );\r\n startActivity(Intent.createChooser(browseIntent, \"Connecting...\"));\r\n \t\t\t}", "public void startViewTripActivity() {\r\n\t\t\r\n\t\t// TODO - fill in here\r\n Intent intent = new Intent(this,TripHistoryActivity.class);\r\n startActivity(intent);\r\n\t}", "public void startVideoPlayer(Context context, String url) {\n Resource item = new Resource();\n item.setType(context.getString(R.string.typeVideo));\n item.setUrlMain(url);\n context.startActivity(PlayVideoFullScreenActivity.getStartActivityIntent(context, ConstantUtil.BLANK, ConstantUtil.BLANK, PlayVideoFullScreenActivity.NETWORK_TYPE_ONLINE, (Resource) item));\n }", "@Override\n public void onClick(View view) {\n Intent intent = MainActivity.newIntent(getActivity(), mMonitor.getId());\n startActivity(intent);\n\n }", "private static void redirectActivity(Activity activity, Class aClass) {\n Intent intent = new Intent(activity, aClass);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n activity.startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(NowPlaying.this, classDestination);\n // starting new activity\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartActivity(new Intent(OnePService.this, MainActivity.class)\n\t\t\t\t\t\t.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK\n\t\t\t\t\t\t\t\t| Intent.FLAG_ACTIVITY_CLEAR_TOP));\n\t\t\t\t// Toast.makeText(OnePService.this, \"onClick\",\n\t\t\t\t// Toast.LENGTH_SHORT)\n\t\t\t\t// .show();\n\t\t\t}", "void redirect(Reagent reagent);", "public void goToForecast(View view) {\n Intent myIntent = new Intent(MainActivity.this, Forecast.class);\n MainActivity.this.startActivity(myIntent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(activity, Honour_Activity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}", "public void goToStageActivity(View view)\n {\n Stage thisStage = stageHandler.getStage(1);\n if (thisStage != null)\n {\n Intent intent = new Intent(MainActivity.this, StageActivity.class);\n startActivity(intent);\n }\n else\n {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(MainActivity.this);\n alertDialog.setMessage(getString(R.string.noStages)).create().show();\n }\n }", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.zhy.socket.SocketClientDemoActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"1\");\n\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\tIntent webIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.google.com\"));\n\t\t\t\t\tcontext.startActivity(webIntent);\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/\"));\n startActivity(browserIntent);\n }", "@Override\n public void onClick(View v) {\n String Url= currentNews.getWebUrl();\n //sent intent to the website\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW);\n intent.addCategory(Intent.CATEGORY_BROWSABLE);\n intent.setData(Uri.parse(Url));\n getContext().startActivity(intent);\n }", "@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tSystem.out.println(\"播放网络上的音频\");\n\t\t\ttry {\n\n\t\t\t\tString path = catalogName + File.separator + videoName;\n\t\t\t\t// String path =\n\t\t\t\t// \"http://192.168.253.1:8080/httpGetVideo/5a3bbe53835ffd43/LoveStory.mp4\";\n\t\t\t\tConnectionDetector cd = new ConnectionDetector(\n\t\t\t\t\t\tHistoryVideoBroadcastActivity.this);\n\t\t\t\tLog.e(TAG, \"11111111111\");\n\t\t\t\tif (cd.isConnectingToInternet()) {\n\t\t\t\t\tMediaController mediaController = new MediaController(\n\t\t\t\t\t\t\tHistoryVideoBroadcastActivity.this); // 通过videoView提供的uri函数借口播放服务器视频\n\t\t\t\t\tmediaController.setAnchorView(videoView);\n\t\t\t\t\tUri video = Uri.parse(path);\n\t\t\t\t\tvideoView.setMediaController(mediaController);\n\t\t\t\t\tvideoView.setVideoURI(video);\n\t\t\t\t\tvideoView.start();\n\t\t\t\t} else {\n\t\t\t\t\tToast.makeText(HistoryVideoBroadcastActivity.this,\n\t\t\t\t\t\t\t\"网络连接没有开启,请设置网络连接\", 2000).show();\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tToast.makeText(HistoryVideoBroadcastActivity.this,\n\t\t\t\t\t\t\"Error connecting\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}", "@Override\r\n public void onClick(View v) {\n String path = \"http://techslides.com/demos/sample-videos/small.mp4\";\r\n// Uri uri=Uri.parse(path);\r\n// videoView.setVideoURI(uri);\r\n //MediaController mc = new MediaController(TransformDetailActivity.this);\r\n\r\n //videoView.start();\r\n// videoView.setOnTouchListener(new View.OnTouchListener() {\r\n// @Override\r\n// public boolean onTouch(View v, MotionEvent event) {\r\n// System.out.print(videoView.isPlaying());\r\n// if(videoView.isPlaying()) {\r\n// stopPosition[0] = videoView.getCurrentPosition();\r\n// videoView.pause();\r\n// } else {\r\n// videoView.seekTo(stopPosition[0]);\r\n// videoView.start();\r\n// }\r\n// return false;\r\n// }\r\n// });\r\n// String path = \"android.resource://\" + getPackageName() + \"/\" + R.raw.welcome;\r\n// Uri videoUri = Uri.parse(path);\r\n// Intent intent = new Intent(Intent.ACTION_VIEW, videoUri);\r\n// intent.setDataAndType(videoUri, \"video/*\");\r\n// startActivity(intent);\r\n\r\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(path));\r\n intent.setDataAndType(Uri.parse(path), \"video/mp4\");\r\n startActivity(intent);\r\n }", "public void toBeam(){\n Intent intent = new Intent(this, Beam.class);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent temptIntent=new Intent();\n\t\t\t\ttemptIntent.setClass(Login.this, ECGmain.class);\n\t\t\t\ttemptIntent.putExtra(USER, \"temp\");\n\t\t\t\tstartActivity(temptIntent);\n\t\t\t\tLogin.this.finish();\n\t\t\t}", "private void startControlRobotActivity(){\n Intent intent = new Intent(this, ControlRobotActivity.class );\n startActivity(intent);\n finish();\n }", "@Override\n public void onSuccess(Location location) {\n createVideo(location);\n }", "@Override\n public void onSuccess(Location location) {\n createVideo(location);\n }", "@Override\r\n\tprotected void onPostExecute(JSONObject result) {\n\t\tIntent i = new Intent(context,LiveRace.class);\r\n\t\ti.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\tcontext.startActivity(i);\r\n\r\n\t}", "public void startTripViewer() {\n\n\t\t// TODO - fill in here\n\t\tviewTripButton.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent viewTripIntent = new Intent(MainActivity.this,\n\t\t\t\t\t\tTripHistoryActivity.class);\n\t\t\t\tstartActivity(viewTripIntent);\n\t\t\t}\n\t\t});\n\t}", "public void ClickScanner(View view){\n MainActivity.redirectActivity(this,Scanner.class);\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tboolean isHave=\n\t\t\t\thasApplication(LoginActivity.this,\"com.hsic.tmj.myyhqworkspace\");\n\t\t\t\tif(!isHave){\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\tComponentName componetName = new ComponentName(\n\t\t\t\t\t\t//这个是另外一个应用程序的包名\n\t\t\t\t\t\t\"com.hsic.tmj.myyhqworkspace\",\n\t\t\t\t\t\t//这个参数是要启动的Activity\n\t\t\t\t\t\t\"com.hsic.tmj.myyhqworkspace.LoginActivity\");\n// Intent intent= new Intent(\"chroya.foo\");\n\t\t\t\tIntent intent= new Intent();\n\t\t\t\t//我们给他添加一个参数表示从apk1传过去的\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"arge1\", \"这是跳转过来的!来自apk1\");\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tintent.setComponent(componetName);\n\t\t\t\tstartActivity(intent);\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i_Alert = new Intent(AndroidExamples.this, RssActivity.class);\n\t\t\t\tstartActivity(i_Alert);\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.forecast_io_url)));\n startActivity(browserIntent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tUri webpage = Uri.parse(currentItem.getStoryUrl());\n\n\t\t\t\t// Create web browser intent\n\t\t\t\tIntent storyOnWebIntent = new Intent(Intent.ACTION_VIEW, webpage);\n\n\t\t\t\t// Check web activity can be handled by the device and start activity\n\t\t\t\tif (storyOnWebIntent.resolveActivity(mContext.getPackageManager()) != null) {\n\t\t\t\t\tmContext.startActivity(storyOnWebIntent);\n\t\t\t\t}\n\n\t\t\t}", "@Override\n public void onClick(View v) {\n try {\n launchActivity(MGERRIT, MGERRIT_MAIN_ENTRY);\n } catch (ActivityNotFoundException failToMarket) {\n launchUrl(MGERRIT_PLAYSTORE);\n }\n\n }", "private void toSpotActivity(int spotId) {\n\t\tIntent mIntent = new Intent(getApplicationContext(), SpotActivity.class);\n\t\tmIntent.putExtra(\"spot_number\", spotId+1);\n\t\tmIntent.putExtra(\"user_info\", user);\n\t\tstartActivity(mIntent);\n\t\tfinish();\n\t}", "@Override\n public void onClick(View v) {\n Intent cambioVentana = new Intent(Portada.this, MainActivity.class);\n startActivity(cambioVentana);\n }", "private void toWebViewActivity(){\n Intent toWebViewActivity = new Intent(this, AmazonActivity.class);\n startActivity(toWebViewActivity);\n }", "public static void watchYoutubeVideo(Context context, String id){\n Intent appIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(YOUTUBE_APP_BASE + id));\n Intent webIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(YOUTUBE_BASE_URL + id));\n\n // Add the additional flags to the intent\n // if your android version is below Android - 6 then you need to add this line otherwise it will work above Android - 6.\n // Bcs. of error: AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag.\n appIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n webIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n // If youtube is not installed, plays from web\n try {\n context.startActivity(appIntent);\n } catch (ActivityNotFoundException ex) {\n context.startActivity(webIntent);\n }\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.youtube.com/watch?v=\"+tmp.get(position).key)));\n\n\n\n }", "public static void searchYoutubeVideo(Context context, String id){\n Intent appIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"vnd.youtube:///results?q=\" + id));\n Intent webIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.youtube.com/results?search_query=\" + id));\n try {\n context.startActivity(appIntent);\n } catch (ActivityNotFoundException ex) {\n ex.printStackTrace();\n context.startActivity(webIntent);\n }\n }", "public void goToPreviousStagesActivity(View view)\n {\n Stage thisStage = stageHandler.getStage(1);\n if (thisStage != null)\n {\n Intent intent = new Intent(MainActivity.this, PreviousStagesActivity.class);\n startActivity(intent);\n }\n else\n {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(MainActivity.this);\n alertDialog.setMessage(getString(R.string.noStages)).create().show();\n }\n }" ]
[ "0.7033022", "0.6873102", "0.6209027", "0.61380523", "0.60963005", "0.6045515", "0.599797", "0.59819794", "0.5921142", "0.5902481", "0.57853955", "0.57714015", "0.5765832", "0.57656974", "0.5743088", "0.57251906", "0.56971776", "0.5687037", "0.56510836", "0.5650933", "0.56429994", "0.564207", "0.56368464", "0.5606614", "0.5596394", "0.55909604", "0.5582432", "0.55804133", "0.55709285", "0.5565382", "0.5562712", "0.55620646", "0.5557455", "0.55468416", "0.55462164", "0.55460346", "0.5545558", "0.5545054", "0.55442095", "0.5544199", "0.55365694", "0.5531071", "0.55281633", "0.5527644", "0.55012006", "0.5498847", "0.54986405", "0.5498294", "0.5496969", "0.5495439", "0.5491613", "0.5491613", "0.5483313", "0.547889", "0.54717577", "0.5456742", "0.5452503", "0.5447078", "0.54435736", "0.54435736", "0.54435736", "0.5441676", "0.54390705", "0.54382074", "0.54280204", "0.5427231", "0.54202235", "0.54119146", "0.5409301", "0.54059815", "0.5400023", "0.5397212", "0.5391027", "0.5387748", "0.5379169", "0.537837", "0.537535", "0.5364622", "0.5357469", "0.53551537", "0.5354608", "0.53530467", "0.53524536", "0.5348718", "0.5348718", "0.53483", "0.53433055", "0.5338579", "0.53381944", "0.5336784", "0.532661", "0.53220916", "0.531615", "0.5306272", "0.53018576", "0.5300419", "0.5298755", "0.52927035", "0.5292382", "0.5285706" ]
0.6023709
6
Redirect activity to Vtube service
public void ClickShoppingcart(View view){ redirectActivity(this,SummaryActivity.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ClickVtube(View view){\n MainActivity.redirectActivity(this,Vtube.class);\n\n\n }", "public void ClickVtube(View view){\n redirectActivity(this,Vtube.class);\n }", "public void ClickVtube_Customer_service(View view){\n MainActivity.redirectActivity(this,Vtube_Customer_service.class);\n\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(context, MainVideo.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}", "public void VolverVentana(View view){\n Intent volver = new Intent(this, MainActivity.class);\n startActivity(volver);\n }", "public void gotoVideoLandingPage(){\r\n\t\twebAppDriver.get(baseUrl+\"/videos.aspx\");\r\n\t\t//need to add verification text\r\n\t}", "public void ClickVtube_Customer_service(View view){\n redirectActivity(this,Vtube_Customer_service.class);\n }", "@Override\n public void onClick(View v) {\n Intent it = new Intent(Intent.ACTION_VIEW);\n Uri uri = Uri.parse(\"http://\"+ PostUrl.Media+\":8080/upload/\"+item.getMediaPath().get(0).split(\"\\\\.\")[0]+\".mp4\");\n it.setDataAndType(uri, \"video/mp4\");\n context.startActivity(it);\n\n }", "private void redirectTO() {\n\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n\n finish();\n }", "public void goToVideoViewer(Uri vidURI) {\n Log.i(\"progress\",\"goToViewer\");\n\n Intent playerIntent = new Intent(this, VideoActivity.class);\n\n //attaches the video's uri\n playerIntent.putExtra(INTENT_MESSAGE, vidURI.toString());\n startActivity(playerIntent);\n }", "public void toExistingVirus() {\n Intent toExistingVirus = new Intent(this, activity_existing_virus.class);\n startActivity(toExistingVirus);\n }", "@Override\n public void onClick(View view) {\n String rtmpUrl = \"rtmp://202.69.69.180:443/webcast/bshdlive-pc\";\n if (TextUtils.isEmpty(rtmpUrl)) {\n Toast.makeText(MainActivity.this, \"请输入播放地址\", Toast.LENGTH_SHORT).show();\n } else {\n Intent intent = new Intent(MainActivity.this, PlayerAty.class);\n intent.putExtra(\"rtmp_url\", rtmpUrl);\n startActivity(intent);\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString url = \"http://www.hoteltrip.com/\";\n\t\t\t\tIntent i = new Intent(Intent.ACTION_VIEW);\n\t\t\t\ti.setData(Uri.parse(url));\n\t\t\t\tstartActivity(i);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.SamePlacesCommunity.Main.FeedServiceActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"1\");\n\t\t\t}", "private void redirectStore(String updateUrl) {\n final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(updateUrl));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()){\n case R.id.trainingVideoButton:\n if(skill != null){\n String link = (String) skill.getLink();\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(link));\n getContext().startActivity(i);\n }\n break;\n }\n }", "public void onClick(View v) {\n\t\t\t\tSystem.out.println(\"to video_set\");\n\t\t\t\tIntent intent = new Intent(MainMenuActivity.this,\n\t\t\t\t\t\tapp_video_Activity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/services\"));\n startActivity(browserIntent);\n }", "public void gotoUitgaven(View v){\n Intent uitgaven;\n uitgaven = new Intent(getBaseContext(),UitgavenActivity.class);\n startActivity(uitgaven);\n }", "protected void startVideoCall() {\n if (!EMClient.getInstance().isConnected())\n Toast.makeText(ChatDetailsActivity.this, R.string.not_connect_to_server, Toast.LENGTH_SHORT).show();\n else {\n startActivity(new Intent(ChatDetailsActivity.this, VideoCallActivity.class).putExtra(\"username\", mBean.getMobile())\n .putExtra(\"isComingCall\", false).putExtra(\"nickname\", mBean.getUser_nickname()));\n // videoCallBtn.setEnabled(false);\n// inputMenu.hideExtendMenuContainer();\n }\n }", "public void funcionAppian(View v){\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(\"https://ustglobalspaindemo.appiancloud.com/suite/tempo/news\"));\n if(intent.resolveActivity(getPackageManager())!= null){\n startActivity(intent);\n }\n }", "@Override\n public void onClick(View v) {\n if(v==btnStartCloud) {\n activityIntent.putExtra(\"isOnline\", true);\n activityIntent.putExtra(\"isVadLoad\", true);\n activityIntent.setClass(this, SelectActivity.class);}\n startActivity(activityIntent);\n }", "@Override\n public void onClick(View v) {\n Uri uri = Uri.parse(url);\n //Se crea un intent implicito para visualizar los links en un navegador\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);\n //Se inicia la actividad del navegador\n activityt.startActivity(intent);\n }", "private void Login()\n {\n Intent loginIntent = new Intent (LoginActivity.this, VVPActivity.class);\n startActivity(loginIntent);\n finish();\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\tIntent i = new Intent(Intent.ACTION_VIEW, Uri\n\t\t\t\t\t\t\t\t\t\t.parse(fullsitelink));\n\t\t\t\t\t\t\t\tstartActivity(i);\n\n\t\t\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent videoIntent = new Intent(SearchVideoListActivity.this,\r\n\t\t\t\t\t\tSearchActivity.class);\r\n\r\n\t\t\t\tAnimatedActivity parentActivity = (AnimatedActivity) SearchVideoListActivity.this\r\n\t\t\t\t\t\t.getParent();\r\n\t\t\t\tparentActivity\r\n\t\t\t\t\t\t.startChildActivity(\"LiveStreamoter\", videoIntent);\r\n\t\t\t}", "public void playerView(View view) {\n PlayerCapabilityFacade pcf = new PlayerCapabilityFacade();\n Intent intent;\n if(pcf.isTournamentActive()) {\n intent = new Intent(ModeSelectionActivity.this, PlayerTourneyActivity.class);\n } else {\n intent = new Intent(ModeSelectionActivity.this, PlayerTotalsActivity.class);\n }\n\n startActivity(intent);\n\n //else onclick go to PlayerTourneyActivity\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=201\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "private void showViewToursActivity() {\n//\t\tIntent intent = new intent(this, ActivityViewTours.class);\n System.out.println(\"Not Yet Implemented\");\n }", "private void startARActivity()\n {\n Intent itent = new Intent();\n \n itent.setClassName(\"com.qualcomm.vuforia.samples.VideoPlayback.app.\", \"VideoPlayback\");\n \n startActivity(itent);\n }", "public void goWebSite() {\n\n if (mIsFirst) {\n mSnackbar.setText(getString(R.string.please_wait)).show();\n } else {\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(mSiteData.getUrl()));\n //intent.putExtra(\"url\", webData.getUrl());\n //startActivity(intent);\n startActivityForResult(intent, 100);\n //showToolbarProgressBar();\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (TextUtils.isEmpty(AppofferUtil.getIntsance().getList().get(0).getPackageName())) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tUri uri = Uri.parse(\"market://details?id=\"\n\t\t\t\t\t\t+ AppofferUtil.getIntsance().getList().get(0).getPackageName());\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_VIEW, uri);\n\t\t\t\tif (isPkgInstalled(AlertVideoActivity.this, \"com.android.vending\")) {\n\t\t\t\t\tintent.setPackage(\"com.android.vending\");\n\t\t\t\t}else{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\tAlertVideoActivity.this.startActivity(intent);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.SamePlacesCommunity.Main.UserServiceActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"2\");\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=209\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent viewTripIntent = new Intent(MainActivity.this,\n\t\t\t\t\t\tTripHistoryActivity.class);\n\t\t\t\tstartActivity(viewTripIntent);\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent httpIntent = new Intent(Intent.ACTION_VIEW);\n httpIntent.setData(Uri.parse(\"http://bvmengineering.ac.in\"));\n\n startActivity(httpIntent);\n\n }", "@Override\n public void onClick(View view) {\n Intent Getintent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://feedback.avriant.com\"));\n startActivity(Getintent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=213\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=217\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "public void redirectHome(View v) {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "void redirect();", "@Override\n public void onClick(View view) {\n String url = \"https://ownshopz.com/mobile-360-degree/\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n }", "@Override\n public void onClick(View view) {\n // Create a new intent\n Intent new_release_intent = new Intent(VietPopActivity.this, MainActivity.class);\n new_release_intent.putExtra(\"uniqueid\",\"from_viet\");\n // Start the new activity\n startActivity(new_release_intent);\n }", "@Override\n public void onClick(View v) {\n Intent opnWebIntent = new Intent(getActivity(), WebViewActivity.class);\n opnWebIntent.putExtra(\"url\", \"http://www.mbtabackontrack.com/performance/index.html#/home\");\n startActivity(opnWebIntent);\n }", "void onSuccessRedirection(Response object, int taskID);", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent web = new Intent(Intent.ACTION_VIEW);\n\t\t\t\tweb.setData(Uri.parse(url));\n\t\t\t\tstartActivity(web);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMap<String,String>map=new HashMap<String,String>();\n\t\t\t\tmap.put(\"videoID\", object.videoID);\n\t\t\t\tmap.put(\"videoname\", object.videoname);\n\t\t\t\tString albumVideoImgUrl=CommonUrl.baseUrl + object.videoImgUrl +\".small\"+ object.suffix;\n\t\t\t\tmap.put(\"videoImgUrl\", albumVideoImgUrl);\n\t\t\t\tCommonUtil.jumpToPlayerActivity(context, map);\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(ActivityIndex.this, ActivityTrialMessage.class);\n intent.putExtra(\"fromIndex\", true);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=207\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "void onSuccessRedirection(int taskID);", "public void redirectToPlan() {\n setResponsePage( new RedirectPage( \"plan\" ) );\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(FxService.this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(FxService.this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "public abstract String redirectTo();", "@Override\n\t\t\tpublic void onClick(View v){\n\t\t\t\tif (receiver==null) {\n\t\t\t\t\treceiver = new myReceiver();\n\t\t\t\t\tIntentFilter filter=new IntentFilter();\n\t\t\t\t\tfilter.addAction(\"com.chris.hadoop v\");\n\t\t\t\t\tmActivity.registerReceiver(receiver, filter);\n\t\t\t\t}\n\t\t\t\tIntent intent=new Intent(getActivity(),trafficMonitorService.class);\n\t\t\t\tmActivity.startService(intent);\n\t\t\t\tToast.makeText(mActivity,\" \",Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n final Channel channel;\n channel = channels.get(position);\n\n this.setupStalkerClient();\n\n String url = UrlSettings.getResUrl() + this.user_id + \"/tv-channels/\"+channel.channel_id + \"/link\";\n\n getAPILoader().loader(url, new StalkerLoader.OnJSONResponseCallback() {\n @Override\n public void onJSONResponse(boolean success, JSONObject response) {\n\n try {\n if (response.has(\"status\")) {\n\n String channelLink = response.getString(\"results\");\n Log.d(TAG, \"Channel LINK is: \" + channelLink);\n\n Intent player = new Intent();\n player.setAction(Intent.ACTION_VIEW);\n\n player.setDataAndType(Uri.parse(channelLink), \"video/*\");\n player.putExtra(\"title\", channel.name);\n player.putExtra(\"secure_uri\", true);\n startActivity(player);\n }\n\n if (response.has(\"error\")) {\n\n Toast.makeText(getActivity().getApplicationContext(), response.getString(\"error\"), Toast.LENGTH_LONG).show();\n }\n\n } catch (JSONException e) {\n\n Toast.makeText(getActivity().getApplicationContext(), \"Error in code..((\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n\n }\n\n Log.d(TAG, \"GET CHANNELS REQUEST COMPLETE: \" + response.toString());\n }\n });\n\n }", "public void Volver(View view){\n Intent principal = new Intent(this, Principal.class);\n startActivity(principal);\n finish();\n }", "private void redirectToMain() {\n\t\tIntent intent = new Intent(this, Main.class);\r\n\t\tstartActivity(intent);\r\n\t\tfinish();\r\n\t}", "public void onClick(View v) {\n\n Intent visitSite_intent = new Intent(MainActivity.this, DetailActivity.class);\n visitSite_intent.putExtra(\"url\",\"http://aanm-vvrsrpolytechnic.ac.in/\");\n startActivity(visitSite_intent);\n }", "public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, Setup.class);\n startActivity(intent);\n }", "public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, Setup.class);\n startActivity(intent);\n }", "public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, Setup.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n mFragment.setFadingEnabled(false);\n long programId = ((RecordedProgram) v.getTag()).getId();\n if (DEBUG) Log.d(TAG, \"Play Related Recording:\" + programId);\n Intent intent = new Intent(getContext(), DvrPlaybackActivity.class);\n intent.putExtra(Utils.EXTRA_KEY_RECORDED_PROGRAM_ID, programId);\n getContext().startActivity(intent);\n }", "@Override\r\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tIntent browseIntent = new Intent( Intent.ACTION_VIEW , Uri.parse(urlStr) );\r\n startActivity(Intent.createChooser(browseIntent, \"Connecting...\"));\r\n \t\t\t}", "@Override\n public void onServerStart(String videoStreamUrl)\n {\n\n\n\n Log.d(\"Activity\",\"URL: \"+ videoStreamUrl);\n\n\n video = (VideoView)findViewById(R.id.video);\n\n Uri uri = Uri.parse(videoStreamUrl);\n video.setVideoURI(uri);\n video.start();\n\n\n\n }", "public void startViewTripActivity() {\r\n\t\t\r\n\t\t// TODO - fill in here\r\n Intent intent = new Intent(this,TripHistoryActivity.class);\r\n startActivity(intent);\r\n\t}", "public void startVideoPlayer(Context context, String url) {\n Resource item = new Resource();\n item.setType(context.getString(R.string.typeVideo));\n item.setUrlMain(url);\n context.startActivity(PlayVideoFullScreenActivity.getStartActivityIntent(context, ConstantUtil.BLANK, ConstantUtil.BLANK, PlayVideoFullScreenActivity.NETWORK_TYPE_ONLINE, (Resource) item));\n }", "@Override\n public void onClick(View view) {\n Intent intent = MainActivity.newIntent(getActivity(), mMonitor.getId());\n startActivity(intent);\n\n }", "private static void redirectActivity(Activity activity, Class aClass) {\n Intent intent = new Intent(activity, aClass);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n activity.startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(NowPlaying.this, classDestination);\n // starting new activity\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartActivity(new Intent(OnePService.this, MainActivity.class)\n\t\t\t\t\t\t.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK\n\t\t\t\t\t\t\t\t| Intent.FLAG_ACTIVITY_CLEAR_TOP));\n\t\t\t\t// Toast.makeText(OnePService.this, \"onClick\",\n\t\t\t\t// Toast.LENGTH_SHORT)\n\t\t\t\t// .show();\n\t\t\t}", "void redirect(Reagent reagent);", "public void goToForecast(View view) {\n Intent myIntent = new Intent(MainActivity.this, Forecast.class);\n MainActivity.this.startActivity(myIntent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(activity, Honour_Activity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}", "public void goToStageActivity(View view)\n {\n Stage thisStage = stageHandler.getStage(1);\n if (thisStage != null)\n {\n Intent intent = new Intent(MainActivity.this, StageActivity.class);\n startActivity(intent);\n }\n else\n {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(MainActivity.this);\n alertDialog.setMessage(getString(R.string.noStages)).create().show();\n }\n }", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.zhy.socket.SocketClientDemoActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"1\");\n\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\tIntent webIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.google.com\"));\n\t\t\t\t\tcontext.startActivity(webIntent);\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/\"));\n startActivity(browserIntent);\n }", "@Override\n public void onClick(View v) {\n String Url= currentNews.getWebUrl();\n //sent intent to the website\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW);\n intent.addCategory(Intent.CATEGORY_BROWSABLE);\n intent.setData(Uri.parse(Url));\n getContext().startActivity(intent);\n }", "@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tSystem.out.println(\"播放网络上的音频\");\n\t\t\ttry {\n\n\t\t\t\tString path = catalogName + File.separator + videoName;\n\t\t\t\t// String path =\n\t\t\t\t// \"http://192.168.253.1:8080/httpGetVideo/5a3bbe53835ffd43/LoveStory.mp4\";\n\t\t\t\tConnectionDetector cd = new ConnectionDetector(\n\t\t\t\t\t\tHistoryVideoBroadcastActivity.this);\n\t\t\t\tLog.e(TAG, \"11111111111\");\n\t\t\t\tif (cd.isConnectingToInternet()) {\n\t\t\t\t\tMediaController mediaController = new MediaController(\n\t\t\t\t\t\t\tHistoryVideoBroadcastActivity.this); // 通过videoView提供的uri函数借口播放服务器视频\n\t\t\t\t\tmediaController.setAnchorView(videoView);\n\t\t\t\t\tUri video = Uri.parse(path);\n\t\t\t\t\tvideoView.setMediaController(mediaController);\n\t\t\t\t\tvideoView.setVideoURI(video);\n\t\t\t\t\tvideoView.start();\n\t\t\t\t} else {\n\t\t\t\t\tToast.makeText(HistoryVideoBroadcastActivity.this,\n\t\t\t\t\t\t\t\"网络连接没有开启,请设置网络连接\", 2000).show();\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tToast.makeText(HistoryVideoBroadcastActivity.this,\n\t\t\t\t\t\t\"Error connecting\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}", "@Override\r\n public void onClick(View v) {\n String path = \"http://techslides.com/demos/sample-videos/small.mp4\";\r\n// Uri uri=Uri.parse(path);\r\n// videoView.setVideoURI(uri);\r\n //MediaController mc = new MediaController(TransformDetailActivity.this);\r\n\r\n //videoView.start();\r\n// videoView.setOnTouchListener(new View.OnTouchListener() {\r\n// @Override\r\n// public boolean onTouch(View v, MotionEvent event) {\r\n// System.out.print(videoView.isPlaying());\r\n// if(videoView.isPlaying()) {\r\n// stopPosition[0] = videoView.getCurrentPosition();\r\n// videoView.pause();\r\n// } else {\r\n// videoView.seekTo(stopPosition[0]);\r\n// videoView.start();\r\n// }\r\n// return false;\r\n// }\r\n// });\r\n// String path = \"android.resource://\" + getPackageName() + \"/\" + R.raw.welcome;\r\n// Uri videoUri = Uri.parse(path);\r\n// Intent intent = new Intent(Intent.ACTION_VIEW, videoUri);\r\n// intent.setDataAndType(videoUri, \"video/*\");\r\n// startActivity(intent);\r\n\r\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(path));\r\n intent.setDataAndType(Uri.parse(path), \"video/mp4\");\r\n startActivity(intent);\r\n }", "public void toBeam(){\n Intent intent = new Intent(this, Beam.class);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent temptIntent=new Intent();\n\t\t\t\ttemptIntent.setClass(Login.this, ECGmain.class);\n\t\t\t\ttemptIntent.putExtra(USER, \"temp\");\n\t\t\t\tstartActivity(temptIntent);\n\t\t\t\tLogin.this.finish();\n\t\t\t}", "private void startControlRobotActivity(){\n Intent intent = new Intent(this, ControlRobotActivity.class );\n startActivity(intent);\n finish();\n }", "@Override\n public void onSuccess(Location location) {\n createVideo(location);\n }", "@Override\n public void onSuccess(Location location) {\n createVideo(location);\n }", "@Override\r\n\tprotected void onPostExecute(JSONObject result) {\n\t\tIntent i = new Intent(context,LiveRace.class);\r\n\t\ti.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\tcontext.startActivity(i);\r\n\r\n\t}", "public void startTripViewer() {\n\n\t\t// TODO - fill in here\n\t\tviewTripButton.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent viewTripIntent = new Intent(MainActivity.this,\n\t\t\t\t\t\tTripHistoryActivity.class);\n\t\t\t\tstartActivity(viewTripIntent);\n\t\t\t}\n\t\t});\n\t}", "public void ClickScanner(View view){\n MainActivity.redirectActivity(this,Scanner.class);\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tboolean isHave=\n\t\t\t\thasApplication(LoginActivity.this,\"com.hsic.tmj.myyhqworkspace\");\n\t\t\t\tif(!isHave){\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\tComponentName componetName = new ComponentName(\n\t\t\t\t\t\t//这个是另外一个应用程序的包名\n\t\t\t\t\t\t\"com.hsic.tmj.myyhqworkspace\",\n\t\t\t\t\t\t//这个参数是要启动的Activity\n\t\t\t\t\t\t\"com.hsic.tmj.myyhqworkspace.LoginActivity\");\n// Intent intent= new Intent(\"chroya.foo\");\n\t\t\t\tIntent intent= new Intent();\n\t\t\t\t//我们给他添加一个参数表示从apk1传过去的\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"arge1\", \"这是跳转过来的!来自apk1\");\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tintent.setComponent(componetName);\n\t\t\t\tstartActivity(intent);\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i_Alert = new Intent(AndroidExamples.this, RssActivity.class);\n\t\t\t\tstartActivity(i_Alert);\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.forecast_io_url)));\n startActivity(browserIntent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tUri webpage = Uri.parse(currentItem.getStoryUrl());\n\n\t\t\t\t// Create web browser intent\n\t\t\t\tIntent storyOnWebIntent = new Intent(Intent.ACTION_VIEW, webpage);\n\n\t\t\t\t// Check web activity can be handled by the device and start activity\n\t\t\t\tif (storyOnWebIntent.resolveActivity(mContext.getPackageManager()) != null) {\n\t\t\t\t\tmContext.startActivity(storyOnWebIntent);\n\t\t\t\t}\n\n\t\t\t}", "@Override\n public void onClick(View v) {\n try {\n launchActivity(MGERRIT, MGERRIT_MAIN_ENTRY);\n } catch (ActivityNotFoundException failToMarket) {\n launchUrl(MGERRIT_PLAYSTORE);\n }\n\n }", "private void toSpotActivity(int spotId) {\n\t\tIntent mIntent = new Intent(getApplicationContext(), SpotActivity.class);\n\t\tmIntent.putExtra(\"spot_number\", spotId+1);\n\t\tmIntent.putExtra(\"user_info\", user);\n\t\tstartActivity(mIntent);\n\t\tfinish();\n\t}", "@Override\n public void onClick(View v) {\n Intent cambioVentana = new Intent(Portada.this, MainActivity.class);\n startActivity(cambioVentana);\n }", "private void toWebViewActivity(){\n Intent toWebViewActivity = new Intent(this, AmazonActivity.class);\n startActivity(toWebViewActivity);\n }", "public static void watchYoutubeVideo(Context context, String id){\n Intent appIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(YOUTUBE_APP_BASE + id));\n Intent webIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(YOUTUBE_BASE_URL + id));\n\n // Add the additional flags to the intent\n // if your android version is below Android - 6 then you need to add this line otherwise it will work above Android - 6.\n // Bcs. of error: AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag.\n appIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n webIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n // If youtube is not installed, plays from web\n try {\n context.startActivity(appIntent);\n } catch (ActivityNotFoundException ex) {\n context.startActivity(webIntent);\n }\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.youtube.com/watch?v=\"+tmp.get(position).key)));\n\n\n\n }", "public static void searchYoutubeVideo(Context context, String id){\n Intent appIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"vnd.youtube:///results?q=\" + id));\n Intent webIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.youtube.com/results?search_query=\" + id));\n try {\n context.startActivity(appIntent);\n } catch (ActivityNotFoundException ex) {\n ex.printStackTrace();\n context.startActivity(webIntent);\n }\n }", "@Override\n public void onClick(View view) {\n Intent browser = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://petobesityprevention.org/\"));\n startActivity(browser);\n }" ]
[ "0.70342267", "0.6874477", "0.62083936", "0.613993", "0.60972124", "0.6046798", "0.6023078", "0.5999179", "0.59814596", "0.5923183", "0.5904467", "0.57863855", "0.5773357", "0.5766257", "0.5764521", "0.5745289", "0.5727495", "0.569849", "0.5689539", "0.5652518", "0.56521475", "0.5644185", "0.5643823", "0.5637303", "0.5608423", "0.5598841", "0.5592258", "0.5584038", "0.5581236", "0.55722314", "0.55651957", "0.5564536", "0.5563351", "0.5559121", "0.5547854", "0.5547553", "0.5547166", "0.5546683", "0.5545876", "0.55458415", "0.55426556", "0.55376875", "0.55327606", "0.5528583", "0.5526513", "0.55030376", "0.5501666", "0.5499566", "0.54986644", "0.5497304", "0.54947674", "0.54914516", "0.54914516", "0.54824555", "0.5479384", "0.54731023", "0.5457614", "0.5452115", "0.54487205", "0.5444721", "0.5444721", "0.5444721", "0.5442717", "0.5440164", "0.5439542", "0.54286397", "0.54282105", "0.54214627", "0.5410665", "0.54105896", "0.5406415", "0.5398594", "0.5397807", "0.53921497", "0.5387455", "0.53799707", "0.53798646", "0.53771126", "0.5366117", "0.53597295", "0.5356476", "0.53559077", "0.5353923", "0.5353005", "0.53488266", "0.53488266", "0.53486663", "0.53443027", "0.5339468", "0.5339202", "0.5338596", "0.5328741", "0.5323732", "0.53175485", "0.5306972", "0.53031904", "0.5300447", "0.52998614", "0.5294338", "0.5293972", "0.5285877" ]
0.0
-1
Redirect activity to about us
public void ClickAboutUs(View view){ redirectActivity(this,AboutUs.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void redirectTO() {\n\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n\n finish();\n }", "public void showAbout() {\n\t\t/* track \"About\" */\n\t\ttracker.trackEvent(\"Listings\", \"Click\", \"About\", 0);\n\n\t\tUri uri = Uri.parse(\"http://static.flipzu.com/about-android.html\");\n\t\tIntent intent = new Intent(Intent.ACTION_VIEW, uri);\n\t\tstartActivity(intent);\n\t}", "private void openAbout() {\r\n \tIntent intent = new Intent(this, AboutActivity.class);\r\n \tstartActivity(intent);\r\n }", "public abstract String redirectTo();", "public void GoToAbout(View view) {\n Intent intent = new Intent(this, About.class);\n startActivity(intent);\n }", "public void showAbout(View view){\n startActivity(intent);\n }", "public void onClickAbout(View view) {\n Intent intent = new Intent(this, AboutActivity.class);\n startActivity(intent);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch(item.getItemId()){\n\t\tcase R.id.aboutUs:\n\t\t\tIntent a=new Intent(getApplicationContext(),About.class);\n\t\t\tstartActivity(a);\n\t\t\tbreak;\n\t\t case R.id.exit:\n\t\t\t\tfinish();\n\t\t\t\tbreak;\n\t\t\t}\n\t\treturn false;\n\t}", "private void SendUserToInfoPage(){\n Intent intent = new Intent(sign_up_activity.this,user_info_activity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_CLEAR_TASK);\n overridePendingTransition(0,0);\n startActivity(intent);\n finish();\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_about:\n \t \t//Toast.makeText(getApplicationContext(),\"Show About\", Toast.LENGTH_LONG).show();\n \t \tAboutDialog about = new AboutDialog(this);\n \t \tabout.setTitle(\"About Streetview\");\n \t\t\t\tabout.show();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "public void redirectHome(View v) {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "public void ClickHome(View view){\n MainActivity.redirectActivity(this,MainActivity.class);\n\n }", "@Override\r\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"个人中心\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t}", "public void onClick(View v) {\n\t\t\t\tIntent intent=new Intent(MainActivity.this,about.class);\n\t\t intent.setAction(\"about\");\n\t\t showactivity(intent);\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.gteducation.in\"));\n startActivity(intent);\n Toast.makeText(NoticeActivity.this,\"go to my website\",Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/privacy\"));\n startActivity(browserIntent);\n }", "private void showAboutActivity(String name){\n Intent i = new Intent(this, WelcomeActivity.class);\n i.putExtra(\"userName\",name);\n //se muestra la segunda actividad\n startActivity(i);\n\n\n }", "@Override\n public void onClick(View view) {\n Intent i = new Intent(HelpActivity.this, HomeActivity.class);\n startActivity(i);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent =new Intent();\n\t\t\t\tintent.setClass(mContext, AboutActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "public void toNeedymap (View v){\n Intent i = new Intent(Startup_menu_activity.this,web_page.class);\n startActivity(i);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_who) {\n\n Uri uri = Uri.parse(\"http://instagram.com/_u/mohammadreza2012\");\n Intent likeIng = new Intent(Intent.ACTION_VIEW, uri);\n\n likeIng.setPackage(\"com.instagram.android\");\n\n try {\n startActivity(likeIng);\n } catch (ActivityNotFoundException e) {\n startActivity(new Intent(Intent.ACTION_VIEW,\n Uri.parse(\"http://instagram.com/mohammadreza2012\")));\n }\n return true;\n }\n if (id == R.id.action_about) {\n startActivity(new Intent(MainActivity.this, ActivityAbout.class));\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void onClickAbout (View v)\n\t{\n\t\tstartActivity (new Intent(getApplicationContext(), AboutViewController.class));\n\t}", "public static void goToAboutWindow()\n {\n AboutWindow aboutWindow = new AboutWindow();\n aboutWindow.setVisible(true);\n aboutWindow.setFatherWindow(actualWindow, false);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n switch (item.getItemId()) \n { \n case android.R.id.home:\n Intent intenthome = new Intent(ctx, AdminClubActivity.class);\n startActivity(intenthome); \n return true;\n \n case R.id.action_home:\n Intent intent = new Intent(ctx, MainActivity.class);\n startActivity(intent); \n return true;\n \n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public void onClick(View view) {\n Intent Getintent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://feedback.avriant.com\"));\n startActivity(Getintent);\n }", "void redirect();", "@Test\n\tpublic void testRedirectToAboutUs() {\n\t\tServicesLogic.redirectToAboutUs();\n\t}", "private void redirectToMain() {\n\t\tIntent intent = new Intent(this, Main.class);\r\n\t\tstartActivity(intent);\r\n\t\tfinish();\r\n\t}", "@Override\n public void performAction(View view) {\n startActivity(new Intent(MainActivity.this, MyInfoActivity.class));\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tsuper.onOptionsItemSelected(item);\n\t\tLog.v(\"menu\",\"onOptionsItemSelected \"+item.getItemId());\n\t\tswitch (item.getItemId()) {\n\n\t\tcase MENU_ABOUT:\n\t\t\ttry\n\t\t\t{\n\n\t\t\t\tIntent in1 = new Intent(this, com.mobiperf.lte.ui.About.class);\n\t\t\t\tstartActivityForResult(in1, 0);\n\t\t\t}\n\t\t\tcatch(ActivityNotFoundException e)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please send us an email at MobiPerf@umich.edu\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\n\t\treturn true;\n\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n if (id ==R.id.action_userinfo) {\n Intent i=new Intent(this,Information.class) ;\n startActivity(i);\n\n return true;\n }\n\n if (id ==R.id.action_urgencycontact) {\n Intent i=new Intent(this,EmergencyContact.class) ;\n startActivity(i);\n return true;\n }\n\n if (id == R.id.action_logout) {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_about) {\n startActivity(new Intent(getApplicationContext(), aboutActivity.class));\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "private void redirectToLandingPage(){\n\t\tappInjector.getAppService().getLoggedInUser(new SimpleAsyncCallback<UserDo>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(UserDo loggedInUser) {\n\t\t\t\tAppClientFactory.setLoggedInUser(loggedInUser);\n\t\t\t\tUcCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tHomeCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tAppClientFactory.getInjector().getWrapPresenter().get().setLoginData(loggedInUser);\n\t\t\t\tif (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.STUDENT)){\n\t\t\t\t\t\n\t\t\t\t}else if(AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.SHELF)){\n\t\t\t\t\tAppClientFactory.fireEvent(new DisplayNoCollectionEvent());\n\t\t\t\t}else{\n\t\t\t\t\tMap<String, String> params = new HashMap<String,String>();\n\t\t\t\t\tparams.put(\"loginEvent\", \"true\");\n\t\t\t\t\tappInjector.getPlaceManager().revealPlace(PlaceTokens.HOME, params);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.about) {\n Intent aboutIntent=new Intent(MainActivity.this,AboutActivity.class);\n startActivity(aboutIntent);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "private void toCreateAcc() {\n Intent intent = new Intent(this, WelcomeActivity.class);\n startActivity(intent);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == ABOUT) {\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // navigate to the about page\n case R.id.about_page:\n startActivity(new Intent(getApplicationContext(), AboutActivity.class));\n return true;\n // go to employee contacts page\n case R.id.employee_contacts_page:\n startActivity(new Intent(getApplicationContext(), EmployeeContactsActivity.class));\n return true;\n case R.id.user_info_page:\n startActivity(new Intent(getApplicationContext(), UserInfoActivity.class));\n return true;\n case R.id.login_page:\n startActivity(new Intent(getApplicationContext(), LoginActivity.class));\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(GuideActivity.this,MainActivity.class);\r\n\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NO_USER_ACTION);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\tMyApplication.getApp().getSysSpUtil().setIsFirstTime(false);\r\n\t\t\t\tfinish();\r\n\t\t\t}", "protected void aboutUs(ActionEvent ae) {\n\t\tString info = \"【猿来入此】出品\\n\";\n\t\tinfo += \"网址:http://programmer.ischoolbar.com \\n\";\n\t\tinfo += \"每天更新一个项目,并附带视频教程!\";\n\t\tString[] buttons = {\"迫不及待去看看!\",\"心情不好以后再说!\"};\n\t\tint ret = JOptionPane.showOptionDialog(this, info, \"关于我们\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.DEFAULT_OPTION, new ImageIcon(LoginFrm.class.getResource(\"/images/logo.png\")), buttons, null);\n\t\tif(ret == 0){\n\t\t\t//采用Java 调用系统浏览器打开制定\n\t\t\ttry {\n\t\t\t\tURI uri = new URI(\"http://programmer.ischoolbar.com\");\n\t\t\t\tDesktop.getDesktop().browse(uri);\n\t\t\t\t//Runtime.getRuntime().exec(\"explorer http://programmer.ischoolbar.com\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}else{\n\t\t\tJOptionPane.showMessageDialog(this, \"你真是狠心,坏淫!\");\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n Intent i = new Intent(getApplicationContext(), AboutUs.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n// Handle action bar item clicks here. The action bar will\n// automatically handle clicks on the Home/Up button, so long\n// as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n//noinspection SimplifiableIfStatement\n// Display menu item's title by using a Toast.\n if (id == R.id.action_settings1) { //logout\n Toast.makeText(getApplicationContext(), \"User Menu1\", Toast.LENGTH_SHORT).show();\n finish();\n exit(0);\n return true;\n } else if (id == R.id.action_user) { //back\n if(Typeinfo.equals(\"qlinks\")) {\n\n finish();\n }else{\n Intent i = new Intent(this,OutageInfoActivity.class);\n this.startActivity(i);\n // finish();\n }\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n \t switch (item.getItemId()) {\n \t case 0:{\n \t \t Intent viewIntent = new Intent(\"android.intent.action.VIEW\", \n\t\t\t\t\t\t Uri.parse(\"http://www.newconex.heliohost.org/contatos.php\"));\n\t\t\t\t startActivity(viewIntent);\t\t\t\n \t }case 1:{\n \t \t this.finish();\n \t }\n \t \n \t }\n \t return true;\n \t}", "public void gotoProfileActivity()\n {\n Log.e(\"next\",\"\"+\"log\");\n startActivity(new Intent(OTPActivity.this, UserProfileActivity.class));\n finish();\n }", "void redirectToNotification();", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.logOutLink:\n Intent logOut = new Intent(PatientOptionScreen.this, HomeScreen.class);\n logOut.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(logOut);\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "private void goMainActivity() {\n Intent i = new Intent(this, ProfileActivity.class);\n startActivity(i);\n\n //prevents user going back to this screen after signing up\n finish();\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch (id){\n case R.id.action_about:\n Intent intent = new Intent(MainActivity.this,About.class);\n startActivity(intent);\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case R.id.home:\r\n startActivity(new Intent(this, welcomeActivity.class));\r\n return true;\r\n case R.id.out:\r\n signOut();\r\n Toast.makeText(getApplicationContext(), \"You have signed out!\", Toast.LENGTH_SHORT).show();\r\n startActivity(new Intent(this, LoginActivity.class));\r\n return true;\r\n case R.id.back:\r\n //startActivity(new Intent(this, welcomeActivity.class));\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n Intent intent = new Intent(\n Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "void redirect(ReagentSynonym synonym);", "@Subscribe\n public void onAboutUrlClicked(AboutUrlClicked aboutUrlClicked) {\n if ((PackageUtils.isPackageInstalled(GOOGLE_PLUS_PACKAGE) &&\n aboutUrlClicked.getAboutItem().getTitle().equals(App.CONTEXT.getString(R.string.google_plus))) ||\n PackageUtils.isPackageInstalled(TWITTER_PACKAGE) &&\n aboutUrlClicked.getAboutItem().getTitle().equals(App.CONTEXT.getString(R.string.twitter)) ||\n PackageUtils.isPackageInstalled(PLAY_STORE_PACKAGE) &&\n aboutUrlClicked.getAboutItem().getTitle().equals(App.CONTEXT.getString(R.string.play_store_apps))) {\n\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(aboutUrlClicked.getAboutItem().getUrl()));\n startActivity(i);\n } else {\n // because Custom Tabs are the way to go amirite?\n CustomTabActivityHelper.openCustomTab(\n this,\n new CustomTabsIntent.Builder()\n .setToolbarColor(ContextCompat.getColor(App.CONTEXT, R.color.accent))\n .addDefaultShareMenuItem()\n .enableUrlBarHiding()\n .build(),\n Uri.parse(aboutUrlClicked.getAboutItem().getUrl()));\n }\n }", "private void gotoUserProfile() {\n Intent launchUserProfile = new Intent(this, Profile.class);\n startActivity(launchUserProfile);\n }", "public void onClickAbout (View v)\n{\n startActivity (new Intent(getApplicationContext(), AboutActivity.class));\n}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_about) {\n startActivity(new Intent(MainActivity.this, ActivityAbout.class));\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void redirect() {\n\t\tRequestContext context = RequestContext.getCurrentInstance();\n\t\tString ruta = \"\";\n\t\truta = MyUtil.basepathlogin() + \"inicio.xhtml\";\n\t\tcontext.addCallbackParam(\"ruta\", ruta);\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(activity, Honour_Activity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case R.id.home:\r\n startActivity(new Intent(this, welcomeActivity.class));\r\n return true;\r\n case R.id.out:\r\n signOut();\r\n Toast.makeText(getApplicationContext(), \"You have signed out!\", Toast.LENGTH_SHORT).show();\r\n startActivity(new Intent(this, LoginActivity.class));\r\n return true;\r\n case R.id.back:\r\n //startActivity(new Intent(this, MainActivity.class));\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_about) {\n Intent start_about = new Intent(this, AboutActivity.class);\n startActivity(start_about);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void onClick(View view) {\n Intent browser = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://petobesityprevention.org/\"));\n startActivity(browser);\n }", "private void goToDoctors() {\n\n Intent intent = new Intent(this, DoctorsActivity.class);\n intent.putExtra(EXTRA_EMAIL, email);\n startActivity(intent);\n\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case R.id.action_help:\r\n Intent help = new Intent(facebookplaces.this,appinstr.class);\r\n startActivity(help);\r\n return true;\r\n default:\r\n // If we got here, the user's action was not recognized.\r\n // Invoke the superclass to handle it.\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "private void gotoInfo() {\n Intent launchInfo = new Intent(this, Info.class);\n startActivity(launchInfo);\n }", "private void navigationAdminScreen(UserInfo usn) {\n finish();\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch(item.getItemId()){\n\t\tcase R.id.aboutus:\n\t\t\tIntent about=new Intent(Menu.this,AboutUs.class);\n\t\t\tstartActivity(about);\n\t\t\t\n\t\t\tbreak;\n\t\tcase R.id.pre:\n\t\t\tIntent pre=new Intent(Menu.this,Prefs.class);\n\t\t\tstartActivity(pre);\n\t\t\tbreak;\n\t\tcase R.id.exit:finish();\n\t\t\tbreak;\n\t\tcase R.id.ma:Intent a=new Intent(Menu.this,hehhehe.class);\n\t\tstartActivity(a);\n\t\tbreak;\n\t\t}\n\t\treturn false;\n\t}", "private void goSomewhere() {\n\n Intent intent = new Intent();\n intent.setClassName(Home.this,this.tip.getTipIntent());\n startActivity(intent);\n }", "public void tohome (View view){\n Intent i = new Intent(this,Intro.class);\n startActivity(i);\n }", "@Override\n public void goToEvent() {\n startActivity(new Intent(AddGuests.this, DetailEventRequest.class)); }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == R.id.action_about) {\n\t\t\taboutDialog.show();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "public void onAboutItemClick(MenuItem item) {\n AboutActivity fragment = new AboutActivity();\n presentFragment(fragment,\"about\",false);\n }", "@Override\n public void sendRedirect(String arg0) throws IOException {\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_about) {\n Intent aboutIntent = new Intent(getApplicationContext(),AboutActivity.class);\n startActivity(aboutIntent);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.action_info) {\n Intent myIntent = new Intent(EmergencyContactActivity.this, InfoActivity.class);\n startActivity(myIntent);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n Intent intent = new Intent(this, aboutApp.class);\n startActivity(intent);\n return true;\n }\n\n if (id == R.id.scrollView) {\n Intent intent1 = new Intent(this, aboutAuthers.class);\n startActivity(intent1);\n\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == R.id.about) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent=new Intent();\n\t\t\t\tintent.putExtra(\"isFirstInfo\", 1);\n\t\t\t\tintent.setClass(mContext, HelpActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item)\n\t{\n\t\tsuper.onOptionsItemSelected(item);\n\t\tswitch(item.getItemId())\n\t\t{\n\t\t\n\t\tcase R.id.ABOUT:\n\t\t\tIntent intentAbout = new Intent(\"rahulapps.apihelp.Settings.AboutAPI\");\n\t\t\tstartActivity(intentAbout);\n\t\t\tbreak;\n\t\t\t\n\t\tcase R.id.COMMENT:\n\t\t\tIntent intentComment = new Intent(\"rahulapps.apihelp.Settings.CommentAPI\");\n\t\t\tstartActivity(intentComment);\n\t\t\tbreak;\n\t\t\t\n\t\tcase R.id.EXIT:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\t}\n\t\treturn false;\n\t}", "public void onClick(View v) {\n Intent intent = new Intent(SettingsActivity.this, AboutActivity.class);\n startActivity(intent);\n\n // MainActivity.this.startActivity(activityChangeIntent);\n }", "@Override\r\n public void onClick(View view) {\n Intent intent = new Intent(GuidePage.this, LoginOrRegister.class);\r\n startActivity(intent);\r\n }", "@Override\n public void userPageViewConcerts() {\n Intent intent = new Intent(userPageModel.this, viewConcertsPageModel.class);\n startActivity(intent);\n }", "private void goToHome() {\n finish();\n Intent onPropertyView = new Intent(ChatMessage.this, MainActivity.class);\n startActivity(onPropertyView);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n// Handle action bar item clicks here. The action bar will\n// automatically handle clicks on the Home/Up button, so long\n// as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n//noinspection SimplifiableIfStatement\n// Display menu item's title by using a Toast.\n if (id == R.id.action_settings1) { //logout\n Toast.makeText(getApplicationContext(), \"User Menu1\", Toast.LENGTH_SHORT).show();\n finish();\n exit(0);\n return true;\n } else if (id == R.id.action_user) { //back\n if(compinfo.equals(\"reg\")) {\n Intent i = new Intent(this,MainActivity.class);\n this.startActivity(i);\n finish();\n }else{\n\n }\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.SamePlacesCommunity.Main.UserServiceActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"2\");\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tnew AlertDialog.Builder(Portal.this)\n\t\t\t\t.setTitle(R.string.about_me)\n\t\t\t\t.setMessage(R.string.about_me_message)\n\t\t\t\t.setNeutralButton(R.string.close, new DialogInterface.OnClickListener() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.show();\n\t\t\t}", "private void openHome() {\n Intent intent = new Intent(this, WelcomeActivity.class);\n startActivity(intent);\n\n finish();\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\r\n\t\tif (id == R.id.action_settings) {\r\n\t\t\tIntent intent = new Intent(this, AboutActivity.class);\r\n\t\t\tstartActivity(intent);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_about) {\n Intent intent = new Intent(this, AboutActivity.class);\n startActivity(intent);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void onClick(View v) {\n\t\t\t\t\t\t\tIntent gotohomefrommyaccount = new Intent(UserProfileActivity.this, HomeActivity.class);\n\t\t\t\t\t\t\tstartActivity(gotohomefrommyaccount);\n\t\t\t\t\t\t}", "public void onClick(View v) {\n\t\tIntent in1=new Intent(getApplicationContext(),About.class);\n\t\tstartActivity(in1);\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_info:\n Intent myIntent = new Intent(this, Members.class);\n this.startActivity(myIntent);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_settings:\n\n startActivity(new Intent(ListViewCompany.this, Help.class));\n\n return true;\n\n default:\n\n return super.onOptionsItemSelected(item);\n }\n }", "public void GoInfo(View view) {\n Intent a = new Intent(MainActivity.this, Info.class);\n startActivity(a);\n }", "public void onClick(View v) {\n Intent intent = new Intent();\n intent.setClass(memberinfo.this, home_page.class);\n startActivity(intent);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == R.id.action_Index)\n {\n Intent Intent = new Intent();\n Intent.setClass(this, MainActivity.class);\n startActivity(Intent);\n }\n else if (id == R.id.action_settings) {\n return true;\n }\n else if(id == R.id.action_about)\n {\n AlertDialog.Builder AuthorAbout = new AlertDialog.Builder(this);\n\n AuthorAbout.setTitle(\"關於本系統作者\");\n AuthorAbout.setMessage(\"管理員 歐晉佑\");\n\n DialogInterface.OnClickListener AboutListener = new DialogInterface.OnClickListener()\n {\n public void onClick(DialogInterface di,int i)\n {\n Toast t = Toast.makeText(SystemIndexActivity.this,\"Hellow\",Toast.LENGTH_SHORT);\n t.show();\n }\n };\n AuthorAbout.setPositiveButton(\"我了解了\", AboutListener);\n AuthorAbout.show();\n }\n else if (id == R.id.action_reset)\n {\n\n }\n return super.onOptionsItemSelected(item);\n }", "public String redirectToWelcome() {\r\n\t\treturn \"/secured/wissenstest.xhtml?faces-redirect=true\";\r\n\t}", "public void onClick(View v) {\n\n Intent visitSite_intent = new Intent(MainActivity.this, DetailActivity.class);\n visitSite_intent.putExtra(\"url\",\"http://aanm-vvrsrpolytechnic.ac.in/\");\n startActivity(visitSite_intent);\n }", "@Override\r\n\tpublic void onClick(View v) {\n\t\tIntent intent=new Intent(LookMyDataPrivacyActivity.this, MydataPrivacyActivity.class);\r\n\t\tswitch (v.getId()) {\r\n\t\tcase R.id.self_info:// 个人电话、详细地址及邮箱\r\n\t\t\tintent.putExtra(\"title\", \"个人电话、详细地址及邮箱\");\r\n\t\t\tstartActivity(intent);\r\n\t\t\tbreak;\r\n\t\tcase R.id.which_org:// 所在组织\r\n\t\t\tintent.putExtra(\"title\", \"所在组织\");\r\n\t\t\tstartActivity(intent);\r\n\t\t\tbreak;\r\n\t\tcase R.id.member_information:// 会员信息\r\n\t\t\tintent.putExtra(\"title\", \"会员信息(认证信息、等级)\");\r\n\t\t\tstartActivity(intent);\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "protected void aboutUs(ActionEvent ae) {\n\t\tString info =\"欢迎您使用该系统!!!\\n\";\n\t\tinfo +=\"愿为您提供最好的服务!\\n\";\n\t\tinfo +=\"最好的防脱发洗发水!!!\";\n\t\t//JOptionPane.showMessageDialog(this,info);\n\t\tString[] buttons = {\"迫不及待去看看!\",\"心情不好以后再说!\"};\n\t\tint ret=JOptionPane.showOptionDialog(this, info,\"关于我们\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.DEFAULT_OPTION, new ImageIcon(LoginFrm.class.getResource(\"/images/logo.png\")), buttons, null);\n\t\tif(ret==0) \n\t\t{\n\t\t\ttry {\n\t\t\t\tURI uri = new URI(\"https://s.taobao.com/search?q=%E9%98%B2%E8%84%B1%E5%8F%91%E6%B4%97%E5%8F%91%E6%B0%B4&imgfile=&commend=all&ssid=s5-e&search_type=item&sourceId=tb.index&spm=a21bo.2017.201856-taobao-item.1&ie=utf8&initiative_id=tbindexz_20170306\");\n\t\t\t\tDesktop.getDesktop().browse(uri);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse \n\t\t{\n\t\t\tJOptionPane.showMessageDialog(this, \"你真是狠心,坏淫!\");\n\t\t}\n\t}", "@RequestMapping(value = {\"/about\"}, method = RequestMethod.GET)\n public String aboutPage(ModelMap model) {\n model.addAttribute(LOGGED_USER, userService.getPrincipal());\n return ABOUT;\n }", "void redirect(Reagent reagent);" ]
[ "0.67323864", "0.6460909", "0.6406225", "0.6378512", "0.6366065", "0.63627136", "0.61971825", "0.61725336", "0.6150022", "0.60970765", "0.60799426", "0.60747993", "0.6022411", "0.60027534", "0.5985361", "0.5960112", "0.5950726", "0.59496564", "0.5949003", "0.59387195", "0.59319377", "0.59209114", "0.59024525", "0.5897846", "0.5896761", "0.5889709", "0.58682835", "0.5847961", "0.58440346", "0.58410466", "0.5839926", "0.58317584", "0.5831532", "0.58242893", "0.5820871", "0.5810026", "0.580469", "0.58028466", "0.5795456", "0.5793594", "0.57926816", "0.57877415", "0.5773645", "0.57703674", "0.5769075", "0.5763597", "0.5763538", "0.5755901", "0.57534385", "0.5750052", "0.5748563", "0.5748335", "0.5741844", "0.5739584", "0.57370824", "0.57360226", "0.57225734", "0.5720615", "0.57155526", "0.5710632", "0.5709552", "0.56999487", "0.5695812", "0.56934106", "0.5693358", "0.56908846", "0.56872135", "0.56858253", "0.5685145", "0.56834066", "0.56779873", "0.5674996", "0.5672717", "0.56682444", "0.5667103", "0.5666356", "0.5665956", "0.5659588", "0.5657608", "0.5657389", "0.5656946", "0.56546116", "0.5643552", "0.56387925", "0.5635821", "0.56352276", "0.5633141", "0.5625532", "0.5619891", "0.56089425", "0.560666", "0.55921644", "0.5583789", "0.5579067", "0.5569856", "0.5569796", "0.5567242", "0.5564561", "0.5563087", "0.5562386" ]
0.7209008
0
Close app Redirect back to login page
public void ClickLogout(View view ){ logout(); intent = new Intent(context,LoginActivity.class); //remove all previous stack activities intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void logout() {\n ((MyApplication)this.getApplication()).setLoggedIn(false);\n// Intent intent = new Intent(this, StartupActivity.class);\n// startActivity(intent);\n }", "private void takeUserToLoginScreenOnUnAuth() {\n Intent intent = new Intent(BaseActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n }", "private void signOut(){\n LoginSharedPreference.endLoginSession(this);\n Intent intent = new Intent(this,LoginActivity.class);\n startActivity(intent);\n finish();\n }", "private void Logout() {\n\n\t\tPreferenceUtil.getInstance(mContext).saveBoolean(\"exitApp\", true);\n\t\tPreferenceUtil.getInstance(mContext).clear();\n\t\tPreferenceUtil.getInstance(mContext).destroy();\n\n\t\tZganLoginService.toClearZganDB();\n\n\t\tstopService(new Intent(mContext, ZganPushService.class));\n\n\t\tsetContentView(R.layout.nullxml);\n\t\tfinish();\n\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\n\t\tSystem.exit(0);\n\t}", "private void logout() {\n\t\tgetUI().get().navigate(\"login\");\r\n\t\tgetUI().get().getSession().close();\r\n\t}", "public void logOut(){\n Intent intent=new Intent( getApplicationContext(), Login.class );\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity( intent );\n progressDialog.dismiss();\n finish();\n }", "public void logOut() {\n\t\t// Close all opened windows and start up the App again\n\t\tcurrentUser = null;\n\t\tcurrentContact = null;\n\t\tjava.awt.Window win[] = java.awt.Window.getWindows();\n\t\tfor (int i = 0; i < win.length; i++) {\n\t\t\twin[i].dispose();\n\t\t}\n\t\tApp.main(null);\n\t}", "private void logout() {\n fbAuth.signOut();\n startActivity(new Intent(getApplicationContext(), LoginActivity.class));\n finish();\n }", "public void onClickExit(View view) {\n BYPASS_LOGIN = false;\n\n //finish activity\n super.finish();\n\n //close all activities\n ActivityCompat.finishAffinity(this);\n\n //log out of google play services\n super.signOut();\n }", "private void logout() {\n userModel.setLoggedInUser(null);\n final Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n finish();\n }", "@Override\n public void run(){\n Intent homeIntent = new Intent(MainActivity.this,login_page.class);//splashes to the login page.\n startActivity(homeIntent);\n finish();\n }", "protected void logout() {\n\t\tActiveUserModel userController = ActiveUserModel.getInstance();\n\t\tuserController.performLogout();\n\n\t\tIntent intent = new Intent(this, LoginActivity.class);\n\t\tstartActivityForResult(intent, LOGIN_ACTIVITY);\n\t}", "public void backToLoginWindow(ActionEvent event) {\n loadLogin();\n // hides current stage (window)\n ((Node) (event.getSource())).getScene().getWindow().hide();\n\n }", "private void logout(){\n ParseUser.logOut();\n removeUserFromPrefs();\n Intent intent = LandingActivity.intent_factory(this);\n startActivity(intent);\n }", "public void logOut() {\n\t\t//Inform the database that the user want to log out\n\t\tdc.logOutPlayer(activity);\n\t\t\n\t\t/*\n\t\t * Call is made to StartActivity, which surely is in the bottom of activity-stack. Add a flag to clear stack\n\t\t * and from StartActivity a call is made to the Login screen and StartActivity is finished. By doing this we\n\t\t * assure that Login screen is at the bottom of the activity-stack and a press on back button, while placed \n\t\t * on Login screen, will result in that the application is closed\n\t\t */\n\t\tIntent intent = new Intent(activity, StartActivity.class);\n\t\tintent.putExtra(\"finish\", true);\n\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\tactivity.startActivity(intent);\n\t\tactivity.finish();\n\t}", "@Override\r\n public void onLogout() {\n Intent loginIntent = new Intent(CreateAccount.this, MainActivity.class);\r\n startActivity(loginIntent);\r\n finish();\r\n }", "private void logoutUser() {\n\t\tsession.setLogin(false);\n\n\n\t\t// Launching the login activity\n\t\tIntent intent = new Intent(EnterActivity.this, LoginActivity.class);\n\t\tstartActivity(intent);\n\t\tfinish();\n\t}", "@FXML\n void goToLoginPage(ActionEvent event) {\n closeWindow();\n }", "public void voltarLogin(View view){\n finish();\n }", "private void redirectLoginScreen() {\n Log.d(TAG, \"redirectLoginScreen: redirecting to login screen.\");\n Intent intent = new Intent(Register.this, LogIn.class);\n startActivity(intent);\n finish();\n }", "private void returnToLoginActivity() {\n Intent returnToLogin = new Intent(this, Login.class);\n startActivity(returnToLogin);\n finish();\n }", "public void logOut() {\n try {\n // getGlobalNavigation().clickSignOut();\n } catch (TimeoutException e) {\n Log.log(\"logOut\", \"page loads for more than 30 seconds\", true);\n }\n }", "private void goToLoginPage() {\n\n startActivity(new Intent(this,LoginActivity.class));\n finish();\n }", "private void logout() {\n\t\tParseUser.logOut();\n\n\t\t// Go to the login view\n\t\tstartLoginActivity();\n\t}", "public Result logOut() {\n customerService().logout();\n return redirectToReturnUrl();\n }", "public void logout() {\n updateToken(\"\");\n startActivity(new Intent(GarageListActivity.this, LoginScreenActivity.class));\n updateToken(\"\");\n finish();\n }", "public void logout() {\n \n FacesContext.getCurrentInstance().getExternalContext().invalidateSession();\n try {\n FacesContext.getCurrentInstance().getExternalContext()\n .redirect(\"/BookStorePelikSangat/faces/admin/loginadmin.xhtml\");\n } \n catch (IOException e) {}\n\t}", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(MainActivity.this, Login.class);\n startActivity(intent);\n finish();\n }", "private void logout() {\n Utils.showConfirmationDialogCallBack(MainActivity.this, getString(R.string.logout_sure), this);\n }", "public void logOutOnClick(View view)\n {\n Intent mainIntent = new Intent(SettingsActivity.this, AppLoginActivity.class);\n mainIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n FirebaseAuth.getInstance().signOut();\n startActivity(mainIntent);\n finish();\n }", "@Override\n public void onClick(View v) {\n LoginActivity.this.finish();\n }", "private void GoToLogin() {\n\t\tstartActivity(new Intent(this, LoginActivity.class));\r\n\t\tapp.user.sessionID = \"\";\r\n\t\tMassVigUtil.setPreferenceStringData(this, \"SESSIONID\", \"\");\r\n\t}", "public void logout() {\n // Mengambil method clear untuk menghapus data Shared Preference\n editor.clear();\n // Mengeksekusi perintah clear\n editor.commit();\n // Membuat intent untuk berpindah halaman\n Intent intent = new Intent(context, LoginActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n context.startActivity(intent);\n }", "public void logout() {\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(AppConfig.SHARED_PREF_NAME, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.clear();\n editor.apply();\n mCtx.startActivity(new Intent(mCtx, LoginActivity.class));\n }", "@Override\n public void doLogout() {\n // Toast.makeText(getApplicationContext(),\"Session Expired\",Toast.LENGTH_SHORT).show();\n Intent intent=new Intent(getApplicationContext(), activity_Login.class);\n startActivity(intent);\n }", "private void LogOut() {\n FirebaseAuth.getInstance().signOut();\n Intent intToMain = new Intent(getActivity(),LoginActivity.class);\n startActivity(intToMain);\n }", "@Override\n public void doLogout() {\n // Toast.makeText(getApplicationContext(),\"Session Expired\",Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(getApplicationContext(), activity_Login.class);\n startActivity(intent);\n }", "public void logout() {\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.clear();\n editor.apply();\n Intent myIntent = new Intent(mCtx, LoginActivity.class);\n myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n mCtx.startActivity(myIntent);\n }", "@Override\r\n\tpublic void onBackPressed() {\r\n\t\tsuper.onBackPressed();\r\n\t\tlogout();\r\n\t}", "@FXML\n void OnActionLogout(ActionEvent event) {\n System.exit(0);\n }", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(Activity_Main.this, Activity_Login.class);\n startActivity(intent);\n finish();\n }", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(this, Login.class);\n startActivity(intent);\n finish();\n }", "public void logout() {\r\n SharedPreferences sharedPreferences = ctx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sharedPreferences.edit();\r\n editor.clear();\r\n editor.apply();\r\n ctx.startActivity(new Intent(ctx, MainActivity.class));\r\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n FirebaseAuth.getInstance().signOut();\n startActivity(new Intent(MainActivity.this, Login.class));\n finish();\n }", "@Override\n public void onClick(View v) {\n finish();\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n }", "@Override\n public void onBackPressed() {\n logoutDialog();\n }", "public void onClick(DialogInterface arg0, int arg1) {\n // Clear the session data\n // This will clear all session data and\n // rdirect user to LoginActivity\n FragmentManager mFragmentManager = getActivity().getSupportFragmentManager();\n if (mFragmentManager.getBackStackEntryCount() > 0)\n mFragmentManager.popBackStackImmediate();\n\n\n// getActivity().finish();\n// Intent i = new Intent(getContext(), LoginWithMobile.class);\n// startActivity(i);\n session.logoutUser();\n// System.exit(0);\n\n\n// int pid = android.os.Process.myPid();\n// android.os.Process.killProcess(pid);\n// Toast.makeText(getApplicationContext(), \"User Is Wish To Exit\", Toast.LENGTH_SHORT).show();\n }", "public void logout() {\n showLoginScreen();\n }", "private void logOut() {\n mApi.getSession().unlink();\n\n // Clear our stored keys\n clearKeys();\n // Change UI state to display logged out version\n setLoggedIn(false);\n }", "void redirectToLogin();", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"You have successfully logout\",\n Toast.LENGTH_LONG).show();\n SplashActivity.editor.remove(\"loginTest\");\n SplashActivity.editor.commit();\n Intent sendToLoginandRegistration = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(sendToLoginandRegistration);\n }", "private void returnLogin(){\n Intent intent = new Intent(getContext(), MainActivity.class);\n startActivity(intent);\n getFragmentManager().beginTransaction().remove(this).commit();\n }", "private void logoutUser() {\n\t\tsession.setLogin(false);\n\n\t\tdb.deleteUsers();\n\n\t\t// Launching the login activity\n\t\tIntent intent = new Intent(MainActivity.this, LoginActivity.class);\n\t\tstartActivity(intent);\n\t\tfinish();\n\t}", "private void signOut() {\n //logout of google\n GoogleSignIn.getClient(this, GoogleSignInOptions.DEFAULT_SIGN_IN).signOut()\n .addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n return;\n }\n });\n\n //logout of facebook\n LoginManager.getInstance().logOut();\n\n Intent intent = new Intent(this, Login.class);\n startActivity(intent);\n }", "public void logout()\r\n {\r\n loginForForm = \"\";\r\n passwordForForm = \"\";\r\n redirectSession(\"/logout\");\r\n }", "@JavascriptInterface\n public void logout() {\n Login.logout();\n Intent intent = new Intent(mContext, LoginActivity.class);\n mContext.startActivity(intent);\n }", "public void logout() {\n\t\ttry {\n\t\t\tStage mainStage = (Stage) HomePagePane.getScene().getWindow();\n\t\t\tmainStage.close();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/application/Main.FXML\"));\n\t\t\tAnchorPane pane = loader.load();\n\t\t\tScene scene = new Scene(pane, 700, 400);\n\t\t\tStage stage = new Stage();\n\t\t\tstage.setScene(scene);\n\t\t\tstage.show();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void signOut(View view) {\r\n startActivity(new Intent(getApplicationContext(),AdminDashboard.class));\r\n }", "public void returnToLogin(View view){\r\n startActivity(new Intent(SignUpActivity.this, LoginActivity.class));\r\n finish();\r\n }", "@Override\n public void navigateToLogin() {\n startActivity(new Intent(this, LoginActivity.class));\n finish();\n }", "public void onLogout() {\n ParseUser.logOut();\n\n promptForLogin();\n }", "private void logoutHandler() {\n AlertDialog.Builder builder = new AlertDialog.Builder(context, android.R.style.Theme_DeviceDefault_Dialog);\n builder.setTitle(\"Logout?\");\n builder.setMessage(\"Are you sure you want to logout?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n Util.setLoggedInFlag(false);\n\n HPIApp.getAppContext().stopService(new Intent(HPIApp.getAppContext(), StepService.class));\n\n Intent intent = new Intent(HomeActivity.this, SplashActivity.class);\n startActivity(intent);\n HomeActivity.this.finish();\n }\n });\n\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n builder.show();\n }", "public void actionPerformed(ActionEvent e) {\r\n\t\t\t\tint selection=JOptionPane.showConfirmDialog(mainWin,\"Are you sure you want to log out\",\"Choose\",JOptionPane.YES_NO_OPTION);\r\n\t\t\t\tif( selection==JOptionPane.YES_OPTION) {\r\n\t\t\t\t\tmainWin.dispose();\r\n\t\t\t\t\tMainLoginPage returntologin=new MainLoginPage();\r\n\t\t\t\t\treturntologin.display();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}", "@FXML\r\n private void handleButtonLogOut() {\r\n sessionContent.remove(\"activeId\");\r\n user = null;\r\n MobileApplication.getInstance().switchView(LOGIN_VIEW);\r\n }", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(EscolhaProjeto.this, LoginActivity.class);\n startActivity(intent);\n finish();\n }", "private void onSignOutConfirmed() {\n Login.logout(this, e -> {\n Toast.makeText(this, \"Logged out successfully\", Toast.LENGTH_SHORT).show();\n });\n\n Intent intent = new Intent(this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // add this flag so that we return to an existing MainActivity if it exists rather than creating a new one\n Login.setManualLogin(true);\n Login.forceLogin(); // force re-login so that when we sign-out we are brought to the login screen. Login.logout() occurs asynchronously so without calling this, we may not go to the login screen\n\n startActivity(intent);\n }", "protected void userLoggedOut() {\n\t\tRuvego.userLoggedOut();\n\t\tResultsActivityMenu.userLoggedOut();\n\t\tHistory.newItem(\"homePage\");\n\t}", "public void returnToLogin() {\n // Ako smo kliknuli na Login, kreiramo Intent za\n // prijelaz na Login aktivnost\n Intent i = new Intent(this, LoginActivity.class);\n // U slucaju povratka na Login zelimo izbrisati \"povijest\" navigiranja,\n // tako da nas \"Back\" gumb ne vrati prethodnu aktivnost\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // Prelazimo na Login aktivnost\n startActivity(i);\n // Zavrsavamo trenutnu aktivnost i oslobadjamo resurse\n finish();\n }", "@Override\n public void onClick(View v) {\n FirebaseAuth.getInstance().signOut();\n Intent signOutIntent = new Intent(ResultActivity.this,LoginActivity.class);\n startActivity(signOutIntent);\n finish();\n }", "@Override\n public void onClick(View arg0) {\n Intent login = new Intent(getApplicationContext(), LoginActivity.class);\n login.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(login);\n finish();\n }", "public void logout() {\n\n clearData();\n Intent intent = new Intent(getContext(), LoginActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n\n\n }", "@Override\n public void onBackPressed()\n {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Continuing with the action will log you out and send you to login screen\");\n builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog,\n int which) {\n MainActivity act=new MainActivity();\n act.log_out(email);\n finish();\n setContentView(R.layout.activity_main);\n\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.dismiss();\n\n }\n });\n builder.show();\n }", "public void logOut(View view) {\n Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n }", "public void doLogout() {\n loggedIn = false;\r\n HttpSession session = (HttpSession) FacesContext.getCurrentInstance()\r\n .getExternalContext().getSession(false);\r\n session.invalidate(); \r\n String pag= \"/login.xhtml\";\r\n redireccionar(pag);\r\n }", "public void Logout() {\n \t\t\t\n \t\t}", "private void signOut()\n {\n Auth.GoogleSignInApi.signOut(googleApiClient).setResultCallback(new ResultCallback<Status>() {\n @Override\n public void onResult(@NonNull Status status) {\n //Intent intent = new Intent(LandingPageActivity.this, MainActivity.class);\n //startActivity(intent);\n //finish();\n }\n });\n }", "private void signOutUser() {\n mAuth.signOut();\n LoginManager.getInstance().logOut();\n Toast.makeText(ChatMessage.this, \"You have been logout\", Toast.LENGTH_SHORT).show();\n finishAffinity();\n proceed();\n }", "public void close(ActionEvent event) throws IOException {\n FXRouter.when(\"EscolherLogin\", \"EscolherLogin.fxml\"); \n FXRouter.goTo(\"EscolherLogin\");\n }", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(getActivity(), LoginActivity.class);\n startActivity(intent);\n getActivity().finish();\n }", "private void openLogoutActivity() {\n Intent intent = new Intent(this, FaceDetectionActivity.class);\n intent.putExtra(\"IS_FROM_LOGIN\", false);\n startActivityForResult(intent, LOGOUT_REQUEST);\n }", "@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\t\n\t\t\t\tfinish();\n\t\t\t\t\n\t\t\t\tmApplication.exit();\n\t\t\t}", "public static void Logout(){\n\t\tloginSystem();\r\n\t\t\r\n\t}", "@Step(\"Log out\")\n public void logOut() {\n open();\n sighOutButton.click();\n }", "private void closeApp(){\n Boolean answer = ConfirmBox.display(\"ALERT!!\", \"Sure you want to exit?\");\n if (answer)\n window.close();\n }", "private void goLoginSignupActivity() {\n Intent intent = new Intent(this, LoginSignupActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n finishWithNextActivity(LoginActivity.class);\n\n }", "public void onOK() {\n\t\t\t\t\t\t\tlogout();\n\t\t\t\t\t\t}", "public void logout(){\n SharedPreferences settings = mContext.getSharedPreferences(\"UserData\", 0);\n SharedPreferences.Editor preferencesEditor = settings.edit();\n preferencesEditor.clear();\n preferencesEditor.commit();\n // take user back to login screen\n Intent logoutIntent = new Intent(mContext, LoginActivity.class);\n logoutIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n mContext.startActivity(logoutIntent);\n }", "public boolean logOut(HttpServletRequest request, HttpServletResponse response, String data) {\n request.getSession().removeAttribute(\"user\");\n removeAppCookie(response);\n try {\n response.sendRedirect(\"http://localhost:8010/CostsManagerHit/login\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n return true;\n }", "@Override\n\t\t\t\t\t\t\tpublic void onCancel() {\n\t\t\t\t\t\t\t\tToast.makeText(mActivity, \"取消登录\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\tPlatformJinliLoginAndPay.getInstance()\n\t\t\t\t\t\t\t\t\t\t.callLogout();\n\t\t\t\t\t\t\t\tPlatformJinliLoginAndPay.getInstance()\n\t\t\t\t\t\t\t\t\t\t.callLogin();\n\t\t\t\t\t\t\t}", "@Override\n public void run() {\n\n Intent intent = new Intent(Launcher.this, Login.class);\n startActivity(intent);\n finish();\n }", "public void logoutUser() {\n editor.remove(Is_Login).commit();\n editor.remove(Key_Name).commit();\n editor.remove(Key_Email).commit();\n editor.remove(KEY_CUSTOMERGROUP_ID).commit();\n // editor.clear();\n // editor.commit();\n // After logout redirect user to Loing Activity\n\n }", "private void redirectLoginScreen(Bundle bundle){\n Intent loginIntent = new Intent(PrivateUserRegActivity.this, LoginActivity.class);\n loginIntent.putExtras(bundle);\n startActivity(loginIntent);\n finish();\n }", "@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)\n @Override\n public void finish() {\n loginPresenter.toFinish();\n }", "public static Result logout() {\n session().clear();\n flash(\"success\", Messages.get(\"youve.been.logged.out\"));\n return GO_HOME;\n }", "@Override\n\t\tpublic void onCancelLogin() {\n\n\t\t}", "@Override\n\t\tpublic void onCancelLogin() {\n\n\t\t}", "public void signOutClick()\n {\n if(mAuth.getCurrentUser() != null)\n {\n // sign out.\n mAuth.signOut();\n\n // switch activity to login form.\n finish();\n Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n }\n }", "public String logout() {\n String destination = \"/index?faces-redirect=true\";\n\n // FacesContext provides access to other container managed objects,\n // such as the HttpServletRequest object, which is needed to perform\n // the logout operation.\n FacesContext context = FacesContext.getCurrentInstance();\n HttpServletRequest request = \n (HttpServletRequest) context.getExternalContext().getRequest();\n\n try {\n // added May 12, 2014\n HttpSession session = request.getSession();\n session.invalidate();\n \n // this does not invalidate the session but does null out the user Principle\n request.logout();\n } catch (ServletException e) {\n log.log(Level.SEVERE, \"Failed to logout user!\", e);\n destination = \"/loginerror?faces-redirect=true\";\n }\n\n return destination; // go to destination\n }", "private void logout() {\n //set offline flag\n String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();\n new PostNoSqlDataBase(this).offline(uid);\n\n //logout\n // FirebaseAuth mAuth = FirebaseAuth.getInstance();\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n mGoogleSignInClient.signOut();\n FirebaseAuth.getInstance().signOut();\n //go to the main activity\n startActivity(new Intent(this, SignUpActivity.class));\n finish();\n }", "@Override\r\n public void onClick(View view) {\n new SignOut();\r\n\r\n // stop all services\r\n stopService(new Intent(MainActivity.this,UserDataChangeListener.class));\r\n stopService(new Intent(MainActivity.this,GeofenceService.class));\r\n stopService(new Intent(MainActivity.this,LocationService.class));\r\n\r\n // restart sign in\r\n Intent signIn = new Intent(MainActivity.this,SignIn.class);\r\n startActivity(signIn);\r\n finish();\r\n }" ]
[ "0.7299832", "0.7189039", "0.7180494", "0.717164", "0.7155216", "0.70584726", "0.70076925", "0.7003172", "0.6984616", "0.6966561", "0.6847424", "0.6838963", "0.68343925", "0.683178", "0.67999715", "0.6797891", "0.67925423", "0.6792094", "0.677816", "0.67524964", "0.67278165", "0.67230433", "0.67219025", "0.671962", "0.6711477", "0.671122", "0.6709531", "0.66992444", "0.6697157", "0.66891515", "0.6678924", "0.6664824", "0.66586155", "0.6646523", "0.6641579", "0.6638259", "0.6637432", "0.66118115", "0.66070414", "0.6607007", "0.6600788", "0.65903836", "0.6583377", "0.65749204", "0.65738", "0.6551352", "0.6547277", "0.65306354", "0.651707", "0.65138286", "0.6460234", "0.6459573", "0.645705", "0.64491576", "0.6445605", "0.6441239", "0.6428067", "0.64195067", "0.64181626", "0.6409416", "0.64093155", "0.6390611", "0.63815105", "0.63783425", "0.63700324", "0.633862", "0.63293236", "0.6324096", "0.6320466", "0.631891", "0.630601", "0.629292", "0.6292003", "0.62918025", "0.6286085", "0.6278685", "0.6276443", "0.627627", "0.62740844", "0.62725717", "0.6265741", "0.6259879", "0.62501943", "0.62497413", "0.6249371", "0.62421626", "0.62367487", "0.6235427", "0.6229339", "0.6224632", "0.6220591", "0.6199713", "0.6190506", "0.6187565", "0.617093", "0.6163794", "0.6163794", "0.6162407", "0.6160635", "0.61604714", "0.61598" ]
0.0
-1
Initiates database connection, creating it if it doesn't exist already.
public void initEDBConnection(String name) throws SQLException { String dbName = buildDBName(name); cache = new CacheManager<>(1024); File f = new File(dbName); if (!f.exists()) createDB(dbName); else if(!f.isDirectory()) createDB(dbName); else connectDB(dbName); refreshCurrentAccountId(); refreshCurrentOperationId(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void initializeDatabase()\n\t{\n\t\tResultSet resultSet = dbConnect.getMetaData().getCatalogs();\n\t\tStatment statement = dbConnect.createStatement();\n\t\t\n\t\tif (resultSet.next())\n\t\t{\n\t\t\tstatement.execute(\"USE \" + resultSet.getString(1));\n\t\t\tstatement.close();\n\t\t\tresultSet.close();\n\t\t\treturn; //A database exists already\n\t\t}\n\t\tresultSet.close();\n\t\t//No database exists yet, create it.\n\t\t\n\t\tstatement.execute(\"CREATE DATABASE \" + dbName);\n\t\tstatement.execute(\"USE \" + dbName);\n\t\tstatement.execute(createTableStatement);\n\t\tstatement.close();\n\t\treturn;\n\t}", "private void initConnection() throws DatabaseAccessException {\n\t\ttry {\n\t\t\tthis.connection = DriverManager.getConnection(this.driver + \":\" + this.path);\n\n\t\t} catch (SQLException e) {\n\t\t\t// unable to create the connection; access error\n\t\t\tthrow new DatabaseAccessException(Failure.CONNECTION);\n\t\t}\n\t}", "private Connection createDatabase() {\n\t\tSystem.out.println(\"We are creating a database\");\n\t\ttry (\n\t\t\t\t// Step 1: Allocate a database \"Connection\" object\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:\" + PORT_NUMBER + \"/\", \n\t\t\t\t\t\t\"root\", \"root\"); // MySQL\n\t\t\t\t// Step 2: Allocate a \"Statement\" object in the Connection\n\t\t\t\tStatement stmt = conn.createStatement();\n\t\t\t\t) {\n\t\t\t// Step 3 - create our database\n\t\t\tString sql = \"CREATE DATABASE IF NOT EXISTS experiences\";\n\t\t\tstmt.execute(sql);\n\t\t\treturn conn;\n\t\t\t\n\n\t\t} catch(SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null; }\n\t}", "public void establishConnection() throws SQLException {\n if (!connectToDB(\"jdbc:mysql://localhost/EmployeesProject\")) {\n createDBAndTable();\n }\n }", "public void initializeConnection(){\n try{\n dbConnect = DriverManager.getConnection(DBURL, USERNAME, PASSWORD);\n } catch (SQLException ex){\n ex.printStackTrace();\n }\n }", "public static void InitializeDatabase() throws SQLException {\n dataSource = new SQLiteConnectionPoolDataSource();\n dataSource.setUrl(\"jdbc:sqlite:application.db\");\n\n // Optional Configuration Settings\n org.sqlite.SQLiteConfig config = new org.sqlite.SQLiteConfig();\n config.enforceForeignKeys(true);\n config.enableLoadExtension(true);\n dataSource.setConfig(config);\n\n connectionPool = dataSource.getPooledConnection();\n }", "public void DBConnect() {\n \tdatabase = new DatabaseAccess();\n \tif (database != null) {\n \t\ttry {\n \t\t\tString config = getServletContext().getInitParameter(\"dbConfig\");\n \t\t\tdatabase.GetConnectionProperties(config);\n \t\t\tdatabase.DatabaseConnect();\n \t\t}\n \t\tcatch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}\n }", "public void initConnection() throws DatabaseConnectionException, SQLException {\n\t\t\tString connectionString = DBMS+\"://\" + SERVER + \":\" + PORT + \"/\" + DATABASE;\n\t\t\ttry{\n\t\t\t\tClass.forName(DRIVER_CLASS_NAME).newInstance();\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.err.println(\"IMPOSSIBILE TROVARE DRIVER\");\n\t\t\t\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tconn=DriverManager.getConnection(connectionString, USER_ID, PASSWORD);\n\t\t\t\t\n\t\t\t}catch(SQLException e){\n\t\t\t\tSystem.err.println(\"IMPOSSIBILE STABILIRE CONNESSIONE DATABASE\");\n\t\t\t\t\n\t\t\t}\n\t\t}", "abstract public boolean createConnection(String database);", "private void makeSQLConn() {\n\t\ttry {\n\t\t\tmyDB = new MySQLAccess();\n\t\t} catch (Exception e) { e.printStackTrace(); }\n\t}", "public Connection createConnection() {\n Connection c = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n c = DriverManager.getConnection(\"jdbc:sqlite:ase_i3.db\");\n } catch (Exception e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n return null;\n }\n System.out.println(\"Database connection succeed.\");\n return c;\n }", "private void setupDatabase()\n {\n try\n {\n Class.forName(\"com.mysql.jdbc.Driver\");\n }\n catch (ClassNotFoundException e)\n {\n simpleEconomy.getLogger().severe(\"Could not load database driver.\");\n simpleEconomy.getServer().getPluginManager().disablePlugin(simpleEconomy);\n e.printStackTrace();\n }\n\n try\n {\n connection = DriverManager\n .getConnection(String.format(\"jdbc:mysql://%s/%s?user=%s&password=%s\",\n simpleEconomy.getConfig().getString(\"db.host\"),\n simpleEconomy.getConfig().getString(\"db.database\"),\n simpleEconomy.getConfig().getString(\"db.username\"),\n simpleEconomy.getConfig().getString(\"db.password\")\n ));\n\n // Loads the ddl from the jar and commits it to the database.\n InputStream input = getClass().getResourceAsStream(\"/ddl.sql\");\n try\n {\n String s = IOUtils.toString(input);\n connection.createStatement().execute(s);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n input.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n }\n catch (SQLException e)\n {\n simpleEconomy.getLogger().severe(\"Could not connect to database.\");\n simpleEconomy.getServer().getPluginManager().disablePlugin(simpleEconomy);\n e.printStackTrace();\n }\n }", "public void initConnection() throws SQLException{\n\t\tuserCon = new UserDBHandler(\"jdbc:mysql://127.0.0.1:3306/users\", \"admin\", \"admin\");\n\t\tproductCon = new ProductDBHandler(\"jdbc:mysql://127.0.0.1:3306/products\", \"admin\", \"admin\");\n\t}", "public void createConnection() {\n\t\tif (path != null) {\n\t\t\ttry {\n\t\t\t\tconn = DriverManager.getConnection(path);\n\t\t\t} catch(SQLException se){\n\t\t\t //Handle errors for JDBC\n\t\t\t se.printStackTrace();\n\t\t\t }catch(Exception e){\n\t\t\t //Handle errors for Class.forName\n\t\t\t e.printStackTrace();\n\t\t\t }\n\t\t}\n\t}", "private void initDb() {\n\t\tif (dbHelper == null) {\n\t\t\tdbHelper = new DatabaseOpenHelper(this);\n\t\t}\n\t\tif (dbAccess == null) {\n\t\t\tdbAccess = new DatabaseAccess(dbHelper.getWritableDatabase());\n\t\t}\n\t}", "private void setupDatabase() throws SQLException {\n\t\tdb.open(\"localhost\", 3306, \"wow\", \"greeneconomyapple\");\n\t\tdb.use(\"auctionscan\");\n\t}", "private void setupDatabase() {\r\n\t\tDatabaseHelperFactory.init(this);\r\n\t\tdatabase = DatabaseHelperFactory.getInstance();\r\n\t}", "public void dbCreate() {\n Logger.write(\"INFO\", \"DB\", \"Creating database\");\n try {\n if (!Database.DBDirExists())\n Database.createDBDir();\n dbConnect(false);\n for (int i = 0; i < DBStrings.createDB.length; i++)\n execute(DBStrings.createDB[i]);\n } catch (Exception e) {\n Logger.write(\"FATAL\", \"DB\", \"Failed to create databse: \" + e);\n }\n }", "private Connection createConnection() {\n try {\n return DriverManager.getConnection(\"jdbc:mysql://\" + host + \":\" + port + \"/\" + db, user, password);\n } catch (SQLException e) {\n e.printStackTrace();\n return null;\n }\n }", "protected void openConnection() {\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(\"jdbc:sqlite:\" + name);\n\t\t\tif (conn == null) {\n\t\t\t\tconnectionOpened = false;\n\t\t\t} else {\n\t\t\t\tconnectionOpened = true;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Connect problem: \" + e.getMessage());\n\t\t\tconn = null;\n\t\t}\n\t}", "private Boolean initSqlConnection(String url, String user, String pass) {\n\t\t\n\t\ttry {\n\t\t\tBoolean exists = false;\n\t\t\tClass.forName(SQL_DRIVER);\n\t\t\tConnection sqlConn = DriverManager.getConnection(url, user, pass);\n\t\t\tDatabaseMetaData dm = sqlConn.getMetaData();\n\t\t\tResultSet rs = dm.getCatalogs();\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\tif (rs.getString(\"TABLE_CAT\").compareTo(DB_NAME) == 0) { exists = true; }\n\t\t\t}\n\t\t\t\n\t\t\tif (exists == false) {\n\t\t\t\tStatement smt = sqlConn.createStatement();\n\t\t\t\tsmt.executeUpdate(\"CREATE DATABASE \" + DB_NAME);\n\t\t\t\tsmt.close();\n\t\t\t\tplugin.sendToLog(\"SQL Database not found, creating database: mc_bukkit_naw\");\t\n\t\t\t}\n\t\t\t\n\t\t\trs.close();\n\t\t\tsqlConn.close();\n\t\t\tsqlConn = DriverManager.getConnection(url + DB_NAME, user, pass);\n\t\t\tplugin.sendToLog(\"SQL Database connection initialized\");\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\tplugin.sendToLog(\"SQL Database connection failed!: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "private void makeConnection() {\n try {\n InitialContext ic = new InitialContext();\n DataSource ds = (DataSource) ic.lookup(dbName);\n\n con = ds.getConnection();\n } catch (Exception ex) {\n throw new EJBException(\"Unable to connect to database. \" + ex.getMessage());\n }\n }", "public DatabaseManager() {\n try {\n con = DriverManager.getConnection(DB_URL, \"root\", \"marko\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "private Database() throws SQLException {\n con = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:MusicAlbums\", \"c##dba\", \"sql\");\n }", "private static void connectDatabase(){\n\t\t// register the driver\n\t\ttry{\n\t\t\tClass.forName(DRIVER).newInstance();\n\t\t\tconnection = DriverManager.getConnection(CONNECTION_URL);\n\t\t} catch (IllegalAccessException | InstantiationException | ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void setupConnection()\n\t{\n\t\ttry\n\t\t{\n\t\t\tdatabaseConnection = DriverManager.getConnection(connectionString);\n\t\t}\n\t\tcatch (SQLException currentException)\n\t\t{\n\t\t\tdisplaySQLErrors(currentException);\n\t\t}\n\t}", "private void apriConnessione() throws SQLException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException {\n\t\tString password, user;\n\t\tDatabaseProps dbConf = config.getDb();\n\n\t\tClass.forName(dbConf.getDriver()).getDeclaredConstructor().newInstance();\n\n\t\tuser = dbConf.getUsername();\n\t\tpassword = dbConf.getPassword();\n\n\t\tString uri = String.format(\"jdbc:%s://%s:%d/%s\", dbConf.getDbms(), dbConf.getHost(), dbConf.getPort(), dbConf.getName());\n\n\t\tconnessioneDB = DriverManager.getConnection(uri, user, password);\n\t}", "public void createConnection()\n\t{\n\t\ttry\n {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n // Get a connection\n conn = DriverManager.getConnection(dbURL, \"root\", \"root\"); \n System.out.println(\"Connected...\");\n }\n catch (Exception except)\n {\n except.printStackTrace();\n }\n\t}", "private void open() {\n\t\tFile dbf = new File( dbName );\n\n\t\tif ( dbf.exists( ) == false ) {\n\t\t\tSystem.out.println(\n\t\t\t\t \"SQLite database file [\"\n\t\t\t\t+ dbName\n\t\t\t\t+ \"] does not exist\");\n\t\t\tSystem.exit( 0 );\n\t\t}\n\t\n\t\ttry {\n\t\t\tClass.forName( JDBC_DRIVER );\n\t\t\tgetConnection( );\n\t\t}\n\t\tcatch ( ClassNotFoundException cnfe ) {\n\t\t\tnotify( \"Db.Open\", cnfe );\n\t\t}\n\n\t\tif ( debug )\n\t\t\tSystem.out.println( \"Db.Open : leaving\" );\n\t}", "public void connect() {\n\n DatabaseGlobalAccess.getInstance().setEmf(Persistence.createEntityManagerFactory(\"PU_dashboarddb\"));\n DatabaseGlobalAccess.getInstance().setEm(DatabaseGlobalAccess.getInstance().getEmf().createEntityManager());\n DatabaseGlobalAccess.getInstance().getDatabaseData();\n DatabaseGlobalAccess.getInstance().setDbReachable(true);\n }", "public static void initConnection() throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException{\r\n\t\t//create database connection only once\r\n\t\tif(dbCon == null){\t\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tdbCon = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/wip?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\",\"root\",\"\");\r\n\t\t}\r\n\t}", "@Override\n public Database getAndInitialize() throws IOException {\n Database database = Databases.createPostgresDatabaseWithRetry(\n username,\n password,\n connectionString,\n isDatabaseConnected(databaseName));\n\n new ExceptionWrappingDatabase(database).transaction(ctx -> {\n boolean hasTables = tableNames.stream().allMatch(tableName -> hasTable(ctx, tableName));\n if (hasTables) {\n LOGGER.info(\"The {} database has been initialized\", databaseName);\n return null;\n }\n LOGGER.info(\"The {} database has not been initialized; initializing it with schema: {}\", databaseName, initialSchema);\n ctx.execute(initialSchema);\n return null;\n });\n\n return database;\n }", "private void connectToDB() throws Exception\n\t{\n\t\tcloseConnection();\n\t\t\n\t\tcon = Env.getConnectionBradawl();\n\t}", "public Database() throws SQLException {\n conn = DriverManager.getConnection(dbURL, username, password);\n }", "public DBConnection() {\n this(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST, DB_PORT);\n }", "private static void connect() {\n\t\ttry {\n\t\t\tif (connection == null) {\n\t\t\t\tClass.forName(\"org.mariadb.jdbc.Driver\");\n\t\t\t\tconnection = DriverManager.getConnection(url, user, password);\n\t\t\t\tconnection.setAutoCommit(false);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "private void initialize() {\n try {\n Class.forName(\"org.postgresql.Driver\");\n } catch (ClassNotFoundException e) {\n LOGGER.error(\"DB: Unable to find sql driver.\", e);\n throw new AppRuntimeException(\"Unable to find sql driver\", e);\n }\n\n DbCred cred = getDbCred();\n this.connection = getConnection(cred);\n this.isInitialized.set(Boolean.TRUE);\n }", "private void openDatabase() {\r\n if ( connect != null )\r\n return;\r\n\r\n try {\r\n // Setup the connection with the DB\r\n String host = System.getenv(\"DTF_TEST_DB_HOST\");\r\n String user = System.getenv(\"DTF_TEST_DB_USER\");\r\n String password = System.getenv(\"DTF_TEST_DB_PASSWORD\");\r\n read_only = true;\r\n if (user != null && password != null) {\r\n read_only = false;\r\n }\r\n if ( user == null || password == null ) {\r\n user = \"guest\";\r\n password = \"\";\r\n }\r\n Class.forName(\"com.mysql.jdbc.Driver\"); // required at run time only for .getConnection(): mysql-connector-java-5.1.35.jar\r\n connect = DriverManager.getConnection(\"jdbc:mysql://\"+host+\"/qa_portal?user=\"+user+\"&password=\"+password);\r\n } catch ( Exception e ) {\r\n System.err.println( \"ERROR: DescribedTemplateCore.openDatabase() could not open database connection, \" + e.getMessage() );\r\n }\r\n }", "private Database() throws SQLException, ClassNotFoundException {\r\n Class.forName(\"org.postgresql.Driver\");\r\n con = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/postgres\", \"postgres\", \"kuka\");\r\n }", "private void connect() {\n if (this.connection == null && !this.connected) {\n try {\n this.connection = DriverManager.getConnection(this.dbUrl, this.dbUser, this.dbPassword);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }", "public void openConnection(){\n\n\t\tString dbIP = getConfig().getString(\"mysql.ip\");\n\t\tString dbDB = getConfig().getString(\"mysql.databaseName\");\n\t\tString dbUN = getConfig().getString(\"mysql.username\");\n\t\tString dbPW = getConfig().getString(\"mysql.password\");\n\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:mysql://\" + dbIP + \"/\" + dbDB, dbUN, dbPW);\n\t\t\tgetLogger().info(\"Connected to databse!\");\n\t\t} catch (SQLException ex) {\n\t\t\t// handle any errors\n\t\t\tgetLogger().info(\"SQLException: \" + ex.getMessage());\n\t\t\tgetLogger().info(\"SQLState: \" + ex.getSQLState());\n\t\t\tgetLogger().info(\"VendorError: \" + ex.getErrorCode());\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tgetLogger().info(\"Gabe, you done goof'd!\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private Connection createConnection() {\r\n\tConnection result = null;\r\n\r\n\ttry {\r\n\t Class.forName(\"org.sqlite.JDBC\");\r\n\t result = DriverManager.getConnection(\"jdbc:sqlite:\" + fileName);\r\n\t} catch (Exception e) {\r\n\t result = null;\r\n\t}\r\n\r\n\treturn result;\r\n }", "private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}", "protected Connection openConnection() throws PersistenceException {\n\n String connectionName = getConnectionName();\n if ( connectionName == null){\n \tLOGGER.log(Level.INFO, new LogMessage(null, null, \"creating db connection using default connection\"));\n } else {\n \tLOGGER.log(Level.INFO, new LogMessage(null, null, \"creating db connection using connection name: \" + connectionName));\n }\n Connection conn = Helper.createConnection(getConnectionFactory(),\n connectionName);\n try {\n \tif(useManualCommit) {\n \t\tconn.setAutoCommit(false);\n \t}\n return conn;\n } catch (SQLException e) {\n throw new PersistenceException(\"Error occurs when setting \"\n + (connectionName == null ? \"the default connection\"\n : (\"the connection '\" + connectionName + \"'\"))\n + \" to support transaction.\", e);\n }\n\n }", "public Connection createConnection(){\n Connection conn = null;\n registerDriver();\n createURL();\n\n try {\n conn = DriverManager.getConnection(urlDB,username,password);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n System.out.println((conn != null)?\"You made it, take control your database now!\":\"Failed to make connection!\");\n\n return conn;\n}", "private Connection connect() {\n String url = \"jdbc:sqlite:\" + dbPath + dbName;\n Connection con = null;\n try {\n con = DriverManager.getConnection(url);\n }\n catch (SQLException e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n\n return con;\n }", "private Connection connect() throws SQLException {\n\t\treturn DriverManager.getConnection(\"jdbc:sqlite:database/scddata.db\");\n\t}", "public void createConnection(String dbUrl) {\r\n\t\ttry {\r\n\t\t\tconn = DriverManager.getConnection(dbUrl);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Database exception during database connection creation: \" + e.getMessage());\r\n\t\t}\r\n\t}", "public static Connection initializeDatabase()\n throws SQLException, ClassNotFoundException\n {\n \t\n \tString dbDriver = \"com.mysql.cj.jdbc.Driver\";\n String dbURL = \"jdbc:mysql://localhost:3306/\";\n // Database name, database user and password to access\n String dbName = \"jaltantra_db\";\n String dbUsername = \"root\";\n String dbPassword = \"jaldb@2050\";\n \n Class.forName(dbDriver);\n Connection conn = DriverManager.getConnection(dbURL + dbName ,dbUsername, dbPassword);\n return conn;\n }", "public static Connection createConnection() throws SQLException, NamingException {\n DATA_SOURCE.init();\n return DATA_SOURCE.getConnection();\n }", "public static void initialize()\n\t{\n\t\tProperties props = new Properties();\n\t\tFileInputStream in = new fileInputStream(\"database.properties\");\n\t\tprops.load(in);\n\t\tin.close();\n\t\tString drivers = props.getProperty(\"jdbc.drivers\");\n\t\tif (drivers != null)\n\t\t\tSystem.setProperty(\"jdbc.drivers\", drivers);\n\t\tString url = props.getProperty(\"jdbc.url\");\n\t\tString username = props.getProperty(\"jdbc.username\");\n\t\tString password = props.getProperty(\"jdbc.password\");\n\t\t\n\t\tSystem.out.println(\"url=\"+url+\" user=\"+username+\" password=\"+password);\n\n\t\tdbConnect = DriverManager.getConnection( url, username, password);\n\t\t\n\t\tinitializeDatabase();\n\t}", "public static void createConnection() {\n\n try{\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/mydb\", \"tobymac208\", \"Sparta_!3712\");\n // Database how now been successfully connected.\n System.err.println(\"Database was successfully connected.\");\n }catch (ClassNotFoundException e) {\n System.err.println(\"Class not found.\");\n }catch (SQLException e) {\n System.err.println(\"SQL exception thrown.\");\n }\n }", "public void connectToDatabase(){\n\t\ttry{\n\t\t connection = DriverManager.getConnection(dbConfig.getUrl(), dbConfig.getUser(), dbConfig.getPassword());\n\t\t System.out.println(\"Successfully connected to database.\");\n\t\t} catch (Exception e){\n\t\t\tSystem.out.println(\"An error occurred while attempting to connect to the database.\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "private DBConnection() \n {\n initConnection();\n }", "public void openConnection() throws SQLException {\n DriverManager.registerDriver(new com.mysql.jdbc.Driver());\n this.dbConnection = DriverManager.getConnection(\n this.url,\n this.username,\n this.password);\n\n this.dbConnection.setAutoCommit(false);\n this.connected = true;\n\n Logger logger = Logger.getAnonymousLogger();\n logger.log(Level.INFO, \"Database connection successful\");\n\n }", "private Connection getDb() throws TzException {\n if (conn != null) {\n return conn;\n }\n\n try {\n dbPath = cfg.getDbPath();\n\n if (debug()) {\n debug(\"Try to open db at \" + dbPath);\n }\n\n conn = DriverManager.getConnection(\"jdbc:h2:\" + dbPath,\n \"sa\", \"\");\n\n final ResultSet rset =\n conn.getMetaData().getTables(null, null,\n aliasTable, null);\n if (!rset.next()) {\n clearDb();\n loadInitialData();\n }\n } catch (final Throwable t) {\n // Always bad.\n error(t);\n throw new TzException(t);\n }\n\n return conn;\n }", "public Connection getDBConnection() {\n Connection con = connectDB();\n createTables(con);\n return con;\n }", "public static void setUpConnection()\n\t{\n\t\ttry{\n\t\t\t//The information necessary to create a connection to the database, need to figure out what this will be\n\t\n\t\t\n\t\t\t// Register driver by finding the class that corresponds do it \n\t\t\tString driverName = \"oracle.jdbc.OracleDriver\"; \n\t\t\tClass.forName(driverName);\n\t\t\n\t\t\tconn = DriverManager.getConnection(URL, USR, PWD);\n\t\t\n\t\t\tSystem.out.println(\"Connected to C325.\");\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void init()\n {\n try\n {\n // The newInstance() call is a work around for some broken Java implementations\n Class.forName(\"com.mysql.jdbc.Driver\").newInstance();\n\n // Create a new configuration object\n BoneCPConfig config = new BoneCPConfig();\n\n // Setup the configuration\n config.setJdbcUrl(\"jdbc:mysql://cs304.c0mk5mvcjljr.us-west-2.rds.amazonaws.com/cs304\"); // jdbc url specific to your database, eg jdbc:mysql://127.0.0.1/yourdb\n config.setUsername(\"cs304\");\n config.setPassword(\"ubccs304\");\n config.setConnectionTestStatement(\"SELECT 1\");\n config.setConnectionTimeout(10, TimeUnit.SECONDS);\n config.setMinConnectionsPerPartition(5);\n config.setMaxConnectionsPerPartition(10);\n config.setPartitionCount(1);\n\n // Setup the connection pool\n _pool = new BoneCP(config);\n\n // Log\n LogManager.getLogger(DatabasePoolManager.class).info(\"Database configuration initialized\");\n }\n catch (Exception ex)\n {\n // Log\n LogManager.getLogger(DatabasePoolManager.class).fatal(\"Could not initialize Database configuration\", ex);\n }\n\n }", "@SuppressWarnings(\"finally\")\n\tpublic static Connection createConnection() throws Exception {\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tClass.forName(Constants.dbClass);\n\t\t\tcon = DriverManager.getConnection(Constants.dbUrl, Constants.dbUser,Constants.dbPwd);\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\treturn con;\n\t\t}\n\t}", "private void openConnection() {\n try {\n dbConnection\n = DriverManager.getConnection(url, user, password);\n } catch (SQLException ex) {\n System.err.println(\"Exception in connecting to mysql database\");\n System.err.println(ex.getMessage());\n }\n }", "private void createNewDatabase() throws ConnectException {\n try (Connection sqlConnection = connect()) {\n if (sqlConnection != null) {\n sqlConnection.getMetaData();\n sqlConnection.close();\n }\n\n } catch (SQLException e) {\n LOGGER.error(\"Error when trying to create new database: {}\\n{}\", e.getMessage(), e);\n }\n }", "protected Connection createConnection() {\n Properties connectionProperties = new Properties();\n JdbcPropertyAdapter adapter = getPropertyAdapter(dbType, properties);\n adapter.getExtraProperties(connectionProperties);\n\n String url = translator.getUrl(properties);\n logger.info(\"Opening connection to: \" + url);\n Connection connection;\n try {\n connection = DriverManager.getConnection(url, connectionProperties);\n connection.setAutoCommit(false);\n } catch (SQLException x) {\n throw translator.translate(x);\n }\n return connection;\n }", "public static void createConnection() {\n\t\ttry {\r\n\t\t\tClass.forName(\"org.apache.derby.jdbc.EmbeddedDriver\").newInstance(); //specifies driver\r\n\t\t\t\r\n\t\t\tconn = DriverManager.getConnection(host); //Get a connection \r\n\t\t\tJOptionPane.showMessageDialog(null, \"Database Connection Successful\"); //this notifies the user that the program has sucessfully connected to the database\r\n\t\t} catch (Exception except) {\r\n\t\t\texcept.printStackTrace(); //for debugging purposes\r\n\t\t\tSystem.out.println(\"Database connection failed: \" + except.getMessage()); //for debugging purposes\r\n\t\t\tComponent frame = null; //new frame\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Database connection failed: \" + except.getMessage()); //this notifies the user that the program has not sucessfully connected to the database\r\n\t\t}\r\n\t}", "public void connect(){\n if (connected) {\n // connection already established\n return;\n }\n // Create connection to Database\n Properties props = new Properties();\n props.setProperty(\"user\", DB_USER);\n props.setProperty(\"password\", DB_PASSWORD);\n //props.setProperty(\"ssl\", \"true\");\n //\"Connecting to database...\"\n try {\n Class.forName(\"org.postgresql.Driver\");\n String connection_string = generateURL();\n dbConnect = DriverManager.getConnection(connection_string, props);\n //\"Connection established\"\n status = \"Connection established\";\n connected = true;\n } catch (SQLException e) {\n //\"Connection failed: SQL error\"\n status = \"Connection failed: \" + e.getMessage();\n connected = false;\n } catch (Exception e) {\n //\"Connection failed: unknown error\"\n status = \"Connection failed: \" + e.getMessage();\n connected = false;\n }\n }", "private void setupDB(){\n try {\n Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n String url = \"jdbc:oracle:thin:@localhost:1521:orcl\";\n String username = \"sys as sysdba\"; //Provide username for your database\n String password = \"oracle\"; //provide password for your database\n\n con = DriverManager.getConnection(url, username, password);\n }\n catch(Exception e){\n System.out.println(e);\n }\n }", "public DatabaseConnector() {\n String dbname = \"jdbc/jobs\";\n\n try {\n ds = (DataSource) new InitialContext().lookup(\"java:comp/env/\" + dbname);\n } catch (NamingException e) {\n System.err.println(dbname + \" is missing: \" + e.toString());\n }\n }", "private static void dbConnect() {\r\n\t\tif (conn == null)\r\n\t\t\ttry {\r\n\t\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost/sims?user=root&password=12345&useSSL=true\");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t}", "public void createDatabase(String sDBName) throws SQLException{\n\t\tloadDriver();\n\t\tConnection conn = DriverManager.getConnection(protocol + dbName\n + \";create=true\", new Properties());\n\t\tcloseJDBCResources(conn);\t\t\n\t}", "public static Connection createDBConnection() throws ClassNotFoundException, SQLException\r\n\t{\r\n\t\tString strDbUser = properties.getProperty(\"jdbc.username\"); // database login username\r\n String strDbPassword = properties.getProperty(\"jdbc.password\"); // database login password\r\n String remoteHost = properties.getProperty(\"remote.host\"); // remote host url (ie cloud server url\t\r\n String remotePort = properties.getProperty(\"remote.port\"); // remote post number\r\n String databaseName = properties.getProperty(\"databaseName\");\r\n Connection con;\r\n \r\n System.out.println(\"Trying connection \");\r\n \r\n\t\tClass.forName(\"org.postgresql.Driver\");\r\n// \tClass.forName(\"com.mysql.jdbc.Driver\");\r\n// con = DriverManager.getConnection(\"jdbc:mysql://127.0.0.1:\"+tunnelPort+\"/cos420?user=\"+strDbUser+\"&password=\"+strDbPassword);\r\n\t\tString connectString = \"jdbc:postgresql://\" + remoteHost +\":\" + remotePort + \"/\"+databaseName; \r\n\t\tcon = DriverManager.getConnection(connectString , strDbUser,strDbPassword);\r\n\r\n \tif(!con.isClosed())\r\n System.out.println(\"Successfully connected to Postgres server using TCP/IP...\");\r\n\r\n return con;\r\n\t}", "private void initDatabase() {\n\n String sql = \"CREATE TABLE IF NOT EXISTS books (\\n\"\n + \"\tISBN integer PRIMARY KEY,\\n\"\n + \"\tBookName text NOT NULL,\\n\"\n + \" AuthorName text NOT NULL, \\n\"\n + \"\tPrice integer\\n\"\n + \");\";\n\n try (Connection conn = DriverManager.getConnection(urlPath);\n Statement stmt = conn.createStatement()) {\n System.out.println(\"Database connected\");\n stmt.execute(sql);\n\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public void dbConnection()\n {\n\t try {\n\t \t\tClass.forName(\"org.sqlite.JDBC\");\n // userName=rpanel.getUserName();\n String dbName=userName+\".db\";\n c = DriverManager.getConnection(\"jdbc:sqlite:database/\"+dbName);\n }\n //catch the exception\n catch ( Exception e ) \n { \n System.err.println( \"error in catch\"+e.getClass().getName() + \": \" + e.getMessage() );\n System.exit(0);\n }\n\t if(c!=null)\n\t {\n System.out.println(\"Opened database successfully\");\n\t System.out.println(c);\n createData();\n\t}\n }", "public static Connection establishConnection() {\n\t\tProperties props = new Properties();\n\t\tprops.setProperty(\"gssEncMode\", \"disable\");\n\t\tprops.setProperty(\"user\", \"pi\");\n\t\tprops.setProperty(\"password\", \"Bdw040795\"); // Should probably find a way to not have password in plaintext\n\t\tprops.setProperty(\"sslmode\", \"disable\");\n\t\tConnection WeatherDB;\n\t\ttry {\n\t\tWeatherDB = DriverManager.getConnection(\"jdbc:postgresql://10.0.0.100:5433/weather_app\", props);\n\t\treturn WeatherDB;\n\t\t} catch (SQLException e) {\n\t\te.printStackTrace();\n\t\tWeatherDB = null;\n\t\treturn WeatherDB;\n\t\t}\n\t}", "private void initDB() {\n dataBaseHelper = new DataBaseHelper(this);\n }", "public static Connection createConnection() throws Exception {\n \tClass.forName(DRIVER);\n \treturn DriverManager.getConnection(DBURL, USERNAME, PASSWORD); \t\n }", "private Connection openConnection() throws SQLException {\r\n\t\tConnection dbConnection = DriverManager.getConnection(databaseURL, username, password);\r\n\t\treturn dbConnection;\r\n\t}", "public static void establishConnection()throws IOException, SQLException {\n connection= DriverManager.getConnection(\n Configuration.fileReader(\"dbhostname\"),\n Configuration.fileReader(\"dbusername\"),\n Configuration.fileReader(\"dbpassword\"));\n statement=connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);\n }", "private void connect() {\n try {\n Class.forName(\"org.sqlite.JDBC\");\n this.conn = DriverManager.getConnection(\"jdbc:sqlite:settings.db\");\n } catch (ClassNotFoundException | SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n }\n }", "private void createDatabase() throws Exception{\n Statement stm = this.con.createStatement();\n stm.execute(\"CREATE DATABASE IF NOT EXISTS \" + database +\n \" DEFAULT CHARACTER SET utf8 COLLATE utf8_persian_ci\");\n }", "Connection getConnection(String database, String schema, String jdbcURL, String jdbcURLParameters, String user, String password, boolean createDB, boolean createSchema, boolean dropDBIfExist) throws Exception;", "public static void open()\n\t{\n\t\ttry\n\t\t{\n\t\t\tClass.forName(PATH_DRIVER_JDBC).newInstance();\n\t\t\tCONNECTION \t= DriverManager.getConnection(PATH_DB,USER,PASSWORT);\n\t\t\tSTATEMENT \t= CONNECTION.createStatement();\n\t\t\tlink = true;\n\t\t\n\t\t} catch (Exception e) \n\t\t{\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Database() {\r\n\t\ttry {\t\r\n\t\t\tSystem.out.println(\"Database: Connected\");\r\n\t\t\tconn = DriverManager.getConnection(DB_URL,USER,PASS);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Unable to connect to database\");\r\n\t\t}\r\n\t}", "@Override\n public Database getInitialized() {\n return Databases.createPostgresDatabaseWithRetry(\n username,\n password,\n connectionString,\n isDatabaseReady);\n }", "protected Connection createConnection() throws SQLException {\n return this.dataSourceUtils.getConnection();\n }", "@Override\r\n protected void connect() {\r\n try {\r\n this.setDatabase();\r\n } catch (SQLException e) {\r\n Log.w(NoteTraitDataSource.class.getName(), \"Error setting database.\");\r\n }\r\n }", "private void configureDB() {\n\t\tmDb = mDbHelper.getWritableDatabase();\n\t}", "private Connection getConnection() throws SQLException { //gets and returns a connection to the database at the file path specified when the object was instantiated\n return DriverManager.getConnection(\"jdbc:sqlite:\" + databasePath); //returns the connection to the specified database\n }", "private void initialize() {\n if (databaseExists()) {\n SharedPreferences prefs = PreferenceManager\n .getDefaultSharedPreferences(mContext);\n int dbVersion = prefs.getInt(SP_KEY_DB_VER, 1);\n if (DATABASE_VERSION != dbVersion) {\n File dbFile = mContext.getDatabasePath(DBNAME);\n if (!dbFile.delete()) {\n Log.w(TAG, \"Unable to update database\");\n }\n }\n }\n if (!databaseExists()) {\n createDatabase();\n }\n }", "private Connection connect_db() {\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setUser(db_user);\n dataSource.setPassword(db_pass);\n dataSource.setServerName(db_url);\n dataSource.setDatabaseName(db_database);\n\n Connection conn = null;\n try {\n conn = dataSource.getConnection();\n conn.setAutoCommit(false);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "public static Connection getConnectionToDB() {\n\t\tProperties properties = getProperties();\n\n\t\ttry {\n\t\t\tmyConnection = DriverManager.getConnection(JDBC_URL, properties);\n\t\t\treturn myConnection;\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "private static Connection getDBConnection() {\n\n\t\tConnection dbConnection = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(DB_DRIVER);\n\n\t\t} catch (ClassNotFoundException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\n\t\ttry {\n\n\t\t\tdbConnection = DriverManager.getConnection(DB_CONNECTION, DB_USER,\n\t\t\t\t\tDB_PASSWORD);\n\t\t\treturn dbConnection;\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\n\t\treturn dbConnection;\n\n\t}", "public void createDatabase() throws IOException{\r\n\r\n boolean dbDoesExist = checkDatabase();\r\n if(!dbDoesExist)\r\n {\r\n // Create or open db if db is not connected\r\n this.getReadableDatabase();\r\n try{\r\n createNewDB();\r\n }catch (IOException e){\r\n throw new Error(\"DB Copy Failed\");\r\n }\r\n }\r\n }", "private static Connection getConnection() throws SQLException {\n return DriverManager.getConnection(\"jdbc:derby:derbyDB\");\n }", "public void connectToDb(){\n\t log.info(\"Fetching the database name and other details ... \");\n\t dbConnect.setDbName(properties.getProperty(\"dbName\"));\n\t dbConnect.setUsrName(properties.getProperty(\"dbUsrname\"));\n\t dbConnect.setPassword(properties.getProperty(\"dbPassword\"));\n\t dbConnect.setSQLType(properties.getProperty(\"sqlServer\").toLowerCase());\n\t log.info(\"Trying to connect to the database \"+dbConnect.getDbName()+\" ...\\n with user name \"+dbConnect.getUsrname()+\" and password ****** \");\n\t dbConnect.connectToDataBase(dbConnect.getSQLType(), dbConnect.getDbName(), dbConnect.getUsrname(), dbConnect.getPswd());\n\t log.info(\"Successfully connected to the database \"+dbConnect.getDbName());\n }", "private void connectDatabase(){\n }", "protected static Connection connect() throws SQLException, ClassNotFoundException {\r\n String url = \"jdbc:sqlite:\" + databasePath;\r\n Connection conn;\r\n\r\n Class.forName(DRIVER);\r\n SQLiteConfig config = new SQLiteConfig();\r\n config.enforceForeignKeys(true);\r\n conn = DriverManager.getConnection(url, config.toProperties());\r\n\r\n return conn;\r\n }", "private void openConnection () {\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(\n\t\t\t\t\tPasswordProtector.HOST,\n\t\t\t\t\tPasswordProtector.USER,\n\t\t\t\t\tPasswordProtector.PASSWORD);\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t}\n\t}", "public void OpenDB() {\n\t\tString JDriver = \"com.microsoft.sqlserver.jdbc.SQLServerDriver\";// 数据库驱动\n\t\tSystem.out.println(\"数据库驱动成功\");\n\t\tString connectDB = \"jdbc:sqlserver://localhost:1433;DatabaseName=bookstoreDB\";// 数据库连接\n\t\ttry {\n\t\t\tClass.forName(JDriver);// 加载数据库引擎,返回给定字符串名的类\n\t\t} catch (ClassNotFoundException e) {// e.printStackTrace();\n\t\t\tSystem.out.println(\"加载数据库引擎失败\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\ttry {\n\t\t\tconDB = DriverManager.getConnection(connectDB, \"sa\", \"123456\");// 连接数据库对象\n\t\t\tSystem.out.println(\"连接数据库成功\");\n\t\t\tstaDB = conDB.createStatement();\n\t\t} // 创建SQL命令对象\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"数据库连接错误\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public Connection getConnection() {\n try {\n return DriverManager.getConnection(\"jdbc:sqlite:\" + dbName);\n } catch (SQLException e) {\n return null;\n }\n }", "public void initDb() {\n String createVac = \"create table if not exists vacancies(id serial primary key,\"\n + \"name varchar(1500) NOT NULL UNIQUE, url varchar (1500), description text, dateVac timestamp);\";\n try (Statement st = connection.createStatement()) {\n st.execute(createVac);\n } catch (SQLException e) {\n LOG.error(e.getMessage());\n }\n }" ]
[ "0.74153435", "0.7305279", "0.72658926", "0.7145403", "0.70539784", "0.7049111", "0.70419544", "0.7011788", "0.700516", "0.6995391", "0.69930786", "0.6974525", "0.69677466", "0.6942332", "0.69199145", "0.6919152", "0.6889208", "0.687429", "0.68483645", "0.68426013", "0.6829824", "0.6829524", "0.6826687", "0.67955256", "0.67766476", "0.67756975", "0.67685735", "0.67524666", "0.6748742", "0.6748611", "0.67304647", "0.6714242", "0.670942", "0.6707613", "0.6683073", "0.668044", "0.66707903", "0.6659552", "0.665547", "0.6646577", "0.66390216", "0.663407", "0.6624323", "0.662135", "0.66020083", "0.65862364", "0.6580825", "0.6580015", "0.6579386", "0.6578014", "0.657185", "0.6567394", "0.6567219", "0.6558796", "0.6557643", "0.6552855", "0.6536708", "0.6536174", "0.6534417", "0.6528666", "0.65113366", "0.65063125", "0.6505054", "0.6503987", "0.65011567", "0.6494673", "0.649427", "0.6489893", "0.64730865", "0.6470797", "0.6461155", "0.6458173", "0.6450124", "0.6449058", "0.64454085", "0.643615", "0.6425553", "0.6424176", "0.6420073", "0.64174765", "0.64069766", "0.64016503", "0.6399323", "0.6398562", "0.6392079", "0.6391658", "0.6390148", "0.63890505", "0.6380245", "0.6376855", "0.63705736", "0.6367579", "0.6362064", "0.6360378", "0.63593656", "0.6359067", "0.6356697", "0.635345", "0.6344782", "0.6344749" ]
0.6932167
14
Executes an update query in the database
public void dbUpdate(String query) { try { tryDbUpdate(query); } catch (SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void executeUpdate();", "void executeUpdate();", "public void executeUpdate(String query) {\n \ttry {\n\t\t\tst.executeUpdate(query);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "public abstract int execUpdate(String query) ;", "@Override\n\tpublic void update(String query) {\n\t\ttry {\n\t\t\tStatement st = Database.getInstance().getDBConn().createStatement();\n\t\t\tst.executeUpdate(query);\n\t\t\t\n\t\t\tst.close();\n\t\t} catch(Exception err) {\n\t\t\terr.printStackTrace();\n\t\t}\n\t}", "public int update(String theQuery) throws SQLException {\r\n Statement st = this.connector.createStatement();\r\n return st.executeUpdate(theQuery);\r\n }", "public void executeUpdate(String request) {\n try {\r\n st.executeUpdate(request);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void update(String expression) {\r\n \t\tStatement st = null;\r\n \t\ttry {\r\n \t\t\tst = conn.createStatement();\r\n \t\t\tint i = st.executeUpdate(expression); // run the query\r\n \t\t\tif (i == -1) {\r\n \t\t\t\tSystem.out.println(\"db error : \" + expression);\r\n \t\t\t}\r\n \r\n \t\t} catch (SQLException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t} finally {\r\n \t\t\ttry {\r\n \t\t\t\tst.close();\r\n \t\t\t} catch (SQLException e) {\r\n \t\t\t\te.printStackTrace();\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t}", "public synchronized void update(String expression) throws SQLException {\n\n Statement st = null;\n\n st = conn.createStatement(); // statements\n\n int i = st.executeUpdate(expression); // run the query\n\n if (i == -1) {\n System.out.println(\"db error : \" + expression);\n }\n\n st.close();\n }", "void executeUpdate(String noParamQuery, Connection conn);", "public void executeUpdate(String query) throws SQLException{\n Connection con = this.getConnection();\n\n if (con == null) {\n throw new SQLException(\"Can't get database connection\");\n }\n con.setAutoCommit(false);\n\n Statement statement = con.createStatement();\n statement.executeUpdate(query);\n statement.close();\n con.commit();\n con.close();\n }", "public void executeUpdate(String sql) {\n\t\ttry {\n\t\t\tstm = connection.createStatement();\n\t\t\tstm.executeUpdate(sql);\n\t\t\tSystem.out.println(\"Database update complete.\");\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "Integer update(final String sql);", "int executeUpdate() throws SQLException;", "public int queryUpdate(String query) throws SQLException {\n\t \t\t// Création de l'objet gérant les requêtes\n\t \t\tstatement = cnx.createStatement();\n\t \t\t\t\t\n\t \t\t// Exécution d'une requête d'écriture\n\t \t\tint statut = statement.executeUpdate(query);\n\t \t\t\n\t \t\treturn statut;\n\t \t}", "public void executeUpdate (String sql) throws SQLException {\n // creates a statement object\n Statement stmt = this._connection.createStatement ();\n\n // issues the update instruction\n stmt.executeUpdate (sql);\n\n // close the instruction\n stmt.close ();\n }", "@Override\n public synchronized int executeUpdate(String sql) throws SQLException {\n\n statementString = sql;\n return connection.executetinyUpdate(this);\n\n }", "@Override\r\n\tpublic void update() throws SQLException {\n\r\n\t}", "protected synchronized void pureSQLUpdate(String query) {\n if(this.connect()) {\n try {\n this.statement = this.connection.createStatement();\n this.statement.executeUpdate(query);\n } catch(SQLException ex) {\n Logger.getLogger(MySQLMariaDBConnector.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n this.close();\n }\n }\n }", "public static void Update(String query) throws SQLException{\r\n\t\ttry {\r\n\t\t\tinitConnection();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tdbCon.createStatement().executeUpdate(query);\t\t\t\r\n\t}", "public void executeUpdate(T databaseConnection, String query, Connection connection) throws SQLException {\n query = this.removeIllegalCharactersForSingleQuery(databaseConnection, query);\n query = refactorLimitAndOffset(query);\n // query = prepareQuery(query);\n log.info(databaseConnection.getConnectionURL() + \":\" + query);\n\n Statement statement = connection.createStatement();\n statement.executeUpdate(query);\n statement.close();\n }", "public void update() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.update(this);\n\t\tsession.getTransaction().commit();\n\t}", "public void update(String hql) {\n\r\n\t}", "@Override\n\tpublic void queryUpdate() {\n\t\tneedToUpdate = true;\n\t}", "public static void updateQuery(String query) throws SQLException {\n\t\t\t// TODO Auto-generated method stub\n\t\t\tConnection con = connectToDB();\n\t\t\tStatement cmd = con.createStatement ();\n\t\t\t\n\t\t\tcmd.executeUpdate(query);\n\t\t\t\n\t\t\tcloseConnectionToDB(con);\n\t\t\t\n\t\t}", "public void editar(String update){\n try {\n Statement stm = Conexion.getInstancia().createStatement();\n stm.executeUpdate(update);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "public void executeUpdateQuery(String hql) throws RepositoryException {\n\t\tDatanucleusCRUDUtils.executeUpdateQuery(hql);\n\t}", "public int executeUpdate(String sql) throws Exception {\n\t\tint result = stmt.executeUpdate(sql);\n\t\t// stmt.close();\n\t\treturn result;\n\t}", "public void update() {\n\t\tPreparedStatement stmt;\n\t\ttry {\n\t\t\tstmt = cn.prepareStatement(\n\t\t\t\t\t\"UPDATE Metal SET metalDissolvedBy = ?, molesOfAcidToDissolve = ? WHERE metalID = ?\");\n\t\t\tstmt.setInt(1, dissolvedBy);\n\t\t\tstmt.setDouble(2, molesOfAcidToDissolve);\n\t\t\tstmt.setInt(3, ID);\n\t\t\tstmt.execute();\n\t\t} catch (Exception e) {\n\t\t\tDatabaseException.detectError(e);\n\t\t}\n\t}", "public void executeUpdateQuery(String hql, Map params) throws RepositoryException {\n\t\tDatanucleusCRUDUtils.executeUpdateQuery(hql, params); \n\t\tparams.clear();\n\t}", "protected void update() throws SQLException {\n\t\tProperties whereClause = new Properties();\n\t\twhereClause.setProperty(\"1\", \"1\");\n\t\tupdatePersistentState(getSchema(), persistentState, whereClause);\n\t}", "public void doUpdate(T objectToUpdate) throws SQLException;", "@Override\r\n public void update(String query, Object... parameters) {\n Connection connection = null;\r\n PreparedStatement prepareStatement = null;\r\n try {\r\n connection = getConnection();\r\n connection.setAutoCommit(false);\r\n prepareStatement = connection.prepareStatement(query);\r\n setParameter(prepareStatement, parameters);\r\n prepareStatement.executeUpdate();\r\n connection.commit();\r\n } catch (SQLException e) {\r\n if(connection != null) {\r\n try {\r\n connection.rollback();\r\n } catch (SQLException ex) {\r\n }\r\n } else {\r\n } \r\n } finally {\r\n try {\r\n connection.close();\r\n if (prepareStatement != null) {\r\n prepareStatement.close();\r\n }\r\n } catch (SQLException e) {\r\n }\r\n }\r\n }", "@Override\n\tpublic void executeUpdateDinamicQuery(String s) throws Exception {\n\t\t\n\t}", "public static Boolean updateData(String query){\n int affectedRow = 0;\n connect();\n try{\n Statement stm = conn.createStatement();\n affectedRow = stm.executeUpdate(query);\n }catch(Exception e) {\n System.out.println(e.getMessage());\n }\n disconnect();\n if(affectedRow == 0)\n return false;\n else\n return true;\n }", "public int executeUpdate() throws SQLException {\n return statement.executeUpdate();\n }", "private void updateDB() {\n }", "private <T> void executeUpdate(T value, Object key, String query) {\r\n\t\tlogger.entering(CLASSNAME, \"executeUpdate\", new Object[] {key, value, query});\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement statement = null;\r\n\t\tByteArrayOutputStream baos = null;\r\n\t\tObjectOutputStream oout = null;\r\n\t\tbyte[] b;\r\n\t\ttry {\r\n\t\t\tconn = getConnection();\r\n\t\t\tstatement = conn.prepareStatement(query);\r\n\t\t\tbaos = new ByteArrayOutputStream();\r\n\t\t\toout = new ObjectOutputStream(baos);\r\n\t\t\toout.writeObject(value);\r\n\r\n\t\t\tb = baos.toByteArray();\r\n\r\n\t\t\tstatement.setBytes(1, b);\r\n\t\t\tstatement.setObject(2, key);\r\n\t\t\tstatement.executeUpdate();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new PersistenceException(e);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new PersistenceException(e);\r\n\t\t} finally {\r\n\t\t\tif (baos != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tbaos.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (oout != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\toout.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcleanupConnection(conn, null, statement);\r\n\t\t}\r\n\t\tlogger.exiting(CLASSNAME, \"executeUpdate\");\r\n\t}", "private void tryDbUpdate(String query) throws SQLException {\n Statement s = null;\n try {\n s = rawDataSource.getConnection().createStatement();\n s.executeUpdate(query);\n } finally {\n s.close();\n }\n }", "public int executeUpdate(String sql)\r\n throws SQLException {\n return 0;\r\n }", "public static void editDatabase(String sql){\n Connection connection = dbConnection();\n\n try{\n PreparedStatement pst = connection.prepareStatement(sql);\n pst.executeUpdate();\n pst.close();\n connection.close();\n }catch (Exception e){\n e.printStackTrace();\n }\n }", "int update(Purchase purchase) throws SQLException, DAOException;", "public void updates(String hql, Object... param) {\n\t\tthis.rsDAO.updates(hql, param) ;\n\t}", "public void update() throws SQLException {\n DatabaseConnector.updateQuery(\"UPDATE course SET \"\n + \"courseDept='\" + this.courseDept + \"', \"\n + \"courseNum='\" + this.courseNum + \"', \"\n + \"courseName='\" + this.courseName + \"', \"\n + \"info='\" + this.info + \"', \"\n + \"credit=\" + this.credit);\n }", "public void update(T t) {\n\t\tConnection connection = null;\n\t\tPreparedStatement statement = null;\n\t\tString query = createUpdate(t);\n\t\ttry {\n\t\t\tconnection = ConnectionDB.getConnection();\n\t\t\tstatement = connection.prepareStatement(query);\n\t\t\tstatement.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.log(Level.WARNING, type.getName() + \"DAO:Update \" + e.getMessage());\n\t\t} finally {\n\t\t\tConnectionDB.close(statement);\n\t\t\tConnectionDB.close(connection);\n\t\t}\n\t}", "private void executeUpdate()\n\t\t\tthrows TranslatorException {\n\t\tUpdate ucommand = (Update) command;\t\n\t\t\n\t\tTable t = metadata.getTable(ucommand.getTable().getMetadataObject().getFullName());\n//\t\tList<ForeignKey> fks = t.getForeignKeys();\n\t\t\n\t\t// if the table has a foreign key, its must be a child (contained) object in the root\n\t\tif (t.getForeignKeys() != null && t.getForeignKeys().size() > 0) {\n\t\t\t updateChildObject(t);\n\t\t\t return;\n\t\t}\n\n\t}", "public void updateDB() {\n \n sql = \"UPDATE Order set \" + \"CustomerID='\"+getCustomerID()+\"',\" + \" Status='\"+getStatus()+\"'\" + \" WHERE OrderID= '\" + getOrderID()+\"'\";\n db.updateDB(sql);\n \n }", "CustomUpdateQuery update(String table);", "public static int update( String sql )\n \t{\n \t\tint rowsModified = -1;\n \t\t\n \t\tConnection conn = getConnection();\n \t\n \t\t\ttry {\n \t\t\t\tStatement st = conn.createStatement();\n \t\t\t\trowsModified = st.executeUpdate( sql );\n \t\t\t\tst.close();\n \t\t\t}\n \t\t\tcatch (SQLException ex) {\n \t\t\t\tthrow new RuntimeException( ex );\n \t\t\t}\n \t\t\n \t\treturnConnection( conn );\n \t\t\n \t\treturn rowsModified; \n \t}", "@Override\n\tpublic void update(DomainEntity entity) throws SQLException {\n\t\t\n\t}", "public int executeUpdate(String sql) throws SQLException {\n return currentPreparedStatement.executeUpdate(sql);\n }", "@Override\n\tpublic void executeUpdateDinamicSQL(String s) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void executeQuery(String query) {\n\t\tStatement statement;\n\t\ttry {\n\t\t\tstatement=connection.createStatement();\n\t\t\tstatement.executeUpdate(query);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "public int executeUpdate(final String stmt) throws SQLException {\n return connection.createStatement().executeUpdate(stmt);\n }", "public int executeUpdate() throws SQLException {\n return currentPreparedStatement.executeUpdate();\n }", "@Override\n\tpublic void update(String sql, Object... parameters) {\n\t\tConnection conn = null;\n\t PreparedStatement stm = null;\n\t try {\n\t\t\tconn = getConnection();\n\t\t conn.setAutoCommit(false);\n\t\t stm = conn.prepareStatement(sql);\n\t\t setParameter(stm, parameters);\n\t\t stm.executeUpdate();\n\t\t conn.commit();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO: handle exception\n\t\t\ttry {\n\t\t\t\tconn.rollback();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t e.printStackTrace();\n\t\t \n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\n\t\t\t\tif (stm != null) {\n\t\t\t\t\tstm.close();\n\t\t\t\t}\n\n\t\t\t} catch (Exception e2) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void update(T instance) throws Exception {\n String primaryKeyValue=ReflectionUtils.getFieldValue(instance,instance.getPrimaryKeyName());\n if(null==primaryKeyValue){\n throw new Exception(\"This is no primary key value\");\n }\n\n initDBTableMeta(instance);\n String setClause=buildSQLKeyValueMap(instance,\",\");\n String whereClause =instance.getPrimaryKeyName()+\"=\"+primaryKeyValue;\n String sql = UPDATE+tableName+SET+setClause+WHERE+whereClause;\n logger.info(\"usedSql={}\", sql);\n\n }", "public void update(IEntity entity) throws SQLException;", "public static void executingUpdate(String query1) {\r\n try {\r\n //Apertura de conexion:\r\n Connection con = iniciarConexion();\r\n PreparedStatement pst = con.prepareStatement(query1);\r\n con.setAutoCommit(false);\r\n //Añadimos todas las setencias del ArrayList a la batería de queries:\r\n\r\n pst.addBatch(query1);\r\n\r\n //Recogemos los datos de filas modificadas por cada query y los mostramos:\r\n int[] registrosAfectados = pst.executeBatch();\r\n for (int i = 0; i < registrosAfectados.length; i++) {\r\n System.out.println(\"Filas modificadas: \" + registrosAfectados[i]);\r\n }\r\n //Se confirma la transacción a la base de datos:\r\n con.commit();\r\n con.close();\r\n //Se limpia el ArrayList para una sesión posterior:\r\n\r\n } catch (SQLException ex) {\r\n System.err.print(\"SQLException: \" + ex.getMessage());\r\n }\r\n }", "public void updateQuery(String query) {\n\t\tUpdateAction.parseExecute(query, model);\n\t}", "public static int executeUpdate(final String sql, final Object... args)\n {\n return new SqlClosure<Integer>()\n {\n @Override\n protected Integer execute(Connection connection) throws SQLException\n {\n return OrmElf.executeUpdate(connection, sql, args);\n }\n }.execute();\n }", "<T extends BaseDto> void executeUpdate(String reqQuery, T req, Connection conn);", "private int sendUpdate(String sqlQuery) {\n int result = 0;\n getRemoteConnection();\n try {\n statement = conn.createStatement();{\n // Execute a SELECT SQL statement.\n result = statement.executeUpdate(sqlQuery);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return result;\n }", "private void executeUpdate(final String sqlStatement, final String keyValue, final String eiffelevent)\n throws ConnectException, SQLException {\n try (PreparedStatement preparedStatement = prepareStatmentForResourceBlock(sqlStatement)) {\n preparedStatement.setString(1, eiffelevent);\n preparedStatement.setString(2, keyValue);\n int updateCount = preparedStatement.executeUpdate();\n\n if (updateCount == 0) {\n throw new SQLException(\"No changes was saved in the database.\");\n }\n\n } catch (SQLException e) {\n LOGGER.error(\"Error when trying to add value into database: {}\\n{}\", e.getMessage(), e);\n throw e;\n }\n }", "public boolean update(@NotNull T object) {\n boolean rowUpdated = false;\n Logger logger = getLogger();\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getUpdate())) {\n\n setStatement(preparedStatement, object);\n setUpdateStatementId(preparedStatement, object);\n\n logger.info(\"Executing statement: \" + preparedStatement);\n rowUpdated = preparedStatement.executeUpdate() > 0;\n } catch (SQLException | NotEnoughDataException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Update: success\");\n return rowUpdated;\n }", "public int executeSQLUpdate(final String sql) {\n\n long start = System.currentTimeMillis();\n int updateResult = txTemplate\n .execute(new TransactionCallback<Integer>() {\n @Override\n public Integer doInTransaction(TransactionStatus status) {\n return getSession(false).createSQLQuery(sql)\n .executeUpdate();\n }\n });\n logger.debug(\"executeSQLUpdate took: \"\n + (System.currentTimeMillis() - start) + \" ms\");\n return updateResult;\n }", "@Override\n\tpublic boolean update(String sql) {\n\t\treturn false;\n\t}", "public boolean update() {\n executeCallbacks(CallbackType.BEFORE_UPDATE);\n\n executeCallbacks(CallbackType.BEFORE_VALIDATION);\n executeValidations();\n executeValidationsOnUpdate();\n if (errors.size() > 0) return false;\n executeCallbacks(CallbackType.AFTER_VALIDATION);\n\n Adapter adapter = getAdapter();\n StringBuilder sql = new StringBuilder();\n sql.append(\"UPDATE \").append(getTableName());\n sql.append(\" SET \").append(quotedCommaPairList(attributesWithQuotes(includePrimaryKey)));\n sql.append(\" WHERE \").append(getPrimaryKey()).append(\" = \").append(adapter.quote(getId()));\n\n boolean result = adapter.update(sql.toString(), getClass().getName() + \" Update\") == 1;\n if (result) {\n reloadAssociations();\n reloadAggregations();\n }\n\n executeCallbacks(CallbackType.AFTER_UPDATE);\n return result;\n }", "public int req(Long req_id)throws SQLException {\nint i=DbConnect.getStatement().executeUpdate(\"update requested set status='processed',remark='bought fail' where reqid=\"+req_id+\"\");\t\r\n\treturn i;\r\n}", "void update(User user) throws SQLException;", "public void update( Query q, UpdateOperations ops) {\n \tds.update(q, ops);\n }", "public void update(T object) throws SQLException;", "public int executeUpdateCmd(String sql) {\n\t\ttry {\n\t\t\treturn stmt.executeUpdate(sql);\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn 0;\n\t\t} \n\t}", "public int Editcomp(Long comp_id, String compname, String address, String city,\r\n\t\tString state, Long offno, Long faxno, String website, String e_mail) throws SQLException {\nint i =DbConnect.getStatement().executeUpdate(\"update company set address='\"+address+\"',city='\"+city+\"',state='\"+state+\"',offno=\"+offno+\",faxno=\"+faxno+\",website='\"+website+\"',email='\"+e_mail+\"'where comp_id=\"+comp_id+\" \");\r\n\treturn i;\r\n}", "public HttpStatus executeUpdate(String updateQuery) throws RmesException {\n\t\tHttpStatus status = repositoryUtils.executeUpdate(updateQuery, repositoryUtils.initRepository(config.getRdfServerPublicationInterne(), config.getRepositoryIdPublicationInterne()));\n\t\tif (status.is2xxSuccessful() ) {\n\t\t\tstatus = repositoryUtils.executeUpdate(updateQuery, repositoryUtils.initRepository(config.getRdfServerPublication(), config.getRepositoryIdPublication()));\n\t\t}\n\t\treturn status;\n\t}", "public void update() throws SQLException {\r\n\t\t//SQL-Statment\r\n\r\n\t\tString sql = \" UPDATE \" +table+ \" SET \" + col_genre + \" = ?\"\r\n\t\t\t\t+ \"WHERE \" + col_genreID + \" = ?\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setString(1, this.getGenre());\r\n\t\tstmt.setInt(2, this.getGenreID());\r\n\r\n\r\n\t\t//Update\r\n\t\tint rowsUpdated = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \"+rowsUpdated+ \"Zeilen hinzugefügt\");\r\n\t\tstmt.close();\r\n\r\n\t}", "@Override\n\tpublic int update(Object obj) throws SQLException {\n\t\treturn 0;\n\t}", "@Test\r\n\tpublic void testUpdate() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tE updated = supplyUpdated(entities.get(0));\r\n\t\tdao.update(entities.get(0));\r\n\t\tentities = dao.findAll();\r\n\t\tassertEquals(updated, entities.get(0));\r\n\t}", "public void update() throws ModelException {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = DataSource.getConnection();\n\t\t\tPreparedStatement pstmt = conn.prepareStatement(\n \" UPDATE carrera nombre = ? WHERE codigo = ?\");\n\t\t\tpstmt.setString(2, this.nombre);\n\t\t\tpstmt.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\tthrow new ModelException(\"Error de acceso a datos\", e);\n\t\t} finally {\n \t\t\tDataSource.closeConnection(conn);\n\t\t}\n\t}", "private void update() {\n\t\tConfiguration conf = new Configuration();\n\t\tconf.configure(\"hibernate.cfg.xml\");\n\t\tSessionFactory sf = conf.buildSessionFactory();\n\t\tSession s = sf.openSession();\n\t\ts.beginTransaction();\n\n\t\tQuery query = s.createQuery(\"update OldStudent os set id=9 where os.name = 'Omkar'\");\n\t\tint count = query.executeUpdate();\n\t\tSystem.out.println(\"Number of Rows Updated in the oldstudent table=\" + count);\n\n\t\ts.getTransaction().commit();\n\t\ts.clear();// s.evict() on all student objects in session\n\t\tsf.close();\n\n\t}", "public void update(String sql) {\n\t\tjdbcTemplate.update(sql);\n\t}", "@Override\n public void doUpdate(FasciaOrariaBean bean) throws SQLException {\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"UPDATE fasciaoraria SET fascia=? WHERE id=?\";\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n statement.setString(1, bean.getFascia());\n statement.setInt(2, bean.getId());\n System.out.println(\"doUpdate=\" + statement);\n statement.executeUpdate();\n con.commit();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n }", "@Override\r\n\tpublic void updateForHql(String hql, Object[] params) throws Exception {\n\r\n\t\ttry {\r\n\t\t\tQuery q = this.getcurrentSession().createQuery(hql);\r\n\t\t\tif (params != null && params.length > 0) {\r\n\t\t\t\tfor (int i = 0; i < params.length; i++) {\r\n\t\t\t\t\tq.setParameter(i, params[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tq.executeUpdate();\r\n\t\t} catch (DataAccessException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tthrow new Exception(\"update error for updateForHql\", e);\r\n\t\t}\r\n\t}", "public void updateSQL(String SQL) {\r\n\t\ttry { \r\n\t statement.executeUpdate(SQL); \r\n\t }\r\n\t\tcatch (Exception e){\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public void update(TdiaryArticle obj) throws SQLException {\n\r\n\t}", "public interface QbUpdate extends QbQuery\n{\n\t/**\n\t * Sets a field to the specified placeholder. May be called \n\t * multiple times.\n\t * @param field\n\t * @param placeholder\n\t * @return This query builder.\n\t */\n\tpublic QbUpdate set(QbField field, String placeholder);\n\t\n\t/**\n\t * Adds a where clause. Very important. Call only once\n\t * per QbUpdate object.\n\t * @return A QbWhere object that is bound to this query.\n\t */\n\tpublic QbWhere where();\n\t\n\t/**\n\t * Signals that you want to update all records. If neither\n\t * where or all is called the query builder will throw an exception.\n\t * @return This query builder.\n\t */\n\tpublic QbUpdate all();\n\t\n\t/**\n\t * Which table to update. Table name should not contain\n\t * backticks. Must be called to make a valid update query.\n\t * @param table\n\t * @return This query builder.\n\t */\n\tpublic QbUpdate inTable(String table);\n}", "int updateByPrimaryKey(Yqbd record);", "private int executeUpdateInternal(List<Object> values) {\r\n\t\tif (logger.isDebugEnabled()) {\r\n\t\t\tlogger.debug(\"The following parameters are used for update \" + getUpdateString() + \" with: \" + values);\r\n\t\t}\r\n\t\tint updateCount = jdbcTemplate.update(updateString, values.toArray(), columnTypes);\r\n\t\treturn updateCount;\r\n\t}", "public void updateData() throws SQLException {\n pst=con.prepareStatement(\"update employee set name=?,city=? where id=?\");\n System.out.println(\"Enter name: \");\n String name=sc.next();\n pst.setString(1,name);\n\n System.out.println(\"Enter city: \");\n String city=sc.next();\n pst.setString(2,city);\n\n System.out.println(\"Enter id: \");\n int id=sc.nextInt();\n pst.setInt(3,id);\n pst.execute();\n\n System.out.println(\"Data updated successfully\");\n }", "public abstract void updateDatabase();", "public int update(String sql, Object... args) throws DataAccessException {\n\t\tSystem.out.println(sql + \" - \" + Arrays.toString(args));\r\n\t\treturn new PreparedStatementCallback<Integer>() {\r\n\t\t\t@Override\r\n\t\t\tprotected Integer doInPreparedStatement(PreparedStatement ps) throws SQLException {\r\n\t\t\t\tint ret = ps.executeUpdate();\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\t\t}.execute(txManager, sql, args);\r\n\t}", "public static void ExecuteWriteQuery(String query) {\n\t\ttry {\n\t\t\tStatement st = conn.createStatement();\n\t\t\tst.executeUpdate(query);\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void update(EmployeeDetail detail) throws DBException;", "@Test\n public void testUpdate() throws MainException, SQLException {\n System.out.println(\"update\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n PreparedStatement stmt = instance.prepareStatement(\n \"insert into infermieri (nome, cognome) values ('luca', 'massa')\");\n boolean expResult = true;\n boolean result = instance.update(stmt);\n assertEquals(expResult, result);\n }", "@Override\n public int updateByQuery( BorrowDO record, BorrowQuery query){\n\n return borrowExtMapper.updateByQuery(record, query);\n }", "int updateByPrimaryKey(Admin record);", "int updateByPrimaryKey(Admin record);", "public int update(Administraors admin, QueryRunner queryRunner,\n\t\t\tConnection connection) throws SQLException {\n\t\treturn 0;\n\t}", "public static int executeUpdate( Connection conn, String sqlString )\n throws SQLException {\n Statement stmt = conn.createStatement();\n int res = stmt.executeUpdate( sqlString );\n return res;\n }", "public boolean executeSQLUpdate(String command, List<Object> values) {\n boolean success = false;\n\n try {\n conn = DriverManager.getConnection(\"jdbc:mysql://\" + server + \":\" + port + \"/\" + database, user, pass);\n PreparedStatement stmt = conn.prepareStatement(command);\n\n int i = 1;\n for(Object value : values) {\n stmt.setObject(i, value);\n i++;\n }\n \n stmt.executeUpdate();\n\n success = true;\n } catch (SQLException e) {\n e.printStackTrace();\n success = false;\n }\n\n return success;\n }" ]
[ "0.8079401", "0.7881371", "0.77503836", "0.76139784", "0.7565068", "0.7502295", "0.74836975", "0.74434036", "0.7441622", "0.7403813", "0.74028784", "0.73898333", "0.73488784", "0.73352504", "0.7311737", "0.7278073", "0.7223663", "0.7211174", "0.71111363", "0.71033233", "0.7084098", "0.7056897", "0.70348614", "0.70338225", "0.70286", "0.70012164", "0.6978089", "0.69603884", "0.69368327", "0.69140655", "0.689193", "0.68873066", "0.6824959", "0.68185973", "0.68003666", "0.67856455", "0.6785019", "0.6781344", "0.6771424", "0.67514837", "0.6750884", "0.67423046", "0.6740377", "0.67282003", "0.6718047", "0.66984206", "0.6697643", "0.66906744", "0.6680086", "0.6666284", "0.6627306", "0.662077", "0.66111004", "0.6607591", "0.6594172", "0.65770394", "0.6572779", "0.6570197", "0.6568413", "0.65524083", "0.6552387", "0.65523344", "0.6540186", "0.65393996", "0.6538286", "0.65245324", "0.6509712", "0.6501965", "0.6488633", "0.6487786", "0.64866656", "0.6472536", "0.6464735", "0.6456936", "0.64563584", "0.64492387", "0.6447185", "0.6443867", "0.64411575", "0.6440803", "0.6425816", "0.6424444", "0.6420706", "0.6420393", "0.6413109", "0.64035624", "0.6397587", "0.6397566", "0.63972735", "0.6387825", "0.63852423", "0.63836247", "0.63835895", "0.6376827", "0.6375018", "0.637292", "0.637292", "0.63555735", "0.6353848", "0.6345872" ]
0.76140785
3
Executes an update query in the database
public void dbUpdate(String query, Connection con) { try { tryDbUpdate(query, con); } catch (SQLException e) { try { con.rollback(); } catch (SQLException e1) { e1.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void executeUpdate();", "void executeUpdate();", "public void executeUpdate(String query) {\n \ttry {\n\t\t\tst.executeUpdate(query);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "public abstract int execUpdate(String query) ;", "public void dbUpdate(String query) {\n try {\n tryDbUpdate(query);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void update(String query) {\n\t\ttry {\n\t\t\tStatement st = Database.getInstance().getDBConn().createStatement();\n\t\t\tst.executeUpdate(query);\n\t\t\t\n\t\t\tst.close();\n\t\t} catch(Exception err) {\n\t\t\terr.printStackTrace();\n\t\t}\n\t}", "public int update(String theQuery) throws SQLException {\r\n Statement st = this.connector.createStatement();\r\n return st.executeUpdate(theQuery);\r\n }", "public void executeUpdate(String request) {\n try {\r\n st.executeUpdate(request);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void update(String expression) {\r\n \t\tStatement st = null;\r\n \t\ttry {\r\n \t\t\tst = conn.createStatement();\r\n \t\t\tint i = st.executeUpdate(expression); // run the query\r\n \t\t\tif (i == -1) {\r\n \t\t\t\tSystem.out.println(\"db error : \" + expression);\r\n \t\t\t}\r\n \r\n \t\t} catch (SQLException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t} finally {\r\n \t\t\ttry {\r\n \t\t\t\tst.close();\r\n \t\t\t} catch (SQLException e) {\r\n \t\t\t\te.printStackTrace();\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t}", "public synchronized void update(String expression) throws SQLException {\n\n Statement st = null;\n\n st = conn.createStatement(); // statements\n\n int i = st.executeUpdate(expression); // run the query\n\n if (i == -1) {\n System.out.println(\"db error : \" + expression);\n }\n\n st.close();\n }", "void executeUpdate(String noParamQuery, Connection conn);", "public void executeUpdate(String query) throws SQLException{\n Connection con = this.getConnection();\n\n if (con == null) {\n throw new SQLException(\"Can't get database connection\");\n }\n con.setAutoCommit(false);\n\n Statement statement = con.createStatement();\n statement.executeUpdate(query);\n statement.close();\n con.commit();\n con.close();\n }", "public void executeUpdate(String sql) {\n\t\ttry {\n\t\t\tstm = connection.createStatement();\n\t\t\tstm.executeUpdate(sql);\n\t\t\tSystem.out.println(\"Database update complete.\");\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "Integer update(final String sql);", "int executeUpdate() throws SQLException;", "public int queryUpdate(String query) throws SQLException {\n\t \t\t// Création de l'objet gérant les requêtes\n\t \t\tstatement = cnx.createStatement();\n\t \t\t\t\t\n\t \t\t// Exécution d'une requête d'écriture\n\t \t\tint statut = statement.executeUpdate(query);\n\t \t\t\n\t \t\treturn statut;\n\t \t}", "public void executeUpdate (String sql) throws SQLException {\n // creates a statement object\n Statement stmt = this._connection.createStatement ();\n\n // issues the update instruction\n stmt.executeUpdate (sql);\n\n // close the instruction\n stmt.close ();\n }", "@Override\n public synchronized int executeUpdate(String sql) throws SQLException {\n\n statementString = sql;\n return connection.executetinyUpdate(this);\n\n }", "@Override\r\n\tpublic void update() throws SQLException {\n\r\n\t}", "protected synchronized void pureSQLUpdate(String query) {\n if(this.connect()) {\n try {\n this.statement = this.connection.createStatement();\n this.statement.executeUpdate(query);\n } catch(SQLException ex) {\n Logger.getLogger(MySQLMariaDBConnector.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n this.close();\n }\n }\n }", "public static void Update(String query) throws SQLException{\r\n\t\ttry {\r\n\t\t\tinitConnection();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tdbCon.createStatement().executeUpdate(query);\t\t\t\r\n\t}", "public void executeUpdate(T databaseConnection, String query, Connection connection) throws SQLException {\n query = this.removeIllegalCharactersForSingleQuery(databaseConnection, query);\n query = refactorLimitAndOffset(query);\n // query = prepareQuery(query);\n log.info(databaseConnection.getConnectionURL() + \":\" + query);\n\n Statement statement = connection.createStatement();\n statement.executeUpdate(query);\n statement.close();\n }", "public void update() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.update(this);\n\t\tsession.getTransaction().commit();\n\t}", "public void update(String hql) {\n\r\n\t}", "@Override\n\tpublic void queryUpdate() {\n\t\tneedToUpdate = true;\n\t}", "public static void updateQuery(String query) throws SQLException {\n\t\t\t// TODO Auto-generated method stub\n\t\t\tConnection con = connectToDB();\n\t\t\tStatement cmd = con.createStatement ();\n\t\t\t\n\t\t\tcmd.executeUpdate(query);\n\t\t\t\n\t\t\tcloseConnectionToDB(con);\n\t\t\t\n\t\t}", "public void editar(String update){\n try {\n Statement stm = Conexion.getInstancia().createStatement();\n stm.executeUpdate(update);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "public void executeUpdateQuery(String hql) throws RepositoryException {\n\t\tDatanucleusCRUDUtils.executeUpdateQuery(hql);\n\t}", "public int executeUpdate(String sql) throws Exception {\n\t\tint result = stmt.executeUpdate(sql);\n\t\t// stmt.close();\n\t\treturn result;\n\t}", "public void update() {\n\t\tPreparedStatement stmt;\n\t\ttry {\n\t\t\tstmt = cn.prepareStatement(\n\t\t\t\t\t\"UPDATE Metal SET metalDissolvedBy = ?, molesOfAcidToDissolve = ? WHERE metalID = ?\");\n\t\t\tstmt.setInt(1, dissolvedBy);\n\t\t\tstmt.setDouble(2, molesOfAcidToDissolve);\n\t\t\tstmt.setInt(3, ID);\n\t\t\tstmt.execute();\n\t\t} catch (Exception e) {\n\t\t\tDatabaseException.detectError(e);\n\t\t}\n\t}", "public void executeUpdateQuery(String hql, Map params) throws RepositoryException {\n\t\tDatanucleusCRUDUtils.executeUpdateQuery(hql, params); \n\t\tparams.clear();\n\t}", "protected void update() throws SQLException {\n\t\tProperties whereClause = new Properties();\n\t\twhereClause.setProperty(\"1\", \"1\");\n\t\tupdatePersistentState(getSchema(), persistentState, whereClause);\n\t}", "public void doUpdate(T objectToUpdate) throws SQLException;", "@Override\r\n public void update(String query, Object... parameters) {\n Connection connection = null;\r\n PreparedStatement prepareStatement = null;\r\n try {\r\n connection = getConnection();\r\n connection.setAutoCommit(false);\r\n prepareStatement = connection.prepareStatement(query);\r\n setParameter(prepareStatement, parameters);\r\n prepareStatement.executeUpdate();\r\n connection.commit();\r\n } catch (SQLException e) {\r\n if(connection != null) {\r\n try {\r\n connection.rollback();\r\n } catch (SQLException ex) {\r\n }\r\n } else {\r\n } \r\n } finally {\r\n try {\r\n connection.close();\r\n if (prepareStatement != null) {\r\n prepareStatement.close();\r\n }\r\n } catch (SQLException e) {\r\n }\r\n }\r\n }", "@Override\n\tpublic void executeUpdateDinamicQuery(String s) throws Exception {\n\t\t\n\t}", "public static Boolean updateData(String query){\n int affectedRow = 0;\n connect();\n try{\n Statement stm = conn.createStatement();\n affectedRow = stm.executeUpdate(query);\n }catch(Exception e) {\n System.out.println(e.getMessage());\n }\n disconnect();\n if(affectedRow == 0)\n return false;\n else\n return true;\n }", "public int executeUpdate() throws SQLException {\n return statement.executeUpdate();\n }", "private void updateDB() {\n }", "private <T> void executeUpdate(T value, Object key, String query) {\r\n\t\tlogger.entering(CLASSNAME, \"executeUpdate\", new Object[] {key, value, query});\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement statement = null;\r\n\t\tByteArrayOutputStream baos = null;\r\n\t\tObjectOutputStream oout = null;\r\n\t\tbyte[] b;\r\n\t\ttry {\r\n\t\t\tconn = getConnection();\r\n\t\t\tstatement = conn.prepareStatement(query);\r\n\t\t\tbaos = new ByteArrayOutputStream();\r\n\t\t\toout = new ObjectOutputStream(baos);\r\n\t\t\toout.writeObject(value);\r\n\r\n\t\t\tb = baos.toByteArray();\r\n\r\n\t\t\tstatement.setBytes(1, b);\r\n\t\t\tstatement.setObject(2, key);\r\n\t\t\tstatement.executeUpdate();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new PersistenceException(e);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new PersistenceException(e);\r\n\t\t} finally {\r\n\t\t\tif (baos != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tbaos.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (oout != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\toout.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcleanupConnection(conn, null, statement);\r\n\t\t}\r\n\t\tlogger.exiting(CLASSNAME, \"executeUpdate\");\r\n\t}", "private void tryDbUpdate(String query) throws SQLException {\n Statement s = null;\n try {\n s = rawDataSource.getConnection().createStatement();\n s.executeUpdate(query);\n } finally {\n s.close();\n }\n }", "public int executeUpdate(String sql)\r\n throws SQLException {\n return 0;\r\n }", "public static void editDatabase(String sql){\n Connection connection = dbConnection();\n\n try{\n PreparedStatement pst = connection.prepareStatement(sql);\n pst.executeUpdate();\n pst.close();\n connection.close();\n }catch (Exception e){\n e.printStackTrace();\n }\n }", "int update(Purchase purchase) throws SQLException, DAOException;", "public void updates(String hql, Object... param) {\n\t\tthis.rsDAO.updates(hql, param) ;\n\t}", "public void update() throws SQLException {\n DatabaseConnector.updateQuery(\"UPDATE course SET \"\n + \"courseDept='\" + this.courseDept + \"', \"\n + \"courseNum='\" + this.courseNum + \"', \"\n + \"courseName='\" + this.courseName + \"', \"\n + \"info='\" + this.info + \"', \"\n + \"credit=\" + this.credit);\n }", "public void update(T t) {\n\t\tConnection connection = null;\n\t\tPreparedStatement statement = null;\n\t\tString query = createUpdate(t);\n\t\ttry {\n\t\t\tconnection = ConnectionDB.getConnection();\n\t\t\tstatement = connection.prepareStatement(query);\n\t\t\tstatement.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.log(Level.WARNING, type.getName() + \"DAO:Update \" + e.getMessage());\n\t\t} finally {\n\t\t\tConnectionDB.close(statement);\n\t\t\tConnectionDB.close(connection);\n\t\t}\n\t}", "private void executeUpdate()\n\t\t\tthrows TranslatorException {\n\t\tUpdate ucommand = (Update) command;\t\n\t\t\n\t\tTable t = metadata.getTable(ucommand.getTable().getMetadataObject().getFullName());\n//\t\tList<ForeignKey> fks = t.getForeignKeys();\n\t\t\n\t\t// if the table has a foreign key, its must be a child (contained) object in the root\n\t\tif (t.getForeignKeys() != null && t.getForeignKeys().size() > 0) {\n\t\t\t updateChildObject(t);\n\t\t\t return;\n\t\t}\n\n\t}", "public void updateDB() {\n \n sql = \"UPDATE Order set \" + \"CustomerID='\"+getCustomerID()+\"',\" + \" Status='\"+getStatus()+\"'\" + \" WHERE OrderID= '\" + getOrderID()+\"'\";\n db.updateDB(sql);\n \n }", "CustomUpdateQuery update(String table);", "public static int update( String sql )\n \t{\n \t\tint rowsModified = -1;\n \t\t\n \t\tConnection conn = getConnection();\n \t\n \t\t\ttry {\n \t\t\t\tStatement st = conn.createStatement();\n \t\t\t\trowsModified = st.executeUpdate( sql );\n \t\t\t\tst.close();\n \t\t\t}\n \t\t\tcatch (SQLException ex) {\n \t\t\t\tthrow new RuntimeException( ex );\n \t\t\t}\n \t\t\n \t\treturnConnection( conn );\n \t\t\n \t\treturn rowsModified; \n \t}", "@Override\n\tpublic void update(DomainEntity entity) throws SQLException {\n\t\t\n\t}", "public int executeUpdate(String sql) throws SQLException {\n return currentPreparedStatement.executeUpdate(sql);\n }", "@Override\n\tpublic void executeUpdateDinamicSQL(String s) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void executeQuery(String query) {\n\t\tStatement statement;\n\t\ttry {\n\t\t\tstatement=connection.createStatement();\n\t\t\tstatement.executeUpdate(query);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "public int executeUpdate(final String stmt) throws SQLException {\n return connection.createStatement().executeUpdate(stmt);\n }", "public int executeUpdate() throws SQLException {\n return currentPreparedStatement.executeUpdate();\n }", "@Override\n\tpublic void update(String sql, Object... parameters) {\n\t\tConnection conn = null;\n\t PreparedStatement stm = null;\n\t try {\n\t\t\tconn = getConnection();\n\t\t conn.setAutoCommit(false);\n\t\t stm = conn.prepareStatement(sql);\n\t\t setParameter(stm, parameters);\n\t\t stm.executeUpdate();\n\t\t conn.commit();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO: handle exception\n\t\t\ttry {\n\t\t\t\tconn.rollback();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t e.printStackTrace();\n\t\t \n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\n\t\t\t\tif (stm != null) {\n\t\t\t\t\tstm.close();\n\t\t\t\t}\n\n\t\t\t} catch (Exception e2) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void update(T instance) throws Exception {\n String primaryKeyValue=ReflectionUtils.getFieldValue(instance,instance.getPrimaryKeyName());\n if(null==primaryKeyValue){\n throw new Exception(\"This is no primary key value\");\n }\n\n initDBTableMeta(instance);\n String setClause=buildSQLKeyValueMap(instance,\",\");\n String whereClause =instance.getPrimaryKeyName()+\"=\"+primaryKeyValue;\n String sql = UPDATE+tableName+SET+setClause+WHERE+whereClause;\n logger.info(\"usedSql={}\", sql);\n\n }", "public static void executingUpdate(String query1) {\r\n try {\r\n //Apertura de conexion:\r\n Connection con = iniciarConexion();\r\n PreparedStatement pst = con.prepareStatement(query1);\r\n con.setAutoCommit(false);\r\n //Añadimos todas las setencias del ArrayList a la batería de queries:\r\n\r\n pst.addBatch(query1);\r\n\r\n //Recogemos los datos de filas modificadas por cada query y los mostramos:\r\n int[] registrosAfectados = pst.executeBatch();\r\n for (int i = 0; i < registrosAfectados.length; i++) {\r\n System.out.println(\"Filas modificadas: \" + registrosAfectados[i]);\r\n }\r\n //Se confirma la transacción a la base de datos:\r\n con.commit();\r\n con.close();\r\n //Se limpia el ArrayList para una sesión posterior:\r\n\r\n } catch (SQLException ex) {\r\n System.err.print(\"SQLException: \" + ex.getMessage());\r\n }\r\n }", "public void update(IEntity entity) throws SQLException;", "<T extends BaseDto> void executeUpdate(String reqQuery, T req, Connection conn);", "public static int executeUpdate(final String sql, final Object... args)\n {\n return new SqlClosure<Integer>()\n {\n @Override\n protected Integer execute(Connection connection) throws SQLException\n {\n return OrmElf.executeUpdate(connection, sql, args);\n }\n }.execute();\n }", "public void updateQuery(String query) {\n\t\tUpdateAction.parseExecute(query, model);\n\t}", "private int sendUpdate(String sqlQuery) {\n int result = 0;\n getRemoteConnection();\n try {\n statement = conn.createStatement();{\n // Execute a SELECT SQL statement.\n result = statement.executeUpdate(sqlQuery);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return result;\n }", "private void executeUpdate(final String sqlStatement, final String keyValue, final String eiffelevent)\n throws ConnectException, SQLException {\n try (PreparedStatement preparedStatement = prepareStatmentForResourceBlock(sqlStatement)) {\n preparedStatement.setString(1, eiffelevent);\n preparedStatement.setString(2, keyValue);\n int updateCount = preparedStatement.executeUpdate();\n\n if (updateCount == 0) {\n throw new SQLException(\"No changes was saved in the database.\");\n }\n\n } catch (SQLException e) {\n LOGGER.error(\"Error when trying to add value into database: {}\\n{}\", e.getMessage(), e);\n throw e;\n }\n }", "public boolean update(@NotNull T object) {\n boolean rowUpdated = false;\n Logger logger = getLogger();\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getUpdate())) {\n\n setStatement(preparedStatement, object);\n setUpdateStatementId(preparedStatement, object);\n\n logger.info(\"Executing statement: \" + preparedStatement);\n rowUpdated = preparedStatement.executeUpdate() > 0;\n } catch (SQLException | NotEnoughDataException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Update: success\");\n return rowUpdated;\n }", "public int executeSQLUpdate(final String sql) {\n\n long start = System.currentTimeMillis();\n int updateResult = txTemplate\n .execute(new TransactionCallback<Integer>() {\n @Override\n public Integer doInTransaction(TransactionStatus status) {\n return getSession(false).createSQLQuery(sql)\n .executeUpdate();\n }\n });\n logger.debug(\"executeSQLUpdate took: \"\n + (System.currentTimeMillis() - start) + \" ms\");\n return updateResult;\n }", "@Override\n\tpublic boolean update(String sql) {\n\t\treturn false;\n\t}", "public boolean update() {\n executeCallbacks(CallbackType.BEFORE_UPDATE);\n\n executeCallbacks(CallbackType.BEFORE_VALIDATION);\n executeValidations();\n executeValidationsOnUpdate();\n if (errors.size() > 0) return false;\n executeCallbacks(CallbackType.AFTER_VALIDATION);\n\n Adapter adapter = getAdapter();\n StringBuilder sql = new StringBuilder();\n sql.append(\"UPDATE \").append(getTableName());\n sql.append(\" SET \").append(quotedCommaPairList(attributesWithQuotes(includePrimaryKey)));\n sql.append(\" WHERE \").append(getPrimaryKey()).append(\" = \").append(adapter.quote(getId()));\n\n boolean result = adapter.update(sql.toString(), getClass().getName() + \" Update\") == 1;\n if (result) {\n reloadAssociations();\n reloadAggregations();\n }\n\n executeCallbacks(CallbackType.AFTER_UPDATE);\n return result;\n }", "public int req(Long req_id)throws SQLException {\nint i=DbConnect.getStatement().executeUpdate(\"update requested set status='processed',remark='bought fail' where reqid=\"+req_id+\"\");\t\r\n\treturn i;\r\n}", "void update(User user) throws SQLException;", "public void update( Query q, UpdateOperations ops) {\n \tds.update(q, ops);\n }", "public void update(T object) throws SQLException;", "public int executeUpdateCmd(String sql) {\n\t\ttry {\n\t\t\treturn stmt.executeUpdate(sql);\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn 0;\n\t\t} \n\t}", "public int Editcomp(Long comp_id, String compname, String address, String city,\r\n\t\tString state, Long offno, Long faxno, String website, String e_mail) throws SQLException {\nint i =DbConnect.getStatement().executeUpdate(\"update company set address='\"+address+\"',city='\"+city+\"',state='\"+state+\"',offno=\"+offno+\",faxno=\"+faxno+\",website='\"+website+\"',email='\"+e_mail+\"'where comp_id=\"+comp_id+\" \");\r\n\treturn i;\r\n}", "public HttpStatus executeUpdate(String updateQuery) throws RmesException {\n\t\tHttpStatus status = repositoryUtils.executeUpdate(updateQuery, repositoryUtils.initRepository(config.getRdfServerPublicationInterne(), config.getRepositoryIdPublicationInterne()));\n\t\tif (status.is2xxSuccessful() ) {\n\t\t\tstatus = repositoryUtils.executeUpdate(updateQuery, repositoryUtils.initRepository(config.getRdfServerPublication(), config.getRepositoryIdPublication()));\n\t\t}\n\t\treturn status;\n\t}", "public void update() throws SQLException {\r\n\t\t//SQL-Statment\r\n\r\n\t\tString sql = \" UPDATE \" +table+ \" SET \" + col_genre + \" = ?\"\r\n\t\t\t\t+ \"WHERE \" + col_genreID + \" = ?\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setString(1, this.getGenre());\r\n\t\tstmt.setInt(2, this.getGenreID());\r\n\r\n\r\n\t\t//Update\r\n\t\tint rowsUpdated = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \"+rowsUpdated+ \"Zeilen hinzugefügt\");\r\n\t\tstmt.close();\r\n\r\n\t}", "@Override\n\tpublic int update(Object obj) throws SQLException {\n\t\treturn 0;\n\t}", "@Test\r\n\tpublic void testUpdate() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tE updated = supplyUpdated(entities.get(0));\r\n\t\tdao.update(entities.get(0));\r\n\t\tentities = dao.findAll();\r\n\t\tassertEquals(updated, entities.get(0));\r\n\t}", "public void update() throws ModelException {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = DataSource.getConnection();\n\t\t\tPreparedStatement pstmt = conn.prepareStatement(\n \" UPDATE carrera nombre = ? WHERE codigo = ?\");\n\t\t\tpstmt.setString(2, this.nombre);\n\t\t\tpstmt.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\tthrow new ModelException(\"Error de acceso a datos\", e);\n\t\t} finally {\n \t\t\tDataSource.closeConnection(conn);\n\t\t}\n\t}", "private void update() {\n\t\tConfiguration conf = new Configuration();\n\t\tconf.configure(\"hibernate.cfg.xml\");\n\t\tSessionFactory sf = conf.buildSessionFactory();\n\t\tSession s = sf.openSession();\n\t\ts.beginTransaction();\n\n\t\tQuery query = s.createQuery(\"update OldStudent os set id=9 where os.name = 'Omkar'\");\n\t\tint count = query.executeUpdate();\n\t\tSystem.out.println(\"Number of Rows Updated in the oldstudent table=\" + count);\n\n\t\ts.getTransaction().commit();\n\t\ts.clear();// s.evict() on all student objects in session\n\t\tsf.close();\n\n\t}", "@Override\n public void doUpdate(FasciaOrariaBean bean) throws SQLException {\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"UPDATE fasciaoraria SET fascia=? WHERE id=?\";\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n statement.setString(1, bean.getFascia());\n statement.setInt(2, bean.getId());\n System.out.println(\"doUpdate=\" + statement);\n statement.executeUpdate();\n con.commit();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n }", "public void update(String sql) {\n\t\tjdbcTemplate.update(sql);\n\t}", "@Override\r\n\tpublic void updateForHql(String hql, Object[] params) throws Exception {\n\r\n\t\ttry {\r\n\t\t\tQuery q = this.getcurrentSession().createQuery(hql);\r\n\t\t\tif (params != null && params.length > 0) {\r\n\t\t\t\tfor (int i = 0; i < params.length; i++) {\r\n\t\t\t\t\tq.setParameter(i, params[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tq.executeUpdate();\r\n\t\t} catch (DataAccessException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tthrow new Exception(\"update error for updateForHql\", e);\r\n\t\t}\r\n\t}", "public void updateSQL(String SQL) {\r\n\t\ttry { \r\n\t statement.executeUpdate(SQL); \r\n\t }\r\n\t\tcatch (Exception e){\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public void update(TdiaryArticle obj) throws SQLException {\n\r\n\t}", "public interface QbUpdate extends QbQuery\n{\n\t/**\n\t * Sets a field to the specified placeholder. May be called \n\t * multiple times.\n\t * @param field\n\t * @param placeholder\n\t * @return This query builder.\n\t */\n\tpublic QbUpdate set(QbField field, String placeholder);\n\t\n\t/**\n\t * Adds a where clause. Very important. Call only once\n\t * per QbUpdate object.\n\t * @return A QbWhere object that is bound to this query.\n\t */\n\tpublic QbWhere where();\n\t\n\t/**\n\t * Signals that you want to update all records. If neither\n\t * where or all is called the query builder will throw an exception.\n\t * @return This query builder.\n\t */\n\tpublic QbUpdate all();\n\t\n\t/**\n\t * Which table to update. Table name should not contain\n\t * backticks. Must be called to make a valid update query.\n\t * @param table\n\t * @return This query builder.\n\t */\n\tpublic QbUpdate inTable(String table);\n}", "private int executeUpdateInternal(List<Object> values) {\r\n\t\tif (logger.isDebugEnabled()) {\r\n\t\t\tlogger.debug(\"The following parameters are used for update \" + getUpdateString() + \" with: \" + values);\r\n\t\t}\r\n\t\tint updateCount = jdbcTemplate.update(updateString, values.toArray(), columnTypes);\r\n\t\treturn updateCount;\r\n\t}", "public void updateData() throws SQLException {\n pst=con.prepareStatement(\"update employee set name=?,city=? where id=?\");\n System.out.println(\"Enter name: \");\n String name=sc.next();\n pst.setString(1,name);\n\n System.out.println(\"Enter city: \");\n String city=sc.next();\n pst.setString(2,city);\n\n System.out.println(\"Enter id: \");\n int id=sc.nextInt();\n pst.setInt(3,id);\n pst.execute();\n\n System.out.println(\"Data updated successfully\");\n }", "int updateByPrimaryKey(Yqbd record);", "public abstract void updateDatabase();", "public static void ExecuteWriteQuery(String query) {\n\t\ttry {\n\t\t\tStatement st = conn.createStatement();\n\t\t\tst.executeUpdate(query);\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public int update(String sql, Object... args) throws DataAccessException {\n\t\tSystem.out.println(sql + \" - \" + Arrays.toString(args));\r\n\t\treturn new PreparedStatementCallback<Integer>() {\r\n\t\t\t@Override\r\n\t\t\tprotected Integer doInPreparedStatement(PreparedStatement ps) throws SQLException {\r\n\t\t\t\tint ret = ps.executeUpdate();\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\t\t}.execute(txManager, sql, args);\r\n\t}", "void update(EmployeeDetail detail) throws DBException;", "@Test\n public void testUpdate() throws MainException, SQLException {\n System.out.println(\"update\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n PreparedStatement stmt = instance.prepareStatement(\n \"insert into infermieri (nome, cognome) values ('luca', 'massa')\");\n boolean expResult = true;\n boolean result = instance.update(stmt);\n assertEquals(expResult, result);\n }", "@Override\n public int updateByQuery( BorrowDO record, BorrowQuery query){\n\n return borrowExtMapper.updateByQuery(record, query);\n }", "int updateByPrimaryKey(Admin record);", "int updateByPrimaryKey(Admin record);", "public static int executeUpdate( Connection conn, String sqlString )\n throws SQLException {\n Statement stmt = conn.createStatement();\n int res = stmt.executeUpdate( sqlString );\n return res;\n }", "public int update(Administraors admin, QueryRunner queryRunner,\n\t\t\tConnection connection) throws SQLException {\n\t\treturn 0;\n\t}", "public boolean executeSQLUpdate(String command, List<Object> values) {\n boolean success = false;\n\n try {\n conn = DriverManager.getConnection(\"jdbc:mysql://\" + server + \":\" + port + \"/\" + database, user, pass);\n PreparedStatement stmt = conn.prepareStatement(command);\n\n int i = 1;\n for(Object value : values) {\n stmt.setObject(i, value);\n i++;\n }\n \n stmt.executeUpdate();\n\n success = true;\n } catch (SQLException e) {\n e.printStackTrace();\n success = false;\n }\n\n return success;\n }" ]
[ "0.8079921", "0.7882051", "0.77507365", "0.7614855", "0.7613368", "0.7564533", "0.7501968", "0.74836695", "0.7443567", "0.74425393", "0.7404825", "0.74029577", "0.7389863", "0.73490965", "0.7336186", "0.73110074", "0.72776467", "0.72242266", "0.72105104", "0.71112365", "0.71027726", "0.70846874", "0.70548725", "0.7033448", "0.70327383", "0.70279235", "0.69997156", "0.69775915", "0.69616485", "0.6936262", "0.6913899", "0.6891373", "0.6886401", "0.682475", "0.6819714", "0.6801234", "0.67863554", "0.67858297", "0.6782122", "0.67720675", "0.6751916", "0.67515844", "0.6742346", "0.673931", "0.6727433", "0.67171746", "0.6697672", "0.6697609", "0.66898245", "0.6679522", "0.66649026", "0.66279435", "0.66219985", "0.6612963", "0.6607709", "0.6595365", "0.6576785", "0.6572413", "0.6570067", "0.6569613", "0.6552427", "0.65517396", "0.65509045", "0.6540827", "0.65403944", "0.6537872", "0.6524907", "0.6509204", "0.6500762", "0.6489865", "0.6488024", "0.6486656", "0.647233", "0.64650273", "0.64576423", "0.6456513", "0.64488727", "0.64461887", "0.64438325", "0.6440907", "0.64391756", "0.64246", "0.6424158", "0.6420499", "0.6420148", "0.64123946", "0.6401373", "0.63985133", "0.6397991", "0.6396968", "0.6388135", "0.63848656", "0.638478", "0.63838494", "0.6378054", "0.6374061", "0.6371616", "0.6371616", "0.63543206", "0.63542145", "0.6347854" ]
0.0
-1
Returns a connection to the instantiated database
public Connection getTransactionConnection(){ try { return rawDataSource.getConnection(); } catch (SQLException e) { e.printStackTrace(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Connection getConnection() {\n try {\n return DriverManager.getConnection(\"jdbc:sqlite:\" + dbName);\n } catch (SQLException e) {\n return null;\n }\n }", "public IDatabaseConnection getConnection() {\n try {\n DatabaseConnection databaseConnection = new DatabaseConnection(getDataSource().getConnection());\n editConfig(databaseConnection.getConfig());\n return databaseConnection;\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}", "public Connection connection()\n {\n String host = main.getConfig().getString(\"db.host\");\n int port = main.getConfig().getInt(\"db.port\");\n String user = main.getConfig().getString(\"db.user\");\n String password = main.getConfig().getString(\"db.password\");\n String db = main.getConfig().getString(\"db.db\");\n\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setServerName(host);\n dataSource.setPort(port);\n dataSource.setUser(user);\n if (password != null ) dataSource.setPassword(password);\n dataSource.setDatabaseName(db);\n Connection connection = null;\n try\n {\n connection = dataSource.getConnection();\n }\n catch (SQLException sqlException)\n {\n sqlException.printStackTrace();\n }\n return connection;\n }", "private Connection getDBConnection(){\n\t\tConnection conn = null;\n\t\t\t\t\n\t\ttry{\n\t\t\t\t// name of the database\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch(ClassNotFoundException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\t\t\n\t\ttry{\n\t\t\t// type of the database file\n\t\t\tString url = \"jdbc:sqlite:vehicles.sqlite\";\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t}catch(SQLException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn conn;\n\t}", "public Connection getDBConnection() {\n Connection con = connectDB();\n createTables(con);\n return con;\n }", "public Connection getDBConnection()\r\n {\r\n Connection conn = null;\r\n try\r\n {\r\n // Quitamos los drivers\r\n Enumeration e = DriverManager.getDrivers();\r\n while (e.hasMoreElements())\r\n {\r\n DriverManager.deregisterDriver((Driver) e.nextElement());\r\n }\r\n DriverManager.registerDriver(new com.geopista.sql.GEOPISTADriver());\r\n String sConn = aplicacion.getString(UserPreferenceConstants.LOCALGIS_DATABASE_URL);\r\n conn = DriverManager.getConnection(sConn);\r\n AppContext app = (AppContext) AppContext.getApplicationContext();\r\n conn = app.getConnection();\r\n conn.setAutoCommit(false);\r\n } catch (Exception e)\r\n {\r\n return null;\r\n }\r\n return conn;\r\n }", "public Connection getConnection() throws SQLException {\n\t\treturn Database.getConnection();\n\t}", "public static Connection getDbConnection() throws SQLException {\n return getDbConnection(FxContext.get().getDivisionId());\n }", "public static Connection getConnectionToDB() {\n\t\tProperties properties = getProperties();\n\n\t\ttry {\n\t\t\tmyConnection = DriverManager.getConnection(JDBC_URL, properties);\n\t\t\treturn myConnection;\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "private Connection getDBConnection() {\n\n\t\tConnection dbConnection = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(dbDriver);\n\n\t\t} catch (ClassNotFoundException e) {\n\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t}\n\n\t\ttry {\n\n\t\t\tdbConnection = DriverManager.getConnection(dbConnectionURL, dbUser, dbPassword);\n\t\t\treturn dbConnection;\n\n\t\t} catch (SQLException e) {\n\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t}\n\n\t\treturn dbConnection;\n\n\t}", "private Connection getConnection() throws SQLException { //gets and returns a connection to the database at the file path specified when the object was instantiated\n return DriverManager.getConnection(\"jdbc:sqlite:\" + databasePath); //returns the connection to the specified database\n }", "public Connection getConnection() {\n try {\n return ds.getConnection();\n } catch (SQLException e) {\n System.err.println(\"Error while connecting to database: \" + e.toString());\n }\n return null;\n }", "public Connection getConnection() {\n if(connection == null) throw new RuntimeException(\"Attempt to get database connection before it was initialized\");\n return connection;\n }", "public static Connection getDBInstance() {\r\n\t\tif (db == null)\r\n\t\t\ttry {\r\n\t\t\t\tloadDBDriver();\r\n\t\t\t\tdb = DriverManager.getConnection(url, user, password);\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\treturn db;\r\n\t}", "public DatabaseConnection getDatabaseConnection() {\n return query.getDatabaseConnection();\n }", "public DatabaseConnection newConnection();", "private static Connection getDBConnection() {\n\n\t\tConnection dbConnection = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(DB_DRIVER);\n\n\t\t} catch (ClassNotFoundException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\n\t\ttry {\n\n\t\t\tdbConnection = DriverManager.getConnection(DB_CONNECTION, DB_USER,\n\t\t\t\t\tDB_PASSWORD);\n\t\t\treturn dbConnection;\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\n\t\treturn dbConnection;\n\n\t}", "public static Connection getConnection()\n {\n if (ds == null) {\n try {\n initCtx = new InitialContext();\n envCtx = (Context) initCtx.lookup(\"java:comp/env\");\n ds = (DataSource) envCtx.lookup(dbName);\n }\n catch (javax.naming.NamingException e) {\n Logger.log(Logger.ERROR, \"A problem occurred while retrieving a DataSource object\");\n Logger.log(Logger.ERROR, e.toString());\n }\n }\n\n Connection dbCon = null;\n try {\n dbCon = ds.getConnection();\n }\n catch (java.sql.SQLException e) {\n Logger.log(Logger.ERROR, \"A problem occurred while connecting to the database.\");\n Logger.log(Logger.ERROR, e.toString());\n }\n return dbCon;\n }", "public Connection getConnection() {\n\t\t\tConnection conn = null;\n\t\t\tProperties prop = new Properties();\n\n\t\t\ttry {\n\t\t\t\tString url = \"jdbc:postgresql://java2010rev.cfqzgdfohgof.us-east-2.rds.amazonaws.com:5432/postgres?currentSchema=jensquared\";\n\t\t\t\tString username = \"jenny77\";\n\t\t\t\tString password = \"zeus1418\";\n//\t\t\t\tClassLoader loader = Thread.currentThread().getContextClassLoader();\n//\t prop.load(loader.getResourceAsStream(\"database.properties\"));\n//\t\t\t\tconn = DriverManager.getConnection(prop.getProperty(\"url\"),\n//\t\t\t\t\t\tprop.getProperty(\"username\"),prop.getProperty(\"password\"));\n\t\t\t\tconn = DriverManager.getConnection(url, username, password);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n//\t\t\t} catch (FileNotFoundException e) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te.printStackTrace();\n//\t\t\t} catch (IOException e) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn conn;\n\t\t}", "public static Connection getConnection() throws SQLException {\n\t\t// Create a connection reference var\n\t\tConnection con = null;\n\n\t\t// Int. driver obj from our dependency, connect w/ JDBC\n\t\tDriver postgresDriver = new Driver();\n\t\tDriverManager.registerDriver(postgresDriver);\n\n\t\t// Get database location/credentials from environmental variables\n\t\tString url = System.getenv(\"db_url\");\n\t\tString username = System.getenv(\"db_username\");\n\t\tString password = System.getenv(\"db_password\");\n\t\t\n\t\t// Connect to db and assign to con var.\n\t\tcon = DriverManager.getConnection(url, username, password);\n\n\t\t// Return con, allowing calling class/method etc to use the connection\n\t\treturn con;\n\t}", "private Connection getDb() throws TzException {\n if (conn != null) {\n return conn;\n }\n\n try {\n dbPath = cfg.getDbPath();\n\n if (debug()) {\n debug(\"Try to open db at \" + dbPath);\n }\n\n conn = DriverManager.getConnection(\"jdbc:h2:\" + dbPath,\n \"sa\", \"\");\n\n final ResultSet rset =\n conn.getMetaData().getTables(null, null,\n aliasTable, null);\n if (!rset.next()) {\n clearDb();\n loadInitialData();\n }\n } catch (final Throwable t) {\n // Always bad.\n error(t);\n throw new TzException(t);\n }\n\n return conn;\n }", "public static Connection getConnection() {\n Connection con = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n con = DriverManager.getConnection(\n \"jdbc:hsqldb:mem:avdosdb\", \"sa\", \"\");\n } catch(Exception e) {\n e.printStackTrace();\n }\n return con;\n }", "private Connection getConnection() throws ClassNotFoundException, SQLException {\n\n log.info(\"Get DB connection\");\n\n String url = AppConfig.getInstance().getProperty(\"db.URL\") +\n AppConfig.getInstance().getProperty(\"db.schema\") +\n AppConfig.getInstance().getProperty(\"db.options\");\n String sDBUser = AppConfig.getInstance().getProperty(\"db.user\");\n String sDBPassword = AppConfig.getInstance().getProperty(\"db.password\");\n\n if (sDBUser != null && sDBPassword != null && sDBPassword.startsWith(\"crypt:\")) {\n AltEncrypter cypher = new AltEncrypter(\"cypherkey\" + sDBUser);\n sDBPassword = cypher.decrypt(sDBPassword.substring(6));\n }\n\n return DriverManager.getConnection(url, sDBUser, sDBPassword);\n }", "public static Connection getInstance() {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/restaurant?useSSL=false\", \"root\", \"1234\");\n\t\t} catch (SQLException e) {\n\t\t\te.getStackTrace();\n\t\t}\n\t\treturn conn;\n\t}", "private Connection connect() {\n String url = \"jdbc:sqlite:\" + dbPath + dbName;\n Connection con = null;\n try {\n con = DriverManager.getConnection(url);\n }\n catch (SQLException e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n\n return con;\n }", "private Connection getConnection() throws SQLException, ClassNotFoundException {\n return connectionBuilder.getConnection();\n }", "@Override\n\tpublic Connection getConnection() throws SQLException {\n\t\tConnection conn;\n\t\tconn = ConnectionFactory.getInstance().getConnection();\n\t\treturn conn;\n\t}", "public static Connection getConnection() {\n return singleInstance.createConnection();\n }", "@Override\n\tpublic DBConnection getDBConnection() {\n\t\t\n\t\tSystem.out.println(\"Started to create DB Connection Object\");\n\t\tDBConnection connection = new DBConnection();\n\t\tconnection.setImplementorName(\"MySQL Implementation\");\n\t\tSystem.out.println(\"Completed to create DB Connection Object\");\n\t\treturn connection;\n\t}", "public final DBI getConnect() {\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n // String dbc = System.getenv(\"DB_CONNECTION\");\n // if (dbc == null || dbc.equals(\"\")) {\n // dbc = \"localhost:3306\";\n // }\n // DBI dbi = new DBI(\"jdbc:mysql://\" + dbc + \"/MLPXX?allowPublicKeyRetrieval=true&useSSL=false\", \"MLPXX\", \"MLPXX\");\n DBI dbi = new DBI(\"jdbc:mysql://localhost:3306/MLPXX?allowPublicKeyRetrieval=true&useSSL=false\", \"MLPXX\", \"MLPXX\");\n\n //DBI dbi = new DBI(\"jdbc:mysql://\" + dbc + \"/MLPXX?useSSL=false\", \"MLPXX\", \"MLPXX\");\n // dbi.setSQLLog(new PrintStreamLog());\n return dbi;\n } catch (ClassNotFoundException e) {\n //return null;\n throw new RuntimeException(e);\n }\n }", "private Connection getConnection() {\n if (_connection != null) return _connection;\n\n Element ncElement = getNetcdfElement();\n \n //See if we can get the database connection from a JNDI resource.\n String jndi = ncElement.getAttributeValue(\"jndi\");\n if (jndi != null) {\n try {\n Context initCtx = new InitialContext();\n Context envCtx = (Context) initCtx.lookup(\"java:comp/env\");\n DataSource ds = (DataSource) envCtx.lookup(jndi);\n _connection = ds.getConnection();\n } catch (Exception e) {\n String msg = \"Failed to get database connection from JNDI: \" + jndi;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n }\n return _connection;\n }\n\n //Make the connection ourselves.\n String connectionString = ncElement.getAttributeValue(\"connectionString\");\n String dbUser = ncElement.getAttributeValue(\"dbUser\");\n String dbPassword = ncElement.getAttributeValue(\"dbPassword\");\n String jdbcDriver = ncElement.getAttributeValue(\"jdbcDriver\");\n \n try {\n Class.forName(jdbcDriver);\n _connection = DriverManager.getConnection(connectionString, dbUser, dbPassword);\n } catch (Exception e) {\n String msg = \"Failed to get database connection: \" + connectionString;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n } \n \n return _connection;\n }", "public static Connection getConnection() {\n\t\ttry {\n\t\t\treturn DBUtil.getInstance().ds.getConnection();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\n\t}", "public static DatabaseConnection getDb() {\n return db;\n }", "private Connection getConnection() {\n\t\tlog.debug(\"getConnection start\");\n\t\tif (con != null)\n\t\t\treturn con;\n\t\tString url = \"jdbc:mysql://localhost:3306/\" + db;\n\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\").newInstance();\n\t\t\tlog.debug(\"getConnection obtained driver\");\n\t\t\tcon = DriverManager.getConnection(url, user, password);\n\t\t\tlog.debug(\"getConnection got connection\");\n\t\t} catch (Exception ex) {\n\t\t\tlog.error(\"getConnection: error:\" + ex.getMessage(), ex);\n\t\t\treturn null;\n\t\t}\n\t\treturn con;\n\t}", "public static Connection getConnection() {\n\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = getConnectionPool().getConnection();\n\t\t} catch (Exception e) {\n\n\t\t\tthrow new SystemException(\"Getting Connection from DB Connection Pool\",e,SystemCode.UNABLE_TO_EXECUTE);\n\t\t}\n\t\treturn conn;\n\n\t}", "public Connection createConnection() {\n Connection c = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n c = DriverManager.getConnection(\"jdbc:sqlite:ase_i3.db\");\n } catch (Exception e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n return null;\n }\n System.out.println(\"Database connection succeed.\");\n return c;\n }", "private Connection connect() {\n // SQLite connection string\n \tString url = \"jdbc:sqlite:DataBase/\" + database;\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "public static Connection getConnection() {\r\n\r\n\t\tConfigLoader loader = new ConfigLoader();\r\n\t\tProperties properties = null;\r\n\t\t;\r\n\t\ttry {\r\n\t\t\tproperties = loader.loadConfigurations();\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.error(e.getStackTrace().toString());\r\n\t\t}\r\n\t\tConnection connection = null;\r\n\t\ttry {\r\n\t\t\tString url = properties.getProperty(\"hsqldb.url\");\r\n\t\t\tString user = properties.getProperty(\"hsqldb.user\");\r\n\t\t\tString password = properties.getProperty(\"hsqldb.password\");\r\n\t\t\tlogger.info(\"Connecting to hsqlDB with db:\" + url);\r\n\t\t\tconnection = DriverManager.getConnection(url, user, password);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(e.getStackTrace().toString());\r\n\t\t}\r\n\t\treturn connection;\r\n\t}", "public Connection getConnection() {\n\t// register the JDBC driver\n\ttry {\n\t Class.forName(super.driver);\n\t} catch (ClassNotFoundException e) {\n\t e.printStackTrace();\n\t}\n \n\t// create a connection\n\tConnection connection = null;\n\ttry {\n\t connection = DriverManager.getConnection (super.jdbc_url,super.getu(), super.getp());\n\t} catch (SQLException e) {\n\t e.printStackTrace();\n\t}\n\treturn connection;\n }", "public static Connection getDBConnection(){\n\t\tConnection conn = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t/*InputStream is = DBConfig.class.getClass().\r\n\t\t\t\t\tgetResourceAsStream(\"/resources/db.properties\");\r\n\t\t\tprop.load(is);\r\n\t\t\tClass.forName(prop.getProperty(\"drivername\"));\r\n\t\t\tconn = DriverManager.getConnection(prop.getProperty(\"jdbcurl\"),\r\n\t\t\t\t\tprop.getProperty(\"username\"),prop.getProperty(\"password\"));*/\r\n\t\t\t\r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\t\tconn = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:orcl\",\"fred\",\"flintstone\");\r\n\t\t\t/*Statement stmt = conn.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(\"SELECT LOCATION_NAME FROM LOCATIONS\");\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tSystem.out.println(rs.getString(\"LOCATION_NAME\"));\r\n\t\t\t}*/\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} /*catch (FileNotFoundException e){\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}*/\r\n\t\t\r\n\t\treturn conn;\r\n\t}", "private Connection getConnection() {\n Connection conn = null;\n\n // Force the class loader to load the JDBC driver\n try { \n // The newInstance() call is a work around for some \n // broken Java implementations\n Class.forName(jdbcDriver).newInstance(); \n } catch (Exception ex) { \n System.err.println(\"Failed to load the JDBC driver: \" + jdbcDriver);\n }\n\n // Include the username and password on the URL\n StringBuffer url = new StringBuffer();\n url.append(jdbcUrl);\n if (jdbcUsername != null) {\n url.append(\"?user=\" + jdbcUsername);\n if (jdbcPassword != null) {\n url.append(\"&password=\" + jdbcPassword);\n }\n }\n\n // Establish a connection to the database\n try {\n conn = DriverManager.getConnection(url.toString());\n } catch (SQLException ex) {\n System.err.println(\"Failed to establish a database connection: url=\" + url.toString());\n System.err.println(\"SQLException: \" + ex.getMessage()); \n System.err.println(\"SQLState: \" + ex.getSQLState()); \n System.err.println(\"VendorError: \" + ex.getErrorCode()); \n ex.printStackTrace();\n }\n\n return conn;\n }", "public Connection getConexao() {\t\n\t\ttry {\n\t\t\t\n\t\t\tif (this.conn!=null) {\n\t\t\t\treturn this.conn;\n\t\t\t}\n\t\t\t\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/\"+this.db,this.user,this.pass);\n\t\t\t\n\t\t} catch(Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn this.conn;\n\t}", "public static String getConnectionDB(){\n return \"jdbc:mysql://\" + hostname +\":\"+ port+\"/\" + database;\n }", "private Connection getConnection() throws SQLException {\n OracleDataSource ods = new OracleDataSource();\n ods.setURL(url);\n ods.setUser(user);\n ods.setPassword(password);\n\n // Creates a physical connection to the database.\n return ods.getConnection();\n }", "protected Connection createConnection() {\n Properties connectionProperties = new Properties();\n JdbcPropertyAdapter adapter = getPropertyAdapter(dbType, properties);\n adapter.getExtraProperties(connectionProperties);\n\n String url = translator.getUrl(properties);\n logger.info(\"Opening connection to: \" + url);\n Connection connection;\n try {\n connection = DriverManager.getConnection(url, connectionProperties);\n connection.setAutoCommit(false);\n } catch (SQLException x) {\n throw translator.translate(x);\n }\n return connection;\n }", "public static Connection createConnection() {\n\t\treturn new FabricaDeConexoes().getConnection();\n\t}", "public Connection getConnection(){\n try{\n if(connection == null || connection.isClosed()){\n connection = FabricaDeConexao.getConnection();\n return connection;\n } else return connection;\n } catch (SQLException e){throw new RuntimeException(e);}\n }", "public static Connection getInstanceConnection(){\r\n\t\ttry {\r\n\t\t\tif(conn==null) {\r\n\t\t\t\tconn=DriverManager.getConnection(url, userDb, pwdDb);\r\n\t\t\t\tSystem.out.println(\"Connexion �tablie avec la base\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Probl�me de connexion\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn conn;\r\n\t}", "public static Connection getConnection() {\n\t\t\n\t\treturn conn;\n\t}", "public static Connection getConnection() {\n Connection conn = null;\n\n try {\n DataSource dataSource = (DataSource) new InitialContext().lookup(\"jdbc/library\");\n conn = dataSource.getConnection();\n } catch (SQLException | NamingException e) {\n LOG.error(e.getMessage(), e);\n }\n return conn;\n }", "public static Connection connect() throws SQLException {\n\t\tif (connection != null) {\n\t\t\treturn connection;\n\t\t} else {\n\n\t\t\tDBConnection db = new DBConnection();\n\t\t\treturn db.connection;\n\t\t}\n\n\t}", "protected Connection getConnection()\n {\n Connection connection = null;\n try\n {\n connection = DriverManager.getConnection(url, user, password);\n }\n catch (SQLException ex)\n {\n Logger.getLogger(DB_Utils.class.getName()).log(Level.SEVERE, null, ex);\n }\n return connection;\n }", "private Connection getConnection() throws SQLException{\n return ds.getConnection();\n }", "public Connection getConnection() throws SQLException {\n String connectionUrl = \"jdbc:postgresql://\" + url + \":\" + port + \"/\" + database;\n return DriverManager.getConnection(connectionUrl, SISOBProperties.getDataBackendUsername(), SISOBProperties.getDataBackendPassword());\n }", "protected Connection connection() {\n\t\tif (connection == null) {\n\t\t\ttry {\n\t\t\t\tdblogger.info(\"Connecting to \" + connectionUrlString);\n\t\t\t\tconnection = DriverManager.getConnection(connectionUrlString,\n\t\t\t\t\t\tusername, password);\n\t\t\t} catch (SQLException exception) {\n\t\t\t\tdblogger.fatal(\"Failed to connect to database using \"\n\t\t\t\t\t\t+ connectionUrlString + \" User: \" + username\n\t\t\t\t\t\t+ \" Password: \" + password);\n\t\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\t\"Failed to connect to the database using \"\n\t\t\t\t\t\t\t\t+ connectionUrlString\n\t\t\t\t\t\t\t\t+ \". Please contact your DBA.\");\n\t\t\t}\n\t\t}\n\t\treturn connection;\n\t}", "public static Connection getConnection() {\r\n\t\tsetProperties();\r\n\t\tConnection connection = null;\r\n\t\ttry {\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tconnection = (Connection) DriverManager.getConnection(DBURL,\r\n\t\t\t\t\tproperties);\r\n//\t\t\tSystem.err.println(\"Connection Established\");\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"connection Not Established\");\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t}\r\n\t\treturn connection;\r\n\t}", "private static Connection getConnection() throws SQLException {\n return DriverManager.getConnection(\"jdbc:derby:derbyDB\");\n }", "public Connection getConnection() throws SQLException{\n return ds.getConnection();\n }", "public Connection getConnection() throws SQLException {\n\t\tif (connection == null) {\n\t\t\tconnection = ConnectBDD.jdbcConnexion();\n\t\t}\n\t\treturn connection;\n\t}", "public Connection connect() {\n // SQLite connection string\n String url = \"jdbc:sqlite:c:/Carapaca/server/db/database.db\";\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "protected Connection getConnection() throws PersistenceException {\r\n try {\r\n if (this.connectionName == null) {\r\n return dbConnectionFactory.createConnection();\r\n } else {\r\n return dbConnectionFactory.createConnection(connectionName);\r\n }\r\n } catch (DBConnectionException e) {\r\n StringBuffer sb = new StringBuffer(\"failed to obtain connection:\");\r\n sb.append((connectionName == null) ? \"default connection\" : connectionName);\r\n throw new PersistenceException(sb.toString(), e);\r\n }\r\n }", "public static Connection getConnection() {\n Connection localConnection = connection;\n if (localConnection == null) synchronized (DB_ConnectionProvider.class) {\n\n // multi thread supported, double checker lock\n\n localConnection = connection;\n if (localConnection == null) {\n try {\n Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n // oracle driver: oracle.jdbc.driver.OracleDriver\n // mysql driver: com.mysql.jdbc.Driver\n connection = localConnection = DriverManager.getConnection(\n \"jdbc:oracle:thin:@localhost:1521:XE\", USERNAME, PASSWORD);\n // mysql url: jdbc:mysql://localhost:3306/world\n // oracle url: jdbc:oracle:thin:@localhost:1521:XE\n } catch (Exception ex) {\n System.out.println(\"Could not connect with the database.\");\n }\n }\n }\n return localConnection;\n }", "public Connection getConnection(){\n try {\n return connectionFactory.getConnection(); // wird doch schon im Konstruktor von TodoListApp aufgerufen ???\n } catch (SQLException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }", "public static Connection getConnection() {\r\n\t\tConnection conn = null;\r\n\t\ttry {\r\n\t\t\tClass.forName(DB_DRIVER);\r\n\t\t\tconn = DriverManager.getConnection(DRIVER_URL, DB_USERNAME,\r\n\t\t\t\t\tDB_PASSWORD);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn conn;\r\n\t}", "public static Connection getConnection() {\n try {\n String dbURL = \"jdbc:mysql://\" + HOST + \":3306/soccer\" ;\n Class.forName(DRIVER);\n Connection connection = DriverManager.getConnection(dbURL, USERNAME, PASSWORD);\n return connection;\n } catch (Exception e) {\n System.out.println(\"Error in Database.getConnection: \" + e.getMessage());\n return null;\n }\n }", "public static Connection getConnection() {\r\n\t\tString DRIVER_CLASS = \"com.mysql.cj.jdbc.Driver\";\r\n\t\ttry {\r\n\t\t\tClass.forName(DRIVER_CLASS).getDeclaredConstructor().newInstance();\r\n\t\t} catch(Exception e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t\tjava.sql.Connection conn = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tconn = DriverManager.getConnection(DatabaseInfo.url, DatabaseInfo.username, DatabaseInfo.password);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t\treturn conn;\r\n\t}", "public Connection getConnection() {\n try {\n return dataSource.getConnection();\n } catch (SQLException e) {\n e.printStackTrace();\n return null;\n }\n }", "static Connection getDBConnection(){\r\n\t\t if(mainConnection != null)\r\n\t\t\t return mainConnection;\r\n\t\t \r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\t// loading Oracle Driver\r\n\t\t \t\tSystem.out.print(\"Looking for Oracle's jdbc-odbc driver ... \");\r\n\t\t\t \tDriverManager.registerDriver(new oracle.jdbc.OracleDriver());\r\n\t\t\t \tSystem.out.println(\", Loaded.\");\r\n\r\n\t\t\t\t\tString URL = \"jdbc:oracle:thin:@localhost:1521:orcl\";\r\n\t\t\t \tString userName = \"system\";\r\n\t\t\t \tString password = \"password\";\r\n\r\n\t\t\t \tSystem.out.print(\"Connecting to DB...\");\r\n\t\t\t \tmainConnection = DriverManager.getConnection(URL, userName, password);\r\n\t\t\t \tSystem.out.println(\", Connected!\");\r\n\t\t \t\t}\r\n\t\t \t\tcatch (Exception e)\r\n\t\t \t\t{\r\n\t\t \t\tSystem.out.println( \"Error while connecting to DB: \"+ e.toString() );\r\n\t\t \t\te.printStackTrace();\r\n\t\t \t\tSystem.exit(-1);\r\n\t\t \t\t}\r\n\t\t\t\treturn mainConnection;\r\n\t\t \r\n\t}", "public static MyConnection getConnection() throws SQLException{\n\t\treturn MyConnection.getConnection();\n\t}", "public static Connection getConnection() {\n \t\treturn connPool.getConnection();\n \t}", "public Connection getConnection() {\n java.sql.Connection connection = null;\n try {\n connection = DriverManager.getConnection(\n \"jdbc:postgresql://cslvm74.csc.calpoly.edu:5432/bfung\", \"postgres\",\n \"\");\n } catch (SQLException e) {\n System.out.println(\"Connection Failed! Check output console\");\n e.printStackTrace();\n return null;\n }\n return connection;\n }", "public SqlConnection createConnection() {\n return new SqlConnection(this, VM.getOrThrow());\n }", "private Connection createConnection() {\n try {\n return DriverManager.getConnection(\"jdbc:mysql://\" + host + \":\" + port + \"/\" + db, user, password);\n } catch (SQLException e) {\n e.printStackTrace();\n return null;\n }\n }", "public Connection getDatabaseConnection() {\n return con;\n }", "public static DatabaseConnection getInstance() throws SQLException {\n if (instance == null) {//if we didn't create it earlier\n instance = new DatabaseConnection();//we create new one\n }\n return instance;//otherwise it returns old one\n }", "private Connection getConnection() {\n if ( conn==null ) {\n conn = Util.getConnection( \"root\", \"\" );\n }\n return conn;\n }", "public static DbConnection getInstance() {\n if (!DbConnectionHolder.INSTANCE.isInitialized.get()) {\n synchronized (lock) {\n DbConnectionHolder.INSTANCE.initialize();\n }\n }\n return DbConnectionHolder.INSTANCE;\n }", "public Connection getConnection() throws SQLException {\r\n if (user != null) {\r\n return dataSource.getConnection(user, password);\r\n } else {\r\n return dataSource.getConnection();\r\n }\r\n }", "public Connection openDBConnection() {\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.OracleDriver\");\n\t\t\tConnection myConnection = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:oracle:thin:@//cscioraclesrv.ad.csbsju.edu:1521/\" + \"csci.cscioraclesrv.ad.csbsju.edu\",\n\t\t\t\t\t\"team1\", \"Boh3P\");\n\t\t\treturn myConnection;\n\t\t} catch (Exception E) {\n\t\t\tE.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public Connection getConnection();", "public Connection getConnection();", "public Connection getConnection();", "public Connection openDBConnection() {\n try {\n // Load driver and link to driver manager\n Class.forName(\"oracle.jdbc.OracleDriver\");\n // Create a connection to the specified database\n Connection myConnection = DriverManager.getConnection(\"jdbc:oracle:thin:@//cscioraclesrv.ad.csbsju.edu:1521/\" +\n \"csci.cscioraclesrv.ad.csbsju.edu\",\"TEAM5\", \"mnz\");\n return myConnection;\n } catch (Exception E) {\n E.printStackTrace();\n }\n return null;\n }", "public static Connection getConnection() throws SQLException {\n\t\tString url = ConnectionCredentials.link;\n\t\tString user = ConnectionCredentials.username;\n\t\tString pass = ConnectionCredentials.password;\n\t\t\n\t\t/*Class.forName(\"org.postgresql.Driver\");\n\t\t//Two lines of recommended code\n\t\tDriver PostgresDriver = new Driver();\n\t\tDriverManager.registerDriver(PostgresDriver);*/\n\t\t\n\t\treturn DriverManager.getConnection(url, user, pass);\n\t}", "public static Connection getConnection() {\r\n\t\tConnection connection = null;\r\n\t\ttry {\r\n\t\t\tString dbDirectory = \"C:/Users/MAX-Student/Desktop/java/db\";\r\n\t\t\tSystem.setProperty(\"derby.system.home\", dbDirectory);\r\n\r\n\t\t\t// set the db url, username, and password\r\n\t\t\tString url = \"jdbc:derby:InspirationalDB\";\r\n\t\t\tString username = \"\";\r\n\t\t\tString password = \"\";\r\n\r\n\t\t\tconnection = DriverManager.getConnection(url, username, password);\r\n\t\t\treturn connection;\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\tfor (Throwable t : e)\r\n\t\t\t\tt.printStackTrace(); // for debugging\r\n\t\t\treturn null;\r\n\t\t }\r\n\t}", "public Connection connect() throws SQLException {\n Connection connection = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n String url = \"jdbc:sqlite:\" + dbName;\n connection = DriverManager.getConnection(url);\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n return connection;\n }", "protected Connection getConnection() {\n String url = \"jdbc:oracle:thin:@localhost:32118:xe\";\n String username = \"JANWILLEM2\";\n String password = \"JANWILLEM2\";\n\n if (myConnection == null) {\n try {\n myConnection = DriverManager.getConnection(url, username, password);\n } catch (Exception exc) {\n exc.printStackTrace();\n }\n }\n\n return myConnection;\n }", "public Connection getConnection() throws SQLException {\n return new ConnectionWrapper(currentPreparedStatement.getConnection());\n }", "public static Connection dbConnection()\r\n\t{\r\n\t\t\r\n\t\t Connection c = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\r\n\t\t} \r\n\t\tcatch (ClassNotFoundException e1) \r\n\t\t{\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tc = DriverManager.getConnection(\"jdbc:sqlite:Patients.db\");\r\n\t\t\t\t\r\n\t\t\t\treturn c;\r\n\t\t\t} \r\n\t\t\t\tcatch (SQLException e) \r\n\t\t\t\t{\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\treturn c;\r\n\t\t\r\n\t}", "public static Connection GetConnection() throws SQLException {\n return connectionPool.getConnection();\n }", "private static Connection getConnection() throws SQLException {\n return DriverManager.getConnection(\n Config.getProperty(Config.DB_URL),\n Config.getProperty(Config.DB_LOGIN),\n Config.getProperty(Config.DB_PASSWORD)\n );\n }", "private Connection connect() {\n\t String url = \"jdbc:sqlite:\" + this.db;\r\n\t Connection conn = null;\r\n\t try {\r\n\t \t// Incercam conexiunea la baza de date\r\n\t conn = DriverManager.getConnection(url);\r\n\t } catch (SQLException e) {\r\n\t System.out.println(e.getMessage());\r\n\t }\r\n\t return conn; // returnam conexiunea, daca aceasta s-a facut fara erori\r\n\t }", "public Connection getConnection() throws DBAccessException;", "public Connection getDbConnect() {\n return dbConnect;\n }", "public\n Connection getConnection();", "public Connection getConnection() {\n if (con == null) {\n try {\n con = DriverManager.getConnection(url, user, password);\n return con;\n } catch (SQLException e) {\n System.err.println(e.getMessage());\n }\n }\n\n return con;\n }", "public Connection getConnection() throws PersistenceException {\r\n\t\tConnection connection;\r\n\r\n\t\tString password = null; \r\n\r\n\t\tProperties prop = new Properties();\r\n\t\tInputStream input = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\t\r\n\r\n\t\t\tprop.load(getClass().getClassLoader().getResourceAsStream(\"config.properties\"));\r\n\t\t\t// get the property value and print it out\r\n\r\n\t\t\tpassword = prop.getProperty(\"MYSQL_PASSWORD\");\r\n\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (input != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tinput.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\ttry {\r\n\t\t\tClass.forName(driver);\r\n\t\t\t//Class.forName(\"org.postgresql.Driver\");\t\t//driver class loading\r\n\t\t\t/*\r\n\t\t\t * Now the driver is registered at DriverManager (postgreSQL driver automatically\r\n\t\t\t * registers itself at DriverManager once his class is loaded).\r\n\t\t\t * Since driver is loaded and registered, I can obtain a connection to the database \r\n\t\t\t */\r\n\t\t\tconnection = DriverManager.getConnection(dbURI, userName, password);\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tSystem.out.println(\"Where is your MySQL JDBC Driver?\");\r\n\t\t\t//\t\t\tSystem.out.println(\"Where is your postgreSQL JDBC Driver?\");\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new PersistenceException(e.getMessage());\r\n\t\t} catch(SQLException e) {\r\n\t\t\tthrow new PersistenceException(e.getMessage());\r\n\t\t}\r\n\t\treturn connection;\r\n\t}", "public static Connection getConnection() {\n\t\treturn null;\r\n\t}", "DatabaseConnector getConnector() {return db;}", "public static Connection getConnection() {\n\t\treturn null;\n\t}" ]
[ "0.78959537", "0.7872699", "0.77948797", "0.7788499", "0.7755201", "0.77508116", "0.77367926", "0.77279955", "0.7711009", "0.77083504", "0.76961505", "0.76686496", "0.76642716", "0.7654847", "0.7648538", "0.7645396", "0.75994754", "0.75593823", "0.7551648", "0.75511074", "0.7513378", "0.7505759", "0.7498963", "0.7487106", "0.7484054", "0.7473674", "0.7464029", "0.74573344", "0.74568564", "0.7454376", "0.74488795", "0.744201", "0.74322623", "0.7421608", "0.7403409", "0.73934406", "0.738734", "0.73865914", "0.7370221", "0.7352365", "0.7335855", "0.73294485", "0.73283255", "0.7322423", "0.73181546", "0.73178226", "0.7316668", "0.7310175", "0.73067373", "0.7305404", "0.72998494", "0.7285968", "0.7269188", "0.7265944", "0.72643805", "0.7260809", "0.72578", "0.72532856", "0.7244099", "0.7243474", "0.72420496", "0.7238305", "0.7237618", "0.72335356", "0.72256666", "0.7222862", "0.72044164", "0.72036374", "0.7202042", "0.7199897", "0.71947527", "0.7192265", "0.71862364", "0.71858567", "0.7181761", "0.7177281", "0.71766365", "0.71750194", "0.7166681", "0.7165528", "0.7163831", "0.7163831", "0.7163831", "0.71603036", "0.7147761", "0.71465814", "0.71369624", "0.7135507", "0.71341026", "0.71340394", "0.7128424", "0.7122414", "0.7119349", "0.71032524", "0.71006066", "0.7095005", "0.7093377", "0.7093327", "0.7088265", "0.70782024", "0.70779914" ]
0.0
-1
Prepares the connection to execute a transaction
public void initTransaction(Connection con) { try { con.setAutoCommit(false); con.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED); } catch (SQLException e) { try { con.rollback(); } catch (SQLException e1) { e1.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void beginTransaction(ConnectionContext context) throws IOException;", "Transaction beginTx();", "public void beginTransaction() throws Exception;", "void beginTransaction();", "@Override\n protected void doBegin(Object transaction, TransactionDefinition definition) {\n DataSourceTransactionObject txObject = (DataSourceTransactionObject) transaction;\n Connection con = null;\n\n try {\n if (txObject.getConnectionHolder() == null ||\n txObject.getConnectionHolder().isSynchronizedWithTransaction()) {\n Connection newCon = this.dataSource.getConnection();\n if (logger.isDebugEnabled()) {\n logger.debug(\"Acquired Connection [\" + newCon + \"] for JDBC transaction\");\n }\n txObject.setConnectionHolder(new ConnectionHolder(newCon), true);\n }\n\n txObject.getConnectionHolder().setSynchronizedWithTransaction(true);\n con = txObject.getConnectionHolder().getConnection();\n\n Integer previousIsolationLevel = DataSourceUtils.prepareConnectionForTransaction(con, definition);\n txObject.setPreviousIsolationLevel(previousIsolationLevel);\n\n // Switch to manual commit if necessary. This is very expensive in some JDBC drivers,\n // so we don't want to do it unnecessarily (for example if we've explicitly\n // configured the connection pool to set it already).\n if (con.getAutoCommit()) {\n txObject.setMustRestoreAutoCommit(true);\n if (logger.isDebugEnabled()) {\n logger.debug(\"Switching JDBC Connection [\" + con + \"] to manual commit\");\n }\n con.setAutoCommit(false);\n }\n txObject.getConnectionHolder().setTransactionActive(true);\n\n int timeout = determineTimeout(definition);\n if (timeout != TransactionDefinition.TIMEOUT_DEFAULT) {\n txObject.getConnectionHolder().setTimeoutInSeconds(timeout);\n }\n\n // Bind the session holder to the thread.\n if (txObject.isNewConnectionHolder()) {\n TransactionSynchronizationManager.bindResource(getDataSource(), txObject.getConnectionHolder());\n }\n } catch (Throwable ex) {\n if (txObject.isNewConnectionHolder()) {\n DataSourceUtils.releaseConnection(con, this.dataSource);\n txObject.setConnectionHolder(null, false);\n }\n throw new CannotCreateTransactionException(\"Could not open JDBC Connection for transaction\", ex);\n }\n }", "IDbTransaction beginTransaction();", "public TransactionContext startTransaction() {\n MyConnection connection;\n try {\n connection = supplyConnection();\n } catch (SQLException e) {\n throw new UncheckedSQLException(e);\n }\n return new TransactionContext(connection);\n }", "public void beginTransaction() {\n\r\n\t}", "void startTransaction();", "public void beginTransaction() throws SQLException {\r\n conn.setAutoCommit(false);\r\n beginTransactionStatement.executeUpdate();\r\n }", "IDbTransaction beginTransaction(IsolationLevel il);", "public void beginTransaction() throws TransactionException {\n\t\t\r\n\t}", "Transaction createTransaction();", "@Override\n\tpublic void beginTransaction() {\n\t\tSystem.out.println(\"Transaction 1 begins\");\n\t\t\n\t\t/*String queryLock = \"LOCK TABLES hpq_mem READ;\";\n\t\t\n\t\tPreparedStatement ps;\n\t\ttry {\n\t\t\tconn.setAutoCommit(false);\n\t\t\tps = conn.prepareStatement(queryLock);\n\t\t\tps.execute();\n\t\t\tps = conn.prepareStatement(\"START TRANSACTION;\");\n\t\t\tps.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}*/\n\t\t\n\t\tSystem.out.println(\"After obtaining readLock\");\n\t\t\n\t}", "void prepare() throws IndexTransactionException;", "public void openTheTransaction() {\n openTransaction();\n }", "@Override\n public void startTransaction() throws DAOManagerException {\n openConnection();\n try {\n connection.setAutoCommit(false);\n } catch (SQLException e) {\n LOGGER.error(\"Can't start transaction \", e);\n throw new DAOManagerException(e);\n }\n }", "public void createTransaction(Transaction trans);", "public void beginTransaction() throws SQLException\n\t{\n\t\tconn.setAutoCommit(false);\n\t\tbeginTransactionStatement.executeUpdate();\n\t}", "public Transaction startTransaction(){\n\t\ttr = new Transaction(db);\n\t\treturn tr;\n\t}", "public Connection getTransactionConnection(){\n try {\n return rawDataSource.getConnection();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\tpublic void prepareStatements() throws Exception\n\t{\n\t\tsuper.prepareStatements();\n\t\t//transaction statements\n\t\tbeginTransactionStatement = conn.prepareStatement(BEGIN_TRANSACTION_SQL);\n\t\tcommitTransactionStatement = conn.prepareStatement(COMMIT_SQL);\n\t\trollbackTransactionStatement = conn.prepareStatement(ROLLBACK_SQL);\n\t\t//check statements \n\t\tcheckUserameStatement = conn.prepareStatement(CHECK_USERNAME_SQL);\n\t\tcheckLoginStatement = conn.prepareStatement(CHECK_LOGIN_SQL);\n\t\tcheckUnpaidReservationStatement = conn.prepareStatement(CHECK_UNPAID_RESERVATION_SQL);\n\t\tcheckTravelStatement = conn.prepareStatement(CHECK_TRAVEL_SQL);\n\t\tcheckNotCanceledReservationStatement = conn.prepareStatement(CHECK_NOT_CANCELED_SQL);\n\t\t//insert statements\n\t\tinsertUserStatement = conn.prepareStatement(INSERT_USER_SQL);\n\t\tinsertTravelStatement = conn.prepareStatement(INSERT_TRAVEL_SQL);\n\t\tinsertReservationStatement = conn.prepareStatement(INSERT_RESERVATION_SQL);\n\t\tinsertRidStatement = conn.prepareStatement(INSERT_RID_SQL);\n\t\t//update statements\n\t\tupdateBalanceStatement = conn.prepareStatement(UPDATE_BALANCE_SQL);\n\t\tupdateRidStatement = conn.prepareStatement(UPDATE_RID_SQL);\n\t\tupdateReservationCancelStatement = conn.prepareStatement(UPDATE_RESERVATION_CANCEL_SQL);\n\t\tupdateReservationPaidStatement = conn.prepareStatement(UPDATE_RESERVATION_PAID_SQL);\n\t\t//get statements\n\t\tgetReservationsStatement = conn.prepareStatement(GET_RESERVATIONS_SQL);\n\t\tgetFlightStatement = conn.prepareStatement(GET_FLIGHT_SQL);\n\t\tgetBalanceStatement = conn.prepareStatement(GET_BALANCE_SQL);\n\t\tgetReservationStatement = conn.prepareStatement(GET_RESERVATION_SQL);\n\t\tgetNumReservationsStatement = conn.prepareStatement(GET_NUM_RESERVATION_SQL);\n\t\tgetRidStatement = conn.prepareStatement(GET_RID_SQL);\n\t\t//clear statements\n\t\tdeleteTravelStatement = conn.prepareStatement(DELETE_TRAVEL_SQL);\n\t\tclearStatement = conn.prepareStatement(CLEAR_SQL);\n\t}", "public int startTransaction();", "@Override\n public void startTx() {\n \n }", "public void prepareStatements() throws Exception {\r\n beginTransactionStatement = conn.prepareStatement(BEGIN_TRANSACTION_SQL);\r\n commitTransactionStatement = conn.prepareStatement(COMMIT_SQL);\r\n rollbackTransactionStatement = conn.prepareStatement(ROLLBACK_SQL);\r\n\r\n\t\tdeleteReservationStatement = conn.prepareStatement(DELETE_RESERVATION_SQL);\r\n\t\tdeleteBookingStatement = conn.prepareStatement(DELETE_BOOKING_SQL);\r\n\t\tdeleteUserStatement = conn.prepareStatement(DELETE_USER_SQL);\r\n\t\t\r\n checkFlightCapacityStatement = conn.prepareStatement(CHECK_FLIGHT_CAPACITY);\r\n\t\tcheckReservationRowStatement = conn.prepareStatement(CHECK_RESERVATION_ROW_NUMBER);\r\n\r\n /* add here more prepare statements for all the other queries you need */\r\n /* . . . . . . */\r\n\t\tuserLoginStatement = conn.prepareStatement(LOGIN_SQL);\r\n\t\t\r\n\t\tcreateUserStatement = conn.prepareStatement(CREATE_USER_SQL);\r\n\t\t\r\n\t\tsearchOneHopStatement = conn.prepareStatement(SEARCH_ONE_HOP_SQL);\r\n\t\tsearchTwoHopStatement = conn.prepareStatement(SEARCH_TWO_HOP_SQL);\r\n\t\t\r\n\t\tcheckBookingStatement = conn.prepareStatement(CHECK_BOOKING_SQL);\r\n\t\tnewBookingStatement = conn.prepareStatement(NEW_BOOKING_SQL);\r\n\t\tupdateBookingStatement = conn.prepareStatement(UPDATE_BOOKING_SQL);\r\n\t\t\r\n\t\toneReservationStatement = conn.prepareStatement(ONE_RESERVATION_SQL);\r\n\t\ttwoReservationStatement = conn.prepareStatement(TWO_RESERVATION_SQL);\r\n\t\t\r\n\t\tsearchReservationStatement = conn.prepareStatement(SEARCH_RESERVATION_SQL);\r\n\t\tunpaidReservationStatement = conn.prepareStatement(SEARCH_UNPAID_SQL);\r\n\t\t\r\n\t\tsearchFlightStatement = conn.prepareStatement(SEARCH_FLIGHT_SQL);\r\n\t\t\r\n\t\tupdatePaidStatement = conn.prepareStatement(UPDATE_UNPAID_SQL);\r\n\t\tcheckPriceStatement = conn.prepareStatement(FLIGHT_PRICE_SQL);\r\n\t\tupdateBalanceStatement = conn.prepareStatement(UPDATE_BALANCE_SQL);\r\n\t\tcheckBalanceStatement = conn.prepareStatement(SEARCH_BALANCE_SQL);\r\n\t\tunpaidReservationStatement2 = conn.prepareStatement(SEARCH_UNPAID_SQL_2);\r\n\t\t\r\n\t\tsearchFirstFidStatement = conn.prepareStatement(FIRST_FID_SQL);\r\n\t\tsearchSecondFidStatement = conn.prepareStatement(SECOND_FID_SQL);\r\n\t\tcancelReservationStatement = conn.prepareStatement(CANCEL_RESERVATION_SQL);\r\n\t\titineraries = new ArrayList<ArrayList<Integer>>();\r\n }", "private void restoreAndRelease() {\n try (Connection c = connection) {\n c.setAutoCommit(autoCommit);\n } catch (SQLException e) {\n throw new UncheckedSQLException(e);\n }\n }", "@VisibleForTesting\n public void executeTransaction(ClientTransaction transaction) {\n transaction.preExecute(this);\n getTransactionExecutor().execute(transaction);\n transaction.recycle();\n }", "void commit() {\r\n tx.commit();\r\n tx = new Transaction();\r\n }", "void commitTransaction(ConnectionContext context) throws IOException;", "public void transactionStarted() {\n transactionStart = true;\n }", "public void prepare() {\n if ((!hasMultipleStatements()) && (getSQLStatement() == null)) {\n throw QueryException.sqlStatementNotSetProperly(getQuery());\n }\n\n // Cannot call super yet as the call is not built.\n }", "Transaction createTransaction(Settings settings);", "public void beginTransactionBlock() throws SQLException {\n masterNodeConnection.setAutoCommit(false);\n }", "@Before\r\n\tpublic void setUp() throws SQLException {\n\t\tconn = DBManager.getInstance().getConnection();\r\n\t}", "public void loadInitialData() {\n\t\t\texecuteTransaction(new Transaction<Boolean>() {\n\t\t\t\t@Override\n\t\t\t\tpublic Boolean execute(Connection conn) throws SQLException {\n\t\t\t\t\tList<Item> inventory;\n\t\t\t\t\tList<Location> locationList;\n\t\t\t\t\tList<User> userList;\n\t\t\t\t\tList<JointLocations> jointLocationsList;\n\t\t\t\t\t//List<Description> descriptionList; \n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinventory = InitialData.getInventory();\n\t\t\t\t\t\tlocationList = InitialData.getLocations(); \n\t\t\t\t\t\tuserList = InitialData.getUsers();\n\t\t\t\t\t\tjointLocationsList = InitialData.getJointLocations();\n\t\t\t\t\t\t//descriptionList = //InitialData.getDescriptions();\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tthrow new SQLException(\"Couldn't read initial data\", e);\n\t\t\t\t\t}\n\n\t\t\t\t\tPreparedStatement insertItem = null;\n\t\t\t\t\tPreparedStatement insertLocation = null; \n\t\t\t\t\tPreparedStatement insertUser = null;\n\t\t\t\t\tPreparedStatement insertJointLocations = null;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// AD: populate locations first since location_id is foreign key in inventory table\n\t\t\t\t\t\tinsertLocation = conn.prepareStatement(\"insert into locations (description_short, description_long) values (?, ?)\" );\n\t\t\t\t\t\tfor (Location location : locationList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertLocation.setString(1, location.getShortDescription());\n\t\t\t\t\t\t\tinsertLocation.setString(2, location.getLongDescription());\n\t\t\t\t\t\t\tinsertLocation.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertLocation.executeBatch(); \n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertJointLocations = conn.prepareStatement(\"insert into jointLocations (fk_location_id, location_north, location_south, location_east, location_west) values (?, ?, ?, ?, ?)\" );\n\t\t\t\t\t\tfor (JointLocations jointLocations: jointLocationsList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertJointLocations.setInt(1, jointLocations.getLocationID());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(2, jointLocations.getLocationNorth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(3, jointLocations.getLocationSouth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(4, jointLocations.getLocationEast());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(5, jointLocations.getLocationWest());\n\t\t\t\t\t\t\tinsertJointLocations.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertJointLocations.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertItem = conn.prepareStatement(\"insert into inventory (location_id, item_name) values (?, ?)\");\n\t\t\t\t\t\tfor (Item item : inventory) \n\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t// Auto generate itemID\n\t\t\t\t\t\t\tinsertItem.setInt(1, item.getLocationID());\n\t\t\t\t\t\t\tinsertItem.setString(2, item.getName());\n\t\t\t\t\t\t\tinsertItem.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertItem.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertUser = conn.prepareStatement(\"insert into users (username, password) values (?, ?)\");\n\t\t\t\t\t\tfor(User user: userList) {\n\t\t\t\t\t\t\tinsertUser.setString(1, user.getUsername());\n\t\t\t\t\t\t\tinsertUser.setString(2, user.getPassword());\n\t\t\t\t\t\t\tinsertUser.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertUser.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"Tables populated\");\n\t\t\t\t\t\t\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tDBUtil.closeQuietly(insertLocation);\t\n\t\t\t\t\t\tDBUtil.closeQuietly(insertItem);\n\t\t\t\t\t\tDBUtil.closeQuietly(insertUser);\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t}", "public static void beginTransaction() throws HException {\r\n\t\t\r\n\t\tTransaction tx = (Transaction) threadTransaction.get();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (tx == null) {\r\n\t\t\t\t// log.debug(\"Starting new database transaction in this\r\n\t\t\t\t// thread.\");\r\n\t\t\t\t//Session =getSession();\r\n\t\t\t\ttx = getSession().beginTransaction();\r\n\t\t\t\tthreadTransaction.set(tx);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tthrow new HException(ex);\r\n\t\t}\r\n\t}", "public static void prepDb(Configuration conf) throws Exception {\n\n Connection conn = null;\n Statement stmt = null;\n try {\n conn = getConnection(conf);\n stmt = conn.createStatement();\n stmt.execute(\"CREATE TABLE TXNS (\" +\n \" TXN_ID bigint PRIMARY KEY,\" +\n \" TXN_STATE char(1) NOT NULL,\" +\n \" TXN_STARTED bigint NOT NULL,\" +\n \" TXN_LAST_HEARTBEAT bigint NOT NULL,\" +\n \" TXN_USER varchar(128) NOT NULL,\" +\n \" TXN_HOST varchar(128) NOT NULL,\" +\n \" TXN_TYPE integer)\");\n\n stmt.execute(\"CREATE TABLE TXN_COMPONENTS (\" +\n \" TC_TXNID bigint NOT NULL REFERENCES TXNS (TXN_ID),\" +\n \" TC_DATABASE varchar(128) NOT NULL,\" +\n \" TC_TABLE varchar(128),\" +\n \" TC_PARTITION varchar(767),\" +\n \" TC_OPERATION_TYPE char(1) NOT NULL,\" +\n \" TC_WRITEID bigint)\");\n stmt.execute(\"CREATE TABLE COMPLETED_TXN_COMPONENTS (\" +\n \" CTC_TXNID bigint NOT NULL,\" +\n \" CTC_DATABASE varchar(128) NOT NULL,\" +\n \" CTC_TABLE varchar(128),\" +\n \" CTC_PARTITION varchar(767),\" +\n \" CTC_TIMESTAMP timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,\" +\n \" CTC_WRITEID bigint,\" +\n \" CTC_UPDATE_DELETE char(1) NOT NULL)\");\n stmt.execute(\"CREATE TABLE NEXT_TXN_ID (\" + \" NTXN_NEXT bigint NOT NULL)\");\n stmt.execute(\"INSERT INTO NEXT_TXN_ID VALUES(1)\");\n\n stmt.execute(\"CREATE TABLE TXN_TO_WRITE_ID (\" +\n \" T2W_TXNID bigint NOT NULL,\" +\n \" T2W_DATABASE varchar(128) NOT NULL,\" +\n \" T2W_TABLE varchar(256) NOT NULL,\" +\n \" T2W_WRITEID bigint NOT NULL)\");\n stmt.execute(\"CREATE TABLE NEXT_WRITE_ID (\" +\n \" NWI_DATABASE varchar(128) NOT NULL,\" +\n \" NWI_TABLE varchar(256) NOT NULL,\" +\n \" NWI_NEXT bigint NOT NULL)\");\n\n stmt.execute(\"CREATE TABLE MIN_HISTORY_LEVEL (\" +\n \" MHL_TXNID bigint NOT NULL,\" +\n \" MHL_MIN_OPEN_TXNID bigint NOT NULL,\" +\n \" PRIMARY KEY(MHL_TXNID))\");\n\n stmt.execute(\"CREATE TABLE HIVE_LOCKS (\" +\n \" HL_LOCK_EXT_ID bigint NOT NULL,\" +\n \" HL_LOCK_INT_ID bigint NOT NULL,\" +\n \" HL_TXNID bigint NOT NULL,\" +\n \" HL_DB varchar(128) NOT NULL,\" +\n \" HL_TABLE varchar(128),\" +\n \" HL_PARTITION varchar(767),\" +\n \" HL_LOCK_STATE char(1) NOT NULL,\" +\n \" HL_LOCK_TYPE char(1) NOT NULL,\" +\n \" HL_LAST_HEARTBEAT bigint NOT NULL,\" +\n \" HL_ACQUIRED_AT bigint,\" +\n \" HL_USER varchar(128) NOT NULL,\" +\n \" HL_HOST varchar(128) NOT NULL,\" +\n \" HL_HEARTBEAT_COUNT integer,\" +\n \" HL_AGENT_INFO varchar(128),\" +\n \" HL_BLOCKEDBY_EXT_ID bigint,\" +\n \" HL_BLOCKEDBY_INT_ID bigint,\" +\n \" PRIMARY KEY(HL_LOCK_EXT_ID, HL_LOCK_INT_ID))\");\n stmt.execute(\"CREATE INDEX HL_TXNID_INDEX ON HIVE_LOCKS (HL_TXNID)\");\n\n stmt.execute(\"CREATE TABLE NEXT_LOCK_ID (\" + \" NL_NEXT bigint NOT NULL)\");\n stmt.execute(\"INSERT INTO NEXT_LOCK_ID VALUES(1)\");\n\n stmt.execute(\"CREATE TABLE COMPACTION_QUEUE (\" +\n \" CQ_ID bigint PRIMARY KEY,\" +\n \" CQ_DATABASE varchar(128) NOT NULL,\" +\n \" CQ_TABLE varchar(128) NOT NULL,\" +\n \" CQ_PARTITION varchar(767),\" +\n \" CQ_STATE char(1) NOT NULL,\" +\n \" CQ_TYPE char(1) NOT NULL,\" +\n \" CQ_TBLPROPERTIES varchar(2048),\" +\n \" CQ_WORKER_ID varchar(128),\" +\n \" CQ_START bigint,\" +\n \" CQ_RUN_AS varchar(128),\" +\n \" CQ_HIGHEST_WRITE_ID bigint,\" +\n \" CQ_META_INFO varchar(2048) for bit data,\" +\n \" CQ_HADOOP_JOB_ID varchar(32))\");\n\n stmt.execute(\"CREATE TABLE NEXT_COMPACTION_QUEUE_ID (NCQ_NEXT bigint NOT NULL)\");\n stmt.execute(\"INSERT INTO NEXT_COMPACTION_QUEUE_ID VALUES(1)\");\n\n stmt.execute(\"CREATE TABLE COMPLETED_COMPACTIONS (\" +\n \" CC_ID bigint PRIMARY KEY,\" +\n \" CC_DATABASE varchar(128) NOT NULL,\" +\n \" CC_TABLE varchar(128) NOT NULL,\" +\n \" CC_PARTITION varchar(767),\" +\n \" CC_STATE char(1) NOT NULL,\" +\n \" CC_TYPE char(1) NOT NULL,\" +\n \" CC_TBLPROPERTIES varchar(2048),\" +\n \" CC_WORKER_ID varchar(128),\" +\n \" CC_START bigint,\" +\n \" CC_END bigint,\" +\n \" CC_RUN_AS varchar(128),\" +\n \" CC_HIGHEST_WRITE_ID bigint,\" +\n \" CC_META_INFO varchar(2048) for bit data,\" +\n \" CC_HADOOP_JOB_ID varchar(32))\");\n\n stmt.execute(\"CREATE TABLE AUX_TABLE (\" +\n \" MT_KEY1 varchar(128) NOT NULL,\" +\n \" MT_KEY2 bigint NOT NULL,\" +\n \" MT_COMMENT varchar(255),\" +\n \" PRIMARY KEY(MT_KEY1, MT_KEY2))\");\n\n stmt.execute(\"CREATE TABLE WRITE_SET (\" +\n \" WS_DATABASE varchar(128) NOT NULL,\" +\n \" WS_TABLE varchar(128) NOT NULL,\" +\n \" WS_PARTITION varchar(767),\" +\n \" WS_TXNID bigint NOT NULL,\" +\n \" WS_COMMIT_ID bigint NOT NULL,\" +\n \" WS_OPERATION_TYPE char(1) NOT NULL)\"\n );\n\n stmt.execute(\"CREATE TABLE REPL_TXN_MAP (\" +\n \" RTM_REPL_POLICY varchar(256) NOT NULL, \" +\n \" RTM_SRC_TXN_ID bigint NOT NULL, \" +\n \" RTM_TARGET_TXN_ID bigint NOT NULL, \" +\n \" PRIMARY KEY (RTM_REPL_POLICY, RTM_SRC_TXN_ID))\"\n );\n\n stmt.execute(\"CREATE TABLE MATERIALIZATION_REBUILD_LOCKS (\" +\n \" MRL_TXN_ID BIGINT NOT NULL, \" +\n \" MRL_DB_NAME VARCHAR(128) NOT NULL, \" +\n \" MRL_TBL_NAME VARCHAR(256) NOT NULL, \" +\n \" MRL_LAST_HEARTBEAT BIGINT NOT NULL, \" +\n \" PRIMARY KEY(MRL_TXN_ID))\"\n );\n\n try {\n stmt.execute(\"CREATE TABLE \\\"APP\\\".\\\"SEQUENCE_TABLE\\\" (\\\"SEQUENCE_NAME\\\" VARCHAR(256) NOT \" +\n\n \"NULL, \\\"NEXT_VAL\\\" BIGINT NOT NULL)\"\n );\n } catch (SQLException e) {\n if (e.getMessage() != null && e.getMessage().contains(\"already exists\")) {\n LOG.info(\"SEQUENCE_TABLE table already exist, ignoring\");\n } else {\n throw e;\n }\n }\n\n try {\n stmt.execute(\"CREATE TABLE \\\"APP\\\".\\\"NOTIFICATION_SEQUENCE\\\" (\\\"NNI_ID\\\" BIGINT NOT NULL, \" +\n\n \"\\\"NEXT_EVENT_ID\\\" BIGINT NOT NULL)\"\n );\n } catch (SQLException e) {\n if (e.getMessage() != null && e.getMessage().contains(\"already exists\")) {\n LOG.info(\"NOTIFICATION_SEQUENCE table already exist, ignoring\");\n } else {\n throw e;\n }\n }\n\n try {\n stmt.execute(\"CREATE TABLE \\\"APP\\\".\\\"NOTIFICATION_LOG\\\" (\\\"NL_ID\\\" BIGINT NOT NULL, \" +\n \"\\\"DB_NAME\\\" VARCHAR(128), \\\"EVENT_ID\\\" BIGINT NOT NULL, \\\"EVENT_TIME\\\" INTEGER NOT\" +\n\n \" NULL, \\\"EVENT_TYPE\\\" VARCHAR(32) NOT NULL, \\\"MESSAGE\\\" CLOB, \\\"TBL_NAME\\\" \" +\n \"VARCHAR\" +\n \"(256), \\\"MESSAGE_FORMAT\\\" VARCHAR(16))\"\n );\n } catch (SQLException e) {\n if (e.getMessage() != null && e.getMessage().contains(\"already exists\")) {\n LOG.info(\"NOTIFICATION_LOG table already exist, ignoring\");\n } else {\n throw e;\n }\n }\n\n stmt.execute(\"INSERT INTO \\\"APP\\\".\\\"SEQUENCE_TABLE\\\" (\\\"SEQUENCE_NAME\\\", \\\"NEXT_VAL\\\") \" +\n \"SELECT * FROM (VALUES ('org.apache.hadoop.hive.metastore.model.MNotificationLog', \" +\n \"1)) tmp_table WHERE NOT EXISTS ( SELECT \\\"NEXT_VAL\\\" FROM \\\"APP\\\"\" +\n \".\\\"SEQUENCE_TABLE\\\" WHERE \\\"SEQUENCE_NAME\\\" = 'org.apache.hadoop.hive.metastore\" +\n \".model.MNotificationLog')\");\n\n stmt.execute(\"INSERT INTO \\\"APP\\\".\\\"NOTIFICATION_SEQUENCE\\\" (\\\"NNI_ID\\\", \\\"NEXT_EVENT_ID\\\")\" +\n \" SELECT * FROM (VALUES (1,1)) tmp_table WHERE NOT EXISTS ( SELECT \" +\n \"\\\"NEXT_EVENT_ID\\\" FROM \\\"APP\\\".\\\"NOTIFICATION_SEQUENCE\\\")\");\n } catch (SQLException e) {\n try {\n conn.rollback();\n } catch (SQLException re) {\n LOG.error(\"Error rolling back: \" + re.getMessage());\n }\n\n // Another thread might have already created these tables.\n if (e.getMessage() != null && e.getMessage().contains(\"already exists\")) {\n LOG.info(\"Txn tables already exist, returning\");\n return;\n }\n\n // This might be a deadlock, if so, let's retry\n if (e instanceof SQLTransactionRollbackException && deadlockCnt++ < 5) {\n LOG.warn(\"Caught deadlock, retrying db creation\");\n prepDb(conf);\n } else {\n throw e;\n }\n } finally {\n deadlockCnt = 0;\n closeResources(conn, stmt, null);\n }\n }", "public void prepareInsertObject() {\n // Require modify row to prepare.\n if (getModifyRow() == null) {\n return;\n }\n\n if (hasMultipleStatements()) {\n for (Enumeration statementEnum = getSQLStatements().elements();\n statementEnum.hasMoreElements();) {\n ((SQLModifyStatement)statementEnum.nextElement()).setModifyRow(getModifyRow());\n }\n } else if (getSQLStatement() != null) {\n ((SQLModifyStatement)getSQLStatement()).setModifyRow(getModifyRow());\n }\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareInsertObject();\n }", "private void InitiateRelevantActiveTransaction() {\n try {\n /**\n * Create a client socket with the host,\n * port, and timeout information.\n */\n mSocket = new Socket();\n mSocket.bind(null);\n mSocket.connect((new InetSocketAddress(mPeer.mIPAddr, Constants.WELCOME_SOCKET_PORT)), 3000);\n } catch (UnknownHostException e) {\n e.printStackTrace();\n return;\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n\n if (mSocket == null) {\n return;\n }\n\n switch (mQueryCode) {\n case Constants.CONNECTION_CODE_DISCOVER: {\n ActiveDiscoveryProcedure();\n break;\n }\n }\n\n }", "TransactionContext preAppendTransaction() throws IOException;", "void commitTransaction();", "@Override\n public Object transaction(DAOCommand command) {\n Object result = null;\n try {\n openConnection();\n startTransaction();\n result = command.execute(this);\n commitTransaction();\n } catch (DAOManagerException e) {\n LOGGER.error(e);\n rollbackTransaction();\n }\n return result;\n }", "public Transaction startTransaction() {\r\n return getManager().startTransaction();\r\n }", "public boolean beginTransaction() {\n boolean result = false;\n if (_canDisableAutoCommit) {\n try {\n _connection.setAutoCommit(false);\n result = true;\n } catch (SQLException e) {\n Log.warning(\"Transactions not supported\", this, \"startTransaction\");\n _canDisableAutoCommit = false;\n }\n }\n return result;\n }", "@Override\n public void commitTransaction() {\n try {\n connection.commit();\n } catch (SQLException e) {\n LOGGER.error(\"Can't commit transaction \", e);\n } finally {\n closeConnection();\n }\n }", "@Override\n\tpublic void onTransactionStart() {}", "@Override\n public void commitTx() {\n \n }", "public static void establecerTransaccion() throws SQLException {\n con.commit();\n }", "private void setDefaults(Connection conn) throws SQLException {\r\n conn.setAutoCommit(false);\r\n }", "@Before\n public void init() throws ConnectionException, IOException {\n\n final ConnectionPool pool = ConnectionPool.getInstance();\n//\n final Connection connection = pool.takeConnection();\n\n final ScriptRunner scriptRunner = new ScriptRunner(connection);\n\n Reader reader = new BufferedReader(new FileReader(UserDaoTest.class.getClassLoader().getResource(\"db_v2.sql\").getPath()));\n\n scriptRunner.runScript(reader);\n\n pool.closeConnection(connection);\n\n }", "private void init() throws SQLException, MalformedURLException {\n\t\tconnection = connect();\n\t\tstmt = connection.createStatement();\n\t\tstmt.setQueryTimeout(30);\n\t}", "private static void init(){\n entityManager = HibernateUtil.getEntityManager();\n transaction = entityManager.getTransaction();\n }", "public Txn() {\n }", "public void initializeTransaction(DBConnection conn) throws Exception {\n super.initializeTransaction( conn );\n int maxDaysForScheduleAdjust;\n \n String sMaxDaysForScheduleAdjust = (String)params.get(PARAM_NAME_MAX_DAYS_FOR_SCHED_ADJUST);\n try {\n maxDaysForScheduleAdjust = Integer.parseInt(sMaxDaysForScheduleAdjust);\n } catch( NumberFormatException ne ) {\n maxDaysForScheduleAdjust = DEFAULT_MAX_DAYS_FOR_SCHED_ADJUST;\n }\n \n lastDateForscheduleAdjust = DateHelper.addDays(DateHelper.getCurrentDate(), maxDaysForScheduleAdjust); \n }", "public long createTransaction(Credentials c, TransactionType tt) throws RelationException;", "protected void startTopLevelTrx() {\n startTransaction();\n }", "public static void habilitarTransaccionManual() {\n try {\n con.setAutoCommit(false);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void rollbackTransaction() {\n if (connection != null) {\n try {\n connection.rollback();\n } catch (SQLException e) {\n LOGGER.error(\"Can't rollback transaction \", e);\n } finally {\n closeConnection();\n }\n }\n }", "void rollbackTransaction(ConnectionContext context) throws IOException;", "@Override\n public void openConnection() throws DAOManagerException {\n try {\n connection = ds.getConnection();\n //save autocommit value\n this.autoCommit = connection.getAutoCommit();\n } catch (SQLException e) {\n LOGGER.error(\"Can't get connection \", e);\n throw new DAOManagerException(e);\n }\n\n }", "public static void openConnection() {\n try {\n connection = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:XE\", \"system\", \"kevin2000\");\n connection.setAutoCommit(true);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public TitanTransaction start();", "public tinySQLStatement(tinySQLConnection conn) {\n\n connection = conn;\n if ( debug) {\n System.out.println(\"connection is \" + connection.toString());\n }\n }", "void rollback() {\r\n tx.rollback();\r\n tx = new Transaction();\r\n }", "public synchronized void begin() throws JmsException {\n startXaTransaction();\n getSession();\n }", "Transaction getCurrentTransaction();", "public void commitTransaction(Connection con){\n try {\n con.commit();\n con.setAutoCommit(true);\n con.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);\n } catch (SQLException e) {\n try {\n con.rollback();\n } catch (SQLException e1) {\n e1.printStackTrace();\n }\n }\n }", "@Override\n public void rollbackTx() {\n \n }", "void sendTransactionToServer()\n \t{\n \t\t//json + sql magic\n \t}", "@Override\n protected void doPrepare()\n {\n iwriter.prepareToCommit();\n super.doPrepare();\n }", "public static void deshacerTransaccion() {\n try {\n con.rollback();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void prepare() throws Exception {\n\t\t\r\n\t}", "public Transaction createTransaction(Credentials user, TransactionType tt) throws RelationException;", "void begin() throws org.omg.CosTransactions.SubtransactionsUnavailable;", "private Transaction setUpTransaction(double amount, Transaction.Operation operation, String username){\n Transaction transaction = new Transaction();\n transaction.setDate(Date.valueOf(LocalDate.now()));\n transaction.setAmount(amount);\n transaction.setOperation(operation);\n transaction.setUserId(userRepository.getByUsername(username).getId());\n return transaction;\n }", "public void begin()\n {\n checkTransactionJoin();\n if (joinStatus != JoinStatus.NO_TXN)\n {\n throw new NucleusTransactionException(\"JTA Transaction is already active\");\n }\n\n UserTransaction utx;\n try\n {\n utx = getUserTransaction();\n }\n catch (NamingException e)\n {\n throw ec.getApiAdapter().getUserExceptionForException(\"Failed to obtain UserTransaction\", e);\n }\n\n try\n {\n utx.begin();\n }\n catch (NotSupportedException e)\n {\n throw ec.getApiAdapter().getUserExceptionForException(\"Failed to begin UserTransaction\", e);\n }\n catch (SystemException e)\n {\n throw ec.getApiAdapter().getUserExceptionForException(\"Failed to begin UserTransaction\", e);\n }\n\n checkTransactionJoin();\n if (joinStatus != JoinStatus.JOINED)\n {\n throw new NucleusTransactionException(\"Cannot join an auto started UserTransaction\");\n }\n userTransaction = utx;\n }", "public static void beginTransaction() throws UAPersistenceException\n {\n final Session session = currentSession();\n session.beginTransaction();\n }", "public void prepare()\n\t{\n\t\tsuper.prepare();\n\t}", "protected void onSetUpInTransaction() throws Exception {\r\n\t\ttry {\r\n\r\n\t\t\tlevelOfCourtInstance.setName(\"delta\");\r\n\r\n\t\t\tTestDataFactory jurisdictionTestDataFactory = (TestDataFactory) BeanHelper\r\n\t\t\t\t\t.getBean(\"jurisdictionTestDataFactory\");\r\n\r\n\t\t\tlevelOfCourtInstance\r\n\t\t\t\t\t.setJurisdiction((com.cc.civlit.domain.courtdivisions.Jurisdiction) jurisdictionTestDataFactory\r\n\t\t\t\t\t\t\t.loadOneRecord());\r\n\r\n\t\t\tlevelOfCourtService.save(levelOfCourtInstance);\r\n\t\t} catch (PersistenceException pe) {\r\n\t\t\t//if this instance can't be created due to back references e.g an orderItem needs an Order - \r\n\t\t\t// - we will simply skip generated tests.\r\n\t\t\tif (pe.getCause() instanceof PropertyValueException\r\n\t\t\t\t\t&& pe.getMessage().contains(\"Backref\")) {\r\n\t\t\t\tbTest = false;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tfail(e.getMessage());\r\n\t\t}\r\n\r\n\t}", "public void transaction() throws DBException {\n\t\tUsersTransaction transaction = new UsersTransaction();\n\t\tScanner scan = new Scanner(System.in);\n\t\tLogger.info(\"================TRANSACTION DETAILS TO DONATE======================\");\n\t\tLogger.info(\"Enter the transaction ID\");\n\t\ttransactionId = scan.nextInt();\n\t\tLogger.info(\"Enter the donor ID\");\n\t\tdonorId = scan.nextInt();\n\t\tLogger.info(\"Enter the fund Id\");\n\t\tfundRequestId = scan.nextInt();\n\t\tLogger.info(\"Enter the amount to be funded\");\n\t\ttargetAmount = scan.nextInt();\n\t\ttransaction.setTransactionId(transactionId);\n\t\ttransaction.setDonorId(donorId);\n\t\ttransaction.setFundRequestId(fundRequestId);\n\t\ttransaction.setTargetAmount(targetAmount);\n\t\tinsert(transaction);\n\t\tdonorFundRequest(reqType);\n\t}", "@Before\r\n public void setUp() {\r\n try {\r\n Connection conn=DriverManager.getConnection(\"jdbc:oracle:thin:@//localhost:1521/XE\",\"hr\",\"hr\");\r\n Statement stmt = conn.createStatement();\r\n stmt.execute(\"INSERT INTO PkgOrders (Pkg_Order_Id, Order_Id, Package_Id, Customer_Id, Price_Per_Pkg, Quantity, Is_Open) \"\r\n + \" VALUES (-1,-1,-1,-1,1.99,1,0)\");\r\n stmt.execute(\"INSERT INTO PkgOrders (Pkg_Order_Id, Order_Id, Package_Id, Customer_Id, Price_Per_Pkg, Quantity, Is_Open) \"\r\n + \" VALUES (-2,-2,-2,-2,2.99,2,0)\");\r\n } catch (Exception e) {System.out.println(e.getMessage());}\r\n }", "public void commitTransaction() {\n\r\n\t}", "public void forceCommitTx()\n{\n}", "public void prepare() throws Exception {\n\r\n\t}", "void prepare(ConnectionInfo info,byte[] reqXml) throws TransportException;", "private static void executeInitialization(String checkQuery,\n \t\tString initQuery) {\n \t\n \tTransaction trans = Connection.create();\n \ttrans.start();\n \tConnection connection = (Connection) trans;\n \tjava.sql.Connection conn = connection.getConn();\n \t\n \ttry (Statement check = conn.createStatement()) {\n \t\ttry (ResultSet rst = check.executeQuery(checkQuery)) {\n \t\t\trst.next();\n\t \t\tif ((Long) rst.getObject(1) < 1) {\n\t \t\t\ttry (Statement init = conn.createStatement()) {\n\t \t\t\t\tinit.execute(initQuery);\n\t \t\t\t}\n\t \t\t}\n \t\t}\n \t\ttrans.commit();\n\t\t} catch (SQLException e) {\n\t\t\ttrans.rollback();\n\t\t\tthrow new InvalidDBTransferException(\"SQL Exception occoured \" +\n\t\t\t\t\t\"during executeInitialization(String checkQuery, \" +\n\t\t\t\t\t\"String initQuery)\", e);\n\t\t}\n }", "protected void prepareSharedConnection(Connection connection) throws JMSException {\n String clientId = getClientId();\n if (clientId != null) {\n connection.setClientID(clientId);\n }\n }", "@Override\r\n\t\tpublic void prepare() throws Exception\r\n\t\t\t{\n\r\n\t\t\t}", "void commit(Transaction transaction);", "public IExporter setTransaction(IExportableTransaction trans) throws IOException {\n\t\tthis.trans = trans;\n\t\treturn prepare();\n\t}", "public Object doInTransaction(TransactionStatus status) {\n sendEvent();\n sendEvent();\n sendEvent();\n sendEvent();\n status.setRollbackOnly();\n return null;\n }", "public static void beginJta() throws DBException {\r\n\t\tgetJtaTransactionManager().begin(null);\r\n\t}", "private void startTransaction() throws CalFacadeException {\n if (transactionStarted) {\n return;\n }\n\n getSvc().open();\n getSvc().beginTransaction();\n transactionStarted = true;\n }", "public void init() throws SQLException {\n EventBusInstance.getInstance().register(new BestEffortsDeliveryListener());\n if (TransactionLogDataSourceType.RDB == transactionConfig.getStorageType()) {\n Preconditions.checkNotNull(transactionConfig.getTransactionLogDataSource());\n createTable();\n }\n }", "public JdbcOrderDao(Connection connection) {\n \t\tthis.connection = connection;\n \t\tconnectionShouldBeClosed = false;\n \t}", "public void prepare() {\n\t}", "public void rollbackTx()\n\n{\n\n}", "protected abstract Transaction createAndAdd();", "public Connection decorate(Connection conn)\r\n throws SQLException {\n conn = super.decorate(conn);\r\n \r\n if (conf.getTransactionIsolationConstant() == -1\r\n && conn.getTransactionIsolation() < conn.TRANSACTION_READ_COMMITTED)\r\n conn.setTransactionIsolation(conn.TRANSACTION_READ_COMMITTED);\r\n \r\n return conn;\r\n }", "@Before\r\n\tpublic void before() {\r\n\t\t_repository = Create();\r\n\t\tif (_repository != null) {\r\n\t\t\t_repository.beginTransaction();\r\n\t\t}\r\n\t}" ]
[ "0.7047395", "0.69065917", "0.66443104", "0.6639078", "0.6589408", "0.6580567", "0.6556852", "0.6552198", "0.64215475", "0.64174557", "0.6416396", "0.6279972", "0.6213136", "0.6174524", "0.61468965", "0.61452216", "0.6085683", "0.6073465", "0.6064074", "0.602135", "0.6010358", "0.59834164", "0.59721196", "0.59345615", "0.5914205", "0.5903347", "0.5857872", "0.58473843", "0.5833091", "0.5830107", "0.5823823", "0.58167213", "0.5774411", "0.5737623", "0.5717515", "0.5696045", "0.56917506", "0.5690077", "0.56515044", "0.56445754", "0.56396854", "0.562807", "0.5618494", "0.5607719", "0.5592634", "0.55866086", "0.55801344", "0.5573191", "0.5572214", "0.55699795", "0.5560791", "0.5552845", "0.5529776", "0.55190337", "0.5507947", "0.5507165", "0.5497508", "0.5493288", "0.5492203", "0.54857373", "0.5485336", "0.5482166", "0.5480489", "0.54793954", "0.5479393", "0.5476609", "0.54716796", "0.5465004", "0.5463437", "0.546296", "0.54559374", "0.54511744", "0.5438188", "0.5430733", "0.5428023", "0.54122657", "0.539501", "0.5394757", "0.5384737", "0.5372091", "0.5367848", "0.53670615", "0.5354264", "0.53485346", "0.5346791", "0.53321624", "0.5324691", "0.53220665", "0.5316532", "0.53136015", "0.53099394", "0.53090614", "0.5306006", "0.530565", "0.5286482", "0.5285739", "0.52758026", "0.52513146", "0.5247564", "0.5246952" ]
0.65552115
7
Commits a transaction being executed withing the given connection
public void commitTransaction(Connection con){ try { con.commit(); con.setAutoCommit(true); con.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); } catch (SQLException e) { try { con.rollback(); } catch (SQLException e1) { e1.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void commitTransaction(ConnectionContext context) throws IOException;", "@Override\n public void commitTransaction() {\n try {\n connection.commit();\n } catch (SQLException e) {\n LOGGER.error(\"Can't commit transaction \", e);\n } finally {\n closeConnection();\n }\n }", "void commit(Transaction transaction);", "public void commit() {\n doCommit();\n }", "public void commit() {\n\t\ttry {\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"完了したコミット/Commit Done\");\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"接続エラーが発生しました/Connection Commit Error Occured\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void commitTransaction();", "void commit() {\r\n tx.commit();\r\n tx = new Transaction();\r\n }", "void commit(Session session);", "@Override\n public void commit() throws SQLException {\n if (isTransActionAlive() && !getTransaction().getStatus().isOneOf(TransactionStatus.MARKED_ROLLBACK,\n TransactionStatus.ROLLING_BACK)) {\n // Flush synchronizes the database with in-memory objects in Session (and frees up that memory)\n getSession().flush();\n // Commit those results to the database & ends the Transaction\n getTransaction().commit();\n }\n }", "public void commit() throws SQLException {\n\t\tconnection.commit();\n\t}", "public void commit() {\n tryCommit(true);\n }", "public void commitTransaction() {\n\r\n\t}", "public void commit() throws ResourceException\n {\n if (inManagedTransaction)\n {\n try\n {\n inManagedTransaction = false;\n con.commit();\n }\n catch (SQLException e)\n {\n checkException(e);\n } // end of try-catch\n } // end of if ()\n else\n {\n throw new JBossResourceException(\"Trying to commit outside of a local tx\");\n } // end of else\n\n }", "void commit() throws CommitException;", "public void commitTransaction() throws TransactionException {\n\t\t\r\n\t}", "public void commitTransaction() throws SQLException {\n dbConnection.commit();\n }", "private void commitTransaction(GraphTraversalSource g) {\n if (graphFactory.isSupportingTransactions()) {\n g.tx().commit();\n }\n }", "public void commit();", "public void commit() {\n }", "public void commit() {\r\n for (Iterator<Connection> it = connections.values().iterator(); it.hasNext();) {\r\n Connection conn = it.next();\r\n try {\r\n conn.commit();\r\n } catch (SQLException ex) {\r\n log.severe(\"Partial commit failure: \" + ex.getMessage());\r\n }\r\n }\r\n closeConnections();\r\n }", "public static void commitAndClose(Connection conn) throws SQLException {\r\n if (conn != null) {\r\n try {\r\n conn.commit();\r\n } finally {\r\n close(conn);\r\n }\r\n }\r\n }", "protected void closeConnection(Connection connection)\n throws PersistenceException {\n Helper.assertObjectNotNull(connection, \"connection\");\n try {\n \tif(useManualCommit) { \n \t\tLOGGER.log(Level.INFO, \"committing transaction\"); \t\n \t\tHelper.commitTransaction(connection);\n \t}\n } finally {\n Helper.closeConnection(connection);\n }\n\n }", "@Override\r\n\t\tpublic void commit() throws SQLException {\n\t\t\t\r\n\t\t}", "public static void commitAndCloseQuietly(Connection conn) {\r\n try {\r\n commitAndClose(conn);\r\n } catch (SQLException e) {\r\n // quiet\r\n }\r\n }", "void commit();", "void commit();", "@Override\n public void commit() throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException,\n RollbackException, SecurityException, SystemException {\n assertActiveTransaction();\n try {\n getTransaction().commit();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n txns.set(null);\n }\n\n }", "public void commitChanges() {\n try {\n connection.commit();\n } catch (SQLException sqle) {\n LOGGER.log(Level.SEVERE, \"Unable to commit changes to the DB due to error {0}\", sqle.getMessage());\n }\n }", "@Override\n public void commitTx() {\n \n }", "public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "@Override\r\n\tpublic boolean commit() {\n\t\ttry {\r\n\t\t\tconn = DriverManager.getConnection(URL, USER, PASS);\r\n\t\t\tString sql = \"commit\";\r\n\t\t\tps = conn.prepareStatement(sql);\r\n\t\t\tps.executeUpdate();\r\n\t\t\trs.close();\r\n\t\t\tps.close();\r\n\t\t\treturn true;\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public abstract void commit();", "public void commitTransactionBlock() throws SQLException {\n masterNodeConnection.commit();\n masterNodeConnection.setAutoCommit(true);\n }", "@Override\n public void commit() {\n }", "void commit() {\n }", "public void commit() throws SQLException {\n if (conn != null) {\n conn.commit();\n }\n }", "public void commitTransaction(long id) throws RelationException;", "public TransactionalElement<E> commit();", "@Override\n\tpublic void commit() {\n\n\t}", "void rollbackTransaction(ConnectionContext context) throws IOException;", "void endTransaction();", "public static void establecerTransaccion() throws SQLException {\n con.commit();\n }", "void commit() throws SoarException\n {\n // if lazy, commit\n if(db != null && params.lazy_commit.get() == LazyCommitChoices.on)\n {\n // Commit and then start next lazy-commit transaction\n try\n {\n db.commitExecuteUpdate( /* soar_module::op_reinit */);\n db.beginExecuteUpdate( /* soar_module::op_reinit */);\n }\n catch(SQLException e)\n {\n throw new SoarException(\"Error while forcing commit: \" + e.getMessage(), e);\n }\n }\n \n }", "public static void commitTransaction() throws HException {\r\n\t\t\r\n\t\tTransaction tx = (Transaction) threadTransaction.get();\r\n\t\ttry {\r\n\t\t\tif (tx != null && !tx.wasCommitted() && !tx.wasRolledBack()) {\r\n\t\t\t\t// log.debug(\"Committing database transaction of this thread.\");\r\n\t\t\t\ttx.commit();\r\n\t\t\t}\r\n\t\t\tthreadTransaction.set(null);\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tthrow new HException(ex);\r\n\t\t}\r\n\t}", "public void commit() {\n\t\tcommitted = true;\n\t}", "@Override\n public void closeConnection() {\n if (connection != null) {\n try {\n //restore autocommit value\n connection.setAutoCommit(autoCommit);\n connection.close();\n } catch (SQLException e) {\n LOGGER.error(\"Can't close connection \", e);\n }\n }\n }", "public void commitTransaction() {\n final EntityTransaction entityTransaction = em.getTransaction();\n if (!entityTransaction.isActive()) {\n entityTransaction.begin();\n }\n entityTransaction.commit();\n }", "public void close() throws RemoteException {\r\n tx.commit();\r\n }", "private void processCommit() throws HsqlException {\n tokenizer.isGetThis(Token.T_WORK);\n session.commit();\n }", "protected abstract boolean commitTxn(Txn txn) throws PersistException;", "public boolean commit() {\r\n\tboolean result = false;\r\n\r\n\tif (conn != null && isConnected()) {\r\n\t try {\r\n\t\tboolean autoCommit = getAutoCommit();\r\n\r\n\t\tif (!autoCommit) {\r\n\t\t conn.commit();\r\n\t\t result = true;\r\n\t\t}\r\n\t } catch (Exception e) {\r\n\t\te.printStackTrace();\r\n\t }\r\n\t}\r\n\r\n\treturn result;\r\n }", "public void commit(){\n \n }", "public final void mCOMMIT() throws RecognitionException {\n try {\n int _type = COMMIT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:350:7: ( C O M M I T )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:350:9: C O M M I T\n {\n mC(); \n mO(); \n mM(); \n mM(); \n mI(); \n mT(); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "void commit() throws IndexTransactionException;", "void beginTransaction(ConnectionContext context) throws IOException;", "@Override\n public void close() throws IOException {\n if (connection != null) {\n try {\n if (complete) {\n connection.commit();\n }\n else {\n connection.rollback();\n }\n }\n catch (SQLException e) {\n throw new StoreException(e);\n }\n finally {\n try {\n connection.close();\n }\n catch (SQLException e) {\n throw new StoreException(e);\n }\n }\n }\n }", "public void commitEntity();", "public boolean commit(Connection conn) throws SQLException {\n boolean status = true;\n try {\n // Start of system transaction\n conn.setAutoCommit(false);\n BookingMapper bm = new BookingMapper();\n status = status && bm.addNewBooking(newBooking, conn);\n status = status && bm.updateBooking(modifiedBooking, conn);\n status = status && bm.deleteBooking(deleteBooking, conn);\n if (!status) {\n\n throw new Exception(\"Business Transaction aborted\");\n }\n // System transaction ends with success\n conn.commit();\n } catch (Exception e) {\n System.out.println(\"fail in UnitOfWork - commit()\");\n System.err.println(e);\n // System transaction fails, rollsback\n conn.rollback();\n status = false;\n }\n return status;\n }", "protected void closeConnectionOnError(Connection connection)\n throws PersistenceException {\n Helper.assertObjectNotNull(connection, \"connection\");\n try {\n \tif(useManualCommit) {\n \t\tLOGGER.log(Level.INFO, \"rollback transaction\");\n \t\tHelper.rollBackTransaction(connection);\n \t}\n } finally {\n Helper.closeConnection(connection);\n }\n }", "@Override\n\tpublic int commit() {\n\t\treturn 0;\n\t}", "public synchronized void writeCommit(Transaction t) {\n\t\tflush();\n\t\tpw.println(t.transactionId() + \" commit\");\t\n\t\tflush();\n\t}", "@Override\r\n\tpublic void commit(String tableName) {\n\t}", "public static void finishTransaction()\n {\n if (currentSession().getTransaction().isActive())\n {\n try\n {\n System.out.println(\"INFO: Transaction not null in Finish Transaction\");\n Thread.dumpStack();\n rollbackTransaction();\n// throw new UAPersistenceException(\"Incorrect Transaction handling! While finishing transaction, transaction still open. Rolling Back.\");\n } catch (UAPersistenceException e)\n {\n System.out.println(\"Finish Transaction threw an exception. Don't know what to do here. TODO find solution for handling this situation\");\n }\n }\n }", "void commit(String tpcid);", "@Override\n\tpublic void close() throws SQLException {\n\t\t//Commit must be explicit before closing the connection\n\t\tconnection.commit();\n\t\tconnection.close();\n\t}", "public void commitTransaction(TransID tid) \n throws IOException, IllegalArgumentException{// Not yet complete\n\t try {\n\t\t ADisk_lock.lock();\n\t\t // Call commit\n\t\t atranslist.get(tid).commit();\n\t\t Transaction temp = atranslist.remove(tid);\n\t\t wblist.addCommitted(temp);\t \n\t }\n\t finally{\n\t\t ADisk_lock.unlock();\n\t }\n }", "public void commit() throws ResourceException;", "@Test\r\n\tpublic void testCommit()\r\n\t\tthrows Exception\r\n\t{\r\n\t\ttry{\r\n\t\t\ttestAdminCon.begin();\r\n\t\t\ttestAdminCon.add(john, email, johnemail,dirgraph);\r\n\t\r\n\t\t\tassertTrue(\"Uncommitted update should be visible to own connection\",\r\n\t\t\t\t\ttestAdminCon.hasStatement(john, email, johnemail, false, dirgraph));\r\n\t\t\tassertFalse(\"Uncommitted update should only be visible to own connection\",\r\n\t\t\t\t\ttestReaderCon.hasStatement(john, email, johnemail, false, dirgraph));\r\n\t\t\tassertThat(testWriterCon.size(), is(equalTo(0L)));\r\n\t\r\n\t\t\ttestAdminCon.commit();\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tlogger.debug(e.getMessage());\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tif(testAdminCon.isActive())\r\n\t\t\t\ttestAdminCon.rollback();\r\n\t\t}\r\n\t\tassertThat(testWriterCon.size(), is(equalTo(1L)));\r\n\t\tassertTrue(\"Repository should contain statement after commit\",\r\n\t\t\t\ttestAdminCon.hasStatement(john, email, johnemail, false, dirgraph));\r\n\t\tassertTrue(\"Committed update will be visible to all connection\",\r\n\t\t\t\ttestReaderCon.hasStatement(john, email, johnemail, false, dirgraph));\r\n\t}", "public static void commitJta() throws DBException {\r\n\t\tgetJtaTransactionManager().commit();\r\n\t}", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public void finalizeTransaction(DBConnection conn) throws Exception {\n calculateEmpIdAndDates( true ); \n super.finalizeTransaction( conn );\n }", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "protected void commit()\n\t{\n\t\t_Status = DBRowStatus.Unchanged;\n\t}", "public static void rollbackAndClose(Connection conn) throws SQLException {\r\n if (conn != null) {\r\n try {\r\n conn.rollback();\r\n } finally {\r\n conn.close();\r\n }\r\n }\r\n }", "public void forceCommitTx()\n{\n}", "public void commit(Writer output) throws IOException {\n postData(new StringReader(\"<commit/>\"), output);\n }", "R commit(C change);", "public void logTransactionEnd();", "@Override\n public void rollbackTransaction() {\n if (connection != null) {\n try {\n connection.rollback();\n } catch (SQLException e) {\n LOGGER.error(\"Can't rollback transaction \", e);\n } finally {\n closeConnection();\n }\n }\n }", "void commit() throws InterruptedException;", "@Override\n\tpublic void rollbackTran(Connection con) throws SQLException {\n\t\tcon.rollback();\n\t this.closeAll(null, null, con);\n\t}", "private void commit() {\n if (vote != Vote.COMMIT) {\n throw new IllegalStateException(\"Cannot commit transaction with vote: \" + vote);\n }\n\n for (ObjectVersion<V> objectVersion : objectVersions.values()) {\n objectVersion.commit();\n }\n }", "public void transactionComplete(TransactionId tid) throws IOException {\n // some code goes here\n // not necessary for proj1\\\n \t//should always commit, simply call transactionComplete(tid,true)\n \ttransactionComplete(tid, true);\n \t\n }", "public static void commitTransaction() throws UAPersistenceException\n {\n final Session session = currentSession();\n Transaction tx = session.getTransaction();\n if (tx != null)\n {\n try\n {\n tx.commit();\n // session commited and closed. New session will be spawned upon calling currentSession on factory.\n } catch (HibernateException e)\n {\n System.out.println(\"commitTransaction: Throwing Exception e = \" + e);\n throw new UAPersistenceException(\"cannot commit transaction, see stack trace\", e);\n }\n } else\n {\n throw new IllegalStateException(\"Cannot commit transaction, no open transaction available!\");\n }\n\n }", "public static void rollbackAndCloseQuietly(Connection conn) {\r\n try {\r\n rollbackAndClose(conn);\r\n } catch (SQLException e) {\r\n // quiet\r\n }\r\n }" ]
[ "0.7714744", "0.7570158", "0.70501184", "0.694605", "0.6934698", "0.6910659", "0.69064003", "0.6828253", "0.67239696", "0.669711", "0.669324", "0.66577643", "0.66195935", "0.6616813", "0.6609646", "0.6584973", "0.6584907", "0.65792954", "0.6536728", "0.65202403", "0.6494864", "0.6486485", "0.64772964", "0.64570975", "0.6453414", "0.6453414", "0.6450801", "0.6440175", "0.6391924", "0.638877", "0.638877", "0.638877", "0.638877", "0.638877", "0.63509405", "0.63509405", "0.63509405", "0.63509405", "0.63355607", "0.63273156", "0.63272834", "0.63066113", "0.63009924", "0.6289837", "0.62244624", "0.6217787", "0.6207552", "0.6205299", "0.61877364", "0.6174658", "0.61709327", "0.6145413", "0.61387396", "0.6113553", "0.6112192", "0.60783994", "0.6056416", "0.60201", "0.5957907", "0.59510994", "0.593977", "0.59109926", "0.5906748", "0.58707774", "0.58617795", "0.58574224", "0.5852856", "0.5842171", "0.5840698", "0.5836442", "0.5835329", "0.5831421", "0.5827288", "0.57862145", "0.5785837", "0.5762597", "0.57378817", "0.5715568", "0.5715568", "0.5715568", "0.5715568", "0.5715568", "0.56858206", "0.5682106", "0.5682106", "0.5682106", "0.5682106", "0.5654782", "0.56520516", "0.56416154", "0.56013274", "0.5585317", "0.55679667", "0.5559616", "0.55493325", "0.5538263", "0.5537946", "0.55368876", "0.55280244", "0.54914063" ]
0.6840703
7
Executes an update query in the database (throws SQLException)
private void tryDbUpdate(String query) throws SQLException { Statement s = null; try { s = rawDataSource.getConnection().createStatement(); s.executeUpdate(query); } finally { s.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int executeUpdate() throws SQLException;", "public void executeUpdate (String sql) throws SQLException {\n // creates a statement object\n Statement stmt = this._connection.createStatement ();\n\n // issues the update instruction\n stmt.executeUpdate (sql);\n\n // close the instruction\n stmt.close ();\n }", "public void executeUpdate(String query) throws SQLException{\n Connection con = this.getConnection();\n\n if (con == null) {\n throw new SQLException(\"Can't get database connection\");\n }\n con.setAutoCommit(false);\n\n Statement statement = con.createStatement();\n statement.executeUpdate(query);\n statement.close();\n con.commit();\n con.close();\n }", "@Override\r\n\tpublic void update() throws SQLException {\n\r\n\t}", "public void executeUpdate(String sql) {\n\t\ttry {\n\t\t\tstm = connection.createStatement();\n\t\t\tstm.executeUpdate(sql);\n\t\t\tSystem.out.println(\"Database update complete.\");\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public synchronized int executeUpdate(String sql) throws SQLException {\n\n statementString = sql;\n return connection.executetinyUpdate(this);\n\n }", "public synchronized void update(String expression) throws SQLException {\n\n Statement st = null;\n\n st = conn.createStatement(); // statements\n\n int i = st.executeUpdate(expression); // run the query\n\n if (i == -1) {\n System.out.println(\"db error : \" + expression);\n }\n\n st.close();\n }", "public int executeUpdate(String sql) throws Exception {\n\t\tint result = stmt.executeUpdate(sql);\n\t\t// stmt.close();\n\t\treturn result;\n\t}", "public int update(String theQuery) throws SQLException {\r\n Statement st = this.connector.createStatement();\r\n return st.executeUpdate(theQuery);\r\n }", "Integer update(final String sql);", "public static void Update(String query) throws SQLException{\r\n\t\ttry {\r\n\t\t\tinitConnection();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tdbCon.createStatement().executeUpdate(query);\t\t\t\r\n\t}", "public void executeUpdate(String query) {\n \ttry {\n\t\t\tst.executeUpdate(query);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "@Override\n\tpublic void update(String query) {\n\t\ttry {\n\t\t\tStatement st = Database.getInstance().getDBConn().createStatement();\n\t\t\tst.executeUpdate(query);\n\t\t\t\n\t\t\tst.close();\n\t\t} catch(Exception err) {\n\t\t\terr.printStackTrace();\n\t\t}\n\t}", "public void dbUpdate(String query) {\n try {\n tryDbUpdate(query);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void update(String expression) {\r\n \t\tStatement st = null;\r\n \t\ttry {\r\n \t\t\tst = conn.createStatement();\r\n \t\t\tint i = st.executeUpdate(expression); // run the query\r\n \t\t\tif (i == -1) {\r\n \t\t\t\tSystem.out.println(\"db error : \" + expression);\r\n \t\t\t}\r\n \r\n \t\t} catch (SQLException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t} finally {\r\n \t\t\ttry {\r\n \t\t\t\tst.close();\r\n \t\t\t} catch (SQLException e) {\r\n \t\t\t\te.printStackTrace();\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t}", "public int queryUpdate(String query) throws SQLException {\n\t \t\t// Création de l'objet gérant les requêtes\n\t \t\tstatement = cnx.createStatement();\n\t \t\t\t\t\n\t \t\t// Exécution d'une requête d'écriture\n\t \t\tint statut = statement.executeUpdate(query);\n\t \t\t\n\t \t\treturn statut;\n\t \t}", "protected synchronized void pureSQLUpdate(String query) {\n if(this.connect()) {\n try {\n this.statement = this.connection.createStatement();\n this.statement.executeUpdate(query);\n } catch(SQLException ex) {\n Logger.getLogger(MySQLMariaDBConnector.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n this.close();\n }\n }\n }", "void executeUpdate(String noParamQuery, Connection conn);", "public int executeUpdate(String sql)\r\n throws SQLException {\n return 0;\r\n }", "public void executeUpdate(T databaseConnection, String query, Connection connection) throws SQLException {\n query = this.removeIllegalCharactersForSingleQuery(databaseConnection, query);\n query = refactorLimitAndOffset(query);\n // query = prepareQuery(query);\n log.info(databaseConnection.getConnectionURL() + \":\" + query);\n\n Statement statement = connection.createStatement();\n statement.executeUpdate(query);\n statement.close();\n }", "public static void updateQuery(String query) throws SQLException {\n\t\t\t// TODO Auto-generated method stub\n\t\t\tConnection con = connectToDB();\n\t\t\tStatement cmd = con.createStatement ();\n\t\t\t\n\t\t\tcmd.executeUpdate(query);\n\t\t\t\n\t\t\tcloseConnectionToDB(con);\n\t\t\t\n\t\t}", "public int executeUpdate() throws SQLException {\n return statement.executeUpdate();\n }", "public int executeUpdate(String sql) throws SQLException {\n return currentPreparedStatement.executeUpdate(sql);\n }", "public static void editDatabase(String sql){\n Connection connection = dbConnection();\n\n try{\n PreparedStatement pst = connection.prepareStatement(sql);\n pst.executeUpdate();\n pst.close();\n connection.close();\n }catch (Exception e){\n e.printStackTrace();\n }\n }", "public void updateRow() throws SQLException\n {\n m_rs.updateRow();\n }", "public void update() throws SQLException {\n DatabaseConnector.updateQuery(\"UPDATE course SET \"\n + \"courseDept='\" + this.courseDept + \"', \"\n + \"courseNum='\" + this.courseNum + \"', \"\n + \"courseName='\" + this.courseName + \"', \"\n + \"info='\" + this.info + \"', \"\n + \"credit=\" + this.credit);\n }", "@Override\n\tpublic void update(String sql, Object... parameters) {\n\t\tConnection conn = null;\n\t PreparedStatement stm = null;\n\t try {\n\t\t\tconn = getConnection();\n\t\t conn.setAutoCommit(false);\n\t\t stm = conn.prepareStatement(sql);\n\t\t setParameter(stm, parameters);\n\t\t stm.executeUpdate();\n\t\t conn.commit();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO: handle exception\n\t\t\ttry {\n\t\t\t\tconn.rollback();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t e.printStackTrace();\n\t\t \n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\n\t\t\t\tif (stm != null) {\n\t\t\t\t\tstm.close();\n\t\t\t\t}\n\n\t\t\t} catch (Exception e2) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void executeUpdate();", "@Override\r\n public void update(String query, Object... parameters) {\n Connection connection = null;\r\n PreparedStatement prepareStatement = null;\r\n try {\r\n connection = getConnection();\r\n connection.setAutoCommit(false);\r\n prepareStatement = connection.prepareStatement(query);\r\n setParameter(prepareStatement, parameters);\r\n prepareStatement.executeUpdate();\r\n connection.commit();\r\n } catch (SQLException e) {\r\n if(connection != null) {\r\n try {\r\n connection.rollback();\r\n } catch (SQLException ex) {\r\n }\r\n } else {\r\n } \r\n } finally {\r\n try {\r\n connection.close();\r\n if (prepareStatement != null) {\r\n prepareStatement.close();\r\n }\r\n } catch (SQLException e) {\r\n }\r\n }\r\n }", "public void update(PreparedStatement preparedStatement) throws SQLException\n {\n preparedStatement.executeUpdate();\n }", "private void tryDbUpdate(String query, Connection con) throws SQLException {\n Statement s = null;\n try {\n s = con.createStatement();\n s.executeUpdate(query);\n } finally {\n s.close();\n }\n }", "public static int update( String sql )\n \t{\n \t\tint rowsModified = -1;\n \t\t\n \t\tConnection conn = getConnection();\n \t\n \t\t\ttry {\n \t\t\t\tStatement st = conn.createStatement();\n \t\t\t\trowsModified = st.executeUpdate( sql );\n \t\t\t\tst.close();\n \t\t\t}\n \t\t\tcatch (SQLException ex) {\n \t\t\t\tthrow new RuntimeException( ex );\n \t\t\t}\n \t\t\n \t\treturnConnection( conn );\n \t\t\n \t\treturn rowsModified; \n \t}", "protected void update() throws SQLException {\n\t\tProperties whereClause = new Properties();\n\t\twhereClause.setProperty(\"1\", \"1\");\n\t\tupdatePersistentState(getSchema(), persistentState, whereClause);\n\t}", "public int updateDb (final String sql) throws DataAccessException;", "public int executeUpdate(final String stmt) throws SQLException {\n return connection.createStatement().executeUpdate(stmt);\n }", "public void executeUpdate(String request) {\n try {\r\n st.executeUpdate(request);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public int executeUpdate() throws SQLException {\n return currentPreparedStatement.executeUpdate();\n }", "int update(Purchase purchase) throws SQLException, DAOException;", "public void updateSQL(String SQL) {\r\n\t\ttry { \r\n\t statement.executeUpdate(SQL); \r\n\t }\r\n\t\tcatch (Exception e){\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "void update(User user) throws SQLException;", "public static int executeUpdate( Connection conn, String sqlString )\n throws SQLException {\n Statement stmt = conn.createStatement();\n int res = stmt.executeUpdate( sqlString );\n return res;\n }", "public void update(IEntity entity) throws SQLException;", "void executeUpdate();", "public void update() {\n\t\tPreparedStatement stmt;\n\t\ttry {\n\t\t\tstmt = cn.prepareStatement(\n\t\t\t\t\t\"UPDATE Metal SET metalDissolvedBy = ?, molesOfAcidToDissolve = ? WHERE metalID = ?\");\n\t\t\tstmt.setInt(1, dissolvedBy);\n\t\t\tstmt.setDouble(2, molesOfAcidToDissolve);\n\t\t\tstmt.setInt(3, ID);\n\t\t\tstmt.execute();\n\t\t} catch (Exception e) {\n\t\t\tDatabaseException.detectError(e);\n\t\t}\n\t}", "public void update() throws SQLException {\r\n\t\t//SQL-Statment\r\n\r\n\t\tString sql = \" UPDATE \" +table+ \" SET \" + col_genre + \" = ?\"\r\n\t\t\t\t+ \"WHERE \" + col_genreID + \" = ?\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setString(1, this.getGenre());\r\n\t\tstmt.setInt(2, this.getGenreID());\r\n\r\n\r\n\t\t//Update\r\n\t\tint rowsUpdated = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \"+rowsUpdated+ \"Zeilen hinzugefügt\");\r\n\t\tstmt.close();\r\n\r\n\t}", "@Override\n\tpublic void executeQuery(String query) {\n\t\tStatement statement;\n\t\ttry {\n\t\t\tstatement=connection.createStatement();\n\t\t\tstatement.executeUpdate(query);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "public void editar(String update){\n try {\n Statement stm = Conexion.getInstancia().createStatement();\n stm.executeUpdate(update);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "@Override\n\tpublic void executeUpdateDinamicSQL(String s) throws Exception {\n\t\t\n\t}", "public int executeUpdateStatement(String statement) throws SQLException {\n\t\tStatement sqlStmt = connection.createStatement();\n\t\t// execute the statement and check whether there is a result\n\t\treturn sqlStmt.executeUpdate(statement);\n\t}", "public boolean updateSql(String sql){\r\n try {\r\n stm = con.createStatement();\r\n stm.executeUpdate(sql);\r\n }\r\n catch (SQLException ex) {\r\n report = ex.toString();\r\n return false;\r\n }\r\n return true;\r\n }", "private void executeUpdate(final String sqlStatement, final String keyValue, final String eiffelevent)\n throws ConnectException, SQLException {\n try (PreparedStatement preparedStatement = prepareStatmentForResourceBlock(sqlStatement)) {\n preparedStatement.setString(1, eiffelevent);\n preparedStatement.setString(2, keyValue);\n int updateCount = preparedStatement.executeUpdate();\n\n if (updateCount == 0) {\n throw new SQLException(\"No changes was saved in the database.\");\n }\n\n } catch (SQLException e) {\n LOGGER.error(\"Error when trying to add value into database: {}\\n{}\", e.getMessage(), e);\n throw e;\n }\n }", "private int update(String sql) {\n int rows = 0;\n\n if (checkConnected()) {\n PreparedStatement statement = null;\n\n try {\n statement = connection.prepareStatement(sql);\n rows = statement.executeUpdate();\n }\n catch (SQLException ex) {\n printErrors(ex);\n }\n finally {\n if (statement != null) {\n try {\n statement.close();\n }\n catch (SQLException e) {\n // Ignore\n }\n }\n }\n }\n\n return rows;\n }", "public int update(String sql, Object... args) throws DataAccessException {\n\t\tSystem.out.println(sql + \" - \" + Arrays.toString(args));\r\n\t\treturn new PreparedStatementCallback<Integer>() {\r\n\t\t\t@Override\r\n\t\t\tprotected Integer doInPreparedStatement(PreparedStatement ps) throws SQLException {\r\n\t\t\t\tint ret = ps.executeUpdate();\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\t\t}.execute(txManager, sql, args);\r\n\t}", "public int execUpdateInsert(String query) {\n Connection con = createConnection();\n Statement st = null;\n\n int rowsAffected = 0;\n\n try {\n st = con.createStatement();\n rowsAffected = st.executeUpdate(query);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return rowsAffected;\n}", "public void update(T instance) throws Exception {\n String primaryKeyValue=ReflectionUtils.getFieldValue(instance,instance.getPrimaryKeyName());\n if(null==primaryKeyValue){\n throw new Exception(\"This is no primary key value\");\n }\n\n initDBTableMeta(instance);\n String setClause=buildSQLKeyValueMap(instance,\",\");\n String whereClause =instance.getPrimaryKeyName()+\"=\"+primaryKeyValue;\n String sql = UPDATE+tableName+SET+setClause+WHERE+whereClause;\n logger.info(\"usedSql={}\", sql);\n\n }", "public int executeSQLUpdate(final String sql) {\n\n long start = System.currentTimeMillis();\n int updateResult = txTemplate\n .execute(new TransactionCallback<Integer>() {\n @Override\n public Integer doInTransaction(TransactionStatus status) {\n return getSession(false).createSQLQuery(sql)\n .executeUpdate();\n }\n });\n logger.debug(\"executeSQLUpdate took: \"\n + (System.currentTimeMillis() - start) + \" ms\");\n return updateResult;\n }", "public void executeUpdateQuery(String hql) throws RepositoryException {\n\t\tDatanucleusCRUDUtils.executeUpdateQuery(hql);\n\t}", "public void updateData() throws SQLException {\n pst=con.prepareStatement(\"update employee set name=?,city=? where id=?\");\n System.out.println(\"Enter name: \");\n String name=sc.next();\n pst.setString(1,name);\n\n System.out.println(\"Enter city: \");\n String city=sc.next();\n pst.setString(2,city);\n\n System.out.println(\"Enter id: \");\n int id=sc.nextInt();\n pst.setInt(3,id);\n pst.execute();\n\n System.out.println(\"Data updated successfully\");\n }", "public int executeUpdateSQL() {\n\t\tint columnsAffected = -1;\n\t\ttry {\n\t\t\tcolumnsAffected = pstmt.executeUpdate();\n\t\t} catch (SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}\n\t\treturn columnsAffected;\n\t}", "@Override\n\tpublic void update(DomainEntity entity) throws SQLException {\n\t\t\n\t}", "public abstract int execUpdate(String query) ;", "public void update(T object) throws SQLException;", "@Override\n public int executeUpdate(String sql, String columnNames[]) \n throws SQLException {\n return 0;\n }", "public int executeUpdateCmd(String sql) {\n\t\ttry {\n\t\t\treturn stmt.executeUpdate(sql);\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn 0;\n\t\t} \n\t}", "@Override\n public int executeUpdate(String sql, int columnIndexes[]) \n throws SQLException {\n return 0;\n }", "public void doUpdate(T objectToUpdate) throws SQLException;", "public void update(String sql) {\n\t\tjdbcTemplate.update(sql);\n\t}", "public static void ExecuteWriteQuery(String query) {\n\t\ttry {\n\t\t\tStatement st = conn.createStatement();\n\t\t\tst.executeUpdate(query);\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void dbUpdate(String query, Connection con) {\n try {\n tryDbUpdate(query, con);\n } catch (SQLException e) {\n try {\n con.rollback();\n } catch (SQLException e1) {\n e1.printStackTrace();\n }\n }\n }", "public static int executeUpdate(ISQLConnection con, \n String SQL,\n boolean writeSQL) throws SQLException {\n Statement stmt = null;\n int result = 0;\n try {\n stmt = con.createStatement();\n if (writeSQL) {\n ScriptWriter.write(SQL);\n }\n if (log.isDebugEnabled()) {\n // i18n[DBUtil.info.executeupdate=executeupdate: Running SQL:\\n '{0}']\n String msg = \n s_stringMgr.getString(\"DBUtil.info.executeupdate\", SQL);\n log.debug(msg);\n }\n lastStatement = SQL;\n result = stmt.executeUpdate(SQL);\n } finally {\n SQLUtilities.closeStatement(stmt);\n }\n return result;\n }", "private int sendUpdate(String sqlQuery) {\n int result = 0;\n getRemoteConnection();\n try {\n statement = conn.createStatement();{\n // Execute a SELECT SQL statement.\n result = statement.executeUpdate(sqlQuery);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return result;\n }", "private void updateAccountTables(Connection conn) {\n\n\tPreparedStatement pst = null;\n\tString updateAccountQuery = \"Update Account Set phoneNumber = ? \" + \"Where name = ?;\";\n\n\ttry {\n\n\t\t\tpst = conn.prepareStatement(updateAccountQuery);\n\t\t\tpst.setInt(1, 312483991);\n\t\t\tpst.setString(2, \"Harry\");\n\t\t\n\t\t\tpst.executeUpdate();\n\t\t\tSystem.out.println(\"\\n\\nRecords updated into Account Table Successfully\\n\");\n\n\t\t//System.out.println(\"Abhinav\");\n\t} catch (SQLException e) {\n\t\tSystem.out.println(\"\\n-----Please Check Error Below for updating Account Table------\\n\");\n\t\te.printStackTrace();\n\t}\n\n}", "public static Boolean updateData(String query){\n int affectedRow = 0;\n connect();\n try{\n Statement stm = conn.createStatement();\n affectedRow = stm.executeUpdate(query);\n }catch(Exception e) {\n System.out.println(e.getMessage());\n }\n disconnect();\n if(affectedRow == 0)\n return false;\n else\n return true;\n }", "ResultSet executeQuery() throws SQLException;", "public void test_update() throws Exception {\n\t\tConnection conn = null;\r\n\t\tPreparedStatement stmt = null;\r\n\t\ttry {\r\n conn = jdbcutils.getConnection();\r\n //定义sql\r\n String sql = \"update employee set salary=? where EMP_id = ?\";\r\n //获取执行sql的对象\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1,10000);\r\n stmt.setInt(2,1);\r\n \r\n //执行sql\r\n stmt.executeUpdate(); \r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }finally {\r\n jdbcutils.close(stmt,conn);\r\n }\r\n\t\t test_select a = new test_select();\r\n\t a.test_select();\r\n\t}", "@Override\n public int executeUpdate(String sql) throws SQLException {\n throw new SQLFeatureNotSupportedException();\n }", "public int req(Long req_id)throws SQLException {\nint i=DbConnect.getStatement().executeUpdate(\"update requested set status='processed',remark='bought fail' where reqid=\"+req_id+\"\");\t\r\n\treturn i;\r\n}", "public static int dbUpdate(String databaseName, String querySQL)\n throws Exception {\n int recordCount = -1;\n try {\n systemlog(LogType.DEBUG, databaseName + \" query = \" + querySQL);\n DataBaseConnection c = DataBaseConnection\n .getDataBaseConnection(databaseName);\n Connection conn = c.getConnection();\n Statement update = conn.createStatement();\n recordCount = update.executeUpdate(querySQL);\n return recordCount;\n } catch (Exception e) {\n StringBuffer b = new StringBuffer();\n b.append(databaseName);\n b.append(\" query\\n\\n \" + querySQL);\n b.append(\"\\n\\n Error: \" + e.getMessage());\n StackTraceElement[] s = e.getStackTrace();\n for (int i = 0; i < s.length; i++) {\n if (i == 0)\n b.append(\"\\n\\n Stack Trace:\\n\");\n b.append(\"\\n \" + s[i].toString());\n }\n systemlog(LogType.ERROR, b.toString());\n throw e;\n } finally {\n DataBaseConnection.closeConnection(databaseName);\n }\n }", "@Test\n public void testUpdate() throws MainException, SQLException {\n System.out.println(\"update\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n PreparedStatement stmt = instance.prepareStatement(\n \"insert into infermieri (nome, cognome) values ('luca', 'massa')\");\n boolean expResult = true;\n boolean result = instance.update(stmt);\n assertEquals(expResult, result);\n }", "public void update() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.update(this);\n\t\tsession.getTransaction().commit();\n\t}", "public void executeQuery_Other(String query) {\n\n \n Connection con = DBconnect.connectdb();\n Statement st;\n\n try {\n st = con.createStatement();\n st.executeUpdate(query);\n\n \n } catch (Exception e) {\n //JOptionPane.showMessageDialog(null, e);\n\n }\n\n }", "@Override\n public void doUpdate(FasciaOrariaBean bean) throws SQLException {\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"UPDATE fasciaoraria SET fascia=? WHERE id=?\";\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n statement.setString(1, bean.getFascia());\n statement.setInt(2, bean.getId());\n System.out.println(\"doUpdate=\" + statement);\n statement.executeUpdate();\n con.commit();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n }", "@Override\n\tpublic int update(Object obj) throws SQLException {\n\t\treturn 0;\n\t}", "public void update(T t) {\n\t\tConnection connection = null;\n\t\tPreparedStatement statement = null;\n\t\tString query = createUpdate(t);\n\t\ttry {\n\t\t\tconnection = ConnectionDB.getConnection();\n\t\t\tstatement = connection.prepareStatement(query);\n\t\t\tstatement.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.log(Level.WARNING, type.getName() + \"DAO:Update \" + e.getMessage());\n\t\t} finally {\n\t\t\tConnectionDB.close(statement);\n\t\t\tConnectionDB.close(connection);\n\t\t}\n\t}", "public void updateRow() throws SQLException {\n\n try {\n debugCodeCall(\"updateRow\");\n checkClosed();\n if (insertRow != null) { throw Message.getSQLException(ErrorCode.NOT_ON_UPDATABLE_ROW); }\n checkOnValidRow();\n if (updateRow != null) {\n UpdatableRow row = getUpdatableRow();\n Value[] current = new Value[columnCount];\n for (int i = 0; i < updateRow.length; i++) {\n current[i] = get(i + 1);\n }\n row.updateRow(current, updateRow);\n for (int i = 0; i < updateRow.length; i++) {\n if (updateRow[i] == null) {\n updateRow[i] = current[i];\n }\n }\n Value[] patch = row.readRow(updateRow);\n patchCurrentRow(patch);\n updateRow = null;\n }\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public final int executeUpdate(String strSQL) throws SQLException {\n\t\tfinal Connection con = getConnection();\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = con.createStatement();\n\t\t\treturn stmt.executeUpdate(strSQL);\n\t\t} finally {\n\t\t\tif (stmt != null)\n\t\t\t\tstmt.close();\n\t\t\tif (con != null)\n\t\t\t\tcon.close();\n\t\t}\n\t}", "public void ejecutarSql(String query) throws Exception {\n stmt.executeUpdate(query);\n }", "public final int executeUpdate(String statementName, Object[] params)\n\t\t\tthrows SQLException {\n\t\tSQLStatement ss = this.getStatement(statementName);\n\t\tfinal Connection con = getConnection();\n\t\tPreparedStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = ss.prepareStatement(con, params);\n\t\t\treturn stmt.executeUpdate();\n\t\t} finally {\n\t\t\tif (stmt != null)\n\t\t\t\tstmt.close();\n\t\t\tif (con != null)\n\t\t\t\tcon.close();\n\t\t}\n\t}", "public int executeUpdate(String sql, int[] columnIndexes)\r\n throws SQLException {\n return 0;\r\n }", "public static int executeUpdate(final String sql, final Object... args)\n {\n return new SqlClosure<Integer>()\n {\n @Override\n protected Integer execute(Connection connection) throws SQLException\n {\n return OrmElf.executeUpdate(connection, sql, args);\n }\n }.execute();\n }", "public void updateIscrizione() throws SQLException {\r\n\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\t\t\tpstmt = con.prepareStatement(STATEMENT);\r\n\t\t\t\r\n\t\t\tArray sql = con.createArrayOf(\"boolean\", i.getDisponibilita());\r\n\t\t\t\r\n\t\t\tpstmt.setArray(1, sql);\r\n\t\t\tpstmt.setString(2, i.getGiocatore());\r\n\t\t\tpstmt.setInt(3, i.getTorneo());\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\tpstmt.execute();\r\n\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\tpstmt.close();\r\n\t\t\t}\r\n\r\n\t\t\tcon.close();\r\n\t\t}\r\n\r\n\t}", "public void update(TdiaryArticle obj) throws SQLException {\n\r\n\t}", "public void executeUpdateQuery(String hql, Map params) throws RepositoryException {\n\t\tDatanucleusCRUDUtils.executeUpdateQuery(hql, params); \n\t\tparams.clear();\n\t}", "private <T> void executeUpdate(T value, Object key, String query) {\r\n\t\tlogger.entering(CLASSNAME, \"executeUpdate\", new Object[] {key, value, query});\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement statement = null;\r\n\t\tByteArrayOutputStream baos = null;\r\n\t\tObjectOutputStream oout = null;\r\n\t\tbyte[] b;\r\n\t\ttry {\r\n\t\t\tconn = getConnection();\r\n\t\t\tstatement = conn.prepareStatement(query);\r\n\t\t\tbaos = new ByteArrayOutputStream();\r\n\t\t\toout = new ObjectOutputStream(baos);\r\n\t\t\toout.writeObject(value);\r\n\r\n\t\t\tb = baos.toByteArray();\r\n\r\n\t\t\tstatement.setBytes(1, b);\r\n\t\t\tstatement.setObject(2, key);\r\n\t\t\tstatement.executeUpdate();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new PersistenceException(e);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new PersistenceException(e);\r\n\t\t} finally {\r\n\t\t\tif (baos != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tbaos.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (oout != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\toout.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcleanupConnection(conn, null, statement);\r\n\t\t}\r\n\t\tlogger.exiting(CLASSNAME, \"executeUpdate\");\r\n\t}", "@Override\n\tpublic String updateStatement() throws Exception {\n\t\treturn null;\n\t}", "public static void update() {\n\t\t// TODO Auto-generated method stub\n\t\t\tString jdbcURL = \"jdbc:mysql://localhost:3306/sampldb\";\n\t String dbUsername=\"root\";\n\t String dbPassword=\"password\";\n\t \n\t \n\t \n\t System.out.println(\"Database Connected Successfully\");\n\t\t \n\t\t \n\t\t/* System.out.println(\"Which operation you want to execute \\n 1.Insert into table.\\n 2.Update table \\n 3.Delete data from table \\n 4.Show the data\");\n\t */\n\t Scanner in=new Scanner(System.in);\n\t \n\t System.out.println(\"Enter New password\");\n\t String password=in.nextLine();\n\t System.out.println(\"Enter fullname\");\n\t String fullname=in.nextLine();\n\t System.out.println(\"Enter email\");\n\t String email=in.nextLine();\n\t System.out.println(\"user name\");\n\t String username=in.nextLine();\n\t \n\t {\n\t \t \n\t \n\t try {\n\t Connection connection = DriverManager.getConnection(jdbcURL,dbUsername,dbPassword);\n\t \n\t String sql=\"UPDATE users SET password=?,fullname=?,email=? WHERE username=?\";\n\t \t PreparedStatement statement=connection.prepareStatement(sql);\n\t \t \n\t \t statement.setString(1, password);\n\t \t statement.setString(2, fullname);\n\t \t statement.setString(3, email);\n\t \t statement.setString(4, username);\n\t \t \n\t \t \n\t \t int rows=statement.executeUpdate();\n\t \t \n\t \t if(rows>0) {\n\t \t\t System.out.println(\"Updated succssfully\");\n\t \t }\n\t \t \n\t \t \n\t \t connection.close();\n\t \t \n\t }\n\t \n\t catch(SQLException ex) {\n\t \tex.printStackTrace();\n\t }\n\t\t\t\n\t\t}\n\n\t}", "public int Editcomp(Long comp_id, String compname, String address, String city,\r\n\t\tString state, Long offno, Long faxno, String website, String e_mail) throws SQLException {\nint i =DbConnect.getStatement().executeUpdate(\"update company set address='\"+address+\"',city='\"+city+\"',state='\"+state+\"',offno=\"+offno+\",faxno=\"+faxno+\",website='\"+website+\"',email='\"+e_mail+\"'where comp_id=\"+comp_id+\" \");\r\n\treturn i;\r\n}", "@Override\n\tpublic void executeUpdateDinamicQuery(String s) throws Exception {\n\t\t\n\t}", "@Override\n public int executeUpdate(String sql, int autoGeneratedKeys) \n throws SQLException {\n return 0;\n }", "public boolean doExecuteUpdate( String sql, Object[] params){\r\n\t\tboolean temp = false;\r\n\t\tif (dbConnection == null)\r\n\t\t\treturn temp;\r\n\t\tPreparedStatement stmt = null;\r\n\t\ttry {\r\n\r\n\t\t\tstmt = dbConnection.prepareStatement(sql);\r\n\t\t\t// stuff parameters in\r\n\t\t\tfor (int i=0; i<params.length; i++){\r\n\t\t\t\tstmt.setObject(i + 1,params[i]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (stmt == null)\r\n\t\t\t\treturn temp;\r\n\t\t\tint count = stmt.executeUpdate(); //返回值为0表示执行出错。仅对INSERT、UPDATE 或 DELETE\r\n\r\n\t\t\t//System.out.println(\"delete:\" +count);\r\n\t\t\t\r\n\t\t\tif (count > 0) \r\n\t\t\t\ttemp= true;\r\n\t\t} catch (SQLException e) {\r\n\t\t\tErrorLog.log(\"Database->doExecuteUpdate3:\" + e.getMessage()+\"//\"+ e);\r\n\t\t}finally{\r\n\t\t\ttry {\r\n\t\t\t\tif(stmt != null){ \r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t\tstmt = null;\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tErrorLog.log(\"Database->doExecuteUpdate4:\" + e.getMessage()+\"//\"+ e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn temp;\t\r\n\t}" ]
[ "0.84014636", "0.798795", "0.7950737", "0.79077333", "0.78101957", "0.7767709", "0.77541864", "0.77432543", "0.7682376", "0.76495475", "0.754149", "0.7512469", "0.75101095", "0.7455014", "0.7396158", "0.73815346", "0.73804694", "0.7352406", "0.73407674", "0.732099", "0.7320263", "0.73109496", "0.7292633", "0.7254374", "0.723298", "0.7210251", "0.7201124", "0.7199428", "0.7171196", "0.7164944", "0.7156771", "0.7150007", "0.71454245", "0.7144665", "0.7139822", "0.71142673", "0.7090833", "0.7086279", "0.707542", "0.70686543", "0.7003803", "0.70037985", "0.70006216", "0.6982211", "0.6965814", "0.6955564", "0.69551283", "0.6911094", "0.6892314", "0.6881763", "0.6856493", "0.6840413", "0.6839785", "0.68302786", "0.6823238", "0.6813529", "0.68015885", "0.67905796", "0.6773996", "0.67714626", "0.6761198", "0.674222", "0.6741006", "0.6737659", "0.6735599", "0.6730605", "0.6724067", "0.67211455", "0.67169636", "0.6712342", "0.67101353", "0.67089653", "0.6706897", "0.66981447", "0.66904485", "0.6675375", "0.66675705", "0.66600555", "0.6629051", "0.6621072", "0.6614048", "0.66042304", "0.6594869", "0.65918326", "0.6574968", "0.656576", "0.65655404", "0.6557368", "0.65462905", "0.6541583", "0.65367293", "0.65330535", "0.6532171", "0.6525485", "0.65046316", "0.6503727", "0.64974767", "0.6494314", "0.64897907", "0.6486361" ]
0.75746125
10
Executes an update query in the database (throws SQLException)
private void tryDbUpdate(String query, Connection con) throws SQLException { Statement s = null; try { s = con.createStatement(); s.executeUpdate(query); } finally { s.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int executeUpdate() throws SQLException;", "public void executeUpdate (String sql) throws SQLException {\n // creates a statement object\n Statement stmt = this._connection.createStatement ();\n\n // issues the update instruction\n stmt.executeUpdate (sql);\n\n // close the instruction\n stmt.close ();\n }", "public void executeUpdate(String query) throws SQLException{\n Connection con = this.getConnection();\n\n if (con == null) {\n throw new SQLException(\"Can't get database connection\");\n }\n con.setAutoCommit(false);\n\n Statement statement = con.createStatement();\n statement.executeUpdate(query);\n statement.close();\n con.commit();\n con.close();\n }", "@Override\r\n\tpublic void update() throws SQLException {\n\r\n\t}", "public void executeUpdate(String sql) {\n\t\ttry {\n\t\t\tstm = connection.createStatement();\n\t\t\tstm.executeUpdate(sql);\n\t\t\tSystem.out.println(\"Database update complete.\");\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public synchronized int executeUpdate(String sql) throws SQLException {\n\n statementString = sql;\n return connection.executetinyUpdate(this);\n\n }", "public synchronized void update(String expression) throws SQLException {\n\n Statement st = null;\n\n st = conn.createStatement(); // statements\n\n int i = st.executeUpdate(expression); // run the query\n\n if (i == -1) {\n System.out.println(\"db error : \" + expression);\n }\n\n st.close();\n }", "public int executeUpdate(String sql) throws Exception {\n\t\tint result = stmt.executeUpdate(sql);\n\t\t// stmt.close();\n\t\treturn result;\n\t}", "public int update(String theQuery) throws SQLException {\r\n Statement st = this.connector.createStatement();\r\n return st.executeUpdate(theQuery);\r\n }", "Integer update(final String sql);", "private void tryDbUpdate(String query) throws SQLException {\n Statement s = null;\n try {\n s = rawDataSource.getConnection().createStatement();\n s.executeUpdate(query);\n } finally {\n s.close();\n }\n }", "public static void Update(String query) throws SQLException{\r\n\t\ttry {\r\n\t\t\tinitConnection();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tdbCon.createStatement().executeUpdate(query);\t\t\t\r\n\t}", "public void executeUpdate(String query) {\n \ttry {\n\t\t\tst.executeUpdate(query);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "@Override\n\tpublic void update(String query) {\n\t\ttry {\n\t\t\tStatement st = Database.getInstance().getDBConn().createStatement();\n\t\t\tst.executeUpdate(query);\n\t\t\t\n\t\t\tst.close();\n\t\t} catch(Exception err) {\n\t\t\terr.printStackTrace();\n\t\t}\n\t}", "public void dbUpdate(String query) {\n try {\n tryDbUpdate(query);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void update(String expression) {\r\n \t\tStatement st = null;\r\n \t\ttry {\r\n \t\t\tst = conn.createStatement();\r\n \t\t\tint i = st.executeUpdate(expression); // run the query\r\n \t\t\tif (i == -1) {\r\n \t\t\t\tSystem.out.println(\"db error : \" + expression);\r\n \t\t\t}\r\n \r\n \t\t} catch (SQLException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t} finally {\r\n \t\t\ttry {\r\n \t\t\t\tst.close();\r\n \t\t\t} catch (SQLException e) {\r\n \t\t\t\te.printStackTrace();\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t}", "public int queryUpdate(String query) throws SQLException {\n\t \t\t// Création de l'objet gérant les requêtes\n\t \t\tstatement = cnx.createStatement();\n\t \t\t\t\t\n\t \t\t// Exécution d'une requête d'écriture\n\t \t\tint statut = statement.executeUpdate(query);\n\t \t\t\n\t \t\treturn statut;\n\t \t}", "protected synchronized void pureSQLUpdate(String query) {\n if(this.connect()) {\n try {\n this.statement = this.connection.createStatement();\n this.statement.executeUpdate(query);\n } catch(SQLException ex) {\n Logger.getLogger(MySQLMariaDBConnector.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n this.close();\n }\n }\n }", "void executeUpdate(String noParamQuery, Connection conn);", "public int executeUpdate(String sql)\r\n throws SQLException {\n return 0;\r\n }", "public void executeUpdate(T databaseConnection, String query, Connection connection) throws SQLException {\n query = this.removeIllegalCharactersForSingleQuery(databaseConnection, query);\n query = refactorLimitAndOffset(query);\n // query = prepareQuery(query);\n log.info(databaseConnection.getConnectionURL() + \":\" + query);\n\n Statement statement = connection.createStatement();\n statement.executeUpdate(query);\n statement.close();\n }", "public static void updateQuery(String query) throws SQLException {\n\t\t\t// TODO Auto-generated method stub\n\t\t\tConnection con = connectToDB();\n\t\t\tStatement cmd = con.createStatement ();\n\t\t\t\n\t\t\tcmd.executeUpdate(query);\n\t\t\t\n\t\t\tcloseConnectionToDB(con);\n\t\t\t\n\t\t}", "public int executeUpdate() throws SQLException {\n return statement.executeUpdate();\n }", "public int executeUpdate(String sql) throws SQLException {\n return currentPreparedStatement.executeUpdate(sql);\n }", "public static void editDatabase(String sql){\n Connection connection = dbConnection();\n\n try{\n PreparedStatement pst = connection.prepareStatement(sql);\n pst.executeUpdate();\n pst.close();\n connection.close();\n }catch (Exception e){\n e.printStackTrace();\n }\n }", "public void updateRow() throws SQLException\n {\n m_rs.updateRow();\n }", "public void update() throws SQLException {\n DatabaseConnector.updateQuery(\"UPDATE course SET \"\n + \"courseDept='\" + this.courseDept + \"', \"\n + \"courseNum='\" + this.courseNum + \"', \"\n + \"courseName='\" + this.courseName + \"', \"\n + \"info='\" + this.info + \"', \"\n + \"credit=\" + this.credit);\n }", "@Override\n\tpublic void update(String sql, Object... parameters) {\n\t\tConnection conn = null;\n\t PreparedStatement stm = null;\n\t try {\n\t\t\tconn = getConnection();\n\t\t conn.setAutoCommit(false);\n\t\t stm = conn.prepareStatement(sql);\n\t\t setParameter(stm, parameters);\n\t\t stm.executeUpdate();\n\t\t conn.commit();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO: handle exception\n\t\t\ttry {\n\t\t\t\tconn.rollback();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t e.printStackTrace();\n\t\t \n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\n\t\t\t\tif (stm != null) {\n\t\t\t\t\tstm.close();\n\t\t\t\t}\n\n\t\t\t} catch (Exception e2) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void executeUpdate();", "@Override\r\n public void update(String query, Object... parameters) {\n Connection connection = null;\r\n PreparedStatement prepareStatement = null;\r\n try {\r\n connection = getConnection();\r\n connection.setAutoCommit(false);\r\n prepareStatement = connection.prepareStatement(query);\r\n setParameter(prepareStatement, parameters);\r\n prepareStatement.executeUpdate();\r\n connection.commit();\r\n } catch (SQLException e) {\r\n if(connection != null) {\r\n try {\r\n connection.rollback();\r\n } catch (SQLException ex) {\r\n }\r\n } else {\r\n } \r\n } finally {\r\n try {\r\n connection.close();\r\n if (prepareStatement != null) {\r\n prepareStatement.close();\r\n }\r\n } catch (SQLException e) {\r\n }\r\n }\r\n }", "public void update(PreparedStatement preparedStatement) throws SQLException\n {\n preparedStatement.executeUpdate();\n }", "public static int update( String sql )\n \t{\n \t\tint rowsModified = -1;\n \t\t\n \t\tConnection conn = getConnection();\n \t\n \t\t\ttry {\n \t\t\t\tStatement st = conn.createStatement();\n \t\t\t\trowsModified = st.executeUpdate( sql );\n \t\t\t\tst.close();\n \t\t\t}\n \t\t\tcatch (SQLException ex) {\n \t\t\t\tthrow new RuntimeException( ex );\n \t\t\t}\n \t\t\n \t\treturnConnection( conn );\n \t\t\n \t\treturn rowsModified; \n \t}", "protected void update() throws SQLException {\n\t\tProperties whereClause = new Properties();\n\t\twhereClause.setProperty(\"1\", \"1\");\n\t\tupdatePersistentState(getSchema(), persistentState, whereClause);\n\t}", "public int updateDb (final String sql) throws DataAccessException;", "public int executeUpdate(final String stmt) throws SQLException {\n return connection.createStatement().executeUpdate(stmt);\n }", "public void executeUpdate(String request) {\n try {\r\n st.executeUpdate(request);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public int executeUpdate() throws SQLException {\n return currentPreparedStatement.executeUpdate();\n }", "int update(Purchase purchase) throws SQLException, DAOException;", "public void updateSQL(String SQL) {\r\n\t\ttry { \r\n\t statement.executeUpdate(SQL); \r\n\t }\r\n\t\tcatch (Exception e){\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "void update(User user) throws SQLException;", "public static int executeUpdate( Connection conn, String sqlString )\n throws SQLException {\n Statement stmt = conn.createStatement();\n int res = stmt.executeUpdate( sqlString );\n return res;\n }", "public void update(IEntity entity) throws SQLException;", "void executeUpdate();", "public void update() {\n\t\tPreparedStatement stmt;\n\t\ttry {\n\t\t\tstmt = cn.prepareStatement(\n\t\t\t\t\t\"UPDATE Metal SET metalDissolvedBy = ?, molesOfAcidToDissolve = ? WHERE metalID = ?\");\n\t\t\tstmt.setInt(1, dissolvedBy);\n\t\t\tstmt.setDouble(2, molesOfAcidToDissolve);\n\t\t\tstmt.setInt(3, ID);\n\t\t\tstmt.execute();\n\t\t} catch (Exception e) {\n\t\t\tDatabaseException.detectError(e);\n\t\t}\n\t}", "public void update() throws SQLException {\r\n\t\t//SQL-Statment\r\n\r\n\t\tString sql = \" UPDATE \" +table+ \" SET \" + col_genre + \" = ?\"\r\n\t\t\t\t+ \"WHERE \" + col_genreID + \" = ?\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setString(1, this.getGenre());\r\n\t\tstmt.setInt(2, this.getGenreID());\r\n\r\n\r\n\t\t//Update\r\n\t\tint rowsUpdated = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \"+rowsUpdated+ \"Zeilen hinzugefügt\");\r\n\t\tstmt.close();\r\n\r\n\t}", "@Override\n\tpublic void executeQuery(String query) {\n\t\tStatement statement;\n\t\ttry {\n\t\t\tstatement=connection.createStatement();\n\t\t\tstatement.executeUpdate(query);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "public void editar(String update){\n try {\n Statement stm = Conexion.getInstancia().createStatement();\n stm.executeUpdate(update);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "@Override\n\tpublic void executeUpdateDinamicSQL(String s) throws Exception {\n\t\t\n\t}", "public int executeUpdateStatement(String statement) throws SQLException {\n\t\tStatement sqlStmt = connection.createStatement();\n\t\t// execute the statement and check whether there is a result\n\t\treturn sqlStmt.executeUpdate(statement);\n\t}", "public boolean updateSql(String sql){\r\n try {\r\n stm = con.createStatement();\r\n stm.executeUpdate(sql);\r\n }\r\n catch (SQLException ex) {\r\n report = ex.toString();\r\n return false;\r\n }\r\n return true;\r\n }", "private void executeUpdate(final String sqlStatement, final String keyValue, final String eiffelevent)\n throws ConnectException, SQLException {\n try (PreparedStatement preparedStatement = prepareStatmentForResourceBlock(sqlStatement)) {\n preparedStatement.setString(1, eiffelevent);\n preparedStatement.setString(2, keyValue);\n int updateCount = preparedStatement.executeUpdate();\n\n if (updateCount == 0) {\n throw new SQLException(\"No changes was saved in the database.\");\n }\n\n } catch (SQLException e) {\n LOGGER.error(\"Error when trying to add value into database: {}\\n{}\", e.getMessage(), e);\n throw e;\n }\n }", "private int update(String sql) {\n int rows = 0;\n\n if (checkConnected()) {\n PreparedStatement statement = null;\n\n try {\n statement = connection.prepareStatement(sql);\n rows = statement.executeUpdate();\n }\n catch (SQLException ex) {\n printErrors(ex);\n }\n finally {\n if (statement != null) {\n try {\n statement.close();\n }\n catch (SQLException e) {\n // Ignore\n }\n }\n }\n }\n\n return rows;\n }", "public int update(String sql, Object... args) throws DataAccessException {\n\t\tSystem.out.println(sql + \" - \" + Arrays.toString(args));\r\n\t\treturn new PreparedStatementCallback<Integer>() {\r\n\t\t\t@Override\r\n\t\t\tprotected Integer doInPreparedStatement(PreparedStatement ps) throws SQLException {\r\n\t\t\t\tint ret = ps.executeUpdate();\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\t\t}.execute(txManager, sql, args);\r\n\t}", "public int execUpdateInsert(String query) {\n Connection con = createConnection();\n Statement st = null;\n\n int rowsAffected = 0;\n\n try {\n st = con.createStatement();\n rowsAffected = st.executeUpdate(query);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return rowsAffected;\n}", "public void update(T instance) throws Exception {\n String primaryKeyValue=ReflectionUtils.getFieldValue(instance,instance.getPrimaryKeyName());\n if(null==primaryKeyValue){\n throw new Exception(\"This is no primary key value\");\n }\n\n initDBTableMeta(instance);\n String setClause=buildSQLKeyValueMap(instance,\",\");\n String whereClause =instance.getPrimaryKeyName()+\"=\"+primaryKeyValue;\n String sql = UPDATE+tableName+SET+setClause+WHERE+whereClause;\n logger.info(\"usedSql={}\", sql);\n\n }", "public int executeSQLUpdate(final String sql) {\n\n long start = System.currentTimeMillis();\n int updateResult = txTemplate\n .execute(new TransactionCallback<Integer>() {\n @Override\n public Integer doInTransaction(TransactionStatus status) {\n return getSession(false).createSQLQuery(sql)\n .executeUpdate();\n }\n });\n logger.debug(\"executeSQLUpdate took: \"\n + (System.currentTimeMillis() - start) + \" ms\");\n return updateResult;\n }", "public void executeUpdateQuery(String hql) throws RepositoryException {\n\t\tDatanucleusCRUDUtils.executeUpdateQuery(hql);\n\t}", "public void updateData() throws SQLException {\n pst=con.prepareStatement(\"update employee set name=?,city=? where id=?\");\n System.out.println(\"Enter name: \");\n String name=sc.next();\n pst.setString(1,name);\n\n System.out.println(\"Enter city: \");\n String city=sc.next();\n pst.setString(2,city);\n\n System.out.println(\"Enter id: \");\n int id=sc.nextInt();\n pst.setInt(3,id);\n pst.execute();\n\n System.out.println(\"Data updated successfully\");\n }", "public int executeUpdateSQL() {\n\t\tint columnsAffected = -1;\n\t\ttry {\n\t\t\tcolumnsAffected = pstmt.executeUpdate();\n\t\t} catch (SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}\n\t\treturn columnsAffected;\n\t}", "@Override\n\tpublic void update(DomainEntity entity) throws SQLException {\n\t\t\n\t}", "public abstract int execUpdate(String query) ;", "public void update(T object) throws SQLException;", "@Override\n public int executeUpdate(String sql, String columnNames[]) \n throws SQLException {\n return 0;\n }", "public int executeUpdateCmd(String sql) {\n\t\ttry {\n\t\t\treturn stmt.executeUpdate(sql);\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn 0;\n\t\t} \n\t}", "@Override\n public int executeUpdate(String sql, int columnIndexes[]) \n throws SQLException {\n return 0;\n }", "public void doUpdate(T objectToUpdate) throws SQLException;", "public void update(String sql) {\n\t\tjdbcTemplate.update(sql);\n\t}", "public static void ExecuteWriteQuery(String query) {\n\t\ttry {\n\t\t\tStatement st = conn.createStatement();\n\t\t\tst.executeUpdate(query);\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void dbUpdate(String query, Connection con) {\n try {\n tryDbUpdate(query, con);\n } catch (SQLException e) {\n try {\n con.rollback();\n } catch (SQLException e1) {\n e1.printStackTrace();\n }\n }\n }", "public static int executeUpdate(ISQLConnection con, \n String SQL,\n boolean writeSQL) throws SQLException {\n Statement stmt = null;\n int result = 0;\n try {\n stmt = con.createStatement();\n if (writeSQL) {\n ScriptWriter.write(SQL);\n }\n if (log.isDebugEnabled()) {\n // i18n[DBUtil.info.executeupdate=executeupdate: Running SQL:\\n '{0}']\n String msg = \n s_stringMgr.getString(\"DBUtil.info.executeupdate\", SQL);\n log.debug(msg);\n }\n lastStatement = SQL;\n result = stmt.executeUpdate(SQL);\n } finally {\n SQLUtilities.closeStatement(stmt);\n }\n return result;\n }", "private int sendUpdate(String sqlQuery) {\n int result = 0;\n getRemoteConnection();\n try {\n statement = conn.createStatement();{\n // Execute a SELECT SQL statement.\n result = statement.executeUpdate(sqlQuery);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return result;\n }", "private void updateAccountTables(Connection conn) {\n\n\tPreparedStatement pst = null;\n\tString updateAccountQuery = \"Update Account Set phoneNumber = ? \" + \"Where name = ?;\";\n\n\ttry {\n\n\t\t\tpst = conn.prepareStatement(updateAccountQuery);\n\t\t\tpst.setInt(1, 312483991);\n\t\t\tpst.setString(2, \"Harry\");\n\t\t\n\t\t\tpst.executeUpdate();\n\t\t\tSystem.out.println(\"\\n\\nRecords updated into Account Table Successfully\\n\");\n\n\t\t//System.out.println(\"Abhinav\");\n\t} catch (SQLException e) {\n\t\tSystem.out.println(\"\\n-----Please Check Error Below for updating Account Table------\\n\");\n\t\te.printStackTrace();\n\t}\n\n}", "public static Boolean updateData(String query){\n int affectedRow = 0;\n connect();\n try{\n Statement stm = conn.createStatement();\n affectedRow = stm.executeUpdate(query);\n }catch(Exception e) {\n System.out.println(e.getMessage());\n }\n disconnect();\n if(affectedRow == 0)\n return false;\n else\n return true;\n }", "ResultSet executeQuery() throws SQLException;", "public void test_update() throws Exception {\n\t\tConnection conn = null;\r\n\t\tPreparedStatement stmt = null;\r\n\t\ttry {\r\n conn = jdbcutils.getConnection();\r\n //定义sql\r\n String sql = \"update employee set salary=? where EMP_id = ?\";\r\n //获取执行sql的对象\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1,10000);\r\n stmt.setInt(2,1);\r\n \r\n //执行sql\r\n stmt.executeUpdate(); \r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }finally {\r\n jdbcutils.close(stmt,conn);\r\n }\r\n\t\t test_select a = new test_select();\r\n\t a.test_select();\r\n\t}", "@Override\n public int executeUpdate(String sql) throws SQLException {\n throw new SQLFeatureNotSupportedException();\n }", "public int req(Long req_id)throws SQLException {\nint i=DbConnect.getStatement().executeUpdate(\"update requested set status='processed',remark='bought fail' where reqid=\"+req_id+\"\");\t\r\n\treturn i;\r\n}", "public static int dbUpdate(String databaseName, String querySQL)\n throws Exception {\n int recordCount = -1;\n try {\n systemlog(LogType.DEBUG, databaseName + \" query = \" + querySQL);\n DataBaseConnection c = DataBaseConnection\n .getDataBaseConnection(databaseName);\n Connection conn = c.getConnection();\n Statement update = conn.createStatement();\n recordCount = update.executeUpdate(querySQL);\n return recordCount;\n } catch (Exception e) {\n StringBuffer b = new StringBuffer();\n b.append(databaseName);\n b.append(\" query\\n\\n \" + querySQL);\n b.append(\"\\n\\n Error: \" + e.getMessage());\n StackTraceElement[] s = e.getStackTrace();\n for (int i = 0; i < s.length; i++) {\n if (i == 0)\n b.append(\"\\n\\n Stack Trace:\\n\");\n b.append(\"\\n \" + s[i].toString());\n }\n systemlog(LogType.ERROR, b.toString());\n throw e;\n } finally {\n DataBaseConnection.closeConnection(databaseName);\n }\n }", "@Test\n public void testUpdate() throws MainException, SQLException {\n System.out.println(\"update\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n PreparedStatement stmt = instance.prepareStatement(\n \"insert into infermieri (nome, cognome) values ('luca', 'massa')\");\n boolean expResult = true;\n boolean result = instance.update(stmt);\n assertEquals(expResult, result);\n }", "public void update() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.update(this);\n\t\tsession.getTransaction().commit();\n\t}", "public void executeQuery_Other(String query) {\n\n \n Connection con = DBconnect.connectdb();\n Statement st;\n\n try {\n st = con.createStatement();\n st.executeUpdate(query);\n\n \n } catch (Exception e) {\n //JOptionPane.showMessageDialog(null, e);\n\n }\n\n }", "@Override\n public void doUpdate(FasciaOrariaBean bean) throws SQLException {\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"UPDATE fasciaoraria SET fascia=? WHERE id=?\";\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n statement.setString(1, bean.getFascia());\n statement.setInt(2, bean.getId());\n System.out.println(\"doUpdate=\" + statement);\n statement.executeUpdate();\n con.commit();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n }", "@Override\n\tpublic int update(Object obj) throws SQLException {\n\t\treturn 0;\n\t}", "public void update(T t) {\n\t\tConnection connection = null;\n\t\tPreparedStatement statement = null;\n\t\tString query = createUpdate(t);\n\t\ttry {\n\t\t\tconnection = ConnectionDB.getConnection();\n\t\t\tstatement = connection.prepareStatement(query);\n\t\t\tstatement.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.log(Level.WARNING, type.getName() + \"DAO:Update \" + e.getMessage());\n\t\t} finally {\n\t\t\tConnectionDB.close(statement);\n\t\t\tConnectionDB.close(connection);\n\t\t}\n\t}", "public void updateRow() throws SQLException {\n\n try {\n debugCodeCall(\"updateRow\");\n checkClosed();\n if (insertRow != null) { throw Message.getSQLException(ErrorCode.NOT_ON_UPDATABLE_ROW); }\n checkOnValidRow();\n if (updateRow != null) {\n UpdatableRow row = getUpdatableRow();\n Value[] current = new Value[columnCount];\n for (int i = 0; i < updateRow.length; i++) {\n current[i] = get(i + 1);\n }\n row.updateRow(current, updateRow);\n for (int i = 0; i < updateRow.length; i++) {\n if (updateRow[i] == null) {\n updateRow[i] = current[i];\n }\n }\n Value[] patch = row.readRow(updateRow);\n patchCurrentRow(patch);\n updateRow = null;\n }\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public final int executeUpdate(String strSQL) throws SQLException {\n\t\tfinal Connection con = getConnection();\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = con.createStatement();\n\t\t\treturn stmt.executeUpdate(strSQL);\n\t\t} finally {\n\t\t\tif (stmt != null)\n\t\t\t\tstmt.close();\n\t\t\tif (con != null)\n\t\t\t\tcon.close();\n\t\t}\n\t}", "public void ejecutarSql(String query) throws Exception {\n stmt.executeUpdate(query);\n }", "public final int executeUpdate(String statementName, Object[] params)\n\t\t\tthrows SQLException {\n\t\tSQLStatement ss = this.getStatement(statementName);\n\t\tfinal Connection con = getConnection();\n\t\tPreparedStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = ss.prepareStatement(con, params);\n\t\t\treturn stmt.executeUpdate();\n\t\t} finally {\n\t\t\tif (stmt != null)\n\t\t\t\tstmt.close();\n\t\t\tif (con != null)\n\t\t\t\tcon.close();\n\t\t}\n\t}", "public int executeUpdate(String sql, int[] columnIndexes)\r\n throws SQLException {\n return 0;\r\n }", "public static int executeUpdate(final String sql, final Object... args)\n {\n return new SqlClosure<Integer>()\n {\n @Override\n protected Integer execute(Connection connection) throws SQLException\n {\n return OrmElf.executeUpdate(connection, sql, args);\n }\n }.execute();\n }", "public void updateIscrizione() throws SQLException {\r\n\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\t\t\tpstmt = con.prepareStatement(STATEMENT);\r\n\t\t\t\r\n\t\t\tArray sql = con.createArrayOf(\"boolean\", i.getDisponibilita());\r\n\t\t\t\r\n\t\t\tpstmt.setArray(1, sql);\r\n\t\t\tpstmt.setString(2, i.getGiocatore());\r\n\t\t\tpstmt.setInt(3, i.getTorneo());\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\tpstmt.execute();\r\n\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\tpstmt.close();\r\n\t\t\t}\r\n\r\n\t\t\tcon.close();\r\n\t\t}\r\n\r\n\t}", "public void update(TdiaryArticle obj) throws SQLException {\n\r\n\t}", "public void executeUpdateQuery(String hql, Map params) throws RepositoryException {\n\t\tDatanucleusCRUDUtils.executeUpdateQuery(hql, params); \n\t\tparams.clear();\n\t}", "private <T> void executeUpdate(T value, Object key, String query) {\r\n\t\tlogger.entering(CLASSNAME, \"executeUpdate\", new Object[] {key, value, query});\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement statement = null;\r\n\t\tByteArrayOutputStream baos = null;\r\n\t\tObjectOutputStream oout = null;\r\n\t\tbyte[] b;\r\n\t\ttry {\r\n\t\t\tconn = getConnection();\r\n\t\t\tstatement = conn.prepareStatement(query);\r\n\t\t\tbaos = new ByteArrayOutputStream();\r\n\t\t\toout = new ObjectOutputStream(baos);\r\n\t\t\toout.writeObject(value);\r\n\r\n\t\t\tb = baos.toByteArray();\r\n\r\n\t\t\tstatement.setBytes(1, b);\r\n\t\t\tstatement.setObject(2, key);\r\n\t\t\tstatement.executeUpdate();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new PersistenceException(e);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new PersistenceException(e);\r\n\t\t} finally {\r\n\t\t\tif (baos != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tbaos.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (oout != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\toout.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcleanupConnection(conn, null, statement);\r\n\t\t}\r\n\t\tlogger.exiting(CLASSNAME, \"executeUpdate\");\r\n\t}", "@Override\n\tpublic String updateStatement() throws Exception {\n\t\treturn null;\n\t}", "public static void update() {\n\t\t// TODO Auto-generated method stub\n\t\t\tString jdbcURL = \"jdbc:mysql://localhost:3306/sampldb\";\n\t String dbUsername=\"root\";\n\t String dbPassword=\"password\";\n\t \n\t \n\t \n\t System.out.println(\"Database Connected Successfully\");\n\t\t \n\t\t \n\t\t/* System.out.println(\"Which operation you want to execute \\n 1.Insert into table.\\n 2.Update table \\n 3.Delete data from table \\n 4.Show the data\");\n\t */\n\t Scanner in=new Scanner(System.in);\n\t \n\t System.out.println(\"Enter New password\");\n\t String password=in.nextLine();\n\t System.out.println(\"Enter fullname\");\n\t String fullname=in.nextLine();\n\t System.out.println(\"Enter email\");\n\t String email=in.nextLine();\n\t System.out.println(\"user name\");\n\t String username=in.nextLine();\n\t \n\t {\n\t \t \n\t \n\t try {\n\t Connection connection = DriverManager.getConnection(jdbcURL,dbUsername,dbPassword);\n\t \n\t String sql=\"UPDATE users SET password=?,fullname=?,email=? WHERE username=?\";\n\t \t PreparedStatement statement=connection.prepareStatement(sql);\n\t \t \n\t \t statement.setString(1, password);\n\t \t statement.setString(2, fullname);\n\t \t statement.setString(3, email);\n\t \t statement.setString(4, username);\n\t \t \n\t \t \n\t \t int rows=statement.executeUpdate();\n\t \t \n\t \t if(rows>0) {\n\t \t\t System.out.println(\"Updated succssfully\");\n\t \t }\n\t \t \n\t \t \n\t \t connection.close();\n\t \t \n\t }\n\t \n\t catch(SQLException ex) {\n\t \tex.printStackTrace();\n\t }\n\t\t\t\n\t\t}\n\n\t}", "public int Editcomp(Long comp_id, String compname, String address, String city,\r\n\t\tString state, Long offno, Long faxno, String website, String e_mail) throws SQLException {\nint i =DbConnect.getStatement().executeUpdate(\"update company set address='\"+address+\"',city='\"+city+\"',state='\"+state+\"',offno=\"+offno+\",faxno=\"+faxno+\",website='\"+website+\"',email='\"+e_mail+\"'where comp_id=\"+comp_id+\" \");\r\n\treturn i;\r\n}", "@Override\n\tpublic void executeUpdateDinamicQuery(String s) throws Exception {\n\t\t\n\t}", "@Override\n public int executeUpdate(String sql, int autoGeneratedKeys) \n throws SQLException {\n return 0;\n }", "public boolean doExecuteUpdate( String sql, Object[] params){\r\n\t\tboolean temp = false;\r\n\t\tif (dbConnection == null)\r\n\t\t\treturn temp;\r\n\t\tPreparedStatement stmt = null;\r\n\t\ttry {\r\n\r\n\t\t\tstmt = dbConnection.prepareStatement(sql);\r\n\t\t\t// stuff parameters in\r\n\t\t\tfor (int i=0; i<params.length; i++){\r\n\t\t\t\tstmt.setObject(i + 1,params[i]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (stmt == null)\r\n\t\t\t\treturn temp;\r\n\t\t\tint count = stmt.executeUpdate(); //返回值为0表示执行出错。仅对INSERT、UPDATE 或 DELETE\r\n\r\n\t\t\t//System.out.println(\"delete:\" +count);\r\n\t\t\t\r\n\t\t\tif (count > 0) \r\n\t\t\t\ttemp= true;\r\n\t\t} catch (SQLException e) {\r\n\t\t\tErrorLog.log(\"Database->doExecuteUpdate3:\" + e.getMessage()+\"//\"+ e);\r\n\t\t}finally{\r\n\t\t\ttry {\r\n\t\t\t\tif(stmt != null){ \r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t\tstmt = null;\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tErrorLog.log(\"Database->doExecuteUpdate4:\" + e.getMessage()+\"//\"+ e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn temp;\t\r\n\t}" ]
[ "0.84014636", "0.798795", "0.7950737", "0.79077333", "0.78101957", "0.7767709", "0.77541864", "0.77432543", "0.7682376", "0.76495475", "0.75746125", "0.754149", "0.7512469", "0.75101095", "0.7455014", "0.7396158", "0.73815346", "0.73804694", "0.7352406", "0.73407674", "0.732099", "0.7320263", "0.73109496", "0.7292633", "0.7254374", "0.723298", "0.7210251", "0.7201124", "0.7199428", "0.7171196", "0.7164944", "0.7150007", "0.71454245", "0.7144665", "0.7139822", "0.71142673", "0.7090833", "0.7086279", "0.707542", "0.70686543", "0.7003803", "0.70037985", "0.70006216", "0.6982211", "0.6965814", "0.6955564", "0.69551283", "0.6911094", "0.6892314", "0.6881763", "0.6856493", "0.6840413", "0.6839785", "0.68302786", "0.6823238", "0.6813529", "0.68015885", "0.67905796", "0.6773996", "0.67714626", "0.6761198", "0.674222", "0.6741006", "0.6737659", "0.6735599", "0.6730605", "0.6724067", "0.67211455", "0.67169636", "0.6712342", "0.67101353", "0.67089653", "0.6706897", "0.66981447", "0.66904485", "0.6675375", "0.66675705", "0.66600555", "0.6629051", "0.6621072", "0.6614048", "0.66042304", "0.6594869", "0.65918326", "0.6574968", "0.656576", "0.65655404", "0.6557368", "0.65462905", "0.6541583", "0.65367293", "0.65330535", "0.6532171", "0.6525485", "0.65046316", "0.6503727", "0.64974767", "0.6494314", "0.64897907", "0.6486361" ]
0.7156771
31
Make movement in normal execution mode (logs the movement operations table and updates the account balance accounts table)
public int makeMovement(int mv_amount, int account_id, int final_balance){ int generated_id = 0; try { operationLock.lock(); executeMovement(generated_id = currentOperationId++, mv_amount, account_id, final_balance, rawDataSource.getConnection()); } catch (SQLException e) { e.printStackTrace(); } finally { operationLock.unlock(); } updateBalance(account_id, final_balance); return generated_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void executeMovement(int op_id, int mv_amount, int account_id, int final_balance, Connection con) throws SQLException {\n PreparedStatement stmt = con.prepareStatement(\n \"insert into OPERATIONS (OP_ID, OP_TYPE, MV_AMOUNT, FROM_ACCOUNT_ID, FROM_CURRENT_BALANCE, TIMESTAMP) \" +\n \"values (?,?,?,?,?,?)\");\n\n stmt.setInt(1, op_id);\n stmt.setInt(2, OP_TYPES.valueOf(\"MOVEMENT\").ordinal()+1);\n stmt.setInt(3, mv_amount);\n stmt.setInt(4, account_id);\n stmt.setInt(5, final_balance);\n stmt.setTimestamp(6, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n }", "@Override\n\tpublic void execute() {\n\n\t\t//System.out.println(Constants.throttle * move_Speed.getAsDouble() + \"and \" + Constants.throttle * rotate_Speed.getAsDouble());\n\t\t\n\t\tConstants.isTank = !Constants.isTank;\t\n\t\tSystem.out.print(\"Drive System is now: \");\n\t\tif(Constants.isTank){\n\t\t\tSystem.out.println(\"Wendy Mode\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Arcade Mode\");\n\t\t}\n\t}", "protected void execute() {\n \tRobot.driveTrain.arcadeNoConstants(MOVE_SPEED_PERCENT, Robot.driveTrain.gyroPReturn(direction));\n }", "protected void execute() {\n \tRecordMotorMovement.getInstance().RecordMotors();\n }", "protected void execute() {\n \tclimber.setCLimberSpeed(0);\n }", "protected void execute() {\r\n \tmanipulator.moveElevator(speed);\r\n }", "public void execute(){\n drivetrain.tankDrive(0.6 * direction, 0.6 * direction);\n // slower than full speed so that we actually bring down the bridge,\n // not just slam it and push balls the wrong way\n }", "protected void execute() {\r\n\t//double leftSpeed = oi.leftUpAndDown();\r\n\tdouble leftSpeed = motorScalerLeft.scale(oi.leftUpAndDown() * fullSpeed);\r\n\tSmartDashboard.putNumber(\"debug\\\\leftSpeed\", leftSpeed);\r\n\t\r\n\t//double rightSpeed = oi.rightUpAndDown();\r\n\tdouble rightSpeed = motorScalerRight.scale(oi.rightUpAndDown() * fullSpeed);\r\n\tSmartDashboard.putNumber(\"debug\\\\rightSpeed\", rightSpeed);\r\n\t\r\n\ttheDrive.goVariable(-leftSpeed,-rightSpeed);\r\n }", "private void executeMove(Move move) {\r\n\t\t//System.out.println(\"executing move\");\r\n\t\tthis.chessGame.movePiece(move);\r\n\t\tthis.chessGame.changeGameState();\r\n\t}", "protected void execute() {\n\t\t// get MP status from each talon\n\t\tleftTalon.getMotionProfileStatus(leftStatus);\n\t\trightTalon.getMotionProfileStatus(rightStatus);\n\n\t\t// Enable MP if not already enabled\n\t\tif ((leftStatus.btmBufferCnt > kMinPointsInTalon) && (rightStatus.btmBufferCnt > kMinPointsInTalon)) {\n\t\t\tstate = SetValueMotionProfile.Enable;\n\t\t}\n\t\tleftTalon.set(ControlMode.MotionProfile, state.value);\n\t\trightTalon.set(ControlMode.MotionProfile, state.value);\n\t\t// System.out.println(\"DriveByMotion: Execute Setting State: \" + state);\n\t\t\n\t\t// did we get an underrun condition since last time we checked?\n\t\tif (leftStatus.hasUnderrun || rightStatus.hasUnderrun) {\n\t\t\t// better log it so we know about it\n\t\t\tSystem.out.println(\"DriveByMotion: A Talon has underrun!!! Left Talon: \" + leftStatus.hasUnderrun + \" Right Talon: \" + rightStatus.hasUnderrun);\n\t\t\t// clear the error. This flag does not auto clear, so this way we never miss logging it.\n\t\t\tleftTalon.clearMotionProfileHasUnderrun(0);\n\t\t\trightTalon.clearMotionProfileHasUnderrun(0);\n\t\t}\n\t}", "protected void execute() {\n \tif(Robot.robotState != Robot.RobotState.Climbing)\n \t\tRobot.shooter.speed(speed);\n }", "protected void execute() {\n \t// Scales the speed based on a proportion of ideal voltage over actual voltage\n \tRobot.shooter.talon.set(0.59 * (12.5 / Robot.pdp.getVoltage()));\n// \tRobot.shooter.talon.enable();\n// \tRobot.shooter.talon.set(Shooter.IDEAL_SPEED * (12.5 / Robot.pdp.getVoltage()));\n }", "protected void execute() {\n \tif(oi.getButton(ControllerMap.operatorController, ControllerMap.convertToClimbMode) && DriverStation.getInstance().getMatchTime() < 30 && !DriverStation.getInstance().isAutonomous()) {\n \t\tleftSpeed = Math.abs(oi.getAxisDeadzonedSquared(ControllerMap.operatorController, ControllerMap.intakeAxis, 0.1));\n \t\trightSpeed = Math.abs(oi.getAxisDeadzonedSquared(ControllerMap.operatorController, ControllerMap.cubeStorageAxis, 0.1));\n \t\t\n \t\tclimber.ascend(leftSpeed, rightSpeed);\n \t}\n }", "public void executarLogica() {\n\t\tchecarTarefaValida();\n\t\texecutar();\n\t\texecutandoTarefa();\n\t\tfinalizarTarefa();\n\t}", "protected void execute() {\n\t\tthrottle = getThrottle();\n\t\tturn = getCorrectTurnValue();\n\t\tforward = getForward();\n\t\tright = (forward - turn) * throttle;\n\t\tleft = (forward + turn) * throttle;\n\n\t\tRobot.driveTrain.driveManual(right, left);\n\t\tif (Robot.oi.bShiftUp.get()) {\n\t\t\tRobot.driveTrain.shiftToHigh(true);\n\t\t} else if (Robot.oi.bShiftDown.get()) {\n\t\t\tRobot.driveTrain.shiftToHigh(false);\n\t\t}\n\t}", "private void movementPhase() {\n ClickObserver.getInstance().setCreatureFlag(\"\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(false);\n TheCupGUI.update();\n Board.removeCovers();\n }\n });\n for (Player p : playerList) {\n \tplayer = p;\n player.flipAllUp();\n\t ClickObserver.getInstance().setActivePlayer(player);\n\t ClickObserver.getInstance().setCreatureFlag(\"Movement: SelectMovers\");\n\t InfoPanel.uncover(player.getName());\n\t if (p.getHexesWithPiece().size() > 0) {\n\t \tClickObserver.getInstance().setClickedTerrain(p.getHexesWithPiece().get(0));\n\t }\n\t pause();\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \tClickObserver.getInstance().whenTerrainClicked();\n \t GUI.getHelpText().setText(\"Movement Phase: \" + player.getName()\n + \", Move your armies\");\n \t Game.getRackGui().setOwner(player);\n }\n });\n\t \n\t while (isPaused) {\n \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t }\n\t InfoPanel.cover(player.getName());\n player.flipAllDown();\n }\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(true);\n }\n });\n ClickObserver.getInstance().setCreatureFlag(\"\");\n }", "public void move() {\n\t\t\tar.setAhead(10 * fahrtrichtung);\n\n\t\t\t// Wie schnell sich der Roboter drehen soll\n\t\t\tar.setTurnRight(45 * drehrichtung);\n\t\t\tar.execute();\n\t\t\tfarbschema = farbschema * (-1);\n\t\t}", "protected void execute() \n {\n \tRobot.ballManipSubsystem.setTopRollerToShootingSpeed();\n }", "@Override\n public void execute() {\n // finds goal and gets speed to turn\n double speed = vision.getPIDOfGoal();\n if (speed == -1000)\n return;\n\n // System.out.println(speed);\n drivetrain.tankDrive(speed, -speed);\n }", "protected void execute() {\n \n \n \torientation.updatePID(RobotMap.navx.getAngle());\n \tRobotMap.motorLeftOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() - speed));\n \tRobotMap.motorLeftTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() - speed));\n \t\n \tRobotMap.motorRightOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() + speed));\n \tRobotMap.motorRightTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() + speed));\n \tSystem.out.println(RobotMap.navx.getAngle()-desiredAngle);\n }", "@Override\n public void runOpMode() {\n leftDrive = hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = hardwareMap.get(DcMotor.class, \"right_drive\");\n intake = hardwareMap.get (DcMotor.class, \"intake\");\n dropServo = hardwareMap.get(Servo.class, \"drop_Servo\");\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n rightDrive.setDirection(DcMotor.Direction.FORWARD);\n\n dropServo.setPosition(1.0);\n waitForStart();\n dropServo.setPosition(0.6);\n sleep(500);\n VuforiaOrientator();\n encoderSequence(\"dumbDrive\");\n\n\n }", "public boolean recoverMovement(int op_id, int mv_amount, int account_id, int final_balance, Connection con){\n try {\n executeMovement(op_id, mv_amount, account_id, final_balance, con);\n } catch (SQLException e) {\n try {\n con.rollback();\n return false;\n } catch (SQLException e1) {\n e1.printStackTrace();\n return false;\n }\n }\n return true;\n }", "private void actualizarVentanaOperadores() throws SQLException {\n Sistema.getControladorVentanaOperadores().actualizarTablaOperadores(\"SELECT * FROM operador WHERE activo=TRUE ORDER BY id ASC;\");\n }", "private synchronized void performOperations() {\r\n\t\ttry {\r\n\t\t\tswitch (operationStatus) {\r\n\t\t\tcase TRUNCATE_DATA:\r\n\t\t\t\tHibernateUtil.rawQuery(\"TRUNCATE csv;\");\r\n\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\tUtil.writeLog(toString());\r\n\t\t\t\t\tLogger.getLogger(Scheduler.class.getName()).log(Level.INFO, toString());\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\tcase APPEND_DATA:\r\n\t\t\t\tparseData(false);\r\n\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\tUtil.writeLog(toString());\r\n\t\t\t\t\tLogger.getLogger(Scheduler.class.getName()).log(Level.INFO, toString());\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase UPDATE_DATA:\r\n\t\t\t\tparseData(true);\r\n\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\tUtil.writeLog(toString());\r\n\t\t\t\t\tLogger.getLogger(Scheduler.class.getName()).log(Level.INFO, toString());\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase ARRANGE_DATA:\r\n\t\t\t\tarrangeData();\r\n\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\tUtil.writeLog(toString());\r\n\t\t\t\t\tLogger.getLogger(Scheduler.class.getName()).log(Level.INFO, toString());\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void execute() {\n\t\t\n\t\tdrivetrain.updateAnglePID();\n\t\t\n//\t\tif (drivetrain.currentControl()) {\n//\t\t\tdrivetrain.shiftGears();\n//\t\t}\n\t}", "@Override\n public void runOpMode() {\n motorFL = hardwareMap.get(DcMotor.class, \"motorFL\");\n motorBL = hardwareMap.get(DcMotor.class, \"motorBL\");\n motorFR = hardwareMap.get(DcMotor.class, \"motorFR\");\n motorBR = hardwareMap.get(DcMotor.class, \"motorBR\");\n landerRiser = hardwareMap.get(DcMotor.class, \"lander riser\");\n landerRiser = hardwareMap.get(DcMotor.class, \"lander riser\");\n landerRiser.setDirection(DcMotor.Direction.FORWARD);\n landerRiser.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n markerDrop = hardwareMap.get(Servo.class, \"marker\");\n markerDrop.setDirection(Servo.Direction.FORWARD);\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n runtime.reset();\n\n //Landing & unlatching\n landerRiser.setPower(-1);\n telemetry.addData(\"Status\", \"Descending\");\n telemetry.update();\n sleep(5550);\n landerRiser.setPower(0);\n telemetry.addData(\"Status\",\"Unhooking\");\n telemetry.update();\n move(-0.5, 600, true);\n strafe(-0.4,0.6, 3600, true);\n move(0.5,600,true);\n markerDrop.setPosition(0);\n sleep(1000);\n markerDrop.setPosition(0.5);\n sleep(700);\n markerDrop.setPosition(0);\n strafe(0, -0.5,500,true);\n strafe(0.5, -0.25, 8500, true);\n\n }", "protected void execute() {\n \tlockedOn();\n \tif (lockedOn) {\n \t\tupdateLocked();\n \t} else if (hasLockedOn) {\n \t\tupdateNotLocked();\n \tnew RotateTurretToAngle(angle()).start();\n \t}\n }", "protected void execute() {\n \tRobot.telemetry.setAutonomousStatus(\"Running \" + commandName + \": \" + distance);\n \tRobot.drivetrain.arcadeDrive(Robot.driveDistancePID.getOutput(), 0.0, false);\n }", "protected void execute() {\n \tRobot.debug.Update(Robot.lift.DebugMotionMagic());\n }", "public void execute() {\r\n\t\tif(policy.moveByPolicy(level2d))\r\n\t\titem.move_up(level2d);\r\n\t\telse\r\n\t\t\tSystem.out.println(\"cant do the action\");\r\n\t\t\r\n\t}", "public void action() {\r\n\t\tLCD.drawString(\"Avoid Behavior!\", 0, 7);\r\n\r\n\t\tMapUpdate.updateWithoutObject(0);\r\n\t\tMapUpdate.updateWithObject(StandardRobot.us.getRange());\r\n\r\n\t\tif (StandardRobot.ts.isPressed()) {\r\n\t\t\tStandardRobot.pilot.setTravelSpeed(7);\r\n\t\t\tStandardRobot.pilot.travel(-5);\r\n\t\t\tcounter.countTravel();\r\n\r\n\t\t\tif (store.getFlag() == 0) {\r\n\t\t\t\tStandardRobot.pilot.rotate(-90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t} else {\r\n\t\t\t\tStandardRobot.pilot.rotate(90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif (store.getFlag() == 0) {\r\n\t\t\t\tStandardRobot.pilot.rotate(-90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t} else {\r\n\t\t\t\tStandardRobot.pilot.rotate(90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void updatemove() {\n\t\tmove = new Movement(getX(), getY(),dungeon,this);\n\t\t//System.out.println(\"Updated\");\n\t\tnotifys();\n\t\tif(this.getInvincible()) {\n\t\t\tsteptracer++;\n\t\t}\n\t\tdungeon.checkGoal();\n\t}", "@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"Driving a airplane!\");\n\t}", "protected void execute()\n\t{\n\t\tdouble speed = Robot.oi.getActuatorSpeed();\n\t\t// Treat a zone around the center position as zero to prevent fluctuating\n\t\t// motor speeds when the joystick is at rest in the center position.\n\t\tRobot.linearActuator.setSpeed(Math.abs(speed) >= .1 ? speed : 0);\n\t}", "protected void execute() {\n drivebase.setCheesySensetivity(1.32);\n if(rot != 0.0)\n drivebase.setCheesyDrive(0, rot, true);\n else\n drivebase.setCheesyDrive(0, inverse*SmartDashboard.getNumber(key), true);\n }", "public void transact() {\n\t\truPay.transact();\n\n\t}", "protected void execute() {\n \tRobot.driveTrain.driveByArcade(_speed, 0);\n }", "public void paradiseMove(){\n if (!getCurrentMainCellCoordinates().equals(new DiscreteCoordinates(11, 9))) {\n move(30);\n }\n }", "@Override\n protected void execute() {\n sClimber.setMotorSpeed(-stick.getRawAxis(1));\n //sIntake.WristMove(mWristAngle);\n //sElevator.setPositionLowGear(mElevatorHieght);\n // SmartDashboard.putNumber(\"Wrist Volts\", RobotMap.WristMotor.getMotorOutputVoltage());\n }", "@Override\n\tpublic void excute() {\n\t\tmoveEvent.move(commandinfo.getValue() * 200);\n\t}", "protected void execute() {\n \tRobot.m_oi.messageDriverStation(\"COMMAND AutoTurnRight reported angle is = \" + Robot.driveBase.getGyroAngle());\n \tdouble angle = Robot.driveBase.getGyroAngle();\n \tdouble increment = (requiredAngle - angle) * kP * -0.08;\n \tRobot.driveBase.autoDrive(0.1,0.5);\n }", "@Override\r\n\tpublic void realizarTransacción() {\n\t\tSystem.out.println(\"Transaccion en progreso\");\r\n\t}", "@Override\n public int execute() throws InterruptedOperationException, CancelOperationException {\n Logger logger = Log4j.getLogger();\n int success = 0;\n try {\n String accountNumber = null;\n BigDecimal amount = BigDecimal.ONE;\n Transaction transaction;\n LocalDateTime now;\n String userId = BankApp.getCurrentUser().getUserId();\n List<String> accountNumbers = accountDao.getAccountNumbers(userId);\n ConsoleHelper.println(\"\");\n ConsoleHelper.displayMenuBanner();\n ConsoleHelper.printlnWithTab(\"[DEPOSIT]\");\n ConsoleHelper.printAccountList();\n\n boolean isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Into: \");\n String input = ConsoleHelper.readString();\n for (int i = 1; i <= accountNumbers.size(); i++) {\n if (input.equals(String.valueOf(i))) {\n accountNumber = accountNumbers.get(i - 1);\n isValidInput = true;\n break;\n }\n }\n\n } while (!isValidInput);\n\n isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Amount: \");\n String input = ConsoleHelper.readString();\n try {\n double inputValue = Double.parseDouble(input);\n amount = BigDecimal.valueOf(inputValue);\n int decimalPlaces = ConsoleHelper.getNumberOfDecimalPlaces(amount);\n if (decimalPlaces == 0 && amount.compareTo(BigDecimal.valueOf(0)) > 0) {\n isValidInput = true;\n } else {\n ConsoleHelper.printlnWithTab(\"Invalid amount, we only accept whole number deposit.\");\n }\n } catch (NumberFormatException e) {\n // the amount format is not valid\n }\n } while (!isValidInput);\n\n int countAccount = accountDao.deposit(accountNumber, amount);\n now = LocalDateTime.now();\n Account account = accountDao.getAccount(accountNumber);\n transaction = new Transaction(TransactionType.DEPOSIT, userId, now, amount, account);\n int countTransaction = transactionDao.addTransaction(transaction);\n success = countAccount == 1 && countTransaction == 1 ? 1 : 0;\n if (success == 1) {\n ConsoleHelper.printlnWithTab(\"Deposit completed.\");\n ConsoleHelper.println(\"\");\n } else {\n ConsoleHelper.printlnWithTab(\"System failure, deposit cancelled. Please try later.\");\n }\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n logger.error(\"Interrupted Exception when thread sleep\", e);\n }\n } catch (CancelOperationException e) {\n // do nothing, allow user to return to main menu\n }\n return success;\n }", "protected void execute() {\n\n \n\n\n\n if (Robot.drive.gyroGetAngle() > m_autorotateangle) { // turn left\n if ( Math.abs(m_autorotateangle - Robot.drive.gyroGetAngle()) < rampthreshold ) {\n Robot.drive.setLeftSide(m_minspeed);\n Robot.drive.setRightSide(m_minspeed);\n } else {\n Robot.drive.setLeftSide(m_leftpower);\n Robot.drive.setRightSide(m_leftpower);\n }\n } else { // turn right\n if ( Math.abs(m_autorotateangle - Robot.drive.gyroGetAngle()) < rampthreshold ) {\n Robot.drive.setLeftSide(-m_minspeed);\n Robot.drive.setRightSide(-m_minspeed);\n } else {\n Robot.drive.setLeftSide(-m_leftpower);\n Robot.drive.setRightSide(-m_leftpower);\n }\n\n }\n\n \n\n \t//SmartDashboard.putNumber(\"NavX getYaw\", Robot.navX.getYaw());\n }", "protected void execute() {\n \tshooterWheel.shooterWheelSpeedControllerAft.Pause();\n \tshooterWheel.shooterWheelSpeedControllerFwd.Pause();\n \t\n }", "public void execute() {\n RobotContainer.drive.turnToAngle(this.angle, turnSpeed);\n }", "@Override\n\tpublic void transferBalnace() {\n\t\tSystem.out.println(\"balance is transferd\");\n\t}", "protected void execute() {\n \tthis.LiftVertAxis.manualOverride(-(this.oi.getBMGamepadAxis5() * .75));\n }", "protected void execute() {\n \tdouble currentAngle = driveTrain.gyro.getYaw();\n \tdriveTrain.drive.arcadeDrive(speed, 0);\n }", "protected void execute() {\n\t\tRobotMap.leftMaster.set(ControlMode.PercentOutput, vision.blockCheck() * turnMultiplier(\"left\"));\n\t\tRobotMap.rightMaster.set(ControlMode.PercentOutput, vision.blockCheck() * turnMultiplier(\"right\"));\n\t}", "private void executePrecomGenericRulesOnDelta(ActionContext context,\n\t\t\tActionOutput actionOutput) throws Exception {\n\t\tActionSequence actions = new ActionSequence();\n\t\tActionsHelper.readFakeTuple(actions);\n\t\tReadAllInMemoryTriples.addToChain(Consts.CURRENT_DELTA_KEY, actions);\n\t\tActionsHelper.mapReduce(Integer.MIN_VALUE, outputStep, false, actions);\n\t\tactionOutput.branch(actions);\n\t}", "protected void execute() { \n\n double move = driveCommand.getValue();\n double turn = angleCommand.getValue();\n\n SmartDashboard.putNumber(\"move\", move);\n SmartDashboard.putNumber(\"turn\", turn);\n //add the values to the drive class\n Robot.drive.arcadeDrive(-move, turn);\n // Robot.drive.setMoveVisionAssist(move);\n // Robot.drive.setTurnVisionAssist(turn);\n }", "protected void execute() {\n \tif (setPoint != 0)\n \t\tshooterWheel.shooterWheelSpeedControllerAft.setSetPoint(setPoint);\n \tshooterWheel.driveAftWheel(shooterWheel.shooterWheelSpeedControllerAft.getControlOutput());\n \t\n }", "protected void execute() {\n \tif(RobotMap.gearIntakeRoller.getOutputCurrent() <= 5){\n \t\tRobotMap.gearIntakeRoller.set(-0.05);\n \t}\n \telse{\n \t\tRobotMap.gearIntakeRoller.set(0);\n \t}\n \t\t\n }", "public void move() {\n\t\tif ( board.getLevel() == 5 )\n\t\t\tmovementIndex = ( movementIndex + 1 ) % movement.length;\n\t}", "@Override\n public void execute() {\n var swerveModuleStates = calcDrive(//\n xSmooth.calc(xSpd.get() * DriveConstants.kTeleDriveMaxSpeedMetersPerSecond), //\n ySmooth.calc(ySpd.get() * DriveConstants.kTeleDriveMaxSpeedMetersPerSecond), //\n rotSmooth.calc(rotSpd.get() * DriveConstants.kTeleDriveMaxAngularSpeedRadiansPerSecond), //\n fieldOriented);\n swerveDrivetrain.setModuleStates(swerveModuleStates);\n }", "protected void execute() {\n \tdrivemotors.tankDrive(leftMotor,rightMotor);\n }", "@Override\n protected void execute() {\n direction = lineFollower.getState();\n\n if(direction == State.noneState) {\n\n System.out.println(\"Going Nowhere\");\n } \n // else if (direction == State.almostState) {\n // //Makes robot slow down as it approaches \n // drivetrain.tankDrive(0.3, 0.3);\n // isFinished = false;\n // System.out.println(\"Approaching!\");\n // }\n\n // else if (direction == State.finishedState)\n // {\n // //disable control from joystick\n // isFinished = true;\n // System.out.println(\"Finished\");\n // }\n else if (direction == State.leftState)\n {\n //disable control from joystick\n drivetrain.setStopArcadeDrive(true);\n //Make robot go Right by increasing left motor speed and decreasing right motor speed\n drivetrain.tankDrive(correctionSpeed, slowDownSpeed);\n System.out.println(\"Going Left\");\n // led.setLEDR(true);\n // led.setLEDB(false);\n }\n\n else if (direction == State.rightState)\n {\n //disable control from joystick\n drivetrain.setStopArcadeDrive(true);\n //Make robot go Left by decreasing left motor speed and increasing right motor speed\n drivetrain.tankDrive(slowDownSpeed, correctionSpeed);\n System.out.println(\"Going Right\");\n // led.setLEDR(false);\n // led.setLEDB(true);\n }\n\n else if (direction == State.centreState)\n {\n //disable control from joystick\n drivetrain.setStopArcadeDrive(true);\n //Keep robot going straight with same speed on both motors\n drivetrain.tankDrive(0.5, 0.5);\n System.out.println(\"Going Straight\");\n // led.setLEDR(true);\n // led.setLEDB(true);\n }\n\n // else \n // {\n // //return control to joystick\n // isFinished = true;\n // }\n }", "private void executeExecutables() {\n \r\n if (stunTime > 0) { // still stunned, so lower stunTime and skip all actions\r\n if (stunTime < Game.deltaTime) {\r\n stunTime = 0;\r\n } else {\r\n stunTime -= Game.deltaTime;\r\n }\r\n //System.out.println(this + \" stunned\");\r\n tryStopping();\r\n return;\r\n }\r\n final Action action = state.action;\r\n if (action instanceof Attack) {\r\n if (moveTime < action.totalTime()) {\r\n moveTime += Game.deltaTime;\r\n return;\r\n } else {\r\n state.resetTime();\r\n stop();\r\n state.resetTime(); // FIXME why two calls to this\r\n }\r\n }\r\n \r\n // just finished hitstun\r\n stunTime = 0;\r\n moveTime = 0;\r\n actionTimer = 0;\r\n acceleration.x = 0;\r\n log(this + \" checking for called executables\");\r\n boolean noMovesCalled = true;\r\n for (int i = 0; i < executables.length; i++) {\r\n final Executable executable = executables[i];\r\n executable.update();\r\n if (executable.keyBinding.isPressed(controller)) {\r\n if (executable instanceof Move) {\r\n noMovesCalled = false;\r\n }\r\n //System.out.println(this + \" pressed \" + KeyBinding.get(i) + \", calling \" + executable);\r\n state = executable.execute(this);\r\n } else {\r\n executable.reset();\r\n }\r\n }\r\n if (noMovesCalled) {\r\n tryStopping();\r\n }\r\n if (wasOnPlatform) {\r\n numMidairJumps = 1;\r\n }\r\n }", "protected void execute() {\n \n \t\n \t \n \t\n \n System.out.println((Timer.getFPGATimestamp()- starttime ) + \",\" + (RobotMap.motorLeftTwo.getEncPosition()) + \",\"\n + (RobotMap.motorLeftTwo.getEncVelocity()*600)/-4096 + \",\" + RobotMap.motorRightTwo.getEncPosition() + \",\" + (RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n /*if(endpoint > 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft+ angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight - angleorientation.getResult());\n }\n if(endpoint <= 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft- angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight + angleorientation.getResult());\n }*/\n System.out.println(this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition() + \"l\");\n System.out.println(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition() + \"r\");\n \n \n \t if(RobotMap.motorLeftTwo.getEncVelocity()!= velocityLeft)\n velocityLeft = RobotMap.motorLeftTwo.getEncVelocity(); \n velocityRight = RobotMap.motorRightTwo.getEncVelocity();\n SmartDashboard.putNumber(\"LeftWheelError\", (this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition()));\n SmartDashboard.putNumber(\"RightWheelError\",(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition()));\n SmartDashboard.putNumber(\"LeftWheelVelocity\", (RobotMap.motorLeftTwo.getEncVelocity())*600/4096);\n SmartDashboard.putNumber(\"RightWheelVelocity\",(RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n \n count++;\n \tangleorientation.updatePID(RobotMap.navx.getAngle());\n }", "public State execute(Agent a, State s) {\n\n\t\tint dir;\n\t\tint newDir;\n\t\tVacuumState state = null;\n\n\t\tif (s instanceof VacuumState)\n\t\t\tstate = (VacuumState)s;\n\t\telse\n\t\t\tSystem.out.println(\"ERROR - Argument to TurnLeft.execute() is not of type VacuumState\");\n\n\t\t/* since we will be copying the state and bumps depend only on the\n current move, unset the bump condition */\n\t\tstate.setBump(false);\n\n\t\tdir = state.getAgentDir();\n\n\t\tnewDir = dir - 1;\n\t\tif (newDir < 0)\n\t\t\tnewDir = 3;\n\t\tstate.setAgentDir(newDir);\n\t\treturn state;\n\t}", "protected void execute() {\n this.setSetpoint(OI.getAdjustedThrottle()*RobotMap.maxRPM);\n ScraperBike.debugToTable(\"PIDSetpoint\", OI.getAdjustedThrottle()*RobotMap.maxRPM);\n \n }", "public void act() {\n\t\tif (canMove()) {\n\t\t\tif (isOnBase()) {\n\t\t\t\tif (steps < baseSteps) {\n\t\t\t\t\tmove();\n\t\t\t\t\tsteps++;\n\t\t\t\t} else {\n\t\t\t\t\tturn();\n\t\t\t\t\tturn();\n\t\t\t\t\tturn();\n\t\t\t\t\tsteps = 0;\n\t\t\t\t}\n\t\t\t} else if (steps == baseSteps / 2) {\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tsteps++;\n\t\t\t} else if (steps == baseSteps + 1) {\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tsteps = 0;\n\t\t\t} else {\n\t\t\t\tmove();\n\t\t\t\tsteps++;\n\t\t\t}\n\t\t} else {\n\t\t\tturn();\n\t\t\tturn();\n\t\t\tturn();\n\t\t\tsteps = 0;\n\t\t}\n\t}", "@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"하늘을 날다\");\n\t}", "P applyMovement(M move);", "@Override\n\tdefault void onExecution(Player player, Position start, Position end) {\n\n\t\tForceMovement forceMovement = new ForceMovement(player.getPosition(),\n\t\t\t\tnew Position(player.getX(), player.getY() - 3, player.getHeight()), 12, 2, Direction.SOUTH);\n\t\tWorld.schedule(new ForceMovementTask(player, 0, forceMovement, new Animation(5043)) {\n\t\t\t@Override\n\t\t\tprotected void onCancel(boolean logout) {\n\t\t\t\tsuper.onCancel(logout);\n\t\t\t\tWorld.schedule(new Task(1) {\n\t\t\t\t\tint ticks = 0;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void execute() {\n\t\t\t\t\t\tswitch (ticks++) {\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tplayer.move(new Position(player.getX(), player.getY(), player.getHeight() + 1));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\tplayer.move(end);\n\t\t\t\t\t\t\tcancel();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}", "protected void execute() \n {\n //System.out.print(sharedSensors.getAverageFilteredUltrasonic());\n //if (oi.getDriveMove() + oi.getDriveRotate() > 0) {\n if (DriverStation.getInstance().getBatteryVoltage() > 8) {\n drive.arcadeDrive(oi.getDriveMove(), oi.getDriveRotate(),true, oi.getUnrestrictedDrive(), false);\n } else {\n drive.arcadeDrive(oi.getDriveMove(), oi.getDriveRotate(),true, oi.getUnrestrictedDrive(), true);\n }\n //DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser6, 1,\"\"+oi.leftTrig2.get()+\" \"+oi.rightTrig2.get());\n //}\n // System.out.println(\"drive left:\" + drive.leftMotorSpeed);\n // System.out.println(\"drive right:\" + drive.rightMotorSpeed);\n // System.out.println(\"Ultrasonic Average:\" + sharedSensors.getAverageUltrasonicDistance());\n // System.out.println(\"Ultrasonic left:\" + sharedSensors.getLeftUltrasonicDistance());\n // System.out.println(\"Ultrasonic right:\" + sharedSensors.getRightUltrasonicDistance());\n }", "public void performActions(){\n GameInformation gi = this.engine.getGameInformation();\n\n if(gi.getTeam() == 0)\n this.engine.performPlayerAction(\n new MoveAction(src, dst)\n );\n\n }", "@Override\n public void execute() {\n vars.setState(\"Teleporting...\");\n Methods.teleToFlameKing();\n }", "protected void execute() {\n \tRobot.driveSubsystem.runLeftSide(howFastWeWantToMove);\n }", "protected void execute() {\n \toi.updateToggleLift();\n if(oi.toggleOnLift){\n \t// The commands here will occur if the TorqueLift toggle switch\n \t// is activated. All code here will only run after the button\n \t// has been toggled.\n \tif (limitswitch.getReadyState()) { \n \ttorquelift.swap();\n \ttorquelift.moveAllMotors(oi.getLiftSpeed());\n \t} else {\n \t\t// activates when the limit switch is pressed\n \t\ttorquelift.moveAllMotors(oi.getLiftYUpSpeed());\n \t}\n } else {\n \t// The commands here will occur normally, when the TorqueLift is\n \t// not activated.\n \treturn;\n }\n }", "public void takeTurnsDebug() {\n boolean antFound = false;\n int gridPos = 0;\n while (antFound == false) {\n if (antGrid[gridPos] != null && antGrid[gridPos].getId() == 14) {\n antGrid[gridPos].moving = true;\n antFound = true;\n } else {\n gridPos++;\n }\n }\n \n takeTurn(antGrid[gridPos], gridPos);\n }", "protected void executionSuccess() {\n this.isUndoable = true;\n }", "protected void execute() {\n \t\n \tcurrentAngle = Robot.gyroSubsystem.gyroPosition();\n\t\tpercentComplete = Math.abs((targetAngle-currentAngle)/goal)*speedFactor;\n\t\t\n\t\tif (percentComplete < minSpeed) \n\t\t{\n\t\t\tpercentComplete = minSpeed;\n\t\t}\n\n\t\t\n\t\tif (targetAngle - error > currentAngle)\n\t\t{\n\t\t\tRobot.driveSubsystem.arcadeDrive(0, percentComplete);\n\t\t}\n\t\telse if (targetAngle + error < currentAngle)\n\t\t{\n\t\t\tRobot.driveSubsystem.arcadeDrive(0, -percentComplete);\n\t\t}\n\t\telse \n\t\t{\n\t\t\tRobot.driveSubsystem.arcadeDrive(0, 0);\n\t\t}\n }", "@Override\n public void execute() {\n if (m_shooter.getTv() != 0.0) {\n double command = 0;\n if (m_shooter.getTx() > 5.0) {\n command = 1;\n } else if (m_shooter.getTx() < -5.0) {\n command = -1;\n } else if (Math.abs(m_shooter.getTx()) <= 1) {\n command = 0;\n } else {\n command = m_shooter.getTx() / 5.0;\n }\n if (m_shooter.getTy() <= -12) {\n command = command * 0.25;\n } else if (m_shooter.getTy() <= 0) {\n command = command * 0.5;\n }\n \n m_shooter.setManualTurretAngle(command * Constants.turretMovement);\n\n double hoodPosition = Constants.hoodSlope * m_shooter.getTy() + Constants.hoodIntercept;\n m_hood.setHoodPosition(hoodPosition); \n m_shooter.setShooterSpeed(Constants.shooterSpeedSlope * hoodPosition + Constants.shooterSpeedAtTwo);\n }\n \n }", "protected void execute() {\n \tRobot.driveTrain.keepHeadingDrive(0, 0, targetDirection);\n }", "private void suarez() {\n\t\ttry {\n\t\t\tThread.sleep(5000); // espera, para dar tempo de ver as mensagens iniciais\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint xInit = -10;\n\t\tint yInit = 8;\n\t\tplayerDeafaultPosition = new Vector2D(xInit*selfPerception.getSide().value(), yInit*selfPerception.getSide().value());\n\t\twhile (commander.isActive()) {\n\t\t\t\n\t\t\tupdatePerceptions(); // deixar aqui, no começo do loop, para ler o resultado do 'move'\n\t\t\tswitch (matchPerception.getState()) {\n\t\t\tcase BEFORE_KICK_OFF:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\t\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase PLAY_ON:\n\t\t\t\t//state = State.FOLLOW;\n\t\t\t\texecuteStateMachine();\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_LEFT: // escanteio time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_RIGHT: // escanteio time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_IN_LEFT: // lateral time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\tcase KICK_IN_RIGHT: // lateal time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_LEFT: // Tiro livre time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_RIGHT: // Tiro Livre time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_LEFT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_RIGHT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t}", "public void move(){\n System.out.println(\"I can't move...\");\n }", "public abstract void doPerMoveWork();", "public void execute() {\n\n try {\n int source = data_path.IR.decimal(15, 0);\n int destination = data_path.IR.decimal(23, 16);\n\n System.out.println(\"Source: \" + source);\n data_path.master_bus.store(source);\n data_path.bank.load(destination);\n\n } catch (Exception e) {\n System.err.println(\"In Controler:LOADI0:increment_clock\");\n System.err.println(e);\n }\n }", "@Override\n public void execute() {\n // Use squared inputs\n // Might want to change that for competition\n m_driveTrain.arcadeDrive(m_throttle.getAsDouble(), m_turn.getAsDouble(), true);\n }", "public ProcessResult atomicCommitWork(ProcessExecution execution)\r\n throws AtomicCommitException{\r\n \r\n if (execution.getDuration() < LENGTH)\r\n return ProcessResult.RUNNING;\r\n \r\n IveObject actor = getCheckedSourceObject(\"actor\", true, execution);\r\n \r\n IveObject mountedTo = actor.getMaster();\r\n if (!ObjectClassTree.instance().getObjectClass(\r\n objectClass).isInside(mountedTo) && mountedTo instanceof WayPoint) {\r\n mountedTo = null;\r\n } else if (!ObjectClassTree.instance().getObjectClass(\r\n objectClass).isInside(mountedTo)) {\r\n Log.addMessage(\"The actor is not placed on the chair.\", Log.WARNING,\r\n actor.getId(), \"Unmount\", actor.getPosition().getId());\r\n return ProcessResult.FAILED;\r\n }\r\n \r\n AttrFuzzy emptyAttr = null;\r\n AttrFuzzy standingAttr;\r\n AttrInteger stateAttr;\r\n boolean standing;\r\n boolean empty;\r\n try {\r\n standingAttr = (AttrFuzzy)actor.getAttribute(\"standing\");\r\n if (standingAttr==null){\r\n //the process SitDown could not finished with result OK\r\n //this is here to enable Cart to Follow\r\n return ProcessResult.OK;\r\n }\r\n stateAttr = (AttrInteger)actor.getAttribute(\"state\");\r\n standing = standingAttr.getValue() == FuzzyValueHolder.True;\r\n \r\n if (standing || stateAttr.getValue() == Ent.STANDING) {\r\n Log.addMessage(\"We are not sitting.\", Log.WARNING,\r\n actor.getId(), \"Unmount\", actor.getPosition().getId());\r\n return ProcessResult.FAILED;\r\n }\r\n \r\n if (mountedTo != null) {\r\n emptyAttr = (AttrFuzzy)mountedTo.getAttribute(\"empty\");\r\n empty = emptyAttr.getValue() == FuzzyValueHolder.True;\r\n if (empty) {\r\n Log.addMessage(\"The chair is not occupied. But we are \" +\r\n \"sitting on it?\", Log.WARNING, actor.getId(),\r\n \"SitDown\", actor.getPosition().getId());\r\n return ProcessResult.FAILED;\r\n }\r\n }\r\n } catch (Exception ex) {\r\n IveApplication.printStackTrace(ex);\r\n Log.addMessage(\"Unexpected or missing attributes.\", Log.WARNING,\r\n actor.getId(), \"StandUp\", actor.getPosition().getId());\r\n return ProcessResult.WRONG_SOURCES;\r\n }\r\n \r\n if (mountedTo != null) {\r\n mountedTo.removeObject(actor);\r\n emptyAttr.setValue(FuzzyValueHolder.True);\r\n \r\n \r\n boolean success=false;\r\n for (Joint j:mountedTo.getPosition().getNeighbours()){\r\n WayPoint neighbour = j.target;\r\n if (neighbour.placeObject(actor, null, neighbour)) {\r\n success=true;\r\n break;\r\n }\r\n }\r\n if (!success){\r\n Log.addMessage(\"Actor could not be placed near the position \" +\r\n \"of the chair.\", Log.WARNING,\r\n actor.getId(), \"StandUp\", actor.getPosition().getId());\r\n return ProcessResult.FAILED;\r\n }\r\n }\r\n standingAttr.setValue(FuzzyValueHolder.True);\r\n stateAttr.setValue(0);\r\n \r\n return ProcessResult.OK;\r\n }", "@Override\n protected void execute() { \n if(!Robot.limelight.objectSighted()){\n System.out.println(\"No object\");\n if(Robot.shooter.outLimit()){\n speed *= -1;\n }\n Shooter.spinTurret(speed);\n }\n else{\n System.out.println(\"Object Sighted\");\n System.out.println(Robot.shooter.turretHall.getPosition());\n\n previous_error = current_error;\n current_error = Robot.limelight.getTx();\n integral = (current_error+previous_error)/2*(time);\n derivative = (current_error-previous_error)/time;\n adjust = (KP*current_error + KI*integral + KD*derivative) * -0.1;\n \n /*if (current_error > min_error){\n adjust += min_command;\n }\n else if (current_error < -min_error){\n adjust -= min_command;\n }*/\n \n try {\n Thread.sleep((long)(time*1000));\n }\n catch(InterruptedException e){\n }\n \n System.out.println(\"Adjust: \" + adjust);\n /*double total = speed + adjust;\n if((int)Shooter.turretHall.getPosition() == -45 && speed + adjust < 0){\n total *= -1;\n }else if((int)Shooter.turretHall.getPosition() == 45 && speed + adjust > 0){\n total *= -1;\n }*/\n \n // if(Shooter.limitTurret.get() == false) {\n // Shooter.spinTurret(-(speed));\n // }\n //if(Shooter.outLimit()){\n // Shooter.spinTurret(-(speed));\n // }\n Shooter.spinTurret(speed + adjust);\n }\n\n\n //System.out.println(\"Adjust: \" + adjust);\n //Shooter.spinTurret(speed+adjust);\n \n //System.out.println(Robot.shooter.turretHall.getPosition());\n /* if(Robot.shooter.outLimit()){\n speed *= -1;\n }\n Shooter.spinTurret(speed+adjust);*/\n }", "@Override\n public void executeAction(IData mainTrade) throws Exception\n {\n String userId = mainTrade.getString(\"USER_ID\");\n String userIdA = mainTrade.getString(\"RSRV_STR2\");\n UserInfoQry.updateTrunkByUserId(userId, userIdA);\n\n }", "protected void execute() {\n\t\tdistanceToCenter = SmartDashboard.getNumber(\"toteOffset\", 0);\n\t\tif (distanceToCenter < -3) {\n\t\t\tRobot._driveTrain.tankDrive(-0.23, 0.23);\n\t\t} else if (distanceToCenter > 3) {\n\t\t\tRobot._driveTrain.tankDrive(0.23, -0.23);\n\t\t}\n\t}", "protected void execute() {\r\n\r\n double tempInches = Robot.driveTrain.getRangeInches();\r\n if(tempInches<0)\r\n {\r\n Robot.driveTrain.stop();\r\n return;\r\n }\r\n\r\n if (tempInches > Preferences.ultraStopDistance) {\r\n if (Preferences.tankDriveMode) {\r\n Robot.driveTrain.tankDrive(Robot.oi.getDriverLeft().getY(), Robot.oi.getDriverRight().getY());\r\n } else {\r\n Robot.driveTrain.arcadeDrive(Robot.oi.getDriverLeft().getY(), Robot.oi.getDriverRight().getX());\r\n }\r\n } else if(complete == false) {\r\n if(Robot.driveTrain.autoTurnToAngle(0)){\r\n complete = true;\r\n Robot.driveTrain.setDirection();\r\n Robot.driveTrain.resetEncoders();\r\n }\r\n }\r\n\r\n if (complete) {\r\n //Robot.driveTrain.autoTurnToAngle(0);\r\n Robot.driveTrain.autoDriveStraight(tempInches - Preferences.ultraStopDistance);\r\n }\r\n\r\n }", "@Override\n public void execute() {\n if(reversed) {\n driveSubsystem.setSpeed(-max_speed, -max_speed);\n }\n driveSubsystem.setSpeed(max_speed, max_speed);\n }", "protected void execute ()\n\t{\n\t\t//Take and process new image every .5 seconds\n\t\tif (System.currentTimeMillis() % 500 == 0)\n\t\t{\n\t\t\tSubsystems.goalVision.processNewImage();\n\t\t}\n\n\t\tif (Subsystems.goalVision.getProportionalGoalX() < X_OFFSET\n\t\t - DEADBAND)\n\t\t//the goal is to the left\n\t\t{\n\t\t\t//turn left\n\t\t\tSubsystems.transmission.drive(motorRatio, -motorRatio);\n\t\t}\n\t\t//the goal is to the right\n\t\telse if (Subsystems.goalVision.getProportionalGoalX() > X_OFFSET\n\t\t + DEADBAND)\n\t\t{\n\t\t\t//turn right\n\t\t\tSubsystems.transmission.drive(-motorRatio, motorRatio);\n\t\t}\n\t}", "public void updateStep() {\n if (level != null) {\n // erst bewegung beenden, dann aktivitaet\n pacman.endMove();\n pacman.update(this);\n checkCollisions();\n // beendet die bewegungen von entities sofort, sonst keine aktivitaet\n GameEntity e;\n for (GameEntity entity : entities) {\n e = entity;\n // erst aktivitaet, dann bewegung beenden\n e.update(this);\n if (e instanceof MovingEntity)\n ((MovingEntity) e).endMove();\n }\n checkCollisions();\n }\n }", "@Override\n public void runOpMode() {\n initialize();\n\n //wait for user to press start\n waitForStart();\n\n if (opModeIsActive()) {\n\n // drive forward 24\"\n // turn left 90 degrees\n // turnLeft(90);\n // drive forward 20\"\n // driveForward(20);\n // turn right 90 degrees\n // turnRight(90);\n // drive forward 36\"\n // driveForward(36);\n\n }\n\n\n }", "public final void processMovement() {\r\n\t\tif (isMoving()) {\r\n\t\t\tlong elapsed = System.currentTimeMillis() - moveStart;\r\n\t\t\tmovementPercent = (((float) elapsed) / ((float) movementTime));\r\n\t\t\tif (movementPercent < 1f) {\r\n\t\t\t\txOff = -getWrappedEntity().getDir().getXOff()\r\n\t\t\t\t\t\t* Math.round((1f - movementPercent)\r\n\t\t\t\t\t\t\t\t* TileConstants.TILE_WIDTH);\r\n\t\t\t\tzOff = -getWrappedEntity().getDir().getZOff()\r\n\t\t\t\t\t\t* Math.round((1f - movementPercent)\r\n\t\t\t\t\t\t\t\t* TileConstants.TILE_HEIGHT);\r\n\t\t\t} else {\r\n\t\t\t\tmovementPercent = 0f;\r\n\t\t\t\tmoveStart = -1;\r\n\t\t\t\txOff = 0;\r\n\t\t\t\tzOff = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void calculateMove() {\n int xa = 0, ya = 0;\n if (steps <= 0) {\n direction = ep.calculateDirection();\n steps = MAX_STEPS;\n }\n if (direction == 0) {\n ya--;\n }\n if (direction == 2) {\n ya++;\n }\n if (direction == 3) {\n xa--;\n }\n if (direction == 1) {\n xa++;\n }\n if (canMove(xa, ya)) {\n steps -= 1 + rest;\n move(xa * speed, ya * speed);\n moving = true;\n } else {\n steps = 0;\n moving = false;\n }\n }", "protected void execute() {\n\n\t\t// SmartDashboard.putString(\"DB/String 0\", \"Vision was reached = \" +\n\t\t// Vision.getInstance().reached());\n\n\t\t// checks to see if the trigger is pressed, and sends diff variables\n\t\t// accordingly\n\n\t\tif (DriveTrain.getInstance().orientationTriggerGet()) {\n\t\t\tDriveTrain.getInstance().tankDrive(getLeftStick(), -getRightStick(), squaredInputs);\n\n\t\t} else {\n\t\t\tDriveTrain.getInstance().tankDrive(-getRightStick(), getLeftStick(), squaredInputs);\n\t\t}\n\n\t}", "protected void execute() {\r\n\r\n Robot.drive.driveForward(DRIVE_SPEED);\r\n }", "public void preform_action() {\n\t\tCarPanelState car_panel_state;\n\t\tSensorData sensor_data;\n\n\t\tint actuator_comp_time = 300;\n\t\tint actuator_deadline = 1000;\n\t\tNature actuator_nature = Task.Nature.APERIODIC;\n\t\tint actuator_movement_amount = 80;\n\n\t\tint closest = 100000;\n\n\t\tswitch (this.action) {\n\t\tcase SET_CAR_SPEED:\n\t\t\tSystem.out.println(\"set speed:\\t\" + this.set_point);\n\t\t\tthis.car_panel_controller.set_target_speed(this.set_point);\n\t\t\tbreak;\n\t\tcase MOVE_UP_CAR:\n\t\t\tSystem.out.println(\"Move_UP:\\t\" + this.set_point);\n\t\t\tthis.car_panel_controller.move_up(this.set_point);\n\t\t\tbreak;\n\t\tcase MOVE_DOWN_CAR:\n\t\t\tSystem.out.println(\"Move_DOWN:\\t\" + this.set_point);\n\t\t\tthis.car_panel_controller.move_down(this.set_point);\n\t\t\tbreak;\n\t\tcase READ_CONE_SENSOR:\n\t\t\tcar_panel_state = this.car_panel_controller.car_panel.getState();\n\t\t\tsensor_data = this.car_panel_controller.get_sensor_data();\n\n\t\t\tint move_up = 0;\n\t\t\tint move_down = 0;\n\n\t\t\tSystem.out.println(\"cone sensor:\\t\" + sensor_data.cone_sensor.cones);\n\n\t\t\t// what to do to avoid hitting the cone\n\t\t\t// if the bottom of the car will hit the cone, move up\n\t\t\tfor (Cone cone : sensor_data.cone_sensor.cones) {\n\t\t\t\tif (will_collide(car_panel_state.main_car, cone)) {\n\t\t\t\t\t// check if the top of the cone will hit the car\n\t\t\t\t\tif ((cone.y_pos < car_panel_state.main_car.y_pos + car_panel_state.main_car.height)\n\t\t\t\t\t\t\t&& (cone.y_pos > car_panel_state.main_car.y_pos)) {\n\t\t\t\t\t\t// the bottom of the car will hit, so move up\n\t\t\t\t\t\tmove_down++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// the top of the car will hit, so move down\n\t\t\t\t\t\t// this.processing_controller.add_task(task);\n\t\t\t\t\t\tmove_up++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set the actuator deadline based on the closest cone\n\t\t\t\tif (cone.origional_x_pos < closest) {\n\t\t\t\t\tclosest = cone.origional_x_pos;\n\n\t\t\t\t\tint distance_from_cone = cone.origional_x_pos - car_panel_state.main_car.total_moved;\n\t\t\t\t\tint speed_by_tick = 1; // car_panel_state.main_car.speed /\n\t\t\t\t\t\t\t\t\t\t\t// CarPanelController.speed_increment;\n\n\t\t\t\t\tactuator_deadline = distance_from_cone / speed_by_tick;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if we need to move decide what task we need to insert\n\t\t\tif (move_up + move_down > 0) {\n\t\t\t\t// see if more obstacles would be avoided by moving up or down\n\t\t\t\tif (move_down > move_up) {\n\t\t\t\t\tTask task = new Task(actuator_comp_time, 0, actuator_deadline, actuator_nature,\n\t\t\t\t\t\t\tTask.Action.MOVE_DOWN_CAR, this.processing_controller, this.car_panel_controller,\n\t\t\t\t\t\t\tactuator_movement_amount);\n\t\t\t\t\tthis.processing_controller.add_task(task);\n\t\t\t\t} else {\n\t\t\t\t\tTask task = new Task(actuator_comp_time, 0, actuator_deadline, actuator_nature,\n\t\t\t\t\t\t\tTask.Action.MOVE_UP_CAR, this.processing_controller, this.car_panel_controller,\n\t\t\t\t\t\t\tactuator_movement_amount);\n\t\t\t\t\tthis.processing_controller.add_task(task);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase READ_OTHER_CAR_SENSOR:\n\t\t\tcar_panel_state = this.car_panel_controller.car_panel.getState();\n\t\t\tsensor_data = this.car_panel_controller.get_sensor_data();\n\n\t\t\tmove_up = 0;\n\t\t\tmove_down = 0;\n\n\t\t\tSystem.out.println(\"car sensor:\\t\" + sensor_data.other_car_sensor.other_cars);\n\n\t\t\t// what to do to avoid hitting the cone\n\t\t\t// if the bottom of the car will hit the cone, move up\n\t\t\tfor (Car car : sensor_data.other_car_sensor.other_cars) {\n\t\t\t\tif (will_collide(car_panel_state.main_car, car)) {\n\t\t\t\t\t// check if the top of the cone will hit the car\n\t\t\t\t\tif ((car.y_pos < car_panel_state.main_car.y_pos + car_panel_state.main_car.height)\n\t\t\t\t\t\t\t&& (car.y_pos > car_panel_state.main_car.y_pos)) {\n\t\t\t\t\t\t// the bottom of the car will hit, so move up\n\t\t\t\t\t\tmove_down++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// the top of the car will hit, so move down\n\t\t\t\t\t\t// this.processing_controller.add_task(task);\n\t\t\t\t\t\tmove_up++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set the actuator deadline based on the closest cone\n\t\t\t\tif (car.origional_x_pos < closest) {\n\t\t\t\t\tclosest = car.origional_x_pos;\n\n\t\t\t\t\tint distance_from_cone = car.origional_x_pos - car_panel_state.main_car.total_moved;\n\t\t\t\t\tint speed_by_tick = 1; // car_panel_state.main_car.speed /\n\t\t\t\t\t\t\t\t\t\t\t// CarPanelController.speed_increment;\n\n\t\t\t\t\tactuator_deadline = distance_from_cone / speed_by_tick;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if we need to move decide what task we need to insert\n\t\t\tif (move_up + move_down > 0) {\n\t\t\t\t// see if more obstacles would be avoided by moving up or down\n\t\t\t\tif (move_down > move_up) {\n\t\t\t\t\tTask task = new Task(actuator_comp_time, 0, actuator_deadline, actuator_nature,\n\t\t\t\t\t\t\tTask.Action.MOVE_DOWN_CAR, this.processing_controller, this.car_panel_controller,\n\t\t\t\t\t\t\tactuator_movement_amount);\n\t\t\t\t\tthis.processing_controller.add_task(task);\n\t\t\t\t} else {\n\t\t\t\t\tTask task = new Task(actuator_comp_time, 0, actuator_deadline, actuator_nature,\n\t\t\t\t\t\t\tTask.Action.MOVE_UP_CAR, this.processing_controller, this.car_panel_controller,\n\t\t\t\t\t\t\tactuator_movement_amount);\n\t\t\t\t\tthis.processing_controller.add_task(task);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase READ_SPEED_SIGN_SENSOR:\n\t\t\tcar_panel_state = this.car_panel_controller.car_panel.getState();\n\t\t\tsensor_data = this.car_panel_controller.get_sensor_data();\n\n\t\t\tSystem.out.println(\"speed sensor:\\t\" + sensor_data.speed_sign_sensor.signs);\n\n\t\t\t// what to do to avoid hitting the cone\n\t\t\t// if the bottom of the car will hit the cone, move up\n\t\t\tfor (Sign sign : sensor_data.speed_sign_sensor.signs) {\n\t\t\t\t// check the distance to the sign. If the sign is within 300,\n\t\t\t\t// slow down\n\t\t\t\tint main_car_x = car_panel_state.main_car.origional_x_pos + car_panel_state.main_car.total_moved;\n\t\t\t\tif (sign.origional_x_pos - main_car_x < 1000) {\n\t\t\t\t\tTask task = new Task(actuator_comp_time, 0, actuator_deadline, actuator_nature,\n\t\t\t\t\t\t\tTask.Action.SET_CAR_SPEED, this.processing_controller, this.car_panel_controller,\n\t\t\t\t\t\t\tsign.speed_limit);\n\t\t\t\t\tthis.processing_controller.add_task(task);\n\t\t\t\t}\n\n\t\t\t\t// set the actuator deadline based on the closest cone\n\t\t\t\tif (sign.origional_x_pos < closest) {\n\t\t\t\t\tclosest = sign.origional_x_pos;\n\n\t\t\t\t\tint distance_from_cone = sign.origional_x_pos - car_panel_state.main_car.total_moved;\n\t\t\t\t\tint speed_by_tick = 1; // car_panel_state.main_car.speed /\n\t\t\t\t\t\t\t\t\t\t\t// CarPanelController.speed_increment;\n\n\t\t\t\t\tactuator_deadline = distance_from_cone / speed_by_tick;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase READ_STOP_SIGN_SENSOR:\n\t\t\tcar_panel_state = this.car_panel_controller.car_panel.getState();\n\t\t\tsensor_data = this.car_panel_controller.get_sensor_data();\n\n\t\t\tSystem.out.println(\"stop sensor:\\t\" + sensor_data.stop_sign_sensor.signs);\n\n\t\t\t// what to do to avoid hitting the cone\n\t\t\t// if the bottom of the car will hit the cone, move up\n\t\t\tfor (Sign sign : sensor_data.stop_sign_sensor.signs) {\n\t\t\t\t// check the distance to the sign. If the sign is within 300,\n\t\t\t\t// slow down\n\t\t\t\tint main_car_x = car_panel_state.main_car.origional_x_pos + car_panel_state.main_car.total_moved;\n\t\t\t\tif (sign.origional_x_pos - main_car_x < 500) {\n\t\t\t\t\t// submit a task to stop at the stop sign\n\t\t\t\t\tTask task = new Task(actuator_comp_time, 0, actuator_deadline, actuator_nature,\n\t\t\t\t\t\t\tTask.Action.SET_CAR_SPEED, this.processing_controller, this.car_panel_controller, 0);\n\t\t\t\t\tthis.processing_controller.add_task(task);\n\n\t\t\t\t\t// submit a task to start moving again\n\t\t\t\t\ttask = new Task(actuator_comp_time * 100, 0, actuator_deadline * 100, actuator_nature,\n\t\t\t\t\t\t\tTask.Action.SET_CAR_SPEED, this.processing_controller, this.car_panel_controller, 50);\n\t\t\t\t\tthis.processing_controller.add_task(task);\n\t\t\t\t}\n\n\t\t\t\t// set the actuator deadline based on the closest cone\n\t\t\t\tif (sign.origional_x_pos < closest) {\n\t\t\t\t\tclosest = sign.origional_x_pos;\n\n\t\t\t\t\tint distance_from_cone = sign.origional_x_pos - car_panel_state.main_car.total_moved;\n\t\t\t\t\tint speed_by_tick = 1; // car_panel_state.main_car.speed /\n\t\t\t\t\t\t\t\t\t\t\t// CarPanelController.speed_increment;\n\n\t\t\t\t\tactuator_deadline = distance_from_cone / speed_by_tick;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase READ_LANE_SENSOR:\n\t\t\tcar_panel_state = this.car_panel_controller.car_panel.getState();\n\t\t\tsensor_data = this.car_panel_controller.get_sensor_data();\n\n\t\t\tSystem.out.println(\"lane sensor:\\t\" + sensor_data.lane_sensor.within_lane);\n\n\t\t\t// if we aren't within our lane\n\t\t\tif (sensor_data.lane_sensor.within_lane == false) {\n\t\t\t\t// move back to origional y position\n\t\t\t\tint main_car_y_offset = car_panel_state.main_car.origional_y_pos - car_panel_state.main_car.y_pos;\n\t\t\t\t// if car below where it should be\n\n\t\t\t\tTask task = new Task(actuator_comp_time, 0, actuator_deadline, actuator_nature,\n\t\t\t\t\t\tTask.Action.MOVE_DOWN_CAR, this.processing_controller, this.car_panel_controller,\n\t\t\t\t\t\tmain_car_y_offset);\n\t\t\t\tthis.processing_controller.add_task(task);\n\t\t\t}\n\n\t\t\tbreak;\n\t\t}\n\t}", "protected void execute() {\n \t// \"Demo Mode\" turns off the driveline for demonstration events so that we don't have to pull fuses.\n \t// Ideally, we only check this every few seconds to avoid performance implications at competitions.\n\t\tif ((++m_loops%500) == 0) { // at 20ms/loop, 50 loops per second, so limit query to 500 loops per 10 seconds\n\t\t\tm_demoMode = SmartDashboard.getBoolean(\"Demo Mode\", false);// default to false if not found in the table\n\t\t}\n\t\tif (!m_demoMode) {\n\t\t\tRobot.driveTrain.octaCanumDriveWithJoysticks(Robot.oi.joyLeft, Robot.oi.joyRight);\n \t}\n \t\n }", "@Override\n public void execute() {\n String nextPlayer = CModel.getInstance().getCurrGame().advancePlayerTurn();\n if(nextPlayer.equals(CModel.getInstance().getMyUser().getUserName())) {\n CModel.getInstance().setCurrGameState(new MyTurn());\n }\n else {\n //update the player stats\n CModel.getInstance().setCurrGameState(new NotMyTurn());\n }\n CModel.getInstance().updatePlayerStatsView();\n }", "@Override\n public void execute() {\n swerve.drive(0, 0, \n turnPID.calculate(swerve.getHeadingDouble(), angleSetpoint) * Constants.Swerve.kMaxAngularSpeed\n , false);\n }", "@Override\n public void execute() {\n if (shooter.getShooterVelocity() < THRESHOLD) {\n shooter.setShooter(accel);\n if (delivery.getBreakbeams()[3]) {\n delivery.setDeliveryBelt(backdrive);\n } else {\n delivery.stopDeliveryBelt();\n }\n } else if (shooter.getShooterVelocity() < TARGET) {\n shooter.setShooter(shoot);\n } else {\n shooter.setShooter(shoot);\n delivery.setDeliveryBelt(feed);\n }\n\n\n ShuffleboardHelpers.setWidgetValue(\"Shooter\", \"Shooter Velocity\", shooter.getShooterVelocity());\n\n boolean change = true;\n boolean[] breakbeams = delivery.getBreakbeams();\n for (boolean beam : breakbeams)\n if (beam)\n change = false;\n if (change) {\n counter++;\n } else {\n counter = 0;\n }\n }", "protected void execute() {\n \tRobot.gearIntake.setGearRollerSpeed(-.7);\n }" ]
[ "0.60915196", "0.6050928", "0.59535843", "0.56764054", "0.56399053", "0.5580012", "0.5576699", "0.55621284", "0.55101436", "0.54840493", "0.5402772", "0.5393091", "0.5376345", "0.536808", "0.53492206", "0.53448665", "0.5343577", "0.5341091", "0.53335464", "0.5325623", "0.530502", "0.5302275", "0.528455", "0.52806455", "0.5278151", "0.5276943", "0.52677757", "0.5263358", "0.5257953", "0.525146", "0.5251154", "0.52456343", "0.52414477", "0.5231526", "0.52122724", "0.5211623", "0.51892793", "0.5186834", "0.51811665", "0.5175072", "0.5167072", "0.51667327", "0.5161625", "0.5152317", "0.5148902", "0.5148748", "0.5146417", "0.5144928", "0.5139328", "0.51342714", "0.5127906", "0.51243126", "0.51199543", "0.51178783", "0.51142836", "0.51106125", "0.5101425", "0.50995606", "0.5098174", "0.5093235", "0.50918233", "0.50901043", "0.5083921", "0.507868", "0.5078203", "0.5054828", "0.50523776", "0.5052252", "0.50477827", "0.50347054", "0.5033592", "0.5029749", "0.5024904", "0.5021206", "0.5016015", "0.50076246", "0.50071865", "0.49925274", "0.49924973", "0.49892697", "0.49892393", "0.49882185", "0.49826995", "0.49816805", "0.49810526", "0.49769637", "0.49769396", "0.49743104", "0.49742138", "0.49671587", "0.4963951", "0.49620846", "0.49620044", "0.49601758", "0.49563396", "0.49551725", "0.4953949", "0.49528962", "0.4952777", "0.4951728" ]
0.5427503
10
Make movement in recovery execution mode(logs de movement with given id operations table)
public boolean recoverMovement(int op_id, int mv_amount, int account_id, int final_balance, Connection con){ try { executeMovement(op_id, mv_amount, account_id, final_balance, con); } catch (SQLException e) { try { con.rollback(); return false; } catch (SQLException e1) { e1.printStackTrace(); return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void performRecovery();", "public boolean reducir_log(){\n\t\t//se carga la consulta a una varible tipo string\n\t\tString query = \"exec sp_reducir_log_de_transacciones\";\n\t\t//variable distancia a la clase connection\n\t\tConnection con = new Connexion().conexion();\n //se declara la variable que prepara el query primero nula\n\t\tPreparedStatement pstmt = null;\n\t //intenta o carga el error \t\n\t\t\n\t\t\n\t\t\t\n\t\ttry {\n\t \t//se inicializa ala transaccion en falto hasta el commit\n\t\t\tcon.setAutoCommit(false);\n\t\t\t//prepara la coneccion con el query\n\t\t\tpstmt = con.prepareStatement(query);\n\t\t\t//ejecuta el query \n\t\t\tpstmt.execute();\n //si se ejecuta la transaccion la marcara como verdadero \t\t\n \t\t\tcon.commit();\n\t\t\t//cacha el error\n \t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tif (con != null){\n\t\t\t\ttry {\n\t\t\t\t\tSystem.out.println(\"La transacción ha sido abortada\");\n\t\t\t\t\tcon.rollback();\n\t\t\t\t} catch(SQLException ex) {\n\t\t\t\t\tSystem.out.println(ex.getMessage());\n\t\t\t\t}\n\t\t\t} \n\t\t\treturn false;\n\t\t\t\n\t\t}finally{\n\t\t\ttry {\n\t\t\t\tpstmt.close();\n\t\t\t\tcon.close();\n\t\t\t} catch(SQLException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\t\t\n\t\treturn true;\n\t}", "private void performMaintenance(String table, MaintenanceOp op) {\n Thread thread = Thread.currentThread();\n String oldThreadName = thread.getName();\n boolean reschedule = true;\n try {\n thread.setName(String.format(\"%s - %s - %s\", oldThreadName, op.getName(), table));\n switch (op.getType()) {\n case METADATA:\n performMetadataMaintenance(table);\n break;\n case DATA:\n performDataMaintenance(table);\n break;\n }\n reschedule = false;\n } catch (FullConsistencyException t) {\n // This is handled the same as any other exception thrown by maintenance except that it logs less loudly.\n // In local testing where the hints poller isn't present force full consistency with the following:\n // curl -s -XPOST \"localhost:8081/tasks/compaction-timestamp?all=$(date -u +\"%Y-%m-%dT%H:%M:%SZ\")\"\n // curl -s -XPOST 'localhost:8081/tasks/compaction-lag?all=PT0.001S'\n _log.info(\"Waiting for full consistency before proceeding with '{}' maintenance on table: {}, {}\",\n op.getName(), table, t.getMessage());\n } catch (PendingTableEventsException t) {\n _log.info(\"Waiting for pending table events to complete before proceeding with {} on table {}, {}\",\n op.getName(), table, t.getMessage());\n } catch (Throwable t) {\n _log.error(\"Unexpected exception performing '{}' maintenance on table: {}\", op.getName(), table, t);\n } finally {\n thread.setName(oldThreadName);\n }\n if (reschedule) {\n scheduleTask(table, MaintenanceOp.reschedule(op, Instant.now().plus(RETRY_DELAY)));\n }\n }", "@Override\n\tpublic void recovery() {\n\t\tRecordTable recordTable = new RecordTable(); \n\t\tjava.util.List<FileRecordInfoModel> lst = null;\n\t\ttry {\n\t\t\tlst = recordTable.findAllRows();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor(FileRecordInfoModel model : lst)\n\t\t\t_recordSingle.addParam(model,false);\n\t\t\t// 读取配置,看是否需要扫描文件。--以后加\n\t}", "void shift() {\n deleteStart += txnOps;\n deleteEnd += txnOps;\n updateStart += txnOps;\n updateEnd += txnOps;\n insertStart += txnOps;\n insertEnd += txnOps;\n }", "public void stopMigrating();", "public void migrateLogsFromRcToDb();", "public void audit(long oid,String _table,String undo_sql,String new_sql) throws RelationException;", "@Transactional\n\tpublic Object rollBackAllWithDifferentTx(String action) {\n\t\tObject res;\n\t\ttry {\n\t\t\tres = annotationSubService.throwRunTimeExceptionInNewTx(action);\n\t\t\tuniActionLogDao.insert(res);\n\t\t\treturn res;\n\t\t} catch (Exception e) {\n\t\t\tres = \"F\";\n\t\t\tuniActionLogDao.insert(res);\n\t\t\tthrow e;\n\t\t}\n\t}", "private void performStateOperation(String tiid, EOperations operation,\n Map<String, Object> parameters) throws HumanTaskManagerException {\n try {\n log.info(operation.toString() + \" on Task \" + tiid);\n sdap.beginTx();\n TaskStructure taskStructure = new TaskStructure(tiid);\n\n // check if the External Task of the structure is already exited by\n // the parent task\n taskStructure.checkExternalTask();\n\n // check if the task is locked or controlled\n taskStructure.checkGeneralOperationPreconditions();\n\n // check if the correct state pair for this operation are given\n taskStructure.checkStatesForOperation(operation);\n\n // propagate operation on all descendants\n taskStructure.propagateStateOperation(operation, parameters);\n\n // propagate operation on all predecessor\n taskStructure.propagateStateToPredecessor();\n\n sdap.commitTx();\n } catch (DatabaseException e) {\n sdap.rollbackTx();\n throw new HumanTaskManagerException(e);\n } finally {\n sdap.close();\n }\n }", "@Override\n public void alRechazarOperacion() {\n }", "@Transactional\n\tpublic Object rollBackAllWithSameTx2(String action) {\n\t\tObject res;\n\t\ttry {\n\t\t\tres = annotationSubService.throwRunTimeExceptionInSameTx(action);\n\t\t} catch (Exception e) {\n\t\t\tres = \"F\";\n\t\t}\n\t\tuniActionLogDao.insert(res);\n\t\treturn res;\n\t}", "public void startMigrating();", "private void cmdRedo() throws NoSystemException {\n \ttry {\n\t\t\tsystem().redoStatement();\n\t\t} catch (MSystemException e) {\n\t\t\tLog.error(e.getMessage());\n\t\t}\n }", "protected void doDML(int operation, TransactionEvent e) {\n super.doDML(operation, e);\n }", "protected void doDML(int operation, TransactionEvent e) {\n super.doDML(operation, e);\n }", "protected void doDML(int operation, TransactionEvent e) {\n super.doDML(operation, e);\n }", "protected void doDML(int operation, TransactionEvent e) {\n super.doDML(operation, e);\n }", "public void preMigration(Context context , String[]args) throws Exception\r\n {\r\n\t try {\r\n\t\t mqlLogRequiredInformationWriter(\"\\n\\n\");\r\n\t\t mqlLogRequiredInformationWriter(\"Inside PreMigration method to stamp the ids ----->\"+ \"\\n\");\r\n\t\t //loadResourceFile(context, \"emxConfigurationMigration\");\r\n\t\t mqlLogRequiredInformationWriter(\"Resource file loaded ------> emxConfigurationMigration.properties\");\r\n\t\t mqlLogRequiredInformationWriter(\"\\n\\n\");\r\n\r\n\t\t String strMqlCommandOff = \"trigger off\";\r\n\t\t MqlUtil.mqlCommand(context,strMqlCommandOff,true);\r\n\t\t mqlLogRequiredInformationWriter(\" 'trigger off' done at the start of preMigration \" + \"\\n\");\r\n\r\n\t\t IS_CONFLICT = false;\r\n\t\t StringBuffer sbRelPattern = new StringBuffer(50);\r\n\t\t sbRelPattern.append(ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM);\r\n\t\t sbRelPattern.append(\",\");\r\n\t\t sbRelPattern.append(ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO);\r\n\t\t sbRelPattern.append(\",\");\r\n\t\t sbRelPattern.append(ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM);\r\n\r\n\t\t StringBuffer sbTypePattern1 = new StringBuffer(50);\r\n\t\t sbTypePattern1.append(ConfigurationConstants.TYPE_FEATURES);\r\n\t\t sbTypePattern1.append(\",\");\r\n\t\t sbTypePattern1.append(ConfigurationConstants.TYPE_FEATURE_LIST);\r\n\t\t sbTypePattern1.append(\",\");\r\n\t\t sbTypePattern1.append(ConfigurationConstants.TYPE_PRODUCTS);\r\n\r\n\t\t emxVariantConfigurationIntermediateObjectMigration_mxJPO jpoInst= new emxVariantConfigurationIntermediateObjectMigration_mxJPO(context, new String[0]);\r\n\t\t StringList slDerivationChangedType1 = jpoInst.getDerivationChangedType(context,new String[0]);\r\n\t\t for(int i=0;i<slDerivationChangedType1.size();i++){\r\n\t\t\t sbTypePattern1.append(\",\");\r\n\t\t\t sbTypePattern1.append(slDerivationChangedType1.get(i));\r\n }\r\n\r\n\t\t StringList fsObjSelects = new StringList();\r\n\t\t fsObjSelects.addElement(SELECT_ID);\r\n\t\t fsObjSelects.addElement(SELECT_TYPE);\r\n\t\t fsObjSelects.addElement(SELECT_NAME);\r\n\t\t fsObjSelects.addElement(SELECT_REVISION);\r\n\t\t fsObjSelects.addElement(SELECT_LEVEL);\r\n\t\t fsObjSelects.addElement(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE + \"]\");\r\n\t\t fsObjSelects.addElement(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT + \"]\");\r\n\t\t fsObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.type\");\r\n\t\t fsObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.id\");\r\n\t\t fsObjSelects.addElement(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].from.attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE + \"]\");\r\n\r\n\t\t //Added to check for GBOM connection if any\r\n\t\t fsObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\t\t fsObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_TO+\"].to.id\");\r\n\r\n\r\n\t\t StringBuffer sbRelPattern1 = new StringBuffer(50);\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_GBOM);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_GBOM_FROM);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_INACTIVE_GBOM);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_CUSTOM_GBOM);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_VARIES_BY);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_INACTIVE_VARIES_BY);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(RELATIONSHIP_MANAGED_SERIES);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_QUANTITY_RULE);\r\n\r\n\t\t StringBuffer sbTypePattern2 = new StringBuffer(50);\r\n\t\t sbTypePattern2.append(ConfigurationConstants.TYPE_GBOM);\r\n\t\t sbTypePattern2.append(\",\");\r\n\t\t sbTypePattern2.append(ConfigurationConstants.TYPE_FEATURES);\r\n\t\t sbTypePattern2.append(\",\");\r\n\t\t sbTypePattern2.append(ConfigurationConstants.TYPE_QUANTITY_RULE);\r\n\t\t sbTypePattern2.append(\",\");\r\n\t\t sbTypePattern2.append(ConfigurationConstants.TYPE_MASTER_FEATURE);\r\n\r\n\r\n\t\t warningLog = new FileWriter(documentDirectory + \"migration.log\", true);\r\n\r\n\r\n\t\t documentDirectory = args[0];\r\n\t\t String fileSeparator = java.io.File.separator;\r\n\t\t if(documentDirectory != null && !documentDirectory.endsWith(fileSeparator)){\r\n\t\t\t documentDirectory = documentDirectory + fileSeparator;\r\n\t\t }\r\n\r\n\r\n\t\t if(args.length > 3){\r\n\r\n\t\t\t RESOLVE_CONFLICTS = args[3];\r\n\t\t\t mqlLogRequiredInformationWriter( \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"This step will also resolve the conflicts related \"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"to 'Mixed Composition' and 'Malformed GBOM/Feature List' Object ids\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"at the end of the step, \"\r\n \t\t\t\t\t\t + \" if present.\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"NOTE : User has to resolve the conflicts related \"\r\n\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"to 'Mixed Usage' and 'Incorrect Mapping' related Object ids\"\r\n\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"at the end of the step, \"\r\n\t\t\t\t\t \t\t\t\t\t\t + \" if present.\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"\\n\");\r\n\r\n\t\t }else{\r\n\r\n\t\t\t mqlLogRequiredInformationWriter( \"\\n\"\r\n\t\t\t\t\t\t \t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t\t \t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t\t \t\t\t\t\t + \"This step will resolve the conflicts related \"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"to 'Malformed GBOM/Feature List' Object ids\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"at the end of the step, \"\r\n \t\t\t\t\t\t + \" if present.\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t\t \t\t\t\t\t + \"NOTE : User has to resolve the conflicts related \"\r\n\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"to 'Mixed Composition','Mixed Usage' and 'Incorrect Mapping' related Object ids\"\r\n\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"at the end of the step, \"\r\n\t\t\t\t\t \t\t\t\t\t\t + \" if present.\"\r\n\t\t\t\t\t\t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t\t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t\t\t\t\t\t\t +\"\\n\");\r\n\t\t }\r\n\r\n\t\t\t String strMinRange = args[1].toString();\r\n\t\t\t minRange = Integer.parseInt(strMinRange);\r\n\t\t\t if (\"n\".equalsIgnoreCase(args[2])){\r\n\t\t\t\t maxRange = getTotalFilesInDirectory();\r\n\t\t\t } else {\r\n\t\t\t\t maxRange = Integer.parseInt(args[2]);\r\n\t\t\t }\r\n\r\n\t\t\t // Execute schema changes needed for migration\r\n\t\t\t //we should only call this once the first time the Find Objects Pre Migration is called.\r\n\t\t\t //If In process of PreMigration, do not call again\r\n\t\t\t int migrationStatus = getAdminMigrationStatus(context);\r\n\t\t\t mqlLogRequiredInformationWriter(\"If Migration Status is -------> 0 \"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"'VariantConfigurationR212SchemaChangesForMigration.tcl' will be executed.\"+\"\\n\\n\");\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"If Migration Status is ------->'PreMigrationInProcess' \"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"'VariantConfigurationR212SchemaChangesForMigration.tcl' will not be executed\"\r\n\t\t\t \t\t\t\t\t\t\t\t +\"\\n\"\r\n\t\t\t \t\t\t\t\t\t\t\t + \"as this TCL is already executed\"+\"\\n\\n\");\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"If Migration Status is ------->'PreMigrationComplete' \"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"Pre Migration step is done.\"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"Please execute the next step to continue with Migration.\"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\\n\");\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"Now the Migration Status is \"+ migrationStatus +\"\\n\\n\");\r\n\r\n\t\t\t if(migrationStatus == 0){\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"'VariantConfigurationR212SchemaChangesForMigration.tcl' execution started...\" + \"\\n\\n\");\r\n\t\t\t\t String cmdString = \"execute program VariantConfigurationR212SchemaChangesForMigration.tcl\";\r\n\t\t\t\t ContextUtil.pushContext(context);\r\n\t\t\t\t MqlUtil.mqlCommand(context, cmdString);\r\n\r\n\t\t\t\t //${CLASS:emxAdminCache}.reloadSymbolicName(context, \"type_ConfigurationFeature\");\r\n\r\n\t\t\t\t TYPE_CONFIGURATION_FEATURE = getSchemaProperty(context, \"type_ConfigurationFeature\");\r\n\r\n\t\t\t\t ContextUtil.popContext(context);\r\n\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"'VariantConfigurationR212SchemaChangesForMigration.tcl' execution is done...\"+ \"\\n\");\r\n\t\t\t }\r\n\t\t\t //------------------------------------------------\r\n\t\t\t //Now to read the files\r\n\t\t\t //------------------------------------------------\r\n\t\t\t int m = 0;\r\n\t\t\t for( m = minRange;m <= maxRange; m++){\r\n\t\t\t\t StringList objectList = new StringList();\r\n\t\t\t\t try{\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Pre-migration in process for objects in objectids_\"+ m +\".txt file. \\n\\n\");\r\n\r\n\t\t\t\t\t //setting admin property MigrationR212VariantConfiguration in eServiceSystemInformation.tcl\r\n\t\t\t\t\t setAdminMigrationStatus(context,\"PreMigrationInProcess\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Migration Status set to value ----->\"+ \"'PreMigrationInProcess'\" +\"\\n\\n\");\r\n\r\n\t\t\t\t\t objectList = readFiles(m);\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"objectids_\"+ m +\".txt file traversal started \" + \"\\n\\n\");\r\n\t\t\t\t\t for(int iCntObjList=0 ;iCntObjList<objectList.size();iCntObjList++){\r\n\t\t\t\t\t\t String topLevelObjectId = (String)objectList.get(iCntObjList);\r\n\r\n\t\t\t\t\t\t String topLevelObjectType =\"\";\r\n\t\t\t\t\t\t DomainObject domTopLevelObject = DomainObject.newInstance(context, topLevelObjectId);\r\n\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"topLevelObjectType------------\"+ topLevelObjectType + \"\\n\");\r\n\t\t\t\t\t\t //topLevelObjectType = domTopLevelObject.getInfo(context, ConfigurationConstants.SELECT_TYPE);\r\n\t\t\t\t\t\t Map htTopLevelObjData = (Map) domTopLevelObject.getInfo(context, fsObjSelects);\r\n\t\t\t\t\t\t topLevelObjectType = (String)htTopLevelObjData.get(ConfigurationConstants.SELECT_TYPE);\r\n\t\t\t\t\t\t String topLevelObjectName= (String)htTopLevelObjData.get(ConfigurationConstants.SELECT_NAME);\r\n\t\t\t\t\t\t String topLevelObjectRevision = (String)htTopLevelObjData.get(ConfigurationConstants.SELECT_REVISION);\r\n\t\t\t\t\t\t Integer iCnt;\r\n\t\t\t\t\t\t iCnt= iCntObjList+1;\r\n\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"------------------------------------------------------------------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Stamping of objects for below Top level object's structure started----->\"+\" --- \"+now()+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Object Count in text file ----->\"+iCnt+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object Id ----------->\"+topLevelObjectId+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object Type --------->\"+topLevelObjectType+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object Name --------->\"+topLevelObjectName+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object Revision ----->\"+topLevelObjectRevision+\"\\n\");\r\n\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t //Check if \"GBOM\" object is connected to Configuration Feature or Configuration Option\r\n\t\t\t\t\t\t //DomainObject domFeatObj = new DomainObject(strFeatureId);\r\n\t\t\t\t\t\t StringList TopLevelfeatureObjSelects = new StringList();\r\n\t\t\t\t\t\t TopLevelfeatureObjSelects.addElement(SELECT_TYPE);\r\n\t\t\t\t\t\t TopLevelfeatureObjSelects.addElement(SELECT_NAME);\r\n\t\t\t\t\t\t TopLevelfeatureObjSelects.addElement(SELECT_REVISION);\r\n\t\t\t\t\t\t TopLevelfeatureObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\r\n\t\t\t\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\t\t\t\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\r\n\t\t\t\t\t\t //topLevelObjectType = domTopLevelObject.getInfo(context, ConfigurationConstants.SELECT_TYPE);\r\n\t\t\t\t\t\t topLevelObjectType = (String)htTopLevelObjData.get(SELECT_TYPE);\r\n\r\n\t\t\t\t\t\t\t StringList sLTopLevelGBOMIds = new StringList();\r\n\r\n\t\t\t\t\t\t\t String TopLevelGBOMSelect = \"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\";\r\n\t\t\t\t\t\t\t Object objTopLevelGBOMId = htTopLevelObjData.get(TopLevelGBOMSelect);\r\n\r\n\t\t\t\t\t\t\t if (objTopLevelGBOMId instanceof StringList) {\r\n\t\t\t\t\t\t\t\t sLTopLevelGBOMIds = (StringList) htTopLevelObjData.get(TopLevelGBOMSelect);\r\n\t\t\t\t\t\t\t } else if (objTopLevelGBOMId instanceof String) {\r\n\t\t\t\t\t\t\t\t sLTopLevelGBOMIds.addElement((String) htTopLevelObjData.get(TopLevelGBOMSelect));\r\n\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t emxVariantConfigurationIntermediateObjectMigration_mxJPO VariantConfigInterObjMigrationInst= new emxVariantConfigurationIntermediateObjectMigration_mxJPO(context, new String[0]);\r\n\t\t\t\t\t\t StringList slDerivationChangedType = VariantConfigInterObjMigrationInst.getDerivationChangedType(context,new String[0]);\r\n\r\n\r\n\t StringBuffer sbWhereClause = new StringBuffer(50);\r\n\t\tsbWhereClause.append(\"((\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+ \"].from.type.kindof != \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\tsbWhereClause.append(\")||(\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+ \"].from.type.kindof != \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\tsbWhereClause.append(\"))||\");\r\n\t\tsbWhereClause.append(\"((\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+ \"].from.type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\tsbWhereClause.append(\"&&\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+ \"].from.id == \"+topLevelObjectId +\"\");\r\n\t\tsbWhereClause.append(\")||(\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+ \"].from.type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\tsbWhereClause.append(\"&&\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+ \"].from.id == \"+topLevelObjectId +\"\");\r\n\t\tsbWhereClause.append(\")\");\r\n\t\tsbWhereClause.append(\")\");\r\n\r\n\t\t\t\t\t\t\tStringBuffer sbObjWhere = new StringBuffer(50);\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"(\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_FEATURES + \"\\\"\");\r\n\t\t\t\t\t\t\tfor(int i=0;i<slDerivationChangedType.size();i++){\r\n\t\t\t\t\t\t\t\tsbObjWhere.append(\"||\");\r\n\t\t\t\t \t\t\tsbObjWhere.append(\"type == \\\"\" + slDerivationChangedType.get(i).toString() + \"\\\"\");\r\n\t\t\t\t }\r\n\t\t\t\t\t\t\tsbObjWhere.append(\")\");\r\n\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"||\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"||\");\r\n\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"(\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"type == \\\"\" + ConfigurationConstants.TYPE_FEATURE_LIST + \"\\\"\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"&&\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(sbWhereClause);\r\n\t\t\t\t\t\t\tsbObjWhere.append(\")\");\r\n\r\n\r\n\t\t\t\t\t\t\tDomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Query to get the Top level object structure started ------------>\"+\" --- \"+ now() +\"\\n\");\r\n\r\n\t\t\t\t\t\t MapList featureStructureList = domTopLevelObject.getRelatedObjects(context,\r\n\t\t\t\t\t\t\t\t sbRelPattern.toString(), // relationshipPattern\r\n\t\t\t\t\t\t\t\t sbTypePattern1.toString(), // typePattern\r\n\t\t\t\t\t\t\t\t fsObjSelects, // objectSelects\r\n\t\t\t\t\t\t\t\t null, // relationshipSelects\r\n\t\t\t\t\t\t\t\t false, // getTo\r\n\t\t\t\t\t\t\t\t true, // getFrom\r\n\t\t\t\t\t\t\t\t (short) 0, // recurseToLevel\r\n\t\t\t\t\t\t\t\t sbObjWhere.toString(), // objectWhere,\r\n\t\t\t\t\t\t\t\t null, // relationshipWhere\r\n\t\t\t\t\t\t\t\t (int)0); // limit\r\n\r\n\t\t\t\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Query to get the Top level object structure ended ------------>\"+\" --- \"+ now() +\"\\n\");\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\\n\\n\");\r\n\r\n\t\t\t\t\t\t String strNewFeatureType = \"\";\r\n\t\t\t\t\t\t String strResolvedNewFeatureType= \"\";\r\n\r\n\t\t\t\t\t\t // use case for standalone features\r\n\t\t\t\t\t\t if (featureStructureList.size() == 0){\r\n\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\" This Top level object structure doesn't have 'Feature List From' and 'Feature List To' connections \"+\"\\n\");\r\n\t\t\t\t\t //mqlLogRequiredInformationWriter(\" Check if this feature has 'Design Variants'or 'GBOM' or 'Managed Series' or 'Quantity Rules' connected \"+\"\\n\");\r\n\t\t\t\t\t //mqlLogRequiredInformationWriter(\" If 'Yes' then stamp this Feature as 'type_LogicalFeature'\"+\"\\n\");\r\n\t\t\t\t\t //mqlLogRequiredInformationWriter(\" If 'No' then check for the property setting for this Feature \"+\"\\n\");\r\n\t\t\t\t\t //mqlLogRequiredInformationWriter(\" If property setting not found for the given type..Check for Parent Type and then set the Type \"+\"\\n\\n\\n\");\r\n\r\n\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Query to check for 'Design Variants' or 'GBOM' or 'Managed Series' or 'Quantity Rules' connections started ------------>\"+\" --- \"+ now() +\"\\n\");\r\n\t\t\t\t\t\t MapList LF_RelatedList = domTopLevelObject.getRelatedObjects(context,\r\n\t\t\t\t\t\t\t\t\t sbRelPattern1.toString(), // relationshipPattern\r\n\t\t\t\t\t\t\t\t\t sbTypePattern2.toString(), // typePattern\r\n\t\t\t\t\t\t\t\t\t null, // objectSelects\r\n\t\t\t\t\t\t\t\t\t null, // relationshipSelects\r\n\t\t\t\t\t\t\t\t\t true, // getTo\r\n\t\t\t\t\t\t\t\t\t true, // getFrom\r\n\t\t\t\t\t\t\t\t\t (short) 1, // recurseToLevel\r\n\t\t\t\t\t\t\t\t\t null, // objectWhere,\r\n\t\t\t\t\t\t\t\t\t null, // relationshipWhere\r\n\t\t\t\t\t\t\t\t\t (int) 0); // limit\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Query to check for 'Design Variants' or 'GBOM' or 'Managed Series' or 'Quantity Rules' connections ended ------------>\"+\" --- \"+ now() +\"\\n\");\r\n\r\n\r\n\t\t\t\t\t\t\t // if feature has DVs or GBOM or Managed Series or Quantity Rules, it should be stamped as Logical\r\n\t\t\t\t\t\t\t if (!LF_RelatedList.isEmpty()) {\r\n\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"This Top level object has 'Design Variants' or 'GBOM' or 'Managed Series' or 'Quantity Rules' connections'\"+\"\\n\");\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Hence stamp this Feature as attribute ---> NewFeatureType=type_LogicalFeature \"+\"\\n\");\r\n\t\t\t\t\t\t\t\t //strNewFeatureType = getResourceProperty(context,\"emxConfiguration.Migration.TechnicalFeatureType\");\r\n\t\t\t\t\t\t\t\t strNewFeatureType = EnoviaResourceBundle.getProperty(context, \"emxConfigurationMigration\", Locale.US, \"emxConfiguration.Migration.TechnicalFeatureType\");\r\n\t\t\t\t\t\t\t\t stampFeature(context,topLevelObjectId,strNewFeatureType,\"\",EMPTY_STRINGLIST);\r\n\r\n\t\t\t\t\t\t\t } else {\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"This Top level object doesn't have the 'Design Variants' or 'GBOM' or 'Managed Series' or 'Quantity Rules' connections'\"+\"\\n\");\r\n\t\t\t\t\t\t\t\t if(topLevelObjectType!=null\r\n\t\t\t\t\t\t\t\t\t\t && !topLevelObjectType.equalsIgnoreCase(ConfigurationConstants.TYPE_PRODUCT_LINE)\r\n\t\t\t\t\t\t\t\t\t\t && !topLevelObjectType.equalsIgnoreCase(ConfigurationConstants.TYPE_GBOM)\r\n\t\t\t\t\t\t\t\t\t\t && !mxType.isOfParentType(context, topLevelObjectType,ConfigurationConstants.TYPE_PRODUCTS)){\r\n\t\t\t\t\t\t\t\t\t\t //&& !isOfDerivationChangedType(context,topLevelObjectType)){\r\n\r\n\t\t\t\t\t\t\t\t\t String strSymbolicType = FrameworkUtil.getAliasForAdmin(context,DomainConstants.SELECT_TYPE, topLevelObjectType, true);\r\n\t\t\t\t\t\t\t\t\t try{\r\n\t\t\t\t\t\t\t\t\t\t //strNewFeatureType = getResourceProperty(context,\"emxConfiguration.Migration.\"+strSymbolicType);\r\n\t\t\t\t\t\t\t\t\t\t strNewFeatureType = EnoviaResourceBundle.getProperty(context, \"emxConfigurationMigration\", Locale.US, \"emxConfiguration.Migration.\"+strSymbolicType);\r\n\t\t\t\t\t\t\t\t\t }catch (Exception e){\r\n\t\t\t\t\t\t\t\t\t\t //If property setting not found for the given type..Check for Parent Type and then set the Type\r\n\t\t\t\t\t\t\t\t\t\t String strParentType = UICache.getParentTypeName(context,topLevelObjectType);\r\n\t\t\t\t\t\t\t\t\t\t String strParSymbolicType = FrameworkUtil.getAliasForAdmin(context,DomainConstants.SELECT_TYPE, strParentType, true);\r\n\t\t\t\t\t\t\t\t\t\t //strNewFeatureType = getResourceProperty(context,\"emxConfiguration.Migration.\"+strParSymbolicType);\r\n\t\t\t\t\t\t\t\t\t\t strNewFeatureType = EnoviaResourceBundle.getProperty(context, \"emxConfigurationMigration\", Locale.US, \"emxConfiguration.Migration.\"+strParSymbolicType);\r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t // stamping the features\r\n\t\t\t\t\t\t\t\t\t stampFeature(context,topLevelObjectId,strNewFeatureType,\"\",EMPTY_STRINGLIST);\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }else{ // usecase for structures\r\n\r\n\t\t\t\t\t\t\t boolean isMixedUsage = false;\r\n\t\t\t\t\t\t\t boolean isMixedComposition = false;\r\n\t\t\t\t\t\t\t String referenceContextUsage=\"\";\r\n\r\n\t\t\t\t\t\t\t StringList featureTypesList = new StringList();\r\n\t\t\t\t\t\t\t // if toplevelobject is feature\r\n\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object is of Type :: \"+ topLevelObjectType +\"\\n\");\r\n\r\n\t\t\t\t\t\t\t if (mxType.isOfParentType(context, topLevelObjectType,ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t || isOfDerivationChangedType(context, topLevelObjectType)){\r\n\t\t\t\t\t\t\t\t // check for mixed usage\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Mixed Usage starts \"+ \"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t StringList allFeatureTypesList = new StringList();\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tList of Features where this Toplevel Object is used. \"+ featureStructureList.size() +\"\\n\");\r\n\t\t\t\t\t\t\t\t outer: for (int j = 0; j < featureStructureList.size(); j++){\r\n\r\n\t\t\t\t\t\t\t\t\t Map fsMap = new HashMap();\r\n\r\n\t\t\t\t\t\t\t\t\t fsMap = (Map) featureStructureList.get(j);\r\n\r\n\t\t\t\t\t\t\t\t\t String strObjectType = (String) fsMap.get(SELECT_TYPE);\r\n\t\t\t\t\t\t\t\t\t referenceContextUsage = (String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\r\n\t\t\t\t\t\t\t\t\t if(mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t\t\t\t\t\t || isOfDerivationChangedType(context, strObjectType)){\r\n\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tObject Type. \"+ strObjectType +\"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t String featureTypeSelect = \"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].from.attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\";\r\n\t\t\t\t\t\t\t\t\t\t Object objFeatureTypes = fsMap.get(featureTypeSelect);\r\n\t\t\t\t\t\t\t\t\t\t featureTypesList.clear();\r\n\r\n\t\t\t\t\t\t\t\t\t\t if (objFeatureTypes instanceof StringList) {\r\n\t\t\t\t\t\t\t\t\t\t\t featureTypesList = (StringList) fsMap.get(featureTypeSelect);\r\n\t\t\t\t\t\t\t\t\t\t } else if (objFeatureTypes instanceof String) {\r\n\t\t\t\t\t\t\t\t\t\t\t featureTypesList.addElement((String) fsMap.get(featureTypeSelect));\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tList of 'Feature Type' attribute values of connected 'Feature List' objects. \"+ featureTypesList +\"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t if (featureTypesList.size() > 0){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t for (int k = 0; k < featureTypesList.size(); k++){\r\n\t\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) featureTypesList.get(k);\r\n\t\t\t\t\t\t\t\t\t\t\t\t if (!strFeatureType.equals((String) featureTypesList.get(0))){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"As the above list is not consisitent Feature will be marked as 'MixedUsage'.\"+\"\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t isMixedUsage = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"MixedUsage\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t break outer;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Mixed Usage ends \"+ \"\\n\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Mixed Composition starts \"+ \"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t // check for mixed composition\r\n\t\t\t\t\t\t\t\t\t if (!isMixedUsage) {\r\n\t\t\t\t\t\t\t\t\t\t if (mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_FEATURE_LIST)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\t\t\t\t\t\t\t\t\t\t\t allFeatureTypesList.addElement(strFeatureType);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\t\tList of 'Feature Type' attribute values of connected 'Feature List' objects. \"+ allFeatureTypesList +\"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if(!strFeatureType.equals(allFeatureTypesList.get(0))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"As the above list is not consisitent Feature will be marked as 'MixedComposition'.\"+\"\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t isMixedComposition = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"MixedComposition\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t break outer;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Mixed Composition ends \"+ \"\\n\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t //Code to check the \"Feature List\" attribute \"Feature Type\" is correctly mapped against the Type\r\n\t\t\t\t\t\t\t\t\t //Check for incorrect mapping\r\n\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Incorrect Mapping starts \"+ \"\\n\");\r\n\t\t\t\t\t\t\t\t\t\tif (!isMixedUsage\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !isMixedComposition\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_FEATURE_LIST)\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_PRODUCTS)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t //Check for incorrect mapping\r\n\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\t\t\t\t\t\t\t\t\t\t if (strFeatureType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_TECHNICAL)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if(!mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_LOGICAL_STRUCTURES)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"IncorrectMapping\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t break outer;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t }else if(strFeatureType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_MARKETING)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if(!mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"IncorrectMapping\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t break outer;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\tmqlLogRequiredInformationWriter(\"\tCode to check Incorrect Mapping ends \"+ \"\\n\\n\");\r\n\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t // stamp the structure including topLevelObject.\r\n\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Stamp starts \"+ \"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t for (int j = 0; j < featureStructureList.size(); j++) {\r\n\t\t\t\t\t\t\t\t\t Map fsMap = (Map) featureStructureList.get(j);\r\n\r\n\t\t\t\t\t\t\t\t\t StringList sLGBOMIds = new StringList();\r\n\r\n\t\t\t\t\t\t\t\t\t String GBOMSelect = \"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\";\r\n\t\t\t\t\t\t\t\t\t Object objGBOMType = fsMap.get(GBOMSelect);\r\n\r\n\t\t\t\t\t\t\t\t\t if (objGBOMType instanceof StringList) {\r\n\t\t\t\t\t\t\t\t\t\t sLGBOMIds = (StringList) fsMap.get(GBOMSelect);\r\n\t\t\t\t\t\t\t\t\t } else if (objGBOMType instanceof String) {\r\n\t\t\t\t\t\t\t\t\t\t sLGBOMIds.addElement((String) fsMap.get(GBOMSelect));\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t String strObjectId = (String) fsMap.get(SELECT_ID);\r\n\t\t\t\t\t\t\t\t\t String strObjectType = (String) fsMap.get(SELECT_TYPE);\r\n\t\t\t\t\t\t\t\t\t boolean isLeafLevel = false;\r\n\r\n\t\t\t\t\t\t\t\t\t if(mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_FEATURES)){\r\n\t\t\t\t\t\t\t\t\t\t int subFeatureCount = Integer.parseInt((String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT + \"]\"));\r\n\t\t\t\t\t\t\t\t\t\t if(subFeatureCount==0)\r\n\t\t\t\t\t\t\t\t\t\t\t isLeafLevel = true;\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t if(!isMixedUsage && !isMixedComposition){\r\n\t\t\t\t\t\t\t\t\t\t //strNewFeatureType = getNewFeatureType(context,(String)featureTypesList.get(0),isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,(String)allFeatureTypesList.get(0),isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t }else if(isMixedComposition){\r\n\t\t\t\t\t\t\t\t\t\t //Need to get the NewResolvedFeatureType\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top Level Feature Type..\"+referenceContextUsage);\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Is this feature LeafLevel..\"+isLeafLevel);\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Type of Object..\"+strObjectType);\r\n\r\n\t\t\t\t\t\t\t\t\t\t strResolvedNewFeatureType = getNewFeatureType(context,referenceContextUsage,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t if (mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_FEATURES) ||\r\n\t\t\t\t\t\t\t\t\t\t\t mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_PRODUCTS)||\r\n\t\t\t\t\t\t\t\t\t\t\t isOfDerivationChangedType(context, strObjectType)){\r\n\r\n\t\t\t\t\t\t\t\t\t\t stampFeature(context,strObjectId,strNewFeatureType,strResolvedNewFeatureType,sLGBOMIds);\r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t //toplevel object stamping\r\n\t\t\t\t\t\t\t\t //strNewFeatureType = getNewFeatureType(context,(String)featureTypesList.get(0),false,topLevelObjectType);\r\n\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,(String)allFeatureTypesList.get(0),false,topLevelObjectType);\r\n\t\t\t\t\t\t\t\t stampFeature(context,topLevelObjectId,strNewFeatureType,strResolvedNewFeatureType,sLTopLevelGBOMIds);\r\n mqlLogRequiredInformationWriter(\"Stamp ends \"+ \"\\n\");\r\n\r\n\t\t\t\t\t\t\t }//end if toplevelobject is feature\r\n\t\t\t\t\t\t\t // if top level object is Product or ProductLine\r\n\t\t\t\t\t\t\t if (mxType.isOfParentType(context, topLevelObjectType,ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,topLevelObjectType, ConfigurationConstants.TYPE_PRODUCT_LINE)) {\r\n\r\n\t\t\t\t\t\t\t\t Map fsMap=new HashMap();\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t for (int j = 0; j < featureStructureList.size(); j++) {\r\n\r\n\t\t\t\t\t\t\t\t\t fsMap= (Map) featureStructureList.get(j);\r\n\r\n\t\t\t\t\t\t\t\t\t int level = Integer.parseInt((String) fsMap.get(SELECT_LEVEL));\r\n\t\t\t\t\t\t\t\t\t if (level == 1) {\r\n\t\t\t\t\t\t\t\t\t\t String referenceContextUsage2 = (String)fsMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t // check for substructure mixed usage\r\n\t\t\t\t\t\t\t\t\t\t StringList allFeatureTypesList = new StringList();\r\n\t\t\t\t\t\t\t\t\t\t outer2:for (int k = j; k < featureStructureList.size(); k++) {\r\n\t\t\t\t\t\t\t\t\t\t\t Map subFSMap = (Map) featureStructureList.get(k);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t String strObjectType = (String) subFSMap.get(SELECT_TYPE);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t int currentLevel = Integer.parseInt((String) subFSMap.get(SELECT_LEVEL));\r\n\t\t\t\t\t\t\t\t\t\t\t if (currentLevel == 1 && k > j) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t featureTypesList.clear();\r\n\t\t\t\t\t\t\t\t\t\t\t if (mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t ||isOfDerivationChangedType(context, strObjectType)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t String featureTypeSelect = \"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].from.attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t Object objFeatureTypes = subFSMap.get(featureTypeSelect);\r\n\t\t\t\t\t\t\t\t\t\t\t\t if (objFeatureTypes instanceof StringList) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t featureTypesList = (StringList) subFSMap.get(featureTypeSelect);\r\n\t\t\t\t\t\t\t\t\t\t\t\t } else if (objFeatureTypes instanceof String) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t featureTypesList.addElement((String) subFSMap.get(featureTypeSelect));\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t objFeatureTypes=null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t if (featureTypesList.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t for (int l = 0; l < featureTypesList.size(); l++) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) featureTypesList.get(l);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!strFeatureType.equals((String) featureTypesList.get(0))) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t isMixedUsage = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"MixedUsage\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t break outer2;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t if(!isMixedUsage){\r\n\t\t\t\t\t\t\t\t\t\t\t\t if (mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_FEATURE_LIST)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) subFSMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t allFeatureTypesList.addElement(strFeatureType);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t if (!strFeatureType.equals(allFeatureTypesList.get(0))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t isMixedComposition = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"MixedComposition\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n \t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t subFSMap=null;\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t allFeatureTypesList=null;\r\n\t\t\t\t\t\t\t\t\t\t // stamp\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\\nstamp started -----> \"+now()+\"\\n\\n\");\r\n\t\t\t\t\t\t\t\t\t\t String strObjectType=\"\";\r\n\t\t\t\t\t\t\t\t\t\t String strObjectId =\"\";\r\n\r\n\t\t\t\t\t\t\t\t\t\t for (int k = j + 1; k < featureStructureList.size(); k++) {\r\n\t\t\t\t\t\t\t\t\t\t\t Map subFSMap= (Map) featureStructureList.get(k);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t strObjectType = (String) subFSMap.get(SELECT_TYPE);\r\n\t\t\t\t\t\t\t\t\t\t\t strObjectId = (String) subFSMap.get(SELECT_ID);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t StringList sLGBOMIds = new StringList();\r\n\t\t\t\t\t\t\t\t\t\t\t String GBOMSelect = \"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\";\r\n\t\t\t\t\t\t\t\t\t\t\t Object objGBOMType = subFSMap.get(GBOMSelect);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if (objGBOMType instanceof StringList) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t sLGBOMIds = (StringList) subFSMap.get(GBOMSelect);\r\n\t\t\t\t\t\t\t\t\t\t\t } else if (objGBOMType instanceof String) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t sLGBOMIds.addElement((String) subFSMap.get(GBOMSelect));\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t int currentLevel = Integer.parseInt((String) subFSMap.get(SELECT_LEVEL));\r\n\t\t\t\t\t\t\t\t\t\t\t if (currentLevel == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"\\ncurrentLevel == 1\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t //j=k;\r\n\t\t\t\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if ((mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_FEATURES)\r\n \t\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t\t\t\t\t || isOfDerivationChangedType(context, strObjectType)))\r\n\t\t\t\t\t\t\t\t\t\t\t //)&&\r\n \t\t\t\t\t\t\t\t\t\t\t//!isOfDerivationChangedType(context, strObjectType)) {\r\n \t\t\t\t\t\t\t\t\t\t {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t boolean isLeafLevel = false;\r\n\t\t\t\t\t\t\t\t\t\t\t\t if(mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t && currentLevel != 2){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t int subFeatureCount = Integer.parseInt((String) subFSMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT + \"]\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t if(subFeatureCount==0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t isLeafLevel = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t if(!isMixedUsage && !isMixedComposition &&\r\n\t\t\t\t\t\t\t\t\t\t\t\t !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_FEATURE_LIST)\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_PRODUCTS)){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t //Code to check the \"Feature List\" attribute \"Feature Type\" is correctly mapped against the Type\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t //Check for incorrect mapping\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (strFeatureType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_TECHNICAL)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if(!(mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_LOGICAL_STRUCTURES)||\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_PRODUCTS))){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"IncorrectMapping\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }else{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,referenceContextUsage2,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t }else if(strFeatureType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_MARKETING)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if(!mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"IncorrectMapping\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }else{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,referenceContextUsage2,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t }else if(!isMixedUsage && !isMixedComposition && (mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t ||mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_PRODUCTS))){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,referenceContextUsage2,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t }else if(isMixedComposition){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t //Need to get the NewResolvedFeatureType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//Need to get the NewResolvedFeatureType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top Level Feature Type..\"+referenceContextUsage);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Is this feature LeafLevel..\"+isLeafLevel);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Type of Object..\"+strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t strResolvedNewFeatureType = getNewFeatureType(context,referenceContextUsage2,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t stampFeature(context,strObjectId,strNewFeatureType,strResolvedNewFeatureType,sLGBOMIds);\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t subFSMap=null;\r\n\t\t\t\t\t\t\t\t\t\t\t strObjectType=null;\r\n\t\t\t\t\t\t\t\t\t\t\t strObjectId=null;\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t //System.gc();\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\\nstamp END -----> \"+now()+\"\\n\");\r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t featureTypesList=null;\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Object Count in text file DONE ----->\"+ iCnt + \"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Toplevel id.DONE ----->\"+ topLevelObjectId +\"--\"+now()+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t domTopLevelObject=null;\r\n\t\t\t\t\t\t topLevelObjectId=null;\r\n\t\t\t\t\t\t //System.gc();\r\n\t\t\t\t\t }\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Pre-migration done for \"+objectList.size()+\" objects in objectids_\"+m+\".txt file. \\n\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t }catch(FileNotFoundException fnfExp){\r\n\t\t\t\t\t // throw exception if file does not exists\r\n\t\t\t\t\t throw fnfExp;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\r\n\t\t\t // Getting top level objects (this includes Feature,Products and ProductLines and also standalone features\r\n\t\t\t StringBuffer sbTypePattern = new StringBuffer(50);\r\n\t\t\t sbTypePattern.append(ConfigurationConstants.TYPE_FEATURES);\r\n\t\t\t sbTypePattern.append(\",\");\r\n\t\t\t sbTypePattern.append(ConfigurationConstants.TYPE_PRODUCTS);\r\n\t\t\t sbTypePattern.append(\",\");\r\n\t\t\t sbTypePattern.append(ConfigurationConstants.TYPE_PRODUCT_LINE);\r\n\r\n\t\t\t StringBuffer sbObjWhere = new StringBuffer(50);\r\n\t\t\t sbObjWhere.append(\"(\");\r\n\t\t\t sbObjWhere.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"]==False\");\r\n\t\t\t sbObjWhere.append(\"&&\");\r\n\t\t\t sbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_FEATURES + \"\\\"\");\r\n\t\t\t sbObjWhere.append(\")\");\r\n\t\t\t sbObjWhere.append(\"||\");\r\n\t\t\t sbObjWhere.append(\"(\");\r\n\t\t\t sbObjWhere.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"]==False\");\r\n\t\t\t sbObjWhere.append(\"&&\");\r\n\t\t\t sbObjWhere.append(\"from[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+ \"]==True\");\r\n\t\t\t sbObjWhere.append(\"&&\");\r\n\t\t\t sbObjWhere.append(\"(\");\r\n\t\t\t sbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\t\t sbObjWhere.append(\"||\");\r\n\t\t\t sbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCT_LINE + \"\\\"\");\r\n\t\t\t sbObjWhere.append(\")\");\r\n\t\t\t sbObjWhere.append(\")\");\r\n\r\n\t\t\t StringList objSelects = new StringList();\r\n\t\t\t objSelects.addElement(SELECT_ID);\r\n\t\t\t objSelects.addElement(SELECT_TYPE);\r\n\t\t\t objSelects.addElement(SELECT_NAME);\r\n\r\n\r\n\t\t\t //finding if any Feature objects in database or Product objects which have FLT relationship are not stamped\r\n\t\t\t StringBuffer unStampedTypePattern = new StringBuffer(50);\r\n\t\t\t unStampedTypePattern.append(ConfigurationConstants.TYPE_FEATURES);\r\n\t\t\t unStampedTypePattern.append(\",\");\r\n\t\t\t unStampedTypePattern.append(ConfigurationConstants.TYPE_PRODUCTS);\r\n\r\n\t\t\t emxVariantConfigurationIntermediateObjectMigration_mxJPO VariantConfigInterObjMigrationInst= new emxVariantConfigurationIntermediateObjectMigration_mxJPO(context, new String[0]);\r\n\t\t\t StringList slDerivationChangedType = VariantConfigInterObjMigrationInst.getDerivationChangedType(context,new String[0]);\r\n\r\n\t\t\t\tStringBuffer sbWhereClause = new StringBuffer(50);\r\n\t\t\t\tsbWhereClause.append(\"(\");\r\n\t\t\t\tsbWhereClause.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_FEATURES + \"\\\"\");\r\n\r\n\t\t for(int i=0;i<slDerivationChangedType.size();i++){\r\n\t\t \tunStampedTypePattern.append(\",\");\r\n\t\t \tunStampedTypePattern.append(slDerivationChangedType.get(i));\r\n\t \t\t\tsbWhereClause.append(\"||\");\r\n\t \t\t\tsbWhereClause.append(\"type.kindof == \\\"\" + slDerivationChangedType.get(i).toString() + \"\\\"\");\r\n\t\t }\r\n\t\t sbWhereClause.append(\")\");\r\n\r\n StringBuffer unStampedObjWhere = new StringBuffer(100);\r\n unStampedObjWhere.append(\"(\");\r\n unStampedObjWhere.append(sbWhereClause);\r\n unStampedObjWhere.append(\"&&\");\r\n\t\t\t unStampedObjWhere.append(\"interface[\"+ INTERFACE_FTRIntermediateObjectMigration +\"]==FALSE\");\r\n\t\t\t unStampedObjWhere.append(\")\");\r\n\t\t\t /*unStampedObjWhere.append(\"||\");\r\n\t\t\t unStampedObjWhere.append(\"(\");\r\n\t\t\t unStampedObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\t\t unStampedObjWhere.append(\"&&\");\r\n\t\t\t unStampedObjWhere.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"]==True\");\r\n\t\t\t unStampedObjWhere.append(\"&&\");\r\n\t\t\t unStampedObjWhere.append(\"interface[\"+ INTERFACE_FTRIntermediateObjectMigration +\"]==FALSE\");\r\n\t\t\t unStampedObjWhere.append(\")\");*/\r\n\r\n\t\t\t StringList sLobjSelects = new StringList();\r\n\t\t\t sLobjSelects.addElement(SELECT_NAME);\r\n\t\t\t sLobjSelects.addElement(SELECT_TYPE);\r\n\t\t\t sLobjSelects.addElement(SELECT_ID);\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"Check for unStamped Objects starts \"+\"\\n\");\r\n\r\n\t\t\t List unStampedObjectsList = DomainObject.findObjects(\r\n\t\t\t\t\t context,\r\n\t\t\t\t\t unStampedTypePattern.toString(),\r\n\t\t\t\t\t DomainConstants.QUERY_WILDCARD,\r\n\t\t\t\t\t unStampedObjWhere.toString(),\r\n\t\t\t\t\t sLobjSelects);\r\n\t\t\t mqlLogRequiredInformationWriter(\"Check for unStamped Objects ends \"+\"\\n\");\r\n\r\n\t\t\t //setting premigration status\r\n\t\t\t if(unStampedObjectsList.size()==0)\r\n\t\t\t {\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Unstamped object list size is 0.\\n\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Pre-migration is complete.\\n\");\r\n\t\t\t\t setAdminMigrationStatus(context,\"PreMigrationComplete\");\r\n\t\t\t }\r\n\t\t\t else\r\n\t {\r\n\t \tMap unStampedObjMap = new HashMap();\r\n\t \tfor(int i=0;i<unStampedObjectsList.size();i++){\r\n\r\n\t \t\tunStampedObjMap= (Map)unStampedObjectsList.get(i);\r\n\t \t\tString strUnStampId =(String)unStampedObjMap.get(SELECT_ID);\r\n\t \t\twriteOIDToTextFile(strUnStampId,\"unStampedOIDs\");\r\n\t \t}\r\n\r\n\t mqlLogRequiredInformationWriter(\"Pre-migration is not complete.\\n\");\r\n\t mqlLogRequiredInformationWriter(\"WARNING: Some Feature objects are not stamped.\\n\");\r\n\t mqlLogRequiredInformationWriter(\"Please refer unStampedOIDs.txt for details.\\n\");\r\n\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\r\n\t }\r\n\r\n\t\t\t if(IS_CONFLICT){\r\n\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"WARNING: Conflict MixedUsage/MixedComposition/MarketingGBOM exist.\" + \"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Please view file 'Conflict.txt'for a list of these objects\" + \"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"These objects need to be deleted or fixed in order to proceed with the next step of migration..\" + \"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t }\r\n\r\n\r\n\t\t\t String strMqlCommandOn = \"trigger on\";\r\n\t\t\t MqlUtil.mqlCommand(context,strMqlCommandOn,true);\r\n\t\t\t mqlLogRequiredInformationWriter(\"End of preMigration 'trigger on' done\" + \"\\n\");\r\n\r\n\t }catch (Exception e) {\r\n \t\t\te.printStackTrace();\r\n \t\t\tmqlLogRequiredInformationWriter(\"Pre-migration failed. \\n\"+e.getMessage() + \"\\n\");\r\n \t\t}\r\n \t}", "@Override\n public void runOpMode() {\n leftDrive = hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = hardwareMap.get(DcMotor.class, \"right_drive\");\n intake = hardwareMap.get (DcMotor.class, \"intake\");\n dropServo = hardwareMap.get(Servo.class, \"drop_Servo\");\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n rightDrive.setDirection(DcMotor.Direction.FORWARD);\n\n dropServo.setPosition(1.0);\n waitForStart();\n dropServo.setPosition(0.6);\n sleep(500);\n VuforiaOrientator();\n encoderSequence(\"dumbDrive\");\n\n\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"alter sessionrefereznces\");\n assertNotNull(boolean0);\n assertFalse(boolean0);\n }", "protected void executionSuccess() {\n this.isUndoable = true;\n }", "private void migrateRule(Context context, StringList objectIdList)\r\n throws Exception\r\n {\r\n \t\t int migrationStatus = getAdminMigrationStatus(context);\r\n \t \r\n\tif ((objectIdList == null || objectIdList.size() <= 0) && (migrationStatus == 9 || migrationStatus == 10 )) {\t\t\r\n\t\tsetAdminMigrationStatus(context,\"RuleComplete\");\r\n\t\tmqlLogRequiredInformationWriter(\"All Rule Migration Completely done\\n\");\r\n\t\t\r\n \t\t\t }\r\n\telse if ((objectIdList == null || objectIdList.size() <= 0)) {\t\t\r\n \t\t\t setAdminMigrationStatus(context,\"RuleObjectsNotFound\");\r\n\t\tmqlLogRequiredInformationWriter(\"Rules not found in the file\\n\");\r\n\t\t\r\n \t\t }\r\n\telse{\r\n\r\n try{\r\n \t\t //STEP1 - turn triggers off\r\n \t\t String strMqlCommand = \"trigger off\";\r\n \t\t MqlUtil.mqlCommand(context,strMqlCommand,true);\r\n\r\n \t setAdminMigrationStatus(context,\"RuleInProcess\");\r\n\t\tmqlLogRequiredInformationWriter(\"Migration Status set to RuleInProcess\" + \"\\n\");\r\n\r\n \t //Get the info related to all Rule Objects in the list\r\n \t String[] oidsArray = new String[objectIdList.size()];\r\n oidsArray = (String[])objectIdList.toArray(oidsArray);\r\n\r\n StringList objectSelects = new StringList();\r\n objectSelects.addElement(SELECT_TYPE);\r\n objectSelects.addElement(SELECT_NAME);\r\n objectSelects.addElement(SELECT_REVISION);\r\n objectSelects.addElement(SELECT_ID);\r\n objectSelects.addElement(ConfigurationConstants.SELECT_DESIGNVARIANTS);\r\n objectSelects.addElement(ConfigurationConstants.SELECT_RULE_COMPLEXITY);\r\n objectSelects.addElement(\"interface[\"+INTERFACE_FTRIntermediateObjectMigration +\"]\");\r\n\r\n //Related to LE\r\n objectSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_LEFT_EXPRESSION+ \"].id\");\r\n //Related to RE\r\n objectSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_RIGHT_EXPRESSION+ \"].id\");\r\n objectSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_RIGHT_EXPRESSION+ \"].to.id\");\r\n DomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ ConfigurationConstants.RELATIONSHIP_LEFT_EXPRESSION+ \"].id\");\r\n DomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ ConfigurationConstants.RELATIONSHIP_RIGHT_EXPRESSION+ \"].id\");\r\n DomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ ConfigurationConstants.RELATIONSHIP_RIGHT_EXPRESSION+ \"].to.id\");\r\n\t\t //DomainConstants.MULTI_VALUE_LIST.add(ConfigurationConstants.SELECT_DESIGNVARIANTS);\r\n\r\n\r\n MapList mapList = DomainObject.getInfo(context, oidsArray, objectSelects);\r\n Iterator itr = mapList.iterator();\r\n Map ruleInfoMap = new HashMap();\r\n String strRuleId = \"\";\r\n //String strType = \"\";\r\n //String strName = \"\";\r\n //String strRevision = \"\";\r\n //String revId = \"\";\r\n String strInterfaceAdded =\"\";\r\n boolean isAllRulesStamped = true;\r\n while (itr.hasNext())\r\n {\r\n \t //convert Rule objects\r\n \t ruleInfoMap = (Map) itr.next();\r\n \t //strType = (String)ruleInfoMap.get(SELECT_TYPE);\r\n //strName = (String)ruleInfoMap.get(SELECT_NAME);\r\n //strRevision = (String)ruleInfoMap.get(SELECT_REVISION);\r\n strRuleId = (String)ruleInfoMap.get(SELECT_ID);\r\n\r\n mqlLogRequiredInformationWriter(\"Rule Id in Process :: \"+ strRuleId +\"\\n\\n\");\r\n\r\n strInterfaceAdded = (String)ruleInfoMap.get(\"interface[\"+INTERFACE_FTRIntermediateObjectMigration +\"]\");\r\n\r\n try{\r\n boolean bRuleMigrated = updateRuleCache(context,ruleInfoMap);\r\n \t \t //Need to stamp the converted Rules with the migration stamp interface to indicate that it has been converted.\r\n \t \t if(bRuleMigrated){\r\n if(strInterfaceAdded!=null && strInterfaceAdded.equalsIgnoreCase(\"FALSE\")){\r\n \t \t\t\tstampRuleObject(context,strRuleId);\r\n \t \t\t }\r\n \t \t }else{\r\n \t \t\t //To indicate that Rule is not stamped.\r\n \t \t\t isAllRulesStamped = false;\r\n \t \t }\r\n\r\n \t \t loadMigratedOids(strRuleId);\r\n \t \t mqlLogRequiredInformationWriter(\"Migration for Rule id :: \"+ strRuleId + \" is done.\"+\"\\n\\n\\n\\n\");\r\n\r\n \t }catch(Exception e)\r\n \t {\r\n \t\t e.printStackTrace();\r\n \t\t String strCommand = strRuleId + \" : \" + e.getMessage()+\"\\n\";\r\n \t\t\t\t writeUnconvertedOID(strCommand,strRuleId);\r\n \t\t continue;\r\n \t }\r\n }\r\n\r\n if(isAllRulesStamped)\r\n {\r\n // E2W Commented out below to not stop rule migration mid way \t \r\n \t //setAdminMigrationStatus(context,\"RuleComplete\");\r\n mqlLogRequiredInformationWriter(\"!!!!!!!!!!!!!! Rule Migration for Ids in this file are Complete. \\n\");\r\n mqlLogRequiredInformationWriter(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\\n\");\r\n \t mqlLogRequiredInformationWriter(\"!!!!!!!!!!!!!! Rule Migration Complete. \\n\");\r\n \t mqlLogRequiredInformationWriter(\"\\n\");\r\n }\r\n else{\r\n\r\n \t mqlLogRequiredInformationWriter(\"Rule Migration Successful but not complete as still migration of some Rule objects is not done.\\n\");\r\n \t mqlLogRequiredInformationWriter(\"\\n\");\r\n }\r\n\r\n //turn triggers off\r\n \t\t strMqlCommand = \"trigger on\";\r\n \t\t MqlUtil.mqlCommand(context,strMqlCommand,true);\r\n }catch(Exception e)\r\n {\r\n \t e.printStackTrace();\r\n \t mqlLogRequiredInformationWriter(\"Rule Migration Failed. \\n\");\r\n \t mqlLogRequiredInformationWriter(\"\\n\");\r\n \t throw e;\r\n }\r\n }\r\n return;\r\n }", "private static boolean writeOperation(Transaction txn, Operation oper) {\n int var_id = oper.getvarid();\n int trans_id = txn.getId();\n List<Variable> variableList = null;\n // ********NEED TO CHANGE\n\n if (txn.checkForWrite(var_id, oper.getValue())) {\n // checking value in own\n System.out.println(\"Writing new value to self locked variable\");\n return true;\n }\n\n if (!isVariableLocked(var_id)) {\n // Along side locking the variable, check if the variable is justRecovered\n // If so, set the justRecovered flag of the variable to false for the site\n // which is recovering. (Not for the DOWN or UP site)\n // TO DO .. check for all the sites where this variable resides\n // If the site status is RECOVERING, set the justRecovered flag to false\n // for that copy of the variable.\n\n // System.out.println(\"writeOperation::Variable not locked\");\n // getting all variable copies\n variableList = writelockVariable(var_id);\n\n if (!variableList.isEmpty()) {\n\n // not sure about use of this below statement\n txn.addOperationToTransaction(oper);\n\n // add to transaction variable-transaction map\n addVariableToMap(trans_id, var_id);\n\n // since we got the lock we can execute it\n // add all the variables of each site to the commit map of transaction\n for (Variable v : variableList) {\n\n txn.addOperationToCommitMap(v, oper.getValue());\n }\n\n System.out\n .println(\"T\" + trans_id + \" Writing \" + oper.getValue() + \" to variable x\" + var_id);\n\n } else {\n Tuple<Transaction, Operation> t = new Tuple<Transaction, Operation>(txn, oper);\n System.out.println(\"T\" + trans_id + \" needs to Wait\");\n\n waitingRecoverOperations.add(t);\n // releaseResources(trans_id);\n // clearWaitingOperations();\n }\n\n } else {\n // check if already waiting\n // if (!alreadyWaiting(txn, oper)) {\n\n\n // }\n\n\n // add to waiting transaction list\n // we need to add edge to the graph\n // first we check if an edge already exists that is\n // check the dependency between transactions\n // and check if there is a deadlock;\n // find the transaction which has lock on this variables\n // and add the dependency edge.\n\n\n // System.out.println(\"writeOperation::Variable is locked\");\n List<Integer> independent_trans_ids = transaction_variable_map.get(var_id);\n\n\n // read locked by self\n if (independent_trans_ids.contains(trans_id)) {\n // System.out.println(\"self contained \");\n List<Integer> list = getTransactionsWaiting(var_id);\n\n if (!list.isEmpty()) {\n // some other transaction is waiting for same variable\n // and this variable was previously locked by me too\n // so deadlock\n int secondTrans = list.get(0);\n if (transactions.get(secondTrans).getStartTime() <= transactions.get(trans_id)\n .getStartTime()) {\n\n // i M getting killed\n releaseResources(trans_id);\n System.out.println(\"Aborted :\" + trans_id);\n clearWaitingOperations();\n return false;\n\n } else {\n // i am not youngest, i can get lock now\n releaseResources(secondTrans);\n clearWaitingOperations();\n System.out.println(\"Aborted :\" + secondTrans);\n }\n\n\n\n }\n\n\n if (independent_trans_ids.size() == 1) {\n // i am the only transaction working on this variable so i can upgrade my lock\n System.out.println(\"Upgrading lock\");\n variableList = writelockVariable(var_id);\n\n if (!variableList.isEmpty()) {\n\n // not sure about use of this below statement\n txn.addOperationToTransaction(oper);\n\n // add to transaction variable-transaction map\n addVariableToMap(trans_id, var_id);\n\n // since we got the lock we can execute it\n // add all the variables of each site to the commit map of transaction\n for (Variable v : variableList) {\n\n txn.addOperationToCommitMap(v, oper.getValue());\n }\n System.out.println(\n \"T\" + trans_id + \" Writing \" + oper.getValue() + \" to variable x\" + var_id);\n\n\n\n } else {\n Tuple<Transaction, Operation> t = new Tuple<Transaction, Operation>(txn, oper);\n\n waitingRecoverOperations.add(t);\n System.out.println(\"T\" + trans_id + \" needs to Wait\");\n // releaseResources(trans_id);\n // clearWaitingOperations();\n }\n\n return true;\n }\n\n\n }\n\n System.out.println(\"T\" + trans_id + \" needs to Wait\");\n\n for (Integer independent_trans_id : independent_trans_ids) {\n if (independent_trans_id == trans_id)\n continue;\n if (checkAndAddDependency(trans_id, independent_trans_id)) {\n\n if (!alreadyWaiting(txn, oper)) {\n // System.out.println(\"writeOperation:: Not already waiting\");\n Tuple<Transaction, Operation> t = new Tuple<Transaction, Operation>(txn, oper);\n\n waitingOperations.add(t);\n\n\n\n }\n }\n }\n\n\n return false;\n }\n\n return true;\n\n }", "protected void execute() {\n \tRecordMotorMovement.getInstance().RecordMotors();\n }", "void iniciarOperacion() throws DAOException;", "public final void mo23206tL(int i) {\n AppMethodBeat.m2504i(18974);\n do {\n if (this.kIW > 0) {\n C4990ab.m7417i(\"MicroMsg.SubCoreDBBackup\", \"Recovery stage %d result: %d\", Integer.valueOf(this.kIW), Integer.valueOf(i));\n }\n if (i == 0) {\n this.kIX.delete();\n C7060h.pYm.mo8378a(181, 29, 1, true);\n if (this.kIC != null) {\n this.kIC.mo23206tL(i);\n }\n this.kIY.unLock();\n AppMethodBeat.m2505o(18974);\n return;\n } else if (i == -2) {\n this.kIX.delete();\n C7060h.pYm.mo8378a(181, 3, 1, true);\n if (this.kIC != null) {\n this.kIC.mo23206tL(i);\n }\n this.kIY.unLock();\n AppMethodBeat.m2505o(18974);\n return;\n } else {\n int i2 = this.kIW + 1;\n this.kIW = i2;\n switch (i2) {\n case 1:\n C4990ab.m7417i(\"MicroMsg.SubCoreDBBackup\", \"Database recovery stage %d: REPAIR\", Integer.valueOf(this.kIW));\n i = C11486d.this.mo23212b(null, (C33900b) this);\n continue;\n case 2:\n C4990ab.m7417i(\"MicroMsg.SubCoreDBBackup\", \"Database recovery stage %d: BACKUP RECOVER\", Integer.valueOf(this.kIW));\n i = C11486d.this.mo23210a(null, (C33900b) this);\n continue;\n case 3:\n C4990ab.m7417i(\"MicroMsg.SubCoreDBBackup\", \"Database recovery stage %d: DUMP\", Integer.valueOf(this.kIW));\n i = C11486d.this.mo23209a((C33900b) this);\n continue;\n default:\n this.kIX.delete();\n C7060h.pYm.mo8378a(181, 30, 1, true);\n if (this.kIC != null) {\n this.kIC.mo23206tL(i);\n }\n this.kIY.unLock();\n AppMethodBeat.m2505o(18974);\n return;\n }\n }\n } while (i != 0);\n AppMethodBeat.m2505o(18974);\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n boolean boolean0 = SQLUtil.isDML(\"org.apache.derby.impl.store.raw.data.ContainerHandleActionOnCommit\");\n assertFalse(boolean0);\n }", "public void commissionRunway(String id);", "void redo();", "public synchronized void undo(){\n int index_of_last_operation = instructions.size() - 1;\n if (index_of_last_operation >= 0){\n instructions.remove(index_of_last_operation);\n }\n }", "public void doRollback() throws Exception{\n /* rollback to last stable checkpoint */\n rStateManager.rollback();\n\n /* gets the last stable checkpoint, or zero if it doesn't exist */\n long seqn = rStateManager.getCurrentCheckpointID();\n\n IRecoverableServer lServer = (IRecoverableServer)getServer();\n \n getStateLog().setNextExecuteSEQ(seqn + 1);\n getStateLog().setCheckpointLowWaterMark(seqn);\n\n if(seqn >= 0){\n lServer.setCurrentState(rStateManager.getCurrentState());\n }else{\n lServer.setCurrentState(null);\n }\n\n if(seqn > getCurrentPrePrepareSEQ()){\n getStateLog().setNextPrePrepareSEQ(seqn+1);\n }else{\n tryExecuteRequests();\n }\n \n }", "protected void doDML(int operation, TransactionEvent e) {\r\n if (operation == DML_INSERT) {\r\n DBTransaction txn = getDBTransaction();\r\n CallableStatement callableStatement =\r\n txn.createCallableStatement(\"begin ? := dss_all_pkg.GET_RFRT_NUMBER; end;\", DBTransaction.DEFAULT);\r\n try {\r\n callableStatement.registerOutParameter(1, Types.VARCHAR);\r\n callableStatement.executeUpdate();\r\n String vRfrtNumber = callableStatement.getString(1);\r\n callableStatement.close();\r\n setRfrtDocNo(vRfrtNumber);\r\n } catch (SQLException sqle) {\r\n try {\r\n callableStatement.close();\r\n } catch (SQLException f) {\r\n }\r\n }\r\n }\r\n Date currentDate = new Date();\r\n if (operation == DML_UPDATE) {\r\n setLastUpdatedDate((Date) currentDate.getCurrentDate());\r\n FacesContext fctx = FacesContext.getCurrentInstance();\r\n ExternalContext ectx = fctx.getExternalContext();\r\n HttpSession userSession = (HttpSession) ectx.getSession(false);\r\n try {\r\n setUserIdFk(new Number(userSession.getAttribute(\"pUserId\")));\r\n setLastUpdatedBy(new Number(userSession.getAttribute(\"pUserId\")));\r\n } catch (SQLException ex) {\r\n setUserIdFk(new Number(0));\r\n setLastUpdatedBy(new Number(0));\r\n }\r\n }\r\n super.doDML(operation, e);\r\n }", "public interface OperationService {\n\n //在每次插座开断的时候插入状态的变化\n public int insertOperation(OperationPO operationPO);\n //根据时段查看所有的变换\n public List<OperationPO> selectOperation(TimeSpanBO timeSpanBO);\n}", "private void logData(VinDevices data,String operation)\n\t\t{\n\t\t\tif (this.debug == true)\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\tSystem.out.print(\"\\n >>>>>>>>>>>>>>> Operation:\" + operation+\"<<<<<<<<<<<<<<<<<<<\");\n\t\t\t\tSystem.out.print(\"\\n --- Begin Debug Hibernate data class ----\");\n\t\t\t\tSystem.out.print(\"\\n id_device :\"+ data.getIdDevice());\n\t\t\t\tSystem.out.print(\"\\n name :\"+ data.getName());\n\t\t\t\tSystem.out.print(\"\\n comment :\"+ data.getComment());\n\t\t\t\tSystem.out.print(\"\\n --- End Debug Hibernate data class ----\");\n\t\t\t\tSystem.out.print(\"\\n >>>>>>>>>>>>>>>>>>>><<<<>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\\n\\n\");\n\t\t\t\t*/\n\t\t\t}\n\t\t}", "public interface MigratableProcesses extends Runnable, Serializable{\n\n // file operation\n public abstract void run();\n\n // suspending this function\n public abstract void suspend();\n\n // check if this process finished\n public boolean finished();\n\n public abstract void resume();\n\n public abstract void finish();\n // public void set_migrate();\n\n}", "private void processRollback() throws HsqlException {\n\n String token;\n boolean toSavepoint;\n\n token = tokenizer.getSimpleToken();\n toSavepoint = false;\n\n if (token.equals(Token.T_WORK)) {\n\n // do nothing\n } else if (token.equals(Token.T_TO)) {\n tokenizer.getThis(Token.T_SAVEPOINT);\n\n token = tokenizer.getSimpleName();\n toSavepoint = true;\n } else {\n tokenizer.back();\n }\n\n if (toSavepoint) {\n session.rollbackToSavepoint(token);\n } else {\n session.rollback();\n }\n }", "private void main_flow() throws SQLException {\n start_operation_complete_monitoring(this);\r\n BuffDBWriterTrell.total_nr_recorded_entries = 0;\r\n //======================\r\n NEW_RECORDS_FOUND = false;\r\n String last_export_date = get_last_export_date(SqlQ.get_latest_export_date());\r\n last_export_date = HelpM.get_date_time_minus_some_time_in_ms(last_export_date, \"yyyy-MM-dd HH:mm:ss\", 600000);// 10 min\r\n //======================\r\n export_procedure_1(last_export_date);\r\n //======================\r\n\r\n if (NEW_RECORDS_FOUND) {\r\n wait_();\r\n String msg = \" (nr rec.= \" + (BufferedDBWriterSuper.total_nr_recorded_entries - 1) + \" )\";\r\n SimpleLoggerLight.logg(\"main_flow.log\", msg);\r\n// write_to_update_table(\"main_flow\", \"\", DBT_trell.INTERFACE_TRIGER_TABLE_NAME,\r\n// \"mc\",\r\n// \"trell\",\r\n// bWriterTrell);\r\n } else {\r\n SimpleLoggerLight.logg_no_append(\"last_check.log\", \"-> LAST CHECK\");\r\n// write_to_update_table(\r\n// \"main_flow\", \"last_check\", DBT_trell.INTERFACE_TRIGER_TABLE_NAME,\r\n// \"mc\",\r\n// \"trell\",\r\n// bWriterTrell);\r\n }\r\n }", "public static void deshabilitarTransaccionManual() {\n try {\n\n con.setAutoCommit(true);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void redo(Transaction tx) {\r\n\t\t// do nothing\r\n\t}", "void rollback();", "@Override\n\tpublic String operateTypeId() throws Exception{\n\t\treturn \"02004\";\n\t}", "@Override\n public void runOpMode() {\n motorFL = hardwareMap.get(DcMotor.class, \"motorFL\");\n motorBL = hardwareMap.get(DcMotor.class, \"motorBL\");\n motorFR = hardwareMap.get(DcMotor.class, \"motorFR\");\n motorBR = hardwareMap.get(DcMotor.class, \"motorBR\");\n landerRiser = hardwareMap.get(DcMotor.class, \"lander riser\");\n landerRiser = hardwareMap.get(DcMotor.class, \"lander riser\");\n landerRiser.setDirection(DcMotor.Direction.FORWARD);\n landerRiser.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n markerDrop = hardwareMap.get(Servo.class, \"marker\");\n markerDrop.setDirection(Servo.Direction.FORWARD);\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n runtime.reset();\n\n //Landing & unlatching\n landerRiser.setPower(-1);\n telemetry.addData(\"Status\", \"Descending\");\n telemetry.update();\n sleep(5550);\n landerRiser.setPower(0);\n telemetry.addData(\"Status\",\"Unhooking\");\n telemetry.update();\n move(-0.5, 600, true);\n strafe(-0.4,0.6, 3600, true);\n move(0.5,600,true);\n markerDrop.setPosition(0);\n sleep(1000);\n markerDrop.setPosition(0.5);\n sleep(700);\n markerDrop.setPosition(0);\n strafe(0, -0.5,500,true);\n strafe(0.5, -0.25, 8500, true);\n\n }", "public abstract void redo();", "public void undo() {\n setExecuted(false);\n }", "public void rollbackTx()\n\n{\n\n}", "private void rollbackMerge(int action) {\n\n /* mergeOnly ran so only remove new inserts not what already existed */\n if (action == 2) {\n try {\n logger.info(\"Rolling back merge cascading from the tutor transaction table\");\n callSP(buildSPCall(ROLLBACK_MERGE_TRANSACTION_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error trying to rollback from the tutor_transaction table.\",\n exception);\n }\n\n try {\n logger.info(\"Rolling back subject data\");\n callSP(buildSPCall(ROLLBACK_MERGE_SUBJECT_DATA_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error trying to rollback the subject data.\",\n exception);\n }\n\n try {\n logger.info(\"Rolling back merge cascading from the dataset level table\");\n callSP(buildSPCall(ROLLBACK_MERGE_DATASET_LEVEL_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error trying to rollback from the dataset_level table.\",\n exception);\n }\n } else {\n try {\n logger.info(\"Rolling back merge cascading from the tutor transaction table\");\n callSP(buildSPCall(ROLLBACK_TRANSACTION_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error trying to rollback from the tutor_transaction table.\",\n exception);\n }\n\n try {\n logger.info(\"Rolling back subject data\");\n callSP(buildSPCall(ROLLBACK_SUBJECT_DATA_PROC, \"\\\"\" + mappingDb + \"\\\"\"));\n } catch (SQLException exception) {\n logger.error(\"Error trying to rollback the subject data.\", exception);\n }\n\n try {\n logger.info(\"Rolling back merge cascading from ds_dataset table\");\n callSP(buildSPCall(ROLLBACK_DATASET_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error trying to rollback from the ds_dataset table.\", exception);\n }\n }\n }", "public void operationSave() {\n\r\n\t\tstatusFeldSave();\r\n\t}", "private void runLater(String table, String id, Operation r) {\n\t\tif (captureHitRatio)\n\t\t\trequestsIn.increment();\n\t\tRowInTable element = new RowInTable(table, id);\n\t\twhile(true) {\n\t\t\tStoreRequest req = new StoreRequest(element);\n\t\t\tStoreRequest tmp = writesByRows.putIfAbsent(element, req);\n\t\t\ttry {\n\t\t\t\tif (tmp == null) {\n\t\t\t\t\t// req was added ; should also be put in the delay queue\n\t\t\t\t\treq.plan();\n\t\t\t\t\tlogger.fine(\"Request planned for \" + table + ':' + id + \" on \" + System.currentTimeMillis() + \" by \" + req);\n\t\t\t\t} else {\n\t\t\t\t\t// Another thread added request for this element before us\n\t\t\t\t\treq = tmp;\n\t\t\t\t}\n\t\t\t\tr.run(req);\n\t\t\t\t// Request is planned and merged ; leaving the infinite loop\n\t\t\t\tbreak;\n\t\t\t} catch (RequestIsOutException x) {\n\t\t\t\t// We've tried to update a request that went out meanwhile\n\t\t\t}\n\t\t\t// retrying eventually\n\t\t\tThread.yield();\n\t\t}\n\t}", "public void redo() {\n\t\t\n\t}", "public void executarLogica() {\n\t\tchecarTarefaValida();\n\t\texecutar();\n\t\texecutandoTarefa();\n\t\tfinalizarTarefa();\n\t}", "@RollbackExecution\n public void rollback() {\n log.warn(\"Rollback requested but not available for 'sortWorkPlacements' migration.\");\n }", "public static void snapshotOp(String vmname,String op,ServiceInstance si) throws InvalidProperty, RuntimeFault, RemoteException, InterruptedException{\n\t\t\t\n\t\t\tString snapshotname = vmname + \"snapshot\";\n\t\t\tString desc = snapshotname + \"desc\";\n\t\t\tboolean removechild = true;\n\t\t\tVirtualMachine vm = vmbyName(vmname,si);\n\t\t if(\"create\".equalsIgnoreCase(op))\n\t\t {\n\t\t System.out.println(\"creating snapshot for \"+ vmname );\n\t\t Task task = vm.createSnapshot_Task(\n\t\t snapshotname, desc, false, false);\n\t\t if(task.waitForTask()==Task.SUCCESS)\n\t\t {\n\t\t System.out.println(\"Snapshot was created. \"+ vmname );\n\t\t System.out.println(\"====================================================================\");\n\t\t }\n\t\t }\n\t\t else if(\"list\".equalsIgnoreCase(op))\n\t\t {\n\t\t listSnapshots(vm);\n\t\t }\n\t\t else if(op.equalsIgnoreCase(\"revert\")) \n\t\t {\n\t\t VirtualMachineSnapshot vmsnap = getSnapshotInTree(\n\t\t vm, snapshotname);\n\t\t if(vmsnap!=null)\n\t\t {\n\t\t \tSystem.out.println(\"reverting snapshot for \"+ vmname );\n\t\t Task task = vmsnap.revertToSnapshot_Task(null);\n\t\t if(task.waitForTask()==Task.SUCCESS)\n\t\t {\n\t\t System.out.println(\"Reverted to snapshot:\" \n\t\t + snapshotname);\n\t\t }\n\t\t }\n\t\t }\n\t\t else if(op.equalsIgnoreCase(\"removeall\")) \n\t\t {\n\t\t Task task = vm.removeAllSnapshots_Task(); \n\t\t if(task.waitForTask()== Task.SUCCESS) \n\t\t {\n\t\t System.out.println(\"Removed all snapshots\");\n\t\t }\n\t\t }\n\t\t else if(op.equalsIgnoreCase(\"remove\")) \n\t\t {\n\t\t VirtualMachineSnapshot vmsnap = getSnapshotInTree(\n\t\t vm, snapshotname);\n\t\t if(vmsnap!=null)\n\t\t {\n\t\t Task task = vmsnap.removeSnapshot_Task(removechild);\n\t\t if(task.waitForTask()==Task.SUCCESS)\n\t\t {\n\t\t System.out.println(\"Removed snapshot:\" + snapshotname);\n\t\t }\n\t\t }\n\t\t }\n\t\t else \n\t\t {\n\t\t System.out.println(\"Invalid operation\");\n\t\t return;\n\t\t }\n\t\t }", "@Transactional//expect both \"T\" and \"F\"\n\tpublic Object invalidTxInPublicMethod(String action) {\n\t\tuniActionLogDao.insert(\"T\");\n\t\ttry {\n\t\t\tlogInfo12();\n\t\t} catch (Exception e) {\n\t\t\t//do nothing\n\t\t\treturn \"F1\";\n\t\t}\n\t\treturn \"T1\";\n\t}", "private void exeDELREC() \n\t\t{ \n\t\t try\n\t\t {\n\t\t\t \tM_strSQLQRY = \"UPDATE SA_SWMST SET\";\t\n\t\t\t\tM_strSQLQRY +=\"\tSW_STSFL='X'\";\t\n\t\t\t\tM_strSQLQRY +=\" where SW_SFTCT= '\"+hstSFTCT.get(cmbSFTCT.getSelectedItem().toString())+\"' \";\n\t\t\t\tM_strSQLQRY +=\" AND SW_SFTCD='\"+txtSFTCD.getText()+\"'\";\n\t\t\t\tM_strSQLQRY +=\" AND SW_SRLNO='\"+txtSRLNO.getText().toString()+\"'\";\n\t\t\t\tM_strSQLQRY +=\" AND SW_LICTP='\"+hstLICTP.get(cmbLICTP.getSelectedItem().toString())+\"',\";\n\t\t\t\tcl_dat.M_flgLCUPD_pbst = true;\n\t\t\t\tcl_dat.exeSQLUPD(M_strSQLQRY ,\"setLCLUPD\");\n\t\t\t\t//System.out.println(\">>>Delete>>\"+M_strSQLQRY);\n\t\t }\n\t\t catch(Exception L_EX)\n\t\t {\n\t\t setMSG(L_EX,\"exeDELREC()\");\t\t\n\t\t }\n\t\t}", "protected abstract void rollbackIndividualTrx();", "public void adm1() {\n\t\ttry { // Delete all table contents\n\t\t\tstatement = connection.createStatement();\n\t\t\tstatement.executeQuery(\"delete from PLANE\");\n\t\t\tstatement.executeQuery(\"delete from FLIGHT\");\n\t\t\tstatement.executeQuery(\"delete from PRICE\");\n\t\t\tstatement.executeQuery(\"delete from CUSTOMER\");\n\t\t\tstatement.executeQuery(\"delete from RESERVATION\");\n\t\t\tstatement.executeQuery(\"delete from DETAIL\");\n\t\t\tstatement.executeQuery(\"delete from OUR_DATE\");\n\t\t\tstatement.executeQuery(\"delete from AIRLINE\");\n\t\t} catch(SQLException Ex) {System.out.println(\"Error running the sample queries. Machine Error: \" + Ex.toString());}\n\t\tSystem.out.println(\"DATABASE ERASED\");\n\t}", "@Override\n\tpublic void exec() {\n\t\tauto.changerEtat(\"trS\");\n\t}", "@Test\n public void undoCkpointTest() throws Exception {\n final int tableSize = PARAMETERS.NUM_ITERATIONS_LOW;\n final int trimPosition = tableSize / 2;\n final int snapshotPosition = trimPosition + 2;\n\n CountDownLatch latch = new CountDownLatch(1);\n\n t(1, () -> {\n\n CorfuRuntime rt = getNewRuntime();\n try {\n PersistentCorfuTable<String, Long> tableA = openTable(rt, streamNameA);\n\n // first, populate the map\n for (int i = 0; i < tableSize; i++) {\n tableA.insert(String.valueOf(i), (long) i);\n }\n\n // now, take a checkpoint and perform a prefix-trim\n MultiCheckpointWriter<PersistentCorfuTable<String, Long>> mcw1 = new MultiCheckpointWriter<>();\n mcw1.addMap(tableA);\n mcw1.appendCheckpoints(rt, author);\n\n // Trim the log\n Token token = new Token(rt.getLayoutView().getLayout().getEpoch(), trimPosition);\n rt.getAddressSpaceView().prefixTrim(token);\n rt.getAddressSpaceView().gc();\n rt.getAddressSpaceView().invalidateServerCaches();\n rt.getAddressSpaceView().invalidateClientCache();\n\n latch.countDown();\n } finally {\n rt.shutdown();\n }\n });\n\n AtomicBoolean trimExceptionFlag = new AtomicBoolean(false);\n\n // start a new runtime\n t(2, () -> {\n latch.await();\n CorfuRuntime rt = getNewRuntime();\n\n PersistentCorfuTable<String, Long> localm2A = openTable(rt, streamNameA);\n\n // start a snapshot TX at position snapshotPosition\n Token timestamp = new Token(0L, snapshotPosition - 1);\n rt.getObjectsView().TXBuild()\n .type(TransactionType.SNAPSHOT)\n .snapshot(timestamp)\n .build()\n .begin();\n\n // finally, instantiate the map for the snapshot and assert is has the right state\n try {\n localm2A.get(String.valueOf(0));\n } catch (TransactionAbortedException te) {\n assertThat(te.getAbortCause()).isEqualTo(AbortCause.TRIM);\n // this is an expected behavior!\n trimExceptionFlag.set(true);\n }\n\n try {\n if (!trimExceptionFlag.get()) {\n assertThat(localm2A.size())\n .isEqualTo(snapshotPosition);\n\n // check map positions 0..(snapshot-1)\n for (int i = 0; i < snapshotPosition; i++) {\n assertThat(localm2A.get(String.valueOf(i)))\n .isEqualTo(i);\n }\n\n // check map positions snapshot..(mapSize-1)\n for (int i = snapshotPosition; i < tableSize; i++) {\n assertThat(localm2A.get(String.valueOf(i))).isNull();\n }\n }\n } finally {\n rt.shutdown();\n }\n });\n }", "@Test\n public void testAop() {\n\n Dao dao = daoImpl;\n dao.insert();\n LOGGER.info(\"----------分割线----------\");\n dao.delete();\n LOGGER.info(\"----------分割线----------\");\n dao.update();\n }", "private void cmdUndo() throws NoSystemException {\n \ttry {\n\t\t\tsystem().undoLastStatement();\n\t\t} catch (MSystemException e) {\n\t\t\tLog.error(e.getMessage());\n\t\t}\n }", "protected abstract void internalUndo();", "public void execute() {\n\n try {\n int source = data_path.IR.decimal(15, 0);\n int destination = data_path.IR.decimal(23, 16);\n\n System.out.println(\"Source: \" + source);\n data_path.master_bus.store(source);\n data_path.bank.load(destination);\n\n } catch (Exception e) {\n System.err.println(\"In Controler:LOADI0:increment_clock\");\n System.err.println(e);\n }\n }", "LogicalTableModify.Operation getTableModOp();", "public static HashSet<Transition> makeTransitions(Set<Operation> ops, State tail){\n HashSet<Transition> set = new HashSet<Transition>();\n// 调用enabledOperations方法\n Set<Operation> op = enabledOperations(ops , tail);\n// 遍历op\n for(Operation o : op){\n State s = o.execute(tail);\n Transition t = new Transition(o.name , tail , s , 1);\n set.add(t);\n }\n return set ;\n\n\n\n // throw new NotImplementedException();\n }", "public void operationDelete() {\n\r\n\t\tstatusFeldDelete();\r\n\t}", "public void redoAction() {\n executeAction();\n }", "abstract void trataAltera();", "Boolean removeOperation(Long id);", "@Test(timeout = 4000)\n public void test064() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\"alter table\");\n assertTrue(boolean0);\n }", "private synchronized void performOperations() {\r\n\t\ttry {\r\n\t\t\tswitch (operationStatus) {\r\n\t\t\tcase TRUNCATE_DATA:\r\n\t\t\t\tHibernateUtil.rawQuery(\"TRUNCATE csv;\");\r\n\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\tUtil.writeLog(toString());\r\n\t\t\t\t\tLogger.getLogger(Scheduler.class.getName()).log(Level.INFO, toString());\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\tcase APPEND_DATA:\r\n\t\t\t\tparseData(false);\r\n\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\tUtil.writeLog(toString());\r\n\t\t\t\t\tLogger.getLogger(Scheduler.class.getName()).log(Level.INFO, toString());\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase UPDATE_DATA:\r\n\t\t\t\tparseData(true);\r\n\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\tUtil.writeLog(toString());\r\n\t\t\t\t\tLogger.getLogger(Scheduler.class.getName()).log(Level.INFO, toString());\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase ARRANGE_DATA:\r\n\t\t\t\tarrangeData();\r\n\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\tUtil.writeLog(toString());\r\n\t\t\t\t\tLogger.getLogger(Scheduler.class.getName()).log(Level.INFO, toString());\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test004() throws Throwable {\n Recover recover0 = new Recover();\n recover0.openFile(\"databene\", (String) null, true);\n ErrorHandler errorHandler0 = ErrorHandler.getDefault();\n DBExecutionResult dBExecutionResult0 = DBUtil.runScript(\"databene\", (String) null, '<', (Connection) null, false, errorHandler0);\n assertNotNull(dBExecutionResult0);\n }", "int insertSelective(GatewayLog record);", "public void verarbeite() {\n\t\t\r\n\t}", "void processUndo() {\r\n boardManager.undo();\r\n }", "@Override\r\n\tpublic void deleteLog(int id) throws RuntimeException {\n\t\tlogMapper.deleteLog(id);\r\n\t}", "public abstract void rollback() throws DetailException;", "public static void habilitarTransaccionManual() {\n try {\n con.setAutoCommit(false);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tprotected String perform() {\n\t\tT_work_dj_nsrxx nsrxx = getDj_nsrxx();\n\t\tString nsrsbm = sqlsession.selectOne(\"t_work_dj_nsrxx$getNewNsrxxId\");\n\t\tnsrxx.setNsrsbm(nsrsbm);\n\t\tnsrxx.setZgswjgDm(\"000000\");\n\t\tnsrxx.setSwdjzh(\"-1\");\n\t\tnsrxx.setNsrztDm(\"4\");\n\t\tint i = sqlsession.update(\"t_work_dj_nsrxx$insertSelective\", nsrxx);\n\t\tif (i > 0) {\n\t\t\t/**\n\t\t\t * 1. 首页待办事项标题\n\t\t\t */\n\t\t\tString task_title = \"登记管理:设立登记->确定主管机关\";\n\t\t\t/**\n\t\t\t * 2. 首页待办事项链接, 本系统必须为相对路径,否则为绝对路径\n\t\t\t */\n\t\t\tString task_link = \"/com/jdframe/work/biz/swdj/updateQdzgswjg!init?nsrsbm=\"\n\t\t\t\t\t+ nsrxx.getNsrsbm();\n\t\t\t/**\n\t\t\t * 3. 系统,01为本系统,本系统可以使用相对路径,否则为其他系统不能使用相对路径\n\t\t\t */\n\t\t\tString task_from = \"01\";\n\t\t\t/**\n\t\t\t * 4. 首页待办事项到期时间\n\t\t\t */\n\t\t\tString Task_expire_date = DateUtils.newDateTime(5);\n\t\t\t/**\n\t\t\t * 5. 菜单id,系统根据权限判读那些操作人员有权接收此待办事项\n\t\t\t */\n\t\t\tString menu_id = \"1000028\";\n\t\t\t/**\n\t\t\t * 6. 待办事项优先级\n\t\t\t */\n\t\t\tTokens.PRIORITY priority = Tokens.PRIORITY.CRITICAL;\n\t\t\t// 发送待办事宜\n\t\t\tboolean isSend = sendTask(task_title, priority, task_link,\n\t\t\t\t\ttask_from, Task_expire_date, menu_id);\n\t\t\tif (isSend){\n\t\t\t\tsetSystemMessage(\"设立登记操作成功!\");\n\t\t\t}else{\n\t\t\t\tsetSystemMessage(\"设立登记操作失败,可能无待办事项接收人员!\", true, null);\n\t\t\t\tsqlsession.rollback();\n\t\t\t}\n\t\t} else {\n\t\t\t// 操作失败,并返回input页面\n\t\t\tsetSystemMessage(\"设立登记操作失败!\", true, null);\n\t\t}\n\t\treturn SUCCESS;\n\t}", "@Override\n\tpublic boolean blockRestored(String id) {\n\t\treturn true;\n\t}", "public boolean recoverTransfer(int op_id, int tr_amount, int from_account, int to_account, int from_final_balance,\n int to_final_balance, Connection con){\n try {\n executeTransfer(op_id, tr_amount, from_account, to_account, from_final_balance, to_final_balance, con);\n } catch (SQLException e) {\n try {\n con.rollback();\n return false;\n } catch (SQLException e1) {\n e1.printStackTrace();\n return false;\n }\n }\n return true;\n }", "public String execute() {\n\t\tString userId = this.getUsername();\n\t\texpired = false;\n\t\tresult = false;\n\t\tlogger.info(\"hdUuid:\"+hdUuid+\",operation:\"+operation+\",serverId:\"+serverId+\",uid\"+uid);\n\t\tif (operation.equals(ATTACH) && (!isExpired())) {\n\t\t\tVolumeAttachment attachment = new VolumeAttachment(null, serverId, null, hdUuid);\n\t\t\tvolumeAttachmentClient.attachVolumeAttachment(userId, serverId, attachment);\n\t\t\tlogger.info(\"挂载成功\");\n\t\t\tthis.addAcMessageLog(AcModuleEnum.VM_ADMIN, UUID.randomUUID().toString().replace(\"-\", \"\"),\n\t\t\t\t\tthis.getUserId(), hdUuid, \"挂载云硬盘\", \"挂载云硬盘[\"+hdUuid+\"]到[\"+serverId+\"]的云主机\", \"HdOperateAction.class\", \n\t\t\t\t\tnull, AcLogLevelEnum.INFO, new Date(System.currentTimeMillis()));\n\t\t\tresult = true;\n\t\t} else if (operation.equals(DETACH)) {\n\t\t\tvolumeAttachmentClient.detachVolumeAttachment(userId, serverId, hdUuid);\n\t\t\tthis.addAcMessageLog(AcModuleEnum.VM_ADMIN, UUID.randomUUID().toString().replace(\"-\", \"\"),\n\t\t\t\t\tthis.getUserId(), hdUuid, \"卸载云硬盘\", \"从[\"+serverId+\"]的云主机卸载云硬盘[\"+hdUuid+\"]\", \"HdOperateAction.class\", \n\t\t\t\t\tnull, AcLogLevelEnum.INFO, new Date(System.currentTimeMillis()));\n\t\t\tlogger.info(\"卸载成功\");\n\t\t\tresult = true;\n\t\t} else if (operation.equals(DELETE)) {\n\t\t\tvolumeClient.deleteVolume(userId, hdUuid);\n\t\t\tnew VmHdEndtimeManager().delEndtimeById(endTimeId);\n\t\t\tthis.addAcMessageLog(AcModuleEnum.VM_ADMIN, UUID.randomUUID().toString().replace(\"-\", \"\"),\n\t\t\t\t\tthis.getUserId(), hdUuid, \"删除云硬盘\", \"删除云硬盘[\"+hdUuid+\"]\", \"HdOperateAction.class\", \n\t\t\t\t\tnull, AcLogLevelEnum.INFO, new Date(System.currentTimeMillis()));\n\t\t\tlogger.info(\"删除成功\");\n\t\t\tresult = true;\n\t\t}\n\t\t\n\t\treturn SUCCESS;\n\t}", "void doTransaction (Redis redis) {\n\t \tswitch (redis.EXEC()) {\n\t \tcase OK:\n\t \tbreak;\n\t \tcase FAIL:\n \t\t\tdiscardTransaction(redis);\n\t\t\tbreak;\n\t \t}\n\t}", "@Override\r\n\tpublic void realizarTransacción() {\n\t\tSystem.out.println(\"Transaccion en progreso\");\r\n\t}", "public void action(){\n turn.sendMsg(turn.getController().getTurnOwner().getName()+\"'s turn!\");\n if(turn.getPlayer().isDown()){\n turn.setPhase(new RecoveryPhase());\n }else {\n turn.setPhase(new StarsPhase());\n }\n }", "@Override\r\n\tpublic void undo() throws InstructionExecutionException {\n\t\ttry\r\n\t\t{\r\n\t\t\tthis.robotContainer.pickItem(id);\r\n\t\t\tthis.robotContainer.addItem(lastItem);\r\n\t\t\tthis.engine.addFuel(lastFuel-this.engine.getFuel());\r\n\t\t\tthis.engine.addRecycledMaterial(lastRecycledMaterial-this.engine.getRecycledMaterial());\r\n\t\t} \r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tthrow new InstructionExecutionException();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void undo(RechercheDetailleeAction arg0, RechercheDetailleeResult arg1, ExecutionContext arg2) throws ActionException {\n\r\n\t}", "void readOnlyTransaction();", "boolean supportsRollbackAfterDDL();", "public void rollback();", "@Override\n public EnvironmentState execute(AgentState ast, EnvironmentState est) {\n EstadoAmbiente environmentState = (EstadoAmbiente) est;\n EstadoDrone agState = ((EstadoDrone) ast);\n\n if(agState.getposicion()[0]==2){\n \tagState.irNivelMedio();\n \tenvironmentState.irNivelMedio();\n \tArrayList<Esquina> listaEsquinas;\n \tArrayList<Subcuadrante> listaSubcuadrantes;\n \tint[][] antena=agState.getintensidadSenial();\n \tint idCuadrante=agState.getposicion()[1];\n \tint idSubcuadrante=agState.getposicion()[2];\n \t\tfor(int i=0;i<4;i++){\n \t\t\tif(i!=(idCuadrante-1)){\n\t\t\t\t\tlistaSubcuadrantes=agState.getlistaCuadrantesEnDrone().get(i).getlistaSubcuadrantes();\n \t\t\t\tfor(int j=0;j<4;j++){\t\n\t\t\t\t\t\tlistaEsquinas= listaSubcuadrantes.get(j).getlistaEsquinas();\n\t \t\t\t\tfor(Esquina esq : listaEsquinas){\n\t \t\t\t\t\tagState.getlistaEsquinasIdentificadas()[esq.getidEsquina()]=1;\n\t \t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\n \t\tint subcuadranteMayorSenial=3;\n \t\tagState.setSubcuadranteMayor(subcuadranteMayorSenial);\n \t//Busco cuál es el subcuadrante que mayor señal tiene\n \t\t\n \t\t\n\t\t\t//Seteo como visitadas las esquinas de todos los subcuadrantes que no sean el que mayor señal tiene\n \t\tfor(int i=0;i<4;i++){\n \t\t\tif(i!=subcuadranteMayorSenial-1){\n \t\t\t\tlistaEsquinas= agState.getlistaCuadrantesEnDrone().get(idCuadrante-1).getlistaSubcuadrantes().get(i).getlistaEsquinas();\n \t\t\t\tfor(Esquina esq : listaEsquinas){\n \t\t\t\t\tagState.getlistaEsquinasIdentificadas()[esq.getidEsquina()]=1;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t//Seteo como NO visitadas las esquinas del subcuadrante que mayor señal tiene\n \t\tlistaEsquinas= agState.getlistaCuadrantesEnDrone().get(idCuadrante-1).getlistaSubcuadrantes().get(subcuadranteMayorSenial-1).getlistaEsquinas();\n\t\t\tfor(Esquina esq : listaEsquinas){\n\t\t\t\tagState.getlistaEsquinasIdentificadas()[esq.getidEsquina()]=0;\n\t\t\t}\n \treturn environmentState;\n }\n if(agState.getposicion()[0]==0){\n \tint idCuadrante=agState.getposicion()[1];\n \tint idSubcuadrante=agState.getposicion()[2];\n \tint[] esqIdentificadas = agState.getlistaEsquinasIdentificadas(); \n \t\n \t\tArrayList<Esquina> esquinas = agState.getlistaCuadrantesEnDrone().get(idCuadrante-1).getlistaSubcuadrantes().get(idSubcuadrante-1).getlistaEsquinas();\n \t\tfor(Esquina esquina : esquinas){\n \t\t\tif(esqIdentificadas[esquina.getidEsquina()]==0) return null;\n \t\t}\n \tagState.irNivelMedio();\n \tenvironmentState.irNivelMedio();\n \treturn environmentState;\n }\n return null;\n }", "public void execute() {\n TerroristAgent agent = (TerroristAgent)((TNSRole)oldRole).getAgent();\n Hashtable relationshipTable = agent.getRelationshipTable();\n String relationshipName = null;\n Vector relationshipNames = ((TNSRole)oldRole).getRelationships();\n Iterator i = relationshipNames.iterator();\n while (i.hasNext()) {\n relationshipName = (String)i.next();\n Object temp = relationshipTable.get(relationshipName);\n if (temp instanceof Vector) {\n Vector removeRelationships = (Vector)temp;\n Vector copyOfRelationshipVector = new Vector();\n Iterator i2 = removeRelationships.iterator();\n while (i2.hasNext()) {\n Relationship r = (Relationship)i2.next();\n copyOfRelationshipVector.add(r);\n } // end while\n i2 = copyOfRelationshipVector.iterator();\n while (i2.hasNext()) {\n Relationship removeRelationship = (Relationship)i2.next();\n // System.out.println(\"Attempting to remove \" + agent.getEntityName() + \" from relationship \" + removeRelationship.toString());\n if (removeRelationship.getMembers().contains(agent)) {\n removeRelationship.removeAgent(agent);\n } else {\n // System.out.println(\"Not in this relationship.\");\n } // end if-else\n } // end while\n /* System.out.println(\"Remaining relationships\");\n i2 = removeRelationships.iterator();\n while (i2.hasNext()) {\n Relationship r = (Relationship)i2.next();\n System.out.println(r.toString());\n } // end while*/\n relationshipTable.remove(relationshipName);\n } // end if\n } // end while\n agent.removeRole(oldRole);\n Role addRole = createRole(newRole, agent);\n ((TerroristAgent)agent).addRole(addRole);\n }", "private void actualizarVentanaOperadores() throws SQLException {\n Sistema.getControladorVentanaOperadores().actualizarTablaOperadores(\"SELECT * FROM operador WHERE activo=TRUE ORDER BY id ASC;\");\n }", "public void autoMode4Red(int delay){\n \taddParallel(new LightCommand(0.25));\n// \taddSequential(new OpenGearSocketCommand());\n//\t\taddSequential(new OpenBoilerSocketCommand());\n \taddSequential(new AutoDriveCommand(6));\n \taddSequential(new TurnWithPIDCommand(-45)); \n \taddSequential(new WaitWithoutCheckCommand(.5));\n \taddSequential(new VisionGearTargetCommand(\"targets\"));\n \taddSequential(new TargetGearSortCommand());\n \taddSequential(new AutoTurnCommand());\n \taddParallel(new EnvelopeCommand(true));\n \taddSequential(new AutoDriveUltraSonicForwardCommand(.6, 7));\n \taddSequential(new WaitCommand(2));\n// \tif(Robot.envelopeSubsystem.gearCheck()){\n// \t\taddParallel(new EnvelopeCommand(false));\n// \t\taddSequential(new AutoDriveUltraSonicBackwardCommand(-.7, 35));\n// \t\taddSequential(new VisionGearTargetCommand(\"targets\"),0.5);\n// \t\taddSequential(new TargetGearSortCommand(),0.5);\n// \t\taddSequential(new AutoTurnCommand());\n// \t\taddParallel(new EnvelopeCommand(true));\n// \taddSequential(new AutoDriveUltraSonicForwardCommand(.6, 7));\n// \t\taddSequential(new WaitCommand(2));\n// \t}else{\n// \t\n// \t}\n }", "@Transactional\n\tpublic void rewriteElement(UserMtl userMtl,Integer idt){\n\t\tTree sourceT = owsSession.getSourceT();\n\t\tTree targetT = owsSession.getTargetT();\n\t\tString targetName = targetT.getTabName();\n\t\tif(null==sourceT)\n\t\t\treturn;\n\t\tString sourceName = sourceT.getTabName();\n\t\tlog.debug(targetName+\" \"+targetT);\n\t\tlog.debug(sourceName+\" \"+sourceT);\n\t\tTree idT = em.find(Tree.class, idt);\n\t\tif(\"notice\".equals(targetName)){\n\t\t\tif(\"notice\".equals(sourceName)){\n\t\t\t\tupdateIdClass(idt, sourceT);\n\t\t\t}\n\t\t}else if(\"labor\".equals(targetName)){\n\t\t\tif(\"notice\".equals(sourceName)){\n\t\t\t\tinsertDelete(userMtl, idt, targetT);\n\t\t\t}\n\t\t}else if(\"drug\".equals(targetName)){\n\t\t\tif(\"drug\".equals(sourceName)){\n\t\t\t\t\n\t\t\t\tinsertDelete(userMtl, idt, targetT);\n\t\t\t}\n\t\t}\n\t}", "public void Del(String id) {\n\t\tsql = \"delete from throw_history where throw_history_id='\"+id+\"'\";\n\t\tdao.executeUpdate(sql);\n\t\tSystem.out.println(\"=del===\"+sql);\n\t}", "protected void execute() {\r\n \tmanipulator.moveElevator(speed);\r\n }", "@Override\n public void redo() {\n\n }", "@Override\r\n\tpublic void executerEffetDebutTour() throws HearthstoneException {\n\t\t\r\n\t}", "@Override\r\n\tpublic void execute() \r\n\t\t{\n\t\tsourceArcs = parent.getSourceArcsFromID(child.getServerName());\r\n\t\ttargetArcs = parent.getTargetArcsFromID(child.getServerName());\r\n\t\tredo();\r\n\t\t}" ]
[ "0.56299525", "0.52768415", "0.5258961", "0.5153233", "0.5148895", "0.51213515", "0.5116118", "0.5110884", "0.5106755", "0.5105415", "0.50888866", "0.505517", "0.5054241", "0.50353813", "0.50293607", "0.50293607", "0.50293607", "0.50293607", "0.5008469", "0.5004781", "0.49720797", "0.49630293", "0.49303436", "0.4915219", "0.49114373", "0.48763722", "0.4876232", "0.4869525", "0.48586014", "0.48559967", "0.48534444", "0.48373505", "0.48338315", "0.48207405", "0.48142496", "0.48027417", "0.48020864", "0.47989804", "0.47949955", "0.47874445", "0.47807962", "0.4778618", "0.47557876", "0.4755392", "0.47448453", "0.4730984", "0.47145018", "0.47084376", "0.47076944", "0.4696633", "0.46930456", "0.46811423", "0.4672503", "0.4671364", "0.46711197", "0.46694976", "0.46642074", "0.46595362", "0.4655836", "0.46530974", "0.46495423", "0.46407458", "0.4638112", "0.46351826", "0.46309865", "0.46194556", "0.46157774", "0.46156925", "0.46153122", "0.46140742", "0.46114635", "0.46050134", "0.45952833", "0.45932996", "0.4592689", "0.45908427", "0.45898426", "0.45808953", "0.45795596", "0.45750105", "0.4574637", "0.45742598", "0.45612508", "0.4556933", "0.45543003", "0.45538425", "0.45537883", "0.45526487", "0.4548308", "0.4544838", "0.45436", "0.45334712", "0.45289794", "0.4528583", "0.4521457", "0.45211053", "0.4520575", "0.45188838", "0.45179826", "0.4515469" ]
0.5259673
2
Execute movement statement with given parameters
public void executeMovement(int op_id, int mv_amount, int account_id, int final_balance, Connection con) throws SQLException { PreparedStatement stmt = con.prepareStatement( "insert into OPERATIONS (OP_ID, OP_TYPE, MV_AMOUNT, FROM_ACCOUNT_ID, FROM_CURRENT_BALANCE, TIMESTAMP) " + "values (?,?,?,?,?,?)"); stmt.setInt(1, op_id); stmt.setInt(2, OP_TYPES.valueOf("MOVEMENT").ordinal()+1); stmt.setInt(3, mv_amount); stmt.setInt(4, account_id); stmt.setInt(5, final_balance); stmt.setTimestamp(6, new Timestamp(System.currentTimeMillis())); stmt.execute(); stmt.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Position executeMovement(Position pos, Surface surface);", "@Override\n\tpublic void executeMove(Player player, Board gameBoard, int turn, int startRow, int startCol, int endRow,\n\t\t\tint endCol) {\n\t\t\n\t}", "protected void execute() {\r\n \tmanipulator.moveElevator(speed);\r\n }", "P applyMovement(M move);", "private void executeMove(Move move) {\r\n\t\t//System.out.println(\"executing move\");\r\n\t\tthis.chessGame.movePiece(move);\r\n\t\tthis.chessGame.changeGameState();\r\n\t}", "GameState performMove(String guid, String username, int x, int y) throws GameStateException, GamePlayException;", "protected abstract void execute(final SimulationParameters params) throws TurnoverException;", "public void move(String direction);", "protected void execute() {\r\n\t//double leftSpeed = oi.leftUpAndDown();\r\n\tdouble leftSpeed = motorScalerLeft.scale(oi.leftUpAndDown() * fullSpeed);\r\n\tSmartDashboard.putNumber(\"debug\\\\leftSpeed\", leftSpeed);\r\n\t\r\n\t//double rightSpeed = oi.rightUpAndDown();\r\n\tdouble rightSpeed = motorScalerRight.scale(oi.rightUpAndDown() * fullSpeed);\r\n\tSmartDashboard.putNumber(\"debug\\\\rightSpeed\", rightSpeed);\r\n\t\r\n\ttheDrive.goVariable(-leftSpeed,-rightSpeed);\r\n }", "protected void execute() {\n \tRobot.driveSubsystem.runLeftSide(howFastWeWantToMove);\n }", "public void move(String direction) {\n \n }", "@Override\n\tpublic void excute() {\n\t\tmoveEvent.move(commandinfo.getValue() * 200);\n\t}", "public abstract void move(Position position);", "public void execute() {\r\n\t\tif(policy.moveByPolicy(level2d))\r\n\t\titem.move_up(level2d);\r\n\t\telse\r\n\t\t\tSystem.out.println(\"cant do the action\");\r\n\t\t\r\n\t}", "public abstract void move(int direction, double speed);", "@Override\n\tdefault void onExecution(Player player, Position start, Position end) {\n\n\t\tForceMovement forceMovement = new ForceMovement(player.getPosition(),\n\t\t\t\tnew Position(player.getX(), player.getY() - 3, player.getHeight()), 12, 2, Direction.SOUTH);\n\t\tWorld.schedule(new ForceMovementTask(player, 0, forceMovement, new Animation(5043)) {\n\t\t\t@Override\n\t\t\tprotected void onCancel(boolean logout) {\n\t\t\t\tsuper.onCancel(logout);\n\t\t\t\tWorld.schedule(new Task(1) {\n\t\t\t\t\tint ticks = 0;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void execute() {\n\t\t\t\t\t\tswitch (ticks++) {\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tplayer.move(new Position(player.getX(), player.getY(), player.getHeight() + 1));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\tplayer.move(end);\n\t\t\t\t\t\t\tcancel();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}", "abstract public void execute(Parameters p);", "public void move(){\n\t\t\n\t}", "public void move();", "public void move();", "public abstract void move(int deltaX, int deltaY);", "@Override\n public void startExecuting()\n {\n this.entity.getNavigator().tryMoveToXYZ(this.xPosition, this.yPosition, this.zPosition, this.speed);\n }", "@Override\r\n\tpublic void executeCommand(String command,Object arg) {\t\r\n\r\n\t\tswitch(command) {\r\n\t\tcase \"UP\" : moveUP();\r\n\t\tbreak;\r\n\t\tcase \"DOWN\" : moveDOWN();\r\n\t\tbreak;\r\n\t\tcase \"RIGHT\" : moveRIGHT();\r\n\t\tbreak;\r\n\t\tcase \"LEFT\" : moveLEFT();\r\n\t\tbreak;\r\n\t\t// computer's turn\r\n\t\tdefault : String arr[] = command.split(\",\");\r\n\t\tSETslot(Integer.parseInt( arr[0] ), Integer.parseInt( arr[1] ), Integer.parseInt(arr[2]));\r\n\t\tbreak;\r\n\t\t\r\n\t\t}\r\n\t}", "protected void execute() {\n \tRobot.driveTrain.arcadeNoConstants(MOVE_SPEED_PERCENT, Robot.driveTrain.gyroPReturn(direction));\n }", "public void move(int distance);", "public abstract Point move(Point position);", "@Override\n public void execute() {\n if (m_shooter.getTv() != 0.0) {\n double command = 0;\n if (m_shooter.getTx() > 5.0) {\n command = 1;\n } else if (m_shooter.getTx() < -5.0) {\n command = -1;\n } else if (Math.abs(m_shooter.getTx()) <= 1) {\n command = 0;\n } else {\n command = m_shooter.getTx() / 5.0;\n }\n if (m_shooter.getTy() <= -12) {\n command = command * 0.25;\n } else if (m_shooter.getTy() <= 0) {\n command = command * 0.5;\n }\n \n m_shooter.setManualTurretAngle(command * Constants.turretMovement);\n\n double hoodPosition = Constants.hoodSlope * m_shooter.getTy() + Constants.hoodIntercept;\n m_hood.setHoodPosition(hoodPosition); \n m_shooter.setShooterSpeed(Constants.shooterSpeedSlope * hoodPosition + Constants.shooterSpeedAtTwo);\n }\n \n }", "private void move(int dx, int dy) {\n }", "protected void execute() \n {\n \tRobot.ballManipSubsystem.setTopRollerToShootingSpeed();\n }", "void move(int dx, int dy);", "public void move() {\n\r\n\t}", "protected void execute() {\n \tif(Robot.robotState != Robot.RobotState.Climbing)\n \t\tRobot.shooter.speed(speed);\n }", "protected void execute() {\t\n \ttarget = Robot.trackingCamera.getTargetPosition();\n \t\n \tSmartDashboard.putNumber(\"targetX\", target[0]);\n \tSmartDashboard.putNumber(\"targetY\", target[1]);\n \t\n \tif(target[0] == TrackingCamera.NOTFOUND || lastDistance < 28){\n \t\tsuper.execute();\n \t\treturn;\n \t}\n \t\n \ttargetX = target[0];\n \ttargetY = target[1];\n \t\n \tsuper.execute();\n \t//System.out.println(distance);\n }", "public void move() { \n\t\tSystem.out.println(\"MOVING\");\n\t\tswitch(direction) {\n\t\t\tcase NORTH: {\n\t\t\t\tyloc -= ySpeed;\n\t\t\t}\n\t\t\tcase SOUTH: {\n\t\t\t\tyloc+= xSpeed;\n\t\t\t}\n\t\t\tcase EAST: {\n\t\t\t\txloc+= xSpeed;\n\t\t\t}\n\t\t\tcase WEST: {\n\t\t\t\txloc-= xSpeed;\n\t\t\t}\n\t\t\tcase NORTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase NORTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc+=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc+= ySpeed;\n\t\t\t}\n\t\t}\n\t}", "private void placeRobot(List<String> args) {\n int x;\n int y;\n Position.Direction direction;\n\n try {\n x = Integer.parseInt(args.get(0));\n y = Integer.parseInt(args.get(1));\n direction = Position.Direction.valueOf(args.get(2));\n } catch (NumberFormatException e) {\n System.out.println(\"x and y accept only numbers\");\n return;\n } catch (IllegalArgumentException e) {\n System.out.println(args.get(2) + \" looks an unsupported direction\");\n return;\n }\n\n if(x >= lowerBound.getX() && y >= lowerBound.getY() &&\n x <= upperBound.getX() && y <= upperBound.getY() ) {\n currentPosition.setX(x);\n currentPosition.setY(y);\n currentPosition.setDirection(direction);\n } else {\n System.out.println(\"Cannot position the robot outside the table\");\n }\n }", "public void act() \n {\n movement();\n }", "protected void execute() {\n \tdouble moveValue = -1.0;\n \t\n \tif (useSmoothing) {\n\t \tif (Robot.clawElevator.getContainerHeight() == 0) {\n\t \t\t// TODO Something or other\n\t \t} else {\n\t \t\tdouble percentError = Math708.getPercentError(Robot.clawElevator.getTravelDistance(), Constants.CLAW_ELEVATOR_DOWN_TRAVEL_DISTANCE[Math.abs(Robot.clawElevator.getContainerHeight() - 3)]);\n\t \t\t\n\t \t\tif (percentError <= 0.5) {\n\t \t\tmoveValue = Math708.makeWithin(percentError, moveValue, -Constants.CLAW_ELEVATOR_MOTOR_MINIMUM);\n\t \t}\n\t \t}\n \t}\n \t\n \tRobot.clawElevator.manualMove(moveValue);\n }", "@Override\n \t\t\t\tpublic void doMove() {\n \n \t\t\t\t}", "public void move(int delta);", "protected void execute() {\n \tif(oi.getButton(ControllerMap.operatorController, ControllerMap.convertToClimbMode) && DriverStation.getInstance().getMatchTime() < 30 && !DriverStation.getInstance().isAutonomous()) {\n \t\tleftSpeed = Math.abs(oi.getAxisDeadzonedSquared(ControllerMap.operatorController, ControllerMap.intakeAxis, 0.1));\n \t\trightSpeed = Math.abs(oi.getAxisDeadzonedSquared(ControllerMap.operatorController, ControllerMap.cubeStorageAxis, 0.1));\n \t\t\n \t\tclimber.ascend(leftSpeed, rightSpeed);\n \t}\n }", "public abstract void move( char direction );", "void move();", "void move(int steps);", "void executeMotion(Shape shape);", "void move(double dx, double dy);", "public void performUnitActionAt(Position p);", "public void move() {\n\n }", "@Override\n\tpublic void execute(String[] params) {\n\n\t}", "public abstract void move();", "public abstract void move();", "public abstract void move();", "public abstract void move();", "public abstract void move();", "public abstract void move();", "public abstract void move();", "public static void ApplyMovement(Position p, Direction d)\n {\n switch (d)\n {\n case East:\n p.X++;\n break;\n case North:\n p.Y--;\n break;\n case Northeast:\n p.X++;\n p.Y--;\n break;\n case Northwest:\n p.X--;\n p.Y--;\n break;\n case South:\n p.Y++;\n break;\n case Southeast:\n p.X++;\n p.Y++;\n break;\n case Southwest:\n p.X--;\n p.Y++;\n break;\n case West:\n p.X--;\n break;\n }\n }", "@Override\n protected void execute() {\n Robot.tapeAlignSys.enable();\n Robot.lidarAlignSys.enable();\n if (Robot.useDrive) {\n double joy_vals[] = Robot.oi.getJoyXYZ(joy);\n\n double x = joy_vals[0];\n double y = joy_vals[1] * m_forward_speed_limit;\n double z = joy_vals[2] * .5;\n\n if (!joy.getRawButton(5)) { // Button 5 is pid override\n // Get sensor feedback for strafe\n x = .5 * x + Robot.tapeAlignSys.get_pid_output();\n if (x > 1) { x = 1; }\n if (x < -1) { x= -1; }\n\n double distance = Robot.stormNetSubsystem.getLidarDistance();\n SmartDashboard.putNumber(\"Lidar distance (cm)\",distance);\n\n // Get Lidar alignment for Z axis\n// if (z < 100) { // only align if close\n// z = z + Robot.lidarAlignSys.get_pid_output();\n// if (z > 1) { z = 1; }\n// if (z < -1) { z= -1; }\n// }\n\n if (distance < m_distance_scale_factor) {\n // Modulate driver forward input\n if (y > 0 && distance < (m_target_distance + m_distance_scale_factor)) {\n y = y * ((distance - m_target_distance)/(m_distance_scale_factor)) ;\n if (y<0) y = 0;\n } \n }\t\n }\n Robot.drive.driveArcade(x,y,z);\n }\n }", "void excuteCommand(Command commandToExecute, String [] params);", "protected void execute() {\n\n\t\tspeed = oi.getLeftY();\n\n\t\tleftTicks = drive.getLeftRotation();\n\t\trightTicks = drive.getRightRotation();\n\n\t\t/*\n\t\t * if (startAngle == drive.getAngle()) { drive.setBoth(oi.getLeftY()); }\n\t\t * else if (startAngle < drive.getAngle()) { if (oi.getLeftY() > 0)\n\t\t * drive.setBoth(oi.getLeftY(), .9 * oi.getLeftY()); else drive.setBoth(\n\t\t * .9 * oi.getLeftY(),oi.getLeftY()); } else if (startAngle >\n\t\t * drive.getAngle()) { if (oi.getLeftY() > 0)\n\t\t * drive.setBoth(oi.getLeftY(), .9 * oi.getLeftY()); else\n\t\t * drive.setBoth(.9 * oi.getLeftY(), oi.getLeftY()); }\n\t\t */\n\t\tif (leftTicks == 0 || rightTicks == 0)\n\t\t\tdrive.setBoth(speed);\n\t\telse\n\t\t\tdrive.setBoth(MathUtil.setLimits((rightTicks / leftTicks) * speed, -1.0, 1.0),\n\t\t\t\t\tMathUtil.setLimits((leftTicks / rightTicks) * speed, -1.0, 1.0));\n\n\t}", "protected void execute() { \n\n double move = driveCommand.getValue();\n double turn = angleCommand.getValue();\n\n SmartDashboard.putNumber(\"move\", move);\n SmartDashboard.putNumber(\"turn\", turn);\n //add the values to the drive class\n Robot.drive.arcadeDrive(-move, turn);\n // Robot.drive.setMoveVisionAssist(move);\n // Robot.drive.setTurnVisionAssist(turn);\n }", "protected void execute() {\n\n\t\tdouble left = Robot.oi.driver.getRawAxis(Robot.dp.joystick1);\n\t\tdouble right = -Robot.oi.driver.getRawAxis(Robot.dp.joystick2);\n\t\t\n\t\tif (Robot.dp.dc == DriveControl.TANK) {\n\t\t\tRobot.Drivetrain.drive(left, -right);\n\t\t} else {\n\t\t\tif (Robot.dp == DriverConfig.RORY) {\n\t\t\t\tRobot.Drivetrain.drive(left, right * 0.75);\n\t\t\t} else {\n\t\t\t\tRobot.Drivetrain.drive(left, right);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "protected void execute() {\n \tRobot.DRIVE_SUBSYSTEM.tankDrive(expoDrive(RobotMap.DRIVE_EXPO_MIN,\n \t\t\t\t\t\t\t\t\t\t\t RobotMap.DRIVE_EXPO_DEADZONE,\n \t\t\t\t\t\t\t\t\t\t\t Robot.oi.getDriveLeftY(),\n \t\t\t\t\t\t\t\t\t\t\t RobotMap.DRIVE_EXPO_EXPO),\n \t\t\t\t\t\t\t\t\texpoDrive(RobotMap.DRIVE_EXPO_MIN,\n \t\t\t\t\t\t\t\t\t\t\t RobotMap.DRIVE_EXPO_DEADZONE,\n \t\t\t\t\t\t\t\t\t\t\t Robot.oi.getDriveRightY(),\n \t\t\t\t\t\t\t\t\t\t\t RobotMap.DRIVE_EXPO_EXPO));\n }", "public void move(Point p);", "protected void execute() {\n \n \n \torientation.updatePID(RobotMap.navx.getAngle());\n \tRobotMap.motorLeftOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() - speed));\n \tRobotMap.motorLeftTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() - speed));\n \t\n \tRobotMap.motorRightOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() + speed));\n \tRobotMap.motorRightTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() + speed));\n \tSystem.out.println(RobotMap.navx.getAngle()-desiredAngle);\n }", "protected void execute() {\n \tRobot.driveTrain.driveByArcade(_speed, 0);\n }", "@Override\n public void execute() {\n // finds goal and gets speed to turn\n double speed = vision.getPIDOfGoal();\n if (speed == -1000)\n return;\n\n // System.out.println(speed);\n drivetrain.tankDrive(speed, -speed);\n }", "@Override\n\tpublic void move(int xPos, int yPos) {\n\t}", "public void move(int x_pos1, int y_pos1)throws Exception{\n //check if its a legal move.\n if(isLegal(x_pos1, y_pos1)) {\n x_pos = x_pos1;\n y_pos = y_pos1;\n }\n else throw new Exception(\"Illegal move.\");\n }", "protected void execute() {\n \tif (m_moving)\n \t{\n \t\tdouble direction;\n \tif (Math.abs(Gyro.getYaw() - m_desiredYaw) < m_tolerance)\n \t{\n \t\tdirection = 0;\n \t\tm_moving = false;\n \t\tm_cameraThread = new CameraThread();\n \t\tm_cameraThread.start();\n \t\tRobot.getDriveBase().teleopDrive(0.0, 0.0);\n \t}\n \telse\n \t{\n\t \tif (Gyro.getYaw() < m_desiredYaw)\n\t \t{\n\t \t\tdirection = 1;\n\t \t}\n\t \telse\n\t \t{\n\t \t\tdirection = -1;\n\t \t}\n\t \t\n\t \tif (((Gyro.getYaw() - m_lastYaw) * direction) - (m_degreesPerSecond / 50) > m_intervalTolerance)\n\t \t{\n\t \t\tm_speed -= 0.05;\n\t \t}\n\t \telse if (((Gyro.getYaw() - m_lastYaw) * direction) - (m_degreesPerSecond / 50) < (m_intervalTolerance * -1))\n\t \t{\n\t \t\tm_speed += 0.05;\n\t \t}\n\t \t\n\t \tif (Math.abs((Gyro.getYaw() - m_lastYaw) + Gyro.getYaw() / Math.abs(m_desiredYaw)) >= m_percentDegreesToSlow)\n\t \t{\n\t \t\tm_speed -= 0.007;\n\t \t}\n\t \t\n\t \tif (m_speed < 0)\n\t \t{\n\t \t\tm_speed = 0.0;\n\t \t}\n\t \telse if (m_speed > 1)\n\t \t{\n\t \t\tm_speed = 1.0;\n\t \t}\n\t \t\n\t \tRobot.getDriveBase().teleopDrive(0.0, m_speed * direction);\n\t \tm_lastYaw = Gyro.getYaw();\n \t}\n \t}\n \telse\n \t{\n\t \tif (m_cameraThread.isAlive() == false)\n\t \t{\n\t \t\tif (m_cameraThread.weHaveAShot())\n\t \t\t{\n\t \t\t\tif (Gyro.getYaw() >= CameraThread.desiredLeftYaw() && Gyro.getYaw() <= CameraThread.desiredRightYaw())\n\t \t\t\t{\n\t \t\t\t\tm_onTarget = true;\n\t \t\t\t}\n\t \t\t\telse\n\t \t\t\t{\n\t \t\t\t\tm_desiredYaw = CameraThread.desiredCenterYaw();\n\t\t \t\t\tm_moving = true;\n\t \t\t\t}\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\tdouble pixels = m_cameraThread.shotAngleError();\n\t \t\t\t//m_desiredYaw = CameraThread.yawWhenPicture() - pixels * 54 / 640;\n\t \t\t\tm_desiredYaw = CameraThread.yawWhenPicture() - pixels * 0.075; //try with 61 / 640\n\t \t\t\tif (Math.abs(Gyro.getYaw() - m_desiredYaw) < m_tolerance)\n\t \t\t\t{\n\t \t\t\t\tm_onTarget = true;\n\t \t\t\t}\n\t \t\t\telse\n\t \t\t\t{\n\t \t\t\t\tm_moving = true;\n\t \t\t\t}\n\t \t\t}\n\t \t}\n \t}\n \tSmartDashboard.putNumber(\"Desired Yaw\", m_desiredYaw);\n \t\n \tSystem.out.println(\"speed: \" + m_speed);\n \tSystem.out.println(\"desired yaw: \" + m_desiredYaw);\n \tSystem.out.println(\"is moving: \" + m_moving);\n }", "public abstract double executeCommand(ArrayList<Unit> units);", "public void move() {\n process(2);\n }", "protected void execute() {\n \tRobot.debug.Update(Robot.lift.DebugMotionMagic());\n }", "protected void execute() {\n\n \n\n\n\n if (Robot.drive.gyroGetAngle() > m_autorotateangle) { // turn left\n if ( Math.abs(m_autorotateangle - Robot.drive.gyroGetAngle()) < rampthreshold ) {\n Robot.drive.setLeftSide(m_minspeed);\n Robot.drive.setRightSide(m_minspeed);\n } else {\n Robot.drive.setLeftSide(m_leftpower);\n Robot.drive.setRightSide(m_leftpower);\n }\n } else { // turn right\n if ( Math.abs(m_autorotateangle - Robot.drive.gyroGetAngle()) < rampthreshold ) {\n Robot.drive.setLeftSide(-m_minspeed);\n Robot.drive.setRightSide(-m_minspeed);\n } else {\n Robot.drive.setLeftSide(-m_leftpower);\n Robot.drive.setRightSide(-m_leftpower);\n }\n\n }\n\n \n\n \t//SmartDashboard.putNumber(\"NavX getYaw\", Robot.navX.getYaw());\n }", "protected void execute() {\n buttonOpenValue = Robot.m_oi_pilot.joystick.getRawButton(1);\n buttonCloseValue = Robot.m_oi_pilot.joystick.getRawButton(2);\n\n if(buttonOpenValue){\n direction = DoubleSolenoid.Value.kForward;\n }\n else if(buttonCloseValue){\n direction = DoubleSolenoid.Value.kReverse;\n }\n else{\n direction = DoubleSolenoid.Value.kOff;\n }\n //Robot.m_pneumatics.runSolenoid(direction);\n }", "public static void upos(Object... args) throws Exception {\n\t\tlogger.debug(\"Called 'upos' with args: {}\", Arrays.asList(args));\n\t\tif (args.length >= 2) {\n\t\t\t// identify scannables and the positions to move them to\n\t\t\tScannable[] scannables = new Scannable[args.length / 2];\n\t\t\tObject[] positions = new Object[args.length / 2];\n\t\t\tint j = 0;\n\t\t\tfor (int i = 0; i < args.length; i += 2) {\n\t\t\t\tif (args[i] instanceof Scannable) {\n\t\t\t\t\tscannables[j] = (Scannable) args[i];\n\t\t\t\t\tpositions[j] = args[i + 1];\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// send commands\n\t\t\tfor (int i = 0; i < j; i++) {\n\t\t\t\traiseDeviceExceptionIfPositionNotValid(scannables[i], positions[i]);\n\t\t\t\tscannables[i].asynchronousMoveTo(positions[i]);\n\t\t\t}\n\n\t\t\t// construct print out command\n\t\t\tString jythonCommand = \"print \\\"\\\\rMove in progress: \";\n\t\t\tfor (Scannable scannable : scannables) {\n\t\t\t\tjythonCommand += scannable.getName() + \":\\\" + str(\" + scannable.getName() + \".getPosition()\"\n\t\t\t\t\t\t+ \") + \\\" \";\n\t\t\t}\n\t\t\tjythonCommand = jythonCommand.substring(0, jythonCommand.length() - 5);\n\n\t\t\t// wait\n\t\t\ttry {\n\t\t\t\twhile (areAnyBusy(scannables)) {\n\t\t\t\t\tJythonServerFacade.getInstance().runCommand(jythonCommand);\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// print out exception, but carry on in this method\n\t\t\t\t// to report final positions\n\t\t\t\tlogger.info(\"Exception while waiting for move '{}' to finish: \", jythonCommand, e);\n\t\t\t}\n\n\t\t\tString output = \"Move completed: \";\n\t\t\tfor (int i = 0; i < j; i++) {\n\t\t\t\toutput += scannables[i].getName();\n\t\t\t\tObject position = scannables[i].getPosition();\n\t\t\t\tif (position != null) {\n\t\t\t\t\toutput += \":\" + position.toString() + \" \";\n\t\t\t\t}\n\t\t\t}\n\t\t\tInterfaceProvider.getTerminalPrinter().print(\"\\\\n\" + output);\n\t\t}\n\t}", "protected void execute() {\r\n OI.printToDS(0, \"Pos SetPoint: \" + driveTrain.getLeftPosSetpoint());\r\n OI.printToDS(1, \"Pos: \" + driveTrain.getLeftPos());\r\n //OI.printToDS(2, \"Gyro: \" + driveTrain.getGyro().getAngle());\r\n if (oi.getDriver().getRawAxis(6) > 0.5 && !dPadUp) {\r\n y += 0.25;\r\n dPadUp = true;\r\n } else if (oi.getDriver().getRawAxis(6) < - 0.5 && !dPadDown) {\r\n y -= 0.25;\r\n dPadDown = true;\r\n }else if(Math.abs(oi.getDriver().getRawAxis(6)) < 0.5 ){\r\n dPadUp = false;\r\n dPadDown = false;\r\n }\r\n if (oi.getDriver().getRawAxis(6) > 0.5) {\r\n y += 0.1;\r\n } else if (oi.getDriver().getRawAxis(6) < -0.5) {\r\n y -= 0.1;\r\n } else if (oi.getDriver().getRawAxis(5) < -0.5) {\r\n x += 0.05;\r\n } else if (oi.getDriver().getRawAxis(5) > 0.5) {\r\n x -= 0.05;\r\n }\r\n driveTrain.setRightPos(y - x);\r\n driveTrain.setLeftPos(y + x);\r\n }", "public interface Command {\r\n \r\n /** set the coordinates of the mouse down event;\r\n * where the image is moved FROM.\r\n * @param fromX x coordinate of mouse \r\n * @param fromY y coordinate of mouse\r\n */\r\n public void setFromCoordinates(int fromX, int fromY);\r\n\r\n /** set the coordinates of the mouse up event;\r\n * where the image is moved TO.\r\n * @param toX x coordinate of mouse \r\n * @param toY y coordinate of mouse\r\n */\r\n public void setToCoordinates(int toX, int toY);\r\n \r\n /** execute encapsulates the method call on the board game. \r\n * NOTE: it is this method's responsibility return false\r\n * in case the given from and to coordinates cannot\r\n * be translated into a meaningful board game invokation\r\n * and in this case return false. Example: moving a\r\n * piece outside the board may translate into calling\r\n * a game's move method with a null parameter which\r\n * will next generate a null pointer exception in the\r\n * game logic.\r\n * @return false if the action, typically a move, is illegal\r\n * in the board game. \r\n * */\r\n public boolean execute();\r\n}", "public abstract void move(int row, int col) throws IllegalMoveException;", "abstract void move();", "public void move(Entity player, int movement) {\n\n int id = player.getId();\n\n displacement(player, movement, id);\n\n\n }", "public void move() {\n\t\tmoveX();\n\t\tmoveY();\n\t}", "public abstract void execute(Player p);", "private void executeMove(Move move, char symbol) {\n if (this.isValidMove(move) == 'V') {\n this.board[move.row][move.col] = symbol;\n }\n }", "public void move() {\r\n posX += movementX;\r\n posY += movementY;\r\n anchorX += movementX;\r\n anchorY += movementY;\r\n }", "protected void execute() {\n if (oi.getButton(1,3).get()){\n speedModifier = 0.6;\n }\n else if(oi.getButton(2,3).get()){\n speedModifier = 1;\n }\n else if(oi.getButton(1,2).get()&&oi.getButton(2, 2).get()){\n speedModifier = 0.75;\n }\n chassis.tankDrive((oi.getJoystick(1).getAxis(Joystick.AxisType.kY)*speedModifier), (oi.getJoystick(2).getAxis(Joystick.AxisType.kY)*speedModifier));\n //While no triggers are pressed the robot moves at .75 the joystick input\n }", "protected void execute() {\n \t// Scales the speed based on a proportion of ideal voltage over actual voltage\n \tRobot.shooter.talon.set(0.59 * (12.5 / Robot.pdp.getVoltage()));\n// \tRobot.shooter.talon.enable();\n// \tRobot.shooter.talon.set(Shooter.IDEAL_SPEED * (12.5 / Robot.pdp.getVoltage()));\n }", "protected void execute() {\n\t\tthrottle = getThrottle();\n\t\tturn = getCorrectTurnValue();\n\t\tforward = getForward();\n\t\tright = (forward - turn) * throttle;\n\t\tleft = (forward + turn) * throttle;\n\n\t\tRobot.driveTrain.driveManual(right, left);\n\t\tif (Robot.oi.bShiftUp.get()) {\n\t\t\tRobot.driveTrain.shiftToHigh(true);\n\t\t} else if (Robot.oi.bShiftDown.get()) {\n\t\t\tRobot.driveTrain.shiftToHigh(false);\n\t\t}\n\t}", "public abstract void move(int elapsedTime);", "public void move()\n {\n x = x + unitVector.getValue(1)*speed;\n y = y + unitVector.getValue(2)*speed;\n }", "public void move() {\n if(Objects.nonNull(this.position)) {\n Position position = this.getPosition();\n Function<Position, Position> move = moveRobotInDirectionMap.get(position.getDirection());\n this.position = move.apply(position);\n }\n }", "void move(IntVector delta);", "@Override\n\tprotected void execute() {\n\t\tif(Robot.clawSubsystem.clawGetState() == Value.kForward) {\n\t\t\t// If we aren't already, retract\n\t\t\tRobot.clawSubsystem.clawClose();\n\t\t\ttry {\n\t\t\t\t// wait 5 seconds\n\t\t\t\tSystem.out.println(\"Waiting and trying to move\");\n\t\t\t\t//Thread.sleep(5000);\t\t\t\t\t\t\t\t\t//Blocking Method @TODO replace with sensor/ nonblocking method\n\t\t\t} finally {\n\t\t\t\tSystem.out.println(\"Done\");\n\t\t\t\tdone = true;\n\t\t\t}\n\t\t}\n\t\t// check if solenoid is retracted\n\t\telse if (Robot.clawSubsystem.clawGetState() == Value.kReverse) {\n\t\t\t// If we aren't already, extend\n\t\t\tRobot.clawSubsystem.clawOpen();\n\t\t\ttry {\n\t\t\t\t// wait 5 seconds\n\t\t\t\tSystem.out.println(\"Waiting and trying to move\");\n\t\t\t\t//Thread.sleep(5000);\t\t\t\t\t\t\t\t\t//Blocking Method @TODO replace with sensor/ nonblocking method\n\t\t\t} finally {\n\t\t\t\tSystem.out.println(\"Done\");\n\t\t\t\tdone = true;\n\t\t\t}\n\t\t}\n\t\t//If we are neither extended nor retracted, leave it alone\n\t\telse {\n\t\t\tSystem.out.println(\"What?\");\n\t\t}\t \n\t}", "public void testMove() throws RepositoryException{\n String src = \"src\";\n String dest=\"dest\";\n \n session.move(src, dest);\n sessionControl.replay();\n sfControl.replay();\n \n jt.move(src, dest);\n }", "private void move() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n int newX = -1;\n int newY = -1;\n switch (direction) {\n case EAST:\n newX = currentPosition.getX() + 1;\n newY = currentPosition.getY();\n break;\n case WEST:\n newX = currentPosition.getX() - 1;\n newY = currentPosition.getY();\n break;\n case NORTH:\n newX = currentPosition.getX();\n newY = currentPosition.getY() + 1;\n break;\n case SOUTH:\n newX = currentPosition.getX();\n newY = currentPosition.getY() - 1;\n break;\n }\n\n if(newX < lowerBound.getX() || newY < lowerBound.getY()\n || newX > upperBound.getX() || newY > upperBound.getY()) {\n System.out.println(\"Cannot move to \" + direction);\n return;\n }\n\n currentPosition.setX(newX);\n currentPosition.setY(newY);\n }", "public void move() throws InstructionExecutionException\r\n\t{\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tStreet street=this.getHeadingStreet();\r\n\t\t\tif(street==null){\r\n\t\t\t\tString err=\"WALL·E says: There is no street in direction \"+this.getCurrentHeading();\r\n\t\t\t\tif(isSwing()){\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, err);\r\n\t\t\t\t}\r\n\t\t\t\tthrow new InstructionExecutionException(err);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tPlace nextPlace=street.nextPlace(this.currentPlace);\r\n\t\t\tif (street.isOpen()){\r\n\t\t\t\tthis.currentPlace=nextPlace;\r\n\t\t\t\tif(isSwing()){\r\n\t\t\t\t\tthis.navigationPanel.updateCell(currentDirection, nextPlace);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tString err=\"WALL·E says: Arrggg, there is a street but it is closed!\";\r\n\t\t\t\tif(isSwing()){\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, err);\r\n\t\t\t\t}\r\n\t\t\t\tthrow new InstructionExecutionException(err);\r\n\t\t\t}\r\n\t\t}catch (Exception e){\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}", "public void move(){\n x+=xDirection;\n y+=yDirection;\n }", "public abstract void move(Point point);", "public void move(FightCell cell);", "protected void execute() {\n \tdrivemotors.tankDrive(leftMotor,rightMotor);\n }", "void execute(Combat combat, Unit source, Unit target);" ]
[ "0.73254716", "0.65731466", "0.6541499", "0.6437066", "0.6402536", "0.6366752", "0.63661057", "0.6320575", "0.63010246", "0.62764657", "0.62314653", "0.6202804", "0.61743903", "0.6097824", "0.60693896", "0.6020431", "0.59992206", "0.5986586", "0.5976058", "0.5976058", "0.5974107", "0.5973335", "0.5971005", "0.5947887", "0.5937489", "0.59333134", "0.5931475", "0.5930969", "0.59225416", "0.59072024", "0.5905928", "0.5895088", "0.5882306", "0.5875826", "0.58677393", "0.5861045", "0.5851041", "0.5850486", "0.58458424", "0.58356774", "0.5829758", "0.58263695", "0.5823535", "0.5821951", "0.58160263", "0.5797956", "0.5790036", "0.57831955", "0.5779818", "0.5779818", "0.5779818", "0.5779818", "0.5779818", "0.5779818", "0.5779818", "0.5772408", "0.57671666", "0.5766059", "0.5763593", "0.57509816", "0.5749199", "0.57489234", "0.57311106", "0.57234937", "0.5718576", "0.5718134", "0.5717081", "0.57134664", "0.57130075", "0.571131", "0.57110566", "0.5700314", "0.5695048", "0.5691647", "0.56889117", "0.5688268", "0.5687545", "0.568593", "0.5662094", "0.5661921", "0.56593907", "0.5657501", "0.56549364", "0.5652517", "0.56387156", "0.5637386", "0.56319463", "0.5629394", "0.56253403", "0.5622606", "0.56216985", "0.5615041", "0.5606506", "0.5601156", "0.5600348", "0.5599581", "0.55989546", "0.55951077", "0.5591064", "0.55883276" ]
0.56583816
81
Make transfer in normal execution mode (logs the transfer operations table and updates the accounts balance accounts table)
public int makeTransfer(int tr_amount, int from_account, int to_account, int from_final_balance, int to_final_balance) { int generated_id = 0; try { operationLock.lock(); executeTransfer(generated_id = currentOperationId++, tr_amount, from_account, to_account, from_final_balance, to_final_balance, rawDataSource.getConnection()); } catch (SQLException e) { e.printStackTrace(); } finally { operationLock.unlock(); } updateBalance(from_account, from_final_balance); updateBalance(to_account, to_final_balance); return generated_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void transferBalnace() {\n\t\tSystem.out.println(\"balance is transferd\");\n\t}", "public void transferMoney() {\n\t\tSystem.out.println(\"HSBC---transferMoney\");\n\t}", "public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "public void transact() {\n\t\truPay.transact();\n\n\t}", "@Override\n public int execute() throws InterruptedOperationException, CancelOperationException {\n Logger logger = Log4j.getLogger();\n int success = 0;\n try {\n String accountNumber = null;\n BigDecimal amount = BigDecimal.ONE;\n Transaction transaction;\n LocalDateTime now;\n String userId = BankApp.getCurrentUser().getUserId();\n List<String> accountNumbers = accountDao.getAccountNumbers(userId);\n ConsoleHelper.println(\"\");\n ConsoleHelper.displayMenuBanner();\n ConsoleHelper.printlnWithTab(\"[DEPOSIT]\");\n ConsoleHelper.printAccountList();\n\n boolean isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Into: \");\n String input = ConsoleHelper.readString();\n for (int i = 1; i <= accountNumbers.size(); i++) {\n if (input.equals(String.valueOf(i))) {\n accountNumber = accountNumbers.get(i - 1);\n isValidInput = true;\n break;\n }\n }\n\n } while (!isValidInput);\n\n isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Amount: \");\n String input = ConsoleHelper.readString();\n try {\n double inputValue = Double.parseDouble(input);\n amount = BigDecimal.valueOf(inputValue);\n int decimalPlaces = ConsoleHelper.getNumberOfDecimalPlaces(amount);\n if (decimalPlaces == 0 && amount.compareTo(BigDecimal.valueOf(0)) > 0) {\n isValidInput = true;\n } else {\n ConsoleHelper.printlnWithTab(\"Invalid amount, we only accept whole number deposit.\");\n }\n } catch (NumberFormatException e) {\n // the amount format is not valid\n }\n } while (!isValidInput);\n\n int countAccount = accountDao.deposit(accountNumber, amount);\n now = LocalDateTime.now();\n Account account = accountDao.getAccount(accountNumber);\n transaction = new Transaction(TransactionType.DEPOSIT, userId, now, amount, account);\n int countTransaction = transactionDao.addTransaction(transaction);\n success = countAccount == 1 && countTransaction == 1 ? 1 : 0;\n if (success == 1) {\n ConsoleHelper.printlnWithTab(\"Deposit completed.\");\n ConsoleHelper.println(\"\");\n } else {\n ConsoleHelper.printlnWithTab(\"System failure, deposit cancelled. Please try later.\");\n }\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n logger.error(\"Interrupted Exception when thread sleep\", e);\n }\n } catch (CancelOperationException e) {\n // do nothing, allow user to return to main menu\n }\n return success;\n }", "public void executeTransfer(int op_id, int tr_amount, int from_account, int to_account, int from_final_balance,\n int to_final_balance, Connection con) throws SQLException {\n\n PreparedStatement stmt = con.prepareStatement(\n \"insert into OPERATIONS (OP_ID, OP_TYPE, MV_AMOUNT, FROM_ACCOUNT_ID, TO_ACCOUNT_ID, FROM_CURRENT_BALANCE, \" +\n \"TO_CURRENT_BALANCE, TIMESTAMP) values (?,?,?,?,?,?,?,?)\");\n\n stmt.setInt(1, op_id);\n stmt.setInt(2, OP_TYPES.valueOf(\"TRANSFER\").ordinal()+1);\n stmt.setInt(3, tr_amount);\n stmt.setInt(4, from_account);\n stmt.setInt(5, to_account);\n stmt.setInt(6, from_final_balance);\n stmt.setInt(7, to_final_balance);\n stmt.setTimestamp(8, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n }", "@Override\t\n\t@Transactional\n\tpublic Boolean transferMoney(TransferDto transferData) throws Exception {\n\t\t\n\t\tUser targetUser = userDao.findByUsername(transferData.getTargetUser().getUsername());\n\t\t\n\t\tBalanceDto balanceData = transferData.getBalance();\n\t\t\n\t\t\n\t\tbalanceData.setType(AccountTransactionType.SUBTRACT);\n\t\t\n\t\taddSubtractBalance(balanceData);\n\t\n\t\tbalanceData.setType(AccountTransactionType.ADD);\n\t\t\n\t\tbalanceData.setAccount(transferData.getTargetAccount());\n\t\t\n\t\t\n\t\taddSubtractBalanceByUser(targetUser, balanceData);\n\t\t\n\t\t\n\t\treturn true;\n\t}", "public static void main(String[] args) {\n AccountRepository accountRepository=new JdbcAccountRepository();\n TransferServiceImpl transferService = new TransferServiceImpl(accountRepository);\n\n // use phase\n transferService.transfer(1000.00, \"1\", \"2\");\n System.out.println();\n transferService.transfer(1000.00, \"2\", \"1\");\n\n\n // destroy phase\n transferService = null;\n\n\n }", "@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}", "public void executeTransaction(Transaction transaction) {\n logger.info(\"Execute money transaction: {}\", transaction);\n validateTransaction(transaction);\n transferHKD(transaction);\n }", "@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}", "@Override\r\n\tpublic boolean transferAmnt(int toAccNo, double money)\r\n\t\t\tthrows EwalletException {\n\t\tAccount ftTemp =new Account();\r\n\t\tif(temp.getCustBal()>=money) {\r\n\t\tftTemp = dao.loginuser(toAccNo);\r\n\t\tif(ftTemp!=null)\r\n\t\t{\r\n\t\t\tftTemp.setCustBal(ftTemp.getCustBal()+money);\r\n\t\t\ttemp.setCustBal(temp.getCustBal()-money);\r\n\t\t\ttemp.settDetails(\"Date :\"+tDate+\" Amount Transfered :\"+money+\" To Acc No: \"+ftTemp.getAccNum()+\" Total Balance :\"+temp.getCustBal());\r\n\t\t\tftTemp.settDetails(\"Date :\"+tDate+\" Depsoited Amount :\"+money+\" From Acc No: \"+temp.getAccNum()+\" Total Balance :\"+ftTemp.getCustBal());\r\n\t\t\tdao.updatedetails(temp.getAccNum(), temp);\r\n\t\t\tdao.updatedetails(ftTemp.getAccNum(), ftTemp);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\telse if(temp.getCustBal()<money)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Low Balance to transfer\");\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t\tSystem.out.println(\"No such user account\");\r\n\t\treturn false;\r\n\t}", "public boolean makeTransfer(int originAccNo, int targetAccNo, float amount) {\n Account origAccount = getAccountByAccountNo(originAccNo);\n Account targetAccount = getAccountByAccountNo(targetAccNo);\n if (checkIfEnough(origAccount, amount)) {\n origAccount.setBalance(origAccount.getBalance() - amount);\n targetAccount.setBalance(targetAccount.getBalance() + amount);\n //update the two accounts after the transaction\n saveOrUpdate(origAccount);\n saveOrUpdate(targetAccount);\n //save transaction to database with current timestamp\n Transaction transaction = new Transaction();\n transaction.setAccountNo(originAccNo);\n transaction.setTime(new Timestamp(new Date().getTime()));\n transaction.setType(\"transfer from\");\n transactionRepository.save(transaction);\n Transaction transaction2 = new Transaction();\n transaction2.setAccountNo(targetAccNo);\n transaction2.setTime(new Timestamp(new Date().getTime()));\n transaction2.setType(\"transfer to\");\n transactionRepository.save(transaction2);\n\n return true;\n } else {\n return false;\n }\n }", "void transfer(BankAccount x,double amt)\n\t{\n\t\tSystem.out.println(\"transferring the amount\");\n\t\twithdraw(amt);\n\t\tx.deposit(amt);\n\t\tSystem.out.println(\"transfer done successfully! \");\n\t}", "public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}", "public void transferToChecking(double amount){\n withdrawSavings(amount);\r\n depositChecking(amount);\r\n }", "public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;", "@PostMapping(value = \"/transfer\")\n public ResponseEntity<ResponseWrapper> transfer(@RequestBody AccountWrapper accountWrapper) {\n ResponseWrapper wrapper =new ResponseWrapper();\n UserAccount userAccount = userAccountRepository.findByAccountNumber(accountWrapper.getAccountNumber());\n if(Objects.isNull(userAccount)){\n wrapper.setMessage(\"Account With that account number does not exist\");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n\n if (userAccount.getAmount() < accountWrapper.getAmount()) {\n wrapper.setMessage(\"Amount in your account is less than the amount you want to transfer \");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n\n //crediting the other user account\n UserAccount userAccount2 = userAccountRepository.findByAccountNumber(accountWrapper.getTransfer_accountNumber());\n if(Objects.isNull(userAccount2)){\n wrapper.setMessage(\"Account To Transfer With that account number does not exist\");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n Float amount = userAccount2.getAmount() + accountWrapper.getAmount();\n userAccount2.setAmount(amount);\n userAccountRepository.save(userAccount2);\n\n //debit the user transferring money\n float amount1 = userAccount.getAmount() - accountWrapper.getAmount();\n userAccount.setAmount(amount1);\n userAccountRepository.save(userAccount);\n\n accountTransactionService.saveTransaction(new AccountTransaction(TRANSFER,accountWrapper.getAccountNumber(),\"Transferring Money\",\n accountWrapper.getAmount(),accountWrapper.getTransfer_accountNumber(),userAccount.getUserID()));\n wrapper.setData(\"Amount transfered successfully\");\n\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }", "public void nonSyncdeposit(double amount)\r\n\t {\r\n\t if(amount<0){//if deposit amount is negative\r\n\t \t System.out.println(\"Invalid amount cannot deposit\");\r\n\t }\r\n\t else{ //logic to deposit amount\r\n\t\t System.out.print(\"Depositing \" + amount);\r\n\t double newBalance = balance + amount;\r\n\t System.out.println(\", new balance is \" + newBalance);\r\n\t balance = newBalance;\r\n\t }\r\n\t }", "@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }", "void sendTransaction(IUserAccount target, ITransaction trans, IUserAccount user);", "private void transferToBankAccount() {\n ArrayList<Coin> selectedCoins;\n String collection;\n mGoldAmount = 0.0;\n mBankTransferTotal = 0;\n\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n selectedCoins = getSelectedCoins(Data.COLLECTED);\n collection = Data.COLLECTED;\n // Impose 25 coin limit\n if (selectedCoins.size() > (25 - Data.getCollectedTransferred())) {\n displayToast(getString(R.string.msg_25_coin_limit));\n return;\n }\n } else {\n selectedCoins = getSelectedCoins(Data.RECEIVED);\n collection = Data.RECEIVED;\n }\n\n if (selectedCoins.size() == 0) {\n displayToast(getString(R.string.msg_please_select_coins));\n return;\n }\n\n // Transfer selected coins to bank account\n mBankTransferInProgress = true;\n mProgressBar.setVisibility(View.VISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer in progress...\");\n\n for (Coin c : selectedCoins) {\n double value = c.getValue();\n String currency = c.getCurrency();\n double exchange = value * mExchangeRates.get(currency);\n mGoldAmount += exchange;\n Data.removeCoinFromCollection(c, collection, new OnEventListener<String>() {\n\n @Override\n public void onSuccess(String string) {\n mBankTransferTotal++;\n Log.d(TAG, \"[transferToBankAccount] number processed: \" + mBankTransferTotal);\n // If all coins have been processed\n if (mBankTransferTotal == selectedCoins.size()) {\n\n // Get current date\n LocalDateTime now = LocalDateTime.now();\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\n \"yyyy/MM/dd\", Locale.ENGLISH);\n String date = format.format(now);\n\n // Add transaction to firebase\n Transaction transaction = new Transaction(mGoldAmount, date);\n Data.addTransaction(transaction, mBankTransferTotal, collection);\n\n // Clear transfer flag\n mBankTransferInProgress = false;\n\n // Update the view\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n updateCollectedView();\n } else {\n updateReceivedView();\n }\n mProgressBar.setVisibility(View.INVISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer complete\");\n displayToast(getString(R.string.msg_transfer_complete));\n }\n }\n\n @Override\n public void onFailure(Exception e) {\n mBankTransferTotal++;\n // If all coins have been processed\n if (mBankTransferTotal == selectedCoins.size()) {\n\n // Clear transfer flag\n mBankTransferInProgress = false;\n mProgressBar.setVisibility(View.INVISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer failed\");\n\n // Update the view\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n updateCollectedView();\n } else {\n updateReceivedView();\n }\n\n } else {\n displayToast(getString(R.string.msg_failed_to_transfer) + c.getCurrency()\n + \" worth \" + c.getValue());\n }\n Log.d(TAG, \"[sendCoins] failed to transfer coin: \" + c.getId());\n }\n });\n }\n }", "@Override\n public boolean transfer(Account from, Account to, BigDecimal amount) {\n return false;\n }", "@Override\n public void transfer(int fromId, int toId, long amount) {\n synchronized (accounts.get(fromId)){\n synchronized (accounts.get(toId)){\n try {\n accounts.get(fromId).withdraw(amount);\n accounts.get(toId).deposit(amount);\n } catch (InsufficientFundsException e) {\n //Swallow the error and do nothing\n }\n\n }\n }\n }", "public void transfer(double amount, checkingAccount cAccount)throws InsufficientFundsException{\n if (isFrozen == true){\n return;\n }\n if (UserAccount.isAmountValid(amount) == false){\n throw new IllegalArgumentException(\"Amount entered is not possible to be deposited\");\n }\n else if (amount > balance){\n throw new InsufficientFundsException(\"Not enough money\");\n }\n else{\n balance -= amount;\n cAccount.balance += amount;\n savingTransactions[arrayLocation] = \"Transfer from savings account into checkings account of the amount: \" + String.valueOf(amount);\n arrayLocation++;\n }\n }", "@Override\r\n\tpublic void transferMoney() {\n\t\tSystem.out.println(\"Core Method of GGChild\");\r\n\t}", "@Test\n public void customerCanPerformTransferBetweenAccounts() {\n String ownerId = \"ownerId\";\n Account accountFrom = AccountFactory.createAccount(AccountFactory.AccountType.SAVINGS, ownerId);\n Account accountTo = AccountFactory.createAccount(AccountFactory.AccountType.SAVINGS, ownerId);\n\n // Put some money in the from account\n Transaction transaction = new Transaction.Builder().setDescription(\"Test\").setAmount(DollarAmount.fromInt(100)).setType(Transaction.Type.DEPOSIT).build();\n accountFrom.applyTransaction(transaction);\n assertEquals(accountFrom.getAccountBalance(), DollarAmount.fromInt(100));\n\n // Attempt transfer\n Account.transfer(accountFrom, accountTo, DollarAmount.fromInt(30));\n\n // Assert transfer was successful\n assertEquals(DollarAmount.fromInt(70), accountFrom.getAccountBalance());\n assertEquals(DollarAmount.fromInt(30), accountTo.getAccountBalance());\n }", "@Override\n\tpublic void process(TransferOperation operation, Services service) throws OperationException, AccountException {\n\t\tservice.deposit(operation.getTargetIban(), operation.getValue());\n\t\t\n\t\t// Set the next state\n\t\tif (service.diffBanks(operation.getSourceIban(), operation.getTargetIban())) {\n\t\t\toperation.setState(new Deposited());\n\t\t} else {\n\t\t\toperation.setState(new Completed());\n\t\t}\n\t}", "@Override\r\n\tpublic void realizarTransacción() {\n\t\tSystem.out.println(\"Transaccion en progreso\");\r\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tint fromAccountId = Integer.parseInt(fromAccount.getSelectedItem().toString());\n\t\t\tint toAccountId = Integer.parseInt(toAccount.getSelectedItem().toString());\n\t\t\tfloat amountTransfer = Float.parseFloat(transferAmount.getText());\n\t\t\tFloat balance = ATMOptionUtility.getBalanceFromAccountId(fromAccountId);\n\n\t\t\tif (fromAccountId == toAccountId) {\n\t\t\t\tJOptionPane.showMessageDialog(frame, \"Illegal transfer. Cannot pick two same accounts.\");\n\t\t\t} else if (amountTransfer > 2000){\n\t\t\t\tJOptionPane.showMessageDialog(frame, \"Illegal transfer. Cannot transfer more than $2000.\");\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tif (ATMOptionUtility.checkEnoughBalance(fromAccountId, amountTransfer)) {\n\t\t\t\t\t\tATMOptionUtility.subtractMoneyToAccountId(fromAccountId, amountTransfer);\n\t\t\t\t\t\tATMOptionUtility.addMoneyToAccountId(toAccountId, amountTransfer);\n\t\t\t\t\t\tATMOptionUtility.addToTransactionsTable(\"Transfer\", ssn, fromAccountId, toAccountId, amountTransfer);\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"Transfer succeeded.\");\n\t\t\t\t\t\tif(balance - amountTransfer <= 0.01) {\n\t\t\t\t\t\t\tString closeAccount = \"UPDATE CR_ACCOUNTS SET ISCLOSED = 1 WHERE ACCOUNTID = \" + fromAccountId;\n\t\t\t\t\t\t\tint numRowsUpdated = Application.stmt.executeUpdate(closeAccount);\n\t\t\t\t\t\t\tassert(numRowsUpdated == 1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tBankTellerUtility.showPopUpMessage(\"Since your account: \" + fromAccountId + \" balance was less than or \"\n\t\t\t\t\t\t\t\t\t+ \"equal to $0.01, your account was closed.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"You don't have enough to make this transaction.\");\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void execute() {\n\t\t// get references to bank database and screen\n\t\tatmg.BankDatabase bankDatabase = getBankDatabase();\n\n\t\t// get the available balance for the account involved\n\t\tdouble availableBalance = bankDatabase.getAvailableBalance(getAccountNumber());\n\n\t\t// get the total balance for the account involved\n\t\tdouble totalBalance = bankDatabase.getTotalBalance(getAccountNumber());\n\n\t\t// display the balance information on the screen\n\t\tint input = JOptionPane.showOptionDialog(null,\n\t\t\t\t\"\\nBalance Information:\" + \"\\n\" + \" - Available balance: \" + availableBalance + \"\\n - Total balance:\"\n\t\t\t\t\t\t+ totalBalance + \"\\n\\n\",\n\t\t\t\tnull, JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null,\n\t\t\t\tnew String[] { \"OK\"}, \"default\");\n\t\tif (input == JOptionPane.OK_OPTION) {\n\t\t\t\n\n\t\t} else {\n\t\t\t//windowT.disable();\n\t\t}\n\n\t}", "@Override\n public void executeAction(IData mainTrade) throws Exception\n {\n String userId = mainTrade.getString(\"USER_ID\");\n String userIdA = mainTrade.getString(\"RSRV_STR2\");\n UserInfoQry.updateTrunkByUserId(userId, userIdA);\n\n }", "public void transferMoney(int customerAccountId, int accountId) throws SQLException {\n // check if the customer has this account\n boolean customerOwnsAccount = false;\n for (int i = 0; i < this.currentCustomer.getAccounts().size(); i++) {\n if (customerAccountId == this.currentCustomer.getAccounts().get(i).getId()) {\n customerOwnsAccount = true;\n break;\n }\n }\n // it is safe to proceed since the customer accounts have been authenticated\n if (customerOwnsAccount) {\n Account customerAccount = DatabaseSelectHelper.getAccountDetails(customerAccountId);\n // try and catch for valid input (int) expected\n try {\n System.out.println(\"Enter amount you wish to transfer:\");\n // take user input as a big decimal\n BigDecimal bigAmount = new BigDecimal(br.readLine());\n if (bigAmount.compareTo(customerAccount.getBalance()) <= 0) {\n // try to update accounts\n try {\n // update the account which received money in database\n DatabaseUpdateHelper.updateAccountBalance(\n bigAmount.add(DatabaseSelectHelper.getBalance(accountId)), accountId);\n // update account which transfered money in database\n DatabaseUpdateHelper.updateAccountBalance(\n customerAccount.getBalance().subtract(bigAmount), customerAccountId);\n // update the customer object for printing reasons for other options\n this.currentCustomer.updateAccounts();\n // Explicitly tell user money is transfered\n System.out.println(\"you have successfully transfered money to account \" + accountId);\n \n } catch (Exception e) {\n System.out.println(\"The account ID you wish to transfer money to does not exist\");\n }\n // error printing\n } else {\n System.out.println(\"This account does not have enough money to send this amount\");\n }\n \n } catch (Exception e) {\n System.out.println(\"Invalid amount\");\n }\n // error printing\n } else {\n System.out.println(\"You do not have access to this account\");\n }\n \n }", "public Account doMoneyTransfer(MoneyTransferDTO moneyTransferDTO, Long id) {\n Account origin = accountService.getAccountById(id);\n Account destination = accountService.getAccountById(moneyTransferDTO.getToAccountId());\n\n // check for fraud detection\n //fraudDetectionService.checkMoneyTransfer(origin, moneyTransferDTO);\n fraudDetectionService.checkMoneyTransferV2(origin, moneyTransferDTO);\n\n // check enough funds in origin account\n BigDecimal currentBalance = origin.getBalance().getAmount();\n BigDecimal transferAmount = moneyTransferDTO.getAmount();\n if (transferAmount.compareTo(currentBalance) > 0)\n throw new ResponseStatusException(HttpStatus.BAD_REQUEST, \"Amount exceeds balance of the account\");\n\n // check if penalty fee has to be deducted later\n BigDecimal result = currentBalance.subtract(transferAmount);\n boolean applyPenaltyFee =\n currentBalance.compareTo(origin.getMinimumBalance().getAmount()) > 0 &&\n result.compareTo(origin.getMinimumBalance().getAmount()) < 0;\n\n // make the transaction\n Transaction transaction = new Transaction(new Money(transferAmount));\n transaction.setType(Type.MONEY_TRANSFER);\n transaction.setFromAccount(origin);\n transaction.setToAccount(destination);\n //transaction.setAmount(new Money(transferAmount));\n transaction.setAuthorName(moneyTransferDTO.getName());\n transaction.setDescription(moneyTransferDTO.getDescription());\n Transaction newTransaction = transactionService.addTransaction(transaction);\n\n // deduct penalty fee with another transaction if needed\n if (applyPenaltyFee) {\n\n Transaction deductionTransaction = new Transaction(origin.getPenaltyFee());\n transaction.setType(Type.PENALTY_FEE);\n deductionTransaction.setFromAccount(origin);\n //deductionTransaction.setToAccount(null);\n //deductionTransaction.setAmount(origin.getPenaltyFee()); // set amount before accounts\n deductionTransaction.setAuthorName(moneyTransferDTO.getName());\n deductionTransaction.setDescription(\"Penalty fee deduction\");\n transactionService.addTransaction(deductionTransaction);\n }\n\n return accountService.saveAccount(origin);\n }", "@Test\n public void processTestA()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n //pass transaction\n trans = new Transaction(acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),300);\n\n Assert.assertEquals(true,trans.process());\n }", "public boolean recoverTransfer(int op_id, int tr_amount, int from_account, int to_account, int from_final_balance,\n int to_final_balance, Connection con){\n try {\n executeTransfer(op_id, tr_amount, from_account, to_account, from_final_balance, to_final_balance, con);\n } catch (SQLException e) {\n try {\n con.rollback();\n return false;\n } catch (SQLException e1) {\n e1.printStackTrace();\n return false;\n }\n }\n return true;\n }", "protected void execute() {\n \tclimber.setCLimberSpeed(0);\n }", "public int transfer(String fromAccNum, String toAccNum, double amount) {\n String output; \n\n Account fromAcc = bank.retrieveAccount(fromAccNum); \n Account toAcc = bank.retrieveAccount(toAccNum);\n\n if (fromAcc.getBalance() >= amount) {\n fromAcc.deduct(amount);\n toAcc.add(amount); \n \n return 0;\n }\n return -1; \n\n\n }", "@Override\r\n\tpublic TransferAmountResponseDto transfer(TransferAmountRequestDto transferAmountRequestDto) {\r\n\t\tlog.info(\"inside transaction service\");\r\n\r\n\t\tTransferAmountResponseDto transferAmountResponseDto = new TransferAmountResponseDto();\r\n\r\n\t\tTransaction debitTransaction = new Transaction();\r\n\t\tTransaction creditTransaction = new Transaction();\r\n\r\n\t\tAccount fromAccount = accountRepository.findByCustomerId(transferAmountRequestDto.getCustomerId());\r\n\t\tAccount toAccount = accountRepository.findByAccountNumber(transferAmountRequestDto.getCreditTo());\r\n\r\n\t\tif (fromAccount == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NOT_FOUND);\r\n\t\t}\r\n\r\n\t\tif (toAccount == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NOT_FOUND);\r\n\t\t}\r\n\r\n\t\tif (fromAccount.getAccountNumber().equalsIgnoreCase(toAccount.getAccountNumber())) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.INVALID_ACCOUNT);\r\n\t\t}\r\n\r\n\t\tBeneficiary existBeneficiary = beneficiaryRepository.findByCustomerAccountNumberAndBeneficiaryAccountNumber(\r\n\t\t\t\tfromAccount.getAccountNumber(), toAccount.getAccountNumber());\r\n\r\n\t\tif (existBeneficiary == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.NOT_BENEFICIARY);\r\n\t\t}\r\n\r\n\t\tif (fromAccount.getBalance() < transferAmountRequestDto.getTransferAmount()) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.INVALID_AMOUNT);\r\n\t\t}\r\n\r\n\t\tif (transferAmountRequestDto.getTransferAmount() <= 0) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.MINIMUM_AMOUNT);\r\n\t\t}\r\n\r\n\t\tdebitTransaction.setAccountNumber(fromAccount.getAccountNumber());\r\n\t\tdebitTransaction.setTransactionType(\"debit\");\r\n\t\tdebitTransaction.setTransferAmount(transferAmountRequestDto.getTransferAmount());\r\n\t\tdebitTransaction.setTransactionDate(LocalDateTime.now());\r\n\t\tdebitTransaction.setAccount(fromAccount);\r\n\r\n\t\tcreditTransaction.setAccountNumber(toAccount.getAccountNumber());\r\n\t\tcreditTransaction.setTransactionType(\"credit\");\r\n\t\tcreditTransaction.setTransferAmount(transferAmountRequestDto.getTransferAmount());\r\n\t\tcreditTransaction.setTransactionDate(LocalDateTime.now());\r\n\t\tcreditTransaction.setAccount(toAccount);\r\n\r\n\t\tdouble remainingBalance = fromAccount.getBalance() - transferAmountRequestDto.getTransferAmount();\r\n\t\tdouble updatedBalance = toAccount.getBalance() + transferAmountRequestDto.getTransferAmount();\r\n\r\n\t\tfromAccount.setBalance(remainingBalance);\r\n\t\ttoAccount.setBalance(updatedBalance);\r\n\r\n\t\taccountRepository.save(fromAccount);\r\n\r\n\t\tTransaction transaction = transactionRepository.save(debitTransaction);\r\n\t\tif (transaction.getTransactionId() == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.TRANSACTION_FAILED);\r\n\t\t}\r\n\t\taccountRepository.save(toAccount);\r\n\r\n\t\ttransactionRepository.save(creditTransaction);\r\n\r\n\t\ttransferAmountResponseDto.setMessage(\"Amount Transferred successfully..\");\r\n\t\ttransferAmountResponseDto.setTransactionId(transaction.getTransactionId());\r\n\t\ttransferAmountResponseDto.setStatusCode(201);\r\n\t\treturn transferAmountResponseDto;\r\n\t}", "public void transferFunds(BankAccount account1, BankAccount account2, double amount){\n if(account1.checkAccountOpen()&&account2.checkAccountOpen()){\n if((account1.getCurrentBalance()-amount)>0) {\n if (isSameAccount(account1, account2)) {\n account1.subtractCreditTransaction(amount);\n account2.addDebitTransaction(amount);\n } else {\n System.out.println(\"This transaction could not be processed. BankAccount owners are not the same.\");\n }\n }\n else {\n System.out.println(\"Appropriate funds not found. Please check your current balance.\");\n }\n\n\n }\n }", "@Override\n\t@Transactional(rollbackFor=Exception.class, propagation=Propagation.REQUIRES_NEW)\n\tpublic void BackMoney(DelayTransfer delayTransfer) {\n\t\t\n\t\tif (delayTransfer.getTransactionStatus() != AsnyTransStatusEnum.UN_TRANS.getCode()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tCard exitOutCard = cardMapper.getCardByCardNumForUpdate(delayTransfer.getOutCardNum());\n\t\tif (null == exitOutCard) {\n\t\t\tthrow new AtmException(\"卡号不存在 转账支出回滚失败\");\n\t\t}\n\t\t\n\t\tint rows = cardMapper.updateBalanceByCardNum(delayTransfer.getInCardNum(), delayTransfer.getAmount());\n\t\tif (1 != rows) {\n\t\t\tthrow new AtmException(\"转账支出回滚失败\");\n\t\t}\n\t\t\n\t\tdelayTransfer.setTransactionStatus(AsnyTransStatusEnum.QUITTRANSFER.getCode());\n\t\trows = delayTransferMapper.updateStatus(delayTransfer);\n\t\tif (1 != rows) {\n\t\t\tthrow new AtmException(\"转账支出回滚失败\");\n\t\t}\n\t\t\n\t\tDetail detail = new Detail();\n\t\tdetail.setAmount(delayTransfer.getAmount());\n\t\tdetail.setCardNum(exitOutCard.getCardNum());\n\t\tdetail.setStatus(StatusEnum.USABLE.getCode());\n\t\tdetail.setOptType(OptType.BACK_MONEY.getCode());\n\t\tdetail.setUserId(exitOutCard.getUserId());\n\t\tdetail.setFlowDesc(\"转账支出回滚\");\n\t\t\n\t\trows = detailMapper.addDetail(detail);\n\t\tif (1 != rows) {\n\t\t\tthrow new AtmException(\"转账支出回滚流水失败\");\n\t\t}\n\t\t\n\t}", "@Override\n\tvoid make_deposit(DataStore ds){\n\tds.setbalancedepositAccount1(ds.getbalanceAccount1_temp()+ds.getdepositAccount1());\n\t}", "public boolean makeTransfer(String fromAccountNumber,\r\n\t\t\tString toAccountNumber, double amount, String memo) {\r\n\t\tif (DaoUtility.isAccountNumberValid(fromAccountNumber)\r\n\t\t\t\t&& DaoUtility.isAccountNumberValid(toAccountNumber)) {\r\n\t\t} else\r\n\t\t\treturn false;\r\n\r\n\t\t// do transaction\r\n\t\tConnection conn = dbConnector.getConnection();\r\n\t\tif (conn==null)\r\n\t\t\treturn false;\r\n\t\t\r\n\t\tPreparedStatement st;\r\n\t\tString sql;\r\n\t\tResultSet rs;\r\n\r\n\t\ttry {\r\n\t\t\tconn.setAutoCommit(false);\r\n\t\t\tSavepoint savepnt = conn.setSavepoint();\r\n\r\n\t\t\ttry {\r\n\t\t\t\tint fromAccountId=0;\r\n\t\t\t\tint toAccountId=0;\r\n\t\t\t\tString fromName=\"SECRET USER\";\r\n\t\t\t\tString toName=\"SECRET USER\";\r\n\t\t\t\tString fname,mname,lname;\r\n\t\t\t\t\r\n\t\t\t\tst = conn.prepareStatement(\"select tbAccount.aid,balance,isactive,\"\r\n\t\t\t\t\t\t+ \"fname,mname,lname from tbAccount, tbClient \"\r\n\t\t\t\t\t\t+ \" where acnumber= ? and tbAccount.cid=tbClient.cid\");\r\n\t\t\t\tst.setString(1, fromAccountNumber);\r\n\t\t\t\trs = st.executeQuery();\r\n\t\t\t\tif (rs.next()){\r\n\t\t\t\t\tfromAccountId = rs.getInt(\"aid\");\r\n\t\t\t\t\tdouble balance = rs.getDouble(\"balance\");\r\n\t\t\t\t\tboolean isactive = rs.getBoolean(\"isactive\");\r\n\t\t\t\t\tfname = rs.getString(\"fname\");\r\n\t\t\t\t\tmname = rs.getString(\"mname\");\r\n\t\t\t\t\tlname = rs.getString(\"lname\");\r\n\t\t\t\t\tfromName = fname + \" \" + (mname==null?\"\":mname) + \" \" +lname;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (balance<amount || !isactive) { //not enough money or frozen\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tst = conn.prepareStatement(\"select aid,isactive,\"\r\n\t\t\t\t\t\t+ \" fname,mname,lname from tbAccount,tbClient \"\r\n\t\t\t\t\t\t+ \" where acnumber= ? and tbAccount.cid=tbClient.cid\");\r\n\t\t\t\tst.setString(1, toAccountNumber);\r\n\t\t\t\trs = st.executeQuery();\r\n\t\t\t\tif (rs.next()){\r\n\t\t\t\t\ttoAccountId = rs.getInt(\"aid\");\r\n\t\t\t\t\tboolean isactive = rs.getBoolean(\"isactive\");\r\n\t\t\t\t\tfname = rs.getString(\"fname\");\r\n\t\t\t\t\tmname = rs.getString(\"mname\");\r\n\t\t\t\t\tlname = rs.getString(\"lname\");\r\n\t\t\t\t\ttoName = fname + \" \" + (mname==null?\"\":mname) + \" \" +lname;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!isactive) { //frozen\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// substract balance of fromAccount\r\n\t\t\t\tst = conn.prepareStatement(\r\n\t\t\t\t\t\t\"update tbAccount set balance = balance - ? \"\r\n\t\t\t\t\t\t\t\t+ \" where balance >= ? \"\r\n\t\t\t\t\t\t\t\t+ \" and acnumber = ? \"\r\n\t\t\t\t\t\t\t\t+ \" and isactive=TRUE \");\r\n\t\t\t\tst.setDouble(1, amount);\r\n\t\t\t\tst.setDouble(2, amount);\r\n\t\t\t\tst.setString(3, fromAccountNumber);\r\n\t\t\t\tint nRs = st.executeUpdate();\r\n\t\t\t\tif (nRs <= 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// add balance of toAccount\r\n\t\t\t\tst = conn.prepareStatement(\r\n\t\t\t\t\t\t\"update tbAccount set balance = balance + ? \"\r\n\t\t\t\t\t\t\t\t+ \" where acnumber = ? \"\r\n\t\t\t\t\t\t\t\t+ \" and isactive=TRUE \");\r\n\t\t\t\tst.setDouble(1, amount);\r\n\t\t\t\tst.setString(2, toAccountNumber);\r\n\t\t\t\tnRs = st.executeUpdate();\r\n\t\t\t\tif (nRs <= 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// insert 2 transaction record\r\n\t\t\t\t// insert into tbTransaction(aid, trtype, amount, description)\r\n\t\t\t\t// values( select aid from tbAccount where acnumber='acnumber',\r\n\t\t\t\t// DEPOSIT_TRANSACTION_TYPE_ID,\r\n\t\t\t\t// amount, 'transfer 123.4 dollars to 3333343 on 2014-09-19')\r\n\t\t\t\t//\r\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\t\tjava.util.Date date = new java.util.Date();\r\n\t\t\t\tString currentDate = dateFormat.format(date); // 2014-08-06\r\n\r\n\t\t\t\tsql = String.format(\r\n\t\t\t\t\t\t\"insert into tbTransaction(aid,trtype,amount,description) \"\r\n\t\t\t\t\t\t\t\t+ \" values( %d, \" + \"\t\t\t%d, \"\r\n\t\t\t\t\t\t\t\t+ \"\t\t\t%f, 'Transfer out %.2f dollars to %s(%s) on %s. MEMO: %s' ) \", \r\n\t\t\t\t\t\t\t\tfromAccountId,\r\n\t\t\t\t\tTRANSFER_OUT_TRANSACTION_TYPE_ID, amount, amount,\r\n\t\t\t\t\ttoAccountNumber, toName, currentDate,memo);\r\n\t\t\t\tnRs = st.executeUpdate(sql);\r\n\t\t\t\tif (nRs<=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsql = String.format(\r\n\t\t\t\t\t\t\"insert into tbTransaction(aid,trtype,amount,description) \"\r\n\t\t\t\t\t\t\t\t+ \" values( %d, \" + \" %d, \"\r\n\t\t\t\t\t\t\t\t+ \"\t%f, 'Transfer in %.2f dollars from %s(%s) on %s. MEMO: %s' ) \", \r\n\t\t\t\t\t\t\t\ttoAccountId,\r\n\t\t\t\t\tTRANSFER_IN_TRANSACTION_TYPE_ID, amount, amount,\r\n\t\t\t\t\tfromAccountNumber, fromName, currentDate,memo);\r\n\t\t\t\tnRs = st.executeUpdate(sql);\r\n\t\t\t\tif (nRs<=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t\t\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t} finally {\r\n\t\t\t\tconn.setAutoCommit(true);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (conn != null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public static void habilitarTransaccionManual() {\n try {\n con.setAutoCommit(false);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void trans() {\n\t\tSystem.out.println(\"BigCar trans\");\n\t}", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "@Test\n public void testImpossible2TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), \"0000 0000 0000 0000\", user.getPassport(), acc.getRequisites(), 100), is(false));\n }", "@Test\n public void proveraTransfera() {\n Account ivana = mobi.openAccount(\"Ivana\");\n Account pera = mobi.openAccount(\"Pera\");\n\n mobi.payInMoney(ivana.getNumber(), 5000.0);\n mobi.transferMoney(ivana.getNumber(), pera.getNumber(), 2000.0);\n //ocekujemo da nakon ovoga ivana ima 3000, a pera 2000\n\n SoftAssert sa = new SoftAssert();\n sa.assertEquals(ivana.getAmount(), 3000.0);\n sa.assertEquals(pera.getAmount(), 2000.0);\n\n sa.assertAll();\n }", "@Override\n\tpublic void execute() {\n\n\t\t//System.out.println(Constants.throttle * move_Speed.getAsDouble() + \"and \" + Constants.throttle * rotate_Speed.getAsDouble());\n\t\t\n\t\tConstants.isTank = !Constants.isTank;\t\n\t\tSystem.out.print(\"Drive System is now: \");\n\t\tif(Constants.isTank){\n\t\t\tSystem.out.println(\"Wendy Mode\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Arcade Mode\");\n\t\t}\n\t}", "public static void deshabilitarTransaccionManual() {\n try {\n\n con.setAutoCommit(true);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Test\n public void testImpossible1TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0000\");\n AccountOfUser acc2 = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n bank.addAccountToUser(user.getPassport(), acc2);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), acc2.getRequisites(), 100), is(false));\n }", "@Override\n\tpublic void run() {\n\t\tAccount account = accountList.get(this.acc_id);\n\t\tswitch (this.tr_id) {// 0 = deposit; 1 = withdraw; 2 = transferFunds;\n\t\tcase 0: //Deposit\n\t\t\tSystem.out.println(Thread.currentThread().getName() + \" is helping Department ID \" + this.dept_id + \" in making a deposit of € \" + this.amt + \" to Account ID \"\n\t\t\t\t\t+ this.acc_id);\n\t\t\taccount.deposit(account, this.amt);\n\t\t\tbreak;\n\t\tcase 1: //Withdraw\n\t\t\tSystem.out.println(Thread.currentThread().getName() + \" is helping Department ID \" + this.dept_id + \" in making a withdrawal of € \" + this.amt\n\t\t\t\t\t+ \" from Account ID \" + this.acc_id);\n\t\t\taccount.withdraw(account, this.amt);\n\t\t\tbreak;\n\t\tcase 2: //TransferFunds\n\t\t\tSystem.out.println(Thread.currentThread().getName() + \" is helping Department ID \" + this.dept_id + \" in making a transfer of € \" + this.amt\n\t\t\t\t\t+ \" from Account ID \" + this.acc_id + \" to Account ID \" + this.acc_id_second);\n\t\t\tAccount destinationAccount = accountList.get(this.acc_id_second);\n\t\t\taccount.transferFunds(account, destinationAccount, this.amt);\n\t\t\tbreak;\n\t\t}\n\t}", "protected boolean applyTransferTransaction(StateTransferTransaction tr) {\n\t\tString fromAddress = ((StateTransferTransaction)tr).from;\n\t\tString toAddress = ((StateTransferTransaction)tr).to;\t\t\t\t\n\t\tDouble amount = ((StateTransferTransaction)tr).amount;\n\n\t\tfor(AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(fromAddress)){\n\t\t\t\taccount.decreaseBalance(amount);\n\t\t\t\taccount.decreaseBalance(amount);\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\tfor(AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(toAddress)){\n\t\t\t\taccount.decreaseBalance(amount);\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private void executeTransaction(ArrayList<Request> transaction) {\n // create a new TransactionMessage\n TransactionMessage tm = new TransactionMessage(transaction);\n //if(tm.getStatementCode(0)!=8&&tm.getStatementCode(0)!=14)\n // return;\n try {\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bos);\n oos.writeObject(tm);\n oos.flush();\n\n byte[] data = bos.toByteArray();\n\n byte[] buffer = null;\n long startTime = System.currentTimeMillis();\n buffer = clientShim.execute(data);\n long endTime = System.currentTimeMillis();\n if (reqIndex < maxNoOfRequests && id > 0) {\n System.out.println(\"#req\" + reqIndex + \" \" + startTime + \" \" + endTime + \" \" + id);\n }\n reqIndex++;\n\n father.addTransaction();\n\n // IN THE MEAN TIME THE INTERACTION IS BEING EXECUTED\n\n\t\t\t\t/*\n\t\t\t\t * possible values of r: 0: commit 1: rollback 2: error\n\t\t\t\t */\n int r = ByteBuffer.wrap(buffer).getInt();\n //System.out.println(\"r = \"+r);\n if (r == 0) {\n father.addCommit();\n } else if (r == 1) {\n father.addRollback();\n } else {\n father.addError();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n IBank b = new SyncBank(NACCOUNTS, INITIAL_BALANCE);\n\n for (int i = 0; i < NACCOUNTS; i++) {\n TransferThread t = new TransferThread(b, i,\n INITIAL_BALANCE);\n t.setPriority(Thread.NORM_PRIORITY + i % 2);\n t.start();\n }\n }", "private void reportTransactionStatus(boolean success){\n if(success){\n sendMessage(\"<st>\");\n }else{\n sendMessage(\"<f>\");\n }\n }", "public void execute() {\r\n int depositAmount = this.promptDepositAmount(); // amount in cents\r\n if (depositAmount != CANCELED) {\r\n screen.displayMessage(\"\\nPlease insert a deposit envelope containing: \");\r\n screen.displayDollarAmount(depositAmount / 100);\r\n screen.displayMessageLine(\".\");\r\n\r\n if (depositSlot.isEnvelopeReceived()) {\r\n screen.displayMessageLine(\"\\nYour envelope has been received.\");\r\n screen.displayMessageLine(\"The money just deposited will not be available until we verify \" +\r\n \"the amount of any enclosed cash and your checks clear.\");\r\n bankDatabase.credit(this.accountNumber, depositAmount / 100);\r\n } else {\r\n screen.displayMessageLine (\"\\nYou did not insert an envelope. The ATM has canceled your transaction.\");\r\n }\r\n } else {\r\n screen.displayMessageLine( \"\\nCanceling transaction...\");\r\n }\r\n }", "void deposit(double amount) {\n try {Thread.sleep(10l);} catch (InterruptedException e) {}\r\n balance += amount;\r\n System.out.println(\"Inside deposit\"+ balance);\r\n }", "public void transAccElec(){\n System.out.println(\"Elija la cuenta a la que desea efectuar la transferencia\");\n System.out.println(\"\");\n}", "private void handleTransaction() throws Exception {\r\n\t\tString receiver;\r\n\t\tString amount;\r\n\t\tMessage sendTransaction = new Message().addData(\"task\", \"transaction\").addData(\"message\", \"do_transaction\");\r\n\t\tMessage response;\r\n\r\n\t\tthis.connectionData.getTerminal().write(\"enter receiver\");\r\n\t\treceiver = this.connectionData.getTerminal().read();\r\n\r\n\t\t// tries until a amount is typed that's between 1 and 10 (inclusive)\r\n\t\tdo {\r\n\t\t\tthis.connectionData.getTerminal().write(\"enter amount (1-10)\");\r\n\t\t\tamount = this.connectionData.getTerminal().read();\r\n\t\t} while (!amount.matches(\"[0-9]|10\"));\r\n\r\n\t\t// does the transaction\r\n\t\tsendTransaction.addData(\"receiver\", this.connectionData.getAes().encode(receiver)).addData(\"amount\",\r\n\t\t\t\tthis.connectionData.getAes().encode(amount));\r\n\r\n\t\tthis.connectionData.getConnection().write(sendTransaction);\r\n\r\n\t\tresponse = this.connectionData.getConnection().read();\r\n\t\tif (response.getData(\"message\").equals(\"success\")) {\r\n\t\t\tthis.connectionData.getTerminal().write(\"transaction done\");\r\n\t\t} else {\r\n\t\t\tthis.connectionData.getTerminal().write(\"transaction failed. entered correct username?\");\r\n\t\t}\r\n\t}", "private void sendBucks() {\n\t\tconsole.printUsers(userService.getAll(currentUser.getToken()));\n\t\tSystem.out.println(\"\");\n\n\t\tBoolean validResponse = false;\n\t\tint selectedUserId = -1;\n\t\tBigDecimal transferAmount = new BigDecimal(0);\n\t\tBigDecimal zero = new BigDecimal(0);\n\t\tBigDecimal currentBalance = (accountService.getAccountBalance(currentUser.getToken()));\n\t\tTransfer transfer = new Transfer();\n\n\t\twhile (true) {\n\t\t\t// ask which user you want to send money to or exit\n\t\t\tselectedUserId = console.getUserInputInteger(\"Enter ID of user you are sending to (0 to cancel)\");\n\t\t\tif (selectedUserId == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (selectedUserId > 0 && selectedUserId <= userService.getAll(currentUser.getToken()).length) {\n\t\t\t\t// prompt for amount to send\n\t\t\t\ttransferAmount = console.getUserInputBigDecimal(\"Enter amount\");\n\t\t\t\t// transfer money\n\n\t\t\t\tif (transferAmount.compareTo(zero) == 1 && transferAmount.compareTo(currentBalance) <= 0) {\n\n\t\t\t\t\ttransfer.setFromUserId(currentUser.getUser().getId());\n\t\t\t\t\ttransfer.setToUserId(selectedUserId);\n\t\t\t\t\ttransfer.setTransferAmount(transferAmount);\n\t\t\t\t\ttransfer.setStatusOfTransferId(2);\n\t\t\t\t\ttransfer.setTypeOfTransferId(2);\n\n\t\t\t\t\t\n\t\t\t\t\ttransferService.createTransfer(currentUser.getToken(), transfer);\n\t\t\t\t\tSystem.out.println(\"\\nTransfer Complete!\");\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(\"\\nInsufficient Funds! Please try again.\\n\");\n\n\t\t\t}\n\t\t}\n\n\t}", "@Test\n public void processTransactionManagerCaseA()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n Assert.assertEquals(false,trans_mang.processTransaction(acc.get_Account_Number(),acc2.get_Account_Number(),2000));\n }", "@Override\n\tpublic void work() {\n\t\tSystem.out.println(\"Accountant accounting.\");\n\t}", "@Test\n public void processTestC()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n //failed transaction\n trans = new Transaction(acc_db,acc.get_Account_Number(),5,10);\n\n Assert.assertEquals(false,trans.process());\n }", "public void executeMovement(int op_id, int mv_amount, int account_id, int final_balance, Connection con) throws SQLException {\n PreparedStatement stmt = con.prepareStatement(\n \"insert into OPERATIONS (OP_ID, OP_TYPE, MV_AMOUNT, FROM_ACCOUNT_ID, FROM_CURRENT_BALANCE, TIMESTAMP) \" +\n \"values (?,?,?,?,?,?)\");\n\n stmt.setInt(1, op_id);\n stmt.setInt(2, OP_TYPES.valueOf(\"MOVEMENT\").ordinal()+1);\n stmt.setInt(3, mv_amount);\n stmt.setInt(4, account_id);\n stmt.setInt(5, final_balance);\n stmt.setTimestamp(6, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n }", "public void transfer(BigDecimal value, Account account) {\n\n\t\ttheValueHasToBeGreaterThanZero(value);\n\n\t\tif (value.compareTo(balance) <= 0) {\n\t\t\tthis.withdrawalAlgorithm(value);\n\t\t\taccount.depositAlgorithm(value);\n\t\t\taccount.notifyMovements(value, MovementAction.TRANSFER_RECEIVED);\n\t\t\tthis.movements.add(new Movement(MovementAction.TRANSFERRED, this));\n\t\t\treturn;\n\t\t}\n\n\t\tthrow new IllegalArgumentException(\"You do not have enough balance to transfer\");\n\t}", "private void doTransfer(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\tLOG.info(\"LOGIN: \" + req.getSession().getAttribute(\"login\") + \" Start doing transfer.\");\r\n\t\tString page = null;\r\n\t\tTransferCommand command = new TransferCommand();\r\n\t\tpage = command.execute(req, resp);\r\n\t\tif (page.equals(\"/jsp/transfer_error.jspx\")) {\r\n\t\t\tRequestDispatcher dispatcher = getServletContext().getRequestDispatcher(page);\r\n\t\t\tdispatcher.forward(req, resp);\r\n\t\t\tLOG.info(\"LOGIN: \" + req.getSession().getAttribute(\"login\") + \" Transfer was failed.\");\r\n\t\t} else {\r\n\t\t\tresp.sendRedirect(page);\r\n\t\t\tLOG.info(\"LOGIN: \" + req.getSession().getAttribute(\"login\") + \" Transfer succesfull.\");\r\n\t\t}\r\n\t}", "Transfer updateChargeBack(Transfer transfer, Transfer chargeback);", "@Test\n public void processTransactionManagerCaseE() throws InterruptedException\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n trans_mang.processTransaction(acc.get_Account_Number(),acc2.get_Account_Number(),30);\n\n Thread.sleep(15000);\n\n Assert.assertEquals(true,trans_mang.processTransaction(acc.get_Account_Number(),acc2.get_Account_Number(),30));\n }", "public void authorizeTransaction() {}", "@Test\n public void transferCheckingtoSavingsTest(){\n assertTrue(userC.transfer(150.00, userS));\n }", "private void transfer(Transfer associatedUpload) throws IOException {\n \t\ttry {\n \t\t\t_started = System.currentTimeMillis();\n \t\t\tif (_mode == 'A') {\n \t\t\t\t_out = new AddAsciiOutputStream(_out);\n \t\t\t}\n \n \t\t\tbyte[] buff = new byte[Math.max(_slave.getBufferSize(), 65535)];\n \t\t\tint count;\n \t\t\tlong currentTime = System.currentTimeMillis();\n \n \t\t\ttry {\n \t\t\t\twhile (true) {\n \t\t\t\t\tif (_abortReason != null) {\n \t\t\t\t\t\tthrow new TransferFailedException(\n \t\t\t\t\t\t\t\t\"Transfer was aborted - \" + _abortReason,\n \t\t\t\t\t\t\t\tgetTransferStatus());\n \t\t\t\t\t}\n \t\t\t\t\tcount = _in.read(buff);\n \t\t\t\t\tif (count == -1) {\n \t\t\t\t\t\tif (associatedUpload == null) {\n \t\t\t\t\t\t\tbreak; // done transferring\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif (associatedUpload.getTransferStatus().isFinished()) {\n \t\t\t\t\t\t\tbreak; // done transferring\n \t\t\t\t\t\t}\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tThread.sleep(500);\n \t\t\t\t\t\t} catch (InterruptedException e) {\n \t\t\t\t\t\t}\n \t\t\t\t\t\tcontinue; // waiting for upload to catch up\n \t\t\t\t\t}\n \t\t\t\t\t// count != -1\n \t\t\t\t\tif ((System.currentTimeMillis() - currentTime) >= 1000) {\n \t\t\t\t\t\tTransferStatus ts = getTransferStatus();\n \t\t\t\t\t\tif (ts.isFinished()) {\n \t\t\t\t\t\t\tthrow new TransferFailedException(\n \t\t\t\t\t\t\t\t\t\"Transfer was aborted - \" + _abortReason,\n \t\t\t\t\t\t\t\t\tts);\n \t\t\t\t\t\t}\n \t\t\t\t\t\t_slave\n \t\t\t\t\t\t\t\t.sendResponse(new AsyncResponseTransferStatus(\n \t\t\t\t\t\t\t\t\t\tts));\n \t\t\t\t\t\tcurrentTime = System.currentTimeMillis();\n \t\t\t\t\t}\n \t\t\t\t\t_transfered += count;\n \t\t\t\t\t_out.write(buff, 0, count);\n \t\t\t\t}\n \n \t\t\t\t_out.flush();\n \t\t\t} catch (IOException e) {\n \t\t\t\tthrow new TransferFailedException(e, getTransferStatus());\n \t\t\t}\n \t\t} finally {\n \t\t\t_finished = System.currentTimeMillis();\n \t\t\t_slave.removeTransfer(this); // transfers are added in setting up\n \t\t\t\t\t\t\t\t\t\t\t// the transfer,\n \t\t\t\t\t\t\t\t\t\t\t// issueListenToSlave()/issueConnectToSlave()\n \t\t}\n \t}", "@Override\n public void makeTransfer(BigInteger sender, BigInteger recipient, BigDecimal amount)\n throws InsufficientFundsException, GenericBankNowException {\n if (isTheSameAccount(sender, recipient)) {\n throw new GenericBankNowException(\"Sender and recipient are the same accounts\");\n } else {\n Account accountSender = accountDao.getAccountByIban(sender);\n if (hasEfficientFunds(accountSender, amount)) {\n throw new InsufficientFundsException(\"Insufficient funds to proceed transfer\");\n } else {\n Account accountRecipient = accountDao.getAccountByIban(recipient);\n accountSender.setBalance(accountSender.getBalance().subtract(amount));\n accountRecipient.setBalance(accountRecipient.getBalance().add(amount));\n\n accountDao.updateAccount(accountSender);\n accountDao.updateAccount(accountRecipient);\n\n transactionDao.storeTransaction(new Transaction(sender, recipient, amount, TransactionType.TRANSFER));\n }\n }\n }", "void preWithdraw(double amount) {\n\t\tSystem.out.println(\"Your account is not saver account.\");\n\t}", "@Override\n public void run() {\n byte[] deviceTxPayload = CoreServices.getOrCreateHardwareWalletService().get().getContext().getSerializedTx().toByteArray();\n\n log.info(\"DeviceTx payload:\\n{}\", Utils.HEX.encode(deviceTxPayload));\n\n // Load deviceTx\n Transaction deviceTx = new Transaction(MainNetParams.get(), deviceTxPayload);\n\n log.info(\"deviceTx:\\n{}\", deviceTx.toString());\n\n // Check the signatures are canonical\n for (TransactionInput txInput : deviceTx.getInputs()) {\n byte[] signature = txInput.getScriptSig().getChunks().get(0).data;\n if (signature != null) {\n log.debug(\n \"Is signature canonical test result '{}' for txInput '{}', signature '{}'\",\n TransactionSignature.isEncodingCanonical(signature),\n txInput.toString(),\n Utils.HEX.encode(signature));\n } else {\n log.warn(\"No signature data\");\n }\n }\n\n log.debug(\"Committing and broadcasting the last tx\");\n\n BitcoinNetworkService bitcoinNetworkService = CoreServices.getOrCreateBitcoinNetworkService();\n\n if (bitcoinNetworkService.getLastSendRequestSummaryOptional().isPresent()\n && bitcoinNetworkService.getLastWalletOptional().isPresent()) {\n\n SendRequestSummary sendRequestSummary = bitcoinNetworkService.getLastSendRequestSummaryOptional().get();\n\n // Check the unsigned and signed tx are essentially the same as a check against malware attacks on the Trezor\n if (TransactionUtils.checkEssentiallyEqual(sendRequestSummary.getSendRequest().get().tx, deviceTx)) {\n // Substitute the signed tx from the trezor\n log.debug(\n \"Substituting the Trezor signed tx '{}' for the unsigned version {}\",\n deviceTx.toString(),\n sendRequestSummary.getSendRequest().get().tx.toString()\n );\n sendRequestSummary.getSendRequest().get().tx = deviceTx;\n log.debug(\"The transaction fee was {}\", sendRequestSummary.getSendRequest().get().fee);\n\n sendBitcoinConfirmTrezorPanelView.setOperationText(MessageKey.TREZOR_TRANSACTION_CREATED_OPERATION);\n sendBitcoinConfirmTrezorPanelView.setRecoveryText(MessageKey.CLICK_NEXT_TO_CONTINUE);\n sendBitcoinConfirmTrezorPanelView.setDisplayVisible(false);\n\n // Get the last wallet\n Wallet wallet = bitcoinNetworkService.getLastWalletOptional().get();\n\n // Commit and broadcast\n bitcoinNetworkService.commitAndBroadcast(sendRequestSummary, wallet, paymentRequestData);\n\n // Ensure the header is switched off whilst the send is in progress\n ViewEvents.fireViewChangedEvent(ViewKey.HEADER, false);\n } else {\n // The signed transaction is essentially different from what was sent to it - abort send\n sendBitcoinConfirmTrezorPanelView.setOperationText(MessageKey.TREZOR_FAILURE_OPERATION);\n sendBitcoinConfirmTrezorPanelView.setRecoveryText(MessageKey.CLICK_NEXT_TO_CONTINUE);\n sendBitcoinConfirmTrezorPanelView.setDisplayVisible(false);\n }\n } else {\n log.debug(\"Cannot commit and broadcast the last send as it is not present in bitcoinNetworkService\");\n }\n // Clear the previous remembered tx\n bitcoinNetworkService.setLastSendRequestSummaryOptional(Optional.<SendRequestSummary>absent());\n bitcoinNetworkService.setLastWalletOptional(Optional.<Wallet>absent());\n }", "public void spendAllMoney() {\n\t\tcurrentBalance = 0;\n\t}", "void sendTransactionToServer()\n \t{\n \t\t//json + sql magic\n \t}", "public void fullSync() {\n if (checkboxRepository.findOne(1).isCheckboxState()) {\n now = LocalDateTime.now();\n\n logger.info(\"De sync start\");\n long startTime = System.nanoTime();\n try {\n fillLocalDB.fillDb();\n smartschoolSync.ssSync();\n } catch (IOException e) {\n e.getStackTrace();\n logger.error(\"Error bij het uitvoeren van de sync\");\n } catch (MessagingException e) {\n logger.error(\"Error bij het verzenden van een mail tijdens de sync\");\n }\n logger.info(\"De sync is voltooid\");\n Statistic statistic = statisticRepository.findOne(1);\n statistic.setAantal(informatService.getTotaalAantalServerErrors());\n statisticRepository.save(statistic);\n informatService.setTotaalAantalServerErrors(0L);\n long endTime = System.nanoTime();\n long duration = (endTime - startTime) / 1000000; //milliseconds\n Statistic statisticDuration = statisticRepository.findOne(3);\n statisticDuration.setAantal(duration);\n statisticRepository.save(statisticDuration);\n Statistic statisticLastSync = statisticRepository.findOne(4);\n statisticLastSync.setError(String.valueOf(now));\n statisticRepository.save(statisticLastSync);\n }\n }", "public void transferTo(double dollarAmount) {\r\n\t\tthis.accountBalance = this.accountBalance + dollarAmount;\r\n\t}", "protected void executionSuccess() {\n this.isUndoable = true;\n }", "TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);", "public void enableImmediateTransfers() {\n setProperty(\"transferImmediately\", true);\n _writer.println(\"// Note: enabling immediate transfers\");\n try {\n List<ReferenceType> classes = _vm.classesByName(\"edu.rice.cs.cunit.SyncPointBuffer\");\n ClassType bufferClass = null;\n for (ReferenceType cl : classes) {\n if (cl.name().equals(\"edu.rice.cs.cunit.SyncPointBuffer\")) {\n if (cl instanceof ClassType) {\n bufferClass = (ClassType) cl;\n break;\n }\n }\n }\n if (null == bufferClass) {\n throw new Error(\"Could not find edu.rice.cs.cunit.SyncPointBuffer class.\");\n }\n Field transferImmediatelyField = bufferClass.fieldByName(\"_transferImmediately\");\n if (null == transferImmediatelyField) {\n throw new Error(\"Could not find edu.rice.cs.cunit.SyncPointBuffer._transferImmediately field.\");\n }\n try {\n bufferClass.setValue(transferImmediatelyField, _vm.mirrorOf(true));\n } catch (InvalidTypeException e) {\n throw new Error(\"Could not set edu.rice.cs.cunit._transferImmediately to true.\", e);\n } catch (ClassNotLoadedException e) {\n throw new Error(\"Could not set edu.rice.cs.cunit._transferImmediately to true.\", e);\n }\n } finally {\n SwingUtilities.invokeLater(new Runnable() {\n\n public void run() {\n _infoTableModel.fireTableDataChanged();\n }\n });\n }\n enableRecording(true);\n }", "public void testAutoBalanceTransactions(){\n\t\tsetDoubleEntryEnabled(false);\n\t\tmTransactionsDbAdapter.deleteAllRecords();\n\n\t\tassertThat(mTransactionsDbAdapter.getRecordsCount()).isEqualTo(0);\n\t\tString imbalanceAcctUID = mAccountsDbAdapter.getImbalanceAccountUID(Currency.getInstance(CURRENCY_CODE));\n\t\tassertThat(imbalanceAcctUID).isNull();\n\n\t\tvalidateTransactionListDisplayed();\n\t\tonView(withId(R.id.fab_create_transaction)).perform(click());\n\t\tonView(withId(R.id.fragment_transaction_form)).check(matches(isDisplayed()));\n\n\t\tonView(withId(R.id.input_transaction_name)).perform(typeText(\"Autobalance\"));\n\t\tonView(withId(R.id.input_transaction_amount)).perform(typeText(\"499\"));\n\n\t\t//no double entry so no split editor\n\t\t//TODO: check that the split drawable is not displayed\n\t\tonView(withId(R.id.menu_save)).perform(click());\n\n\t\tassertThat(mTransactionsDbAdapter.getRecordsCount()).isEqualTo(1);\n\t\tTransaction transaction = mTransactionsDbAdapter.getAllTransactions().get(0);\n\t\tassertThat(transaction.getSplits()).hasSize(2);\n\t\timbalanceAcctUID = mAccountsDbAdapter.getImbalanceAccountUID(Currency.getInstance(CURRENCY_CODE));\n\t\tassertThat(imbalanceAcctUID).isNotNull();\n\t\tassertThat(imbalanceAcctUID).isNotEmpty();\n\t\tassertTrue(mAccountsDbAdapter.isHiddenAccount(imbalanceAcctUID)); //imbalance account should be hidden in single entry mode\n\n\t\tassertThat(transaction.getSplits()).extracting(\"mAccountUID\").contains(imbalanceAcctUID);\n\n\t}", "public void save(final Operation save, final Account account, final Lock lock) {\r\n\r\n\t\ttry {//tenta colocar a thread em sleep com o valor padrao definido, caso nao consiga, interrompe a thread e imprime o codigo da excecao\r\n\t\t\tThread.sleep(save.getSleep());\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tThread.currentThread().interrupt();\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//trava, verifica se o saldo é maior que zero, remove a quantia determinada, printa as informacoes e por fim destrava a conta\r\n\t\tlock.lock();\r\n\t\tif(account.getBalance() != 0){\r\n\t\t\tif(account.getBalance() - save.getPull() >= 0) {\r\n\t\t\t\taccount.setBalance(account.getBalance() - save.getPull());\r\n\t\t\t\tsave.setNumberOfPulls(save.getNumberOfPulls() + 1);\r\n\t\t\t\tsave.setBalance(save.getBalance() + save.getPull());\r\n\t\t\t\tSystem.out.println(\"Thread: \" + Thread.currentThread().getName() + \" - Accounts new Balance: \" + account.getBalance());\r\n\t\t\t\tSystem.out.println(\"Threads new Balance: \" + save.getBalance() + \"\\n\\n\");\r\n\t\t\t}\t\t\r\n\t\t\tlock.unlock();\r\n\t\t} else {//caso o saldo seja menor ou igual a zero, destrava a conta para uso de outras threads\r\n\t\t\tlock.unlock();\r\n\t\t\tthreadSync(save, account);\r\n\t\t}\r\n\r\n\r\n\r\n\t}", "@Override\n public void startTx() {\n \n }", "private SpeechletResponse handleTransferMoneyExecute(Session session) {\n\t\treturn null;\n\t}", "public void printTransaction() {\n\t\tdao.printTransaction();\r\n\t\t\r\n\t}", "@Override\n\tpublic void execute() {\n\t\tboolean cashDispensed=false;\n\t\tdouble availableBalance;\n\t\tBankDatabase bankDatabase=getBankDatabase();\n\t\tScreen screen=getScreen();\n\t\tdo{\n\t\t\tamount=displayMenuOfAmounts();\n\t\t\tif(amount!=CANCELED){\n\t\t\t\tavailableBalance=bankDatabase.getAvailableBalance(getAccountNumber());\n\t\t\t\tif(amount<=availableBalance){\n\t\t\t\t\tif(cashDispenser.issufficientCashAvailable(amount)){\n\t\t\t\t\t\tbankDatabase.debit(getAccountNumber(), amount);\n\t\t\t\t\t\tcashDispenser.dispenseCash(amount);\n\t\t\t\t\t\tcashDispensed=true;\n\t\t\t\t\t\tscreen.displayMessageLine(\"\\nYour cash has been\" + \" dispensed. Please take your cash now.\");\n\t\t\t\t\t}\n\t\t\t\t\telse{//cash dispenser does not have enough cash\n\t\t\t\t\t\tscreen.displayMessageLine(\"\\nInsuffcient cash available in the ATM.\" + \"\\n\\nPlease choose a smaller amount.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{//not enough money available in user's account\n\t\t\t\t\tscreen.displayMessageLine(\"\\n insufficient funds in your account.\" + \"]n\\nPlease choose a smaller amount.\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tscreen.displayMessageLine(\"\\nCancelling transaction...\");\n\t\t\t\treturn;//return to main menu, because user cancelled\n\t\t\t}\n\t\t} while(!cashDispensed);\n\t}", "@Override\n public void transferWithoutLocking(int fromId, int toId, long amount) throws InsufficientFundsException {\n accounts.get(fromId).withdraw(amount);\n accounts.get(toId).deposit(amount);\n }", "public void sync()\n {\n setAutoSync(false);\n // simply send sync command\n super.executionSync(Option.SYNC);\n }", "@Override\n\tpublic void transferAccount(Bank recievingBank, String recievingUser,\n\t\t\tBank payingBank, String payingUser, double amount) {\n\t\ttry {\n\t\t\tif (getAccount(payingBank, payingUser).getBalance() >= amount) {\n\t\t\tgetAccount(payingBank, payingUser).withdrawal(amount);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Not enough funds\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t}catch(NullPointerException e){\n\t\t\t\tSystem.out.println(\"User not found\");\n\t\t\t}\n\t\t\n\t\ttry {\n\t\tgetAccount(recievingBank, recievingUser).deposit(amount);\n\t\t}\n\t\tcatch(NullPointerException e) {\n\t\t\tSystem.out.println(\"User not found\");\n\t\t\tgetAccount(payingBank, payingUser).deposit(amount);\n\t\t}\n\t}", "void confirmRealWorldTrade(IUserAccount user, ITransaction trans);", "public static void main(String[] args) {\n\t\t\n\t\tBanking s1 = AccountFactory.openSavingAccount(\"Polo\");\n\t\ttry {\n\t\t\ts1.withdraw(2000);\n\t\t} catch (BalanceException e) {\n\t\t\t//e.printStackTrace(); \t//For debugging - used by developers\n\t\t\t//System.out.println(e); \t//used for loggers\n\t\t\tSystem.out.println(e.getMessage()); \t//for end user\n\t\t}\n\t\t\n\t\ts1.deposit(3000);\n//\t\ts1.withdraw(2000);\n//\t\ts1.deposit(4000);\n//\t\t\n//\t\ts1.statement();\n\t\t\n\n\t}", "@Test\n public void processTransactionManagerCaseB()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n Assert.assertEquals(true,trans_mang.processTransaction(acc.get_Account_Number(),acc2.get_Account_Number(),30));\n }", "public boolean doTransaction() {\r\n int nonce = -1;\r\n TransactionOperation transactionOperation = null;\r\n try {\r\n double balance;\r\n \r\n //read the stream for requests from client\r\n byte[] cipherText = (byte [])is.readObject();\r\n \r\n // decrypt the ciphertext to obtain the signed message\r\n ATMSessionMessage atmSessionMessage = (ATMSessionMessage) crypto.decryptRijndael(cipherText, kSession);\r\n if(!(currTimeStamp < atmSessionMessage.getTimeStamp())) error (\"Time stamp does not match\");\r\n \r\n //interpret the transaction operation in the request\r\n SignedMessage signedMessage = atmSessionMessage.getSignedMessage();\r\n \r\n \r\n \t\t//verify signature\r\n \t\ttry {\r\n \t\t\tif(!crypto.verify(signedMessage.msg, signedMessage.signature, currAcct.kPub))\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"Digital signature failed...\");\r\n \t\t\t}\r\n \t\t\tSystem.out.println(\"Message signature valid...\");\r\n \t\t} catch (SignatureException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t} catch (KeyException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\t\r\n TransactionMessage transactionMessage = (TransactionMessage)signedMessage.getObject();\r\n transactionOperation = transactionMessage.getOperation();\r\n \r\n //print the signed message\r\n System.out.println(\"\\n\" + (new Date()).toString());\r\n System.out.println(signedMessage.toString());\r\n \r\n //strip out the parameters embedded \r\n nonce = atmSessionMessage.getNonce();\r\n double value = transactionMessage.getValue();\r\n \r\n //print the timestamp when the transaction takes place\r\n Date now = new Date();\r\n System.out.println(\"\\n\" + now.toString());\r\n \r\n //re-route the request to the appropriate handling function\r\n if(transactionOperation == TransactionOperation.Deposit) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" DEPOSIT: \" + value);\r\n currAcct.deposit(value);\r\n \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Deposit Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.Withdraw) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" WITHDRAW: \" + value);\r\n \t currAcct.withdraw(value);\r\n \t \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Withdrawal Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.EndSession) \r\n \t {\r\n \t \tSystem.out.println(\"\\nTerminating session with ACCT#: \" + currAcct.getNumber());\r\n \t \treturn false;\r\n \t \t\r\n \t }\r\n \r\n accts.save();\r\n //create a successful reply Success and set the balance\r\n balance = currAcct.getBalance(); \r\n transactionMessage = new TransactionMessage(MessageType.ResponseSuccess,transactionOperation,balance);\r\n atmSessionMessage = new ATMSessionMessage(transactionMessage);\r\n \r\n //set the nonce \r\n atmSessionMessage.setNonce(nonce);\r\n currTimeStamp = atmSessionMessage.getTimeStamp();\r\n //encrypt the response and send it\r\n cipherText = crypto.encryptRijndael(atmSessionMessage, kSession);\r\n os.writeObject((Serializable)cipherText);\r\n \r\n //Logging.....\r\n //get the signed message and encrypt it\r\n \r\n signedMessage.encryptMessage(this.kLog);\r\n \r\n //encrypt the action\r\n //archive the signed message for logging and non-repudiation purposes \r\n SignedAction signedAction = new SignedAction(currAcct.getNumber(), atmSessionMessage.getTimeStamp(), signedMessage);\r\n \r\n //flush out transaction record to the audit file\r\n BankServer.log.write(signedAction);\r\n \r\n\t return true;\r\n }\r\n catch(Exception e){\r\n if(e instanceof TransException) replyFailure(transactionOperation,nonce);\r\n System.out.println(\"Terminating session with ACCT#: \" + currAcct.getNumber());\r\n \t//e.printStackTrace();\r\n \r\n return true;\r\n }\r\n }", "public void migrateFromTo(String srcServer, String dstServer) throws LoginException, JSONException, IOException, InterruptedException {\r\n\t\tSystem.out.println(\"migrer\");\r\n\t\tList<LXC> cts = api.getCTs(srcServer);\r\n\t\tlong timeOn = 0;\r\n\t\tlong id = -1;\r\n\t\tfor (LXC lxc : cts) {\r\n\t\t\tif(lxc.getName().contains(Constants.CT_BASE_NAME)){\r\n\t\t\t\tif(lxc.getUptime() > timeOn){\r\n\t\t\t\t\tSystem.out.println(\"mes conteneurs\");\r\n\t\t\t\t\ttimeOn = lxc.getUptime();\r\n\t\t\t\t\tSystem.out.println(id);\r\n\t\t\t\t\t\r\n\t\t\t\t\tid = Integer.parseInt(lxc.getVmid());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(id);\r\n\t\tif(id > 0){\r\n\t\t\tString idCT = Long.toString(id);\r\n\t\t\tSystem.out.println(\"migrate CT\");\r\n\t\t\tapi.stopCT(srcServer, idCT);\r\n\t\t\tSystem.out.print(\"stopping CT...\");\r\n\t\t\tint i = 0;\r\n\t\t\twhile(i!=5){\r\n\t\t\t\ti++;\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t\tSystem.out.print(\".\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\tSystem.out.print(\"migrating CT...\");\r\n\t\t\tapi.migrateCT(srcServer, idCT, dstServer);\r\n\t\t\tint j = 0;\r\n\t\t\twhile(j!=20){\r\n\t\t\t\tj++;\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t\tSystem.out.print(\".\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"migrated and started\");\r\n\t\t\tapi.startCT(dstServer, idCT);\r\n\t\t}\r\n\t}", "private void log() {\n\t\t\n//\t\tif (trx_loggin_on){\n\t\t\n\t\tif ( transLogModelThreadLocal.get().isTransLoggingOn() ) {\n\t\t\t\n\t\t\tTransLogModel translog = transLogModelThreadLocal.get();\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\ttransactionLogger.info(\"\"); // don't really need a msg here\n\t\t\t\n\t\t\t// TODO MDC maybe conflic with existing MDC using in the project\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\t\n\t\t\ttranslog.getAttributesOnce().clear();\n\t\t}\n\t\t\n\t}", "synchronized public boolean submitNewTransaction(StealthTransferData transfer) throws Exception {\n // First step is to validate the Transaction\n if (!validateTransaction(transfer)) {\n out.println(\"Couldn't validate transfer\");\n return false;\n }\n\n // Add it to the queue to be handled by the executor\n queue.put(transfer);\n MixStatusManager.getInstance().newStealthTransfer(transfer);\n\n return true;\n }", "public boolean recoverMovement(int op_id, int mv_amount, int account_id, int final_balance, Connection con){\n try {\n executeMovement(op_id, mv_amount, account_id, final_balance, con);\n } catch (SQLException e) {\n try {\n con.rollback();\n return false;\n } catch (SQLException e1) {\n e1.printStackTrace();\n return false;\n }\n }\n return true;\n }", "public void execute(){\n drivetrain.tankDrive(0.6 * direction, 0.6 * direction);\n // slower than full speed so that we actually bring down the bridge,\n // not just slam it and push balls the wrong way\n }" ]
[ "0.68208754", "0.6401826", "0.63250905", "0.6275406", "0.6091655", "0.606728", "0.606435", "0.59552896", "0.59418136", "0.5927436", "0.5863398", "0.5848647", "0.57836354", "0.5747468", "0.57449144", "0.566093", "0.5650112", "0.5647749", "0.55878407", "0.5574072", "0.55552334", "0.55495673", "0.5478463", "0.54737335", "0.5466946", "0.54488695", "0.5443707", "0.5407988", "0.5386549", "0.53745544", "0.5362926", "0.53453463", "0.53439033", "0.533675", "0.5325024", "0.53064287", "0.5291811", "0.52918005", "0.5291685", "0.5286428", "0.5279606", "0.5276077", "0.52625877", "0.52514976", "0.524994", "0.524206", "0.5222487", "0.52216935", "0.52117604", "0.52043724", "0.51981175", "0.51973873", "0.5192384", "0.51900285", "0.51827526", "0.51680243", "0.5165015", "0.5157271", "0.5154611", "0.5152704", "0.514477", "0.5139295", "0.5135579", "0.51286334", "0.51262194", "0.5125579", "0.5124446", "0.5123348", "0.51161516", "0.5100217", "0.5092094", "0.5091192", "0.5080019", "0.5072482", "0.50657016", "0.50598156", "0.5055051", "0.5047671", "0.5044826", "0.5043492", "0.50426173", "0.50424796", "0.50300366", "0.5027534", "0.50199896", "0.5002232", "0.50021636", "0.5001682", "0.50013226", "0.5000341", "0.4999352", "0.49989134", "0.4997403", "0.4984932", "0.49836403", "0.49735224", "0.49627858", "0.49523333", "0.49509847", "0.49475774" ]
0.5658131
16
Make transfer in recovery execution mode(logs de transfer with given id operations table)
public boolean recoverTransfer(int op_id, int tr_amount, int from_account, int to_account, int from_final_balance, int to_final_balance, Connection con){ try { executeTransfer(op_id, tr_amount, from_account, to_account, from_final_balance, to_final_balance, con); } catch (SQLException e) { try { con.rollback(); return false; } catch (SQLException e1) { e1.printStackTrace(); return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void performRecovery();", "public void doRollback() throws Exception{\n /* rollback to last stable checkpoint */\n rStateManager.rollback();\n\n /* gets the last stable checkpoint, or zero if it doesn't exist */\n long seqn = rStateManager.getCurrentCheckpointID();\n\n IRecoverableServer lServer = (IRecoverableServer)getServer();\n \n getStateLog().setNextExecuteSEQ(seqn + 1);\n getStateLog().setCheckpointLowWaterMark(seqn);\n\n if(seqn >= 0){\n lServer.setCurrentState(rStateManager.getCurrentState());\n }else{\n lServer.setCurrentState(null);\n }\n\n if(seqn > getCurrentPrePrepareSEQ()){\n getStateLog().setNextPrePrepareSEQ(seqn+1);\n }else{\n tryExecuteRequests();\n }\n \n }", "public void rollbackTx()\n\n{\n\n}", "@Transactional\n\tpublic Object rollBackAllWithDifferentTx(String action) {\n\t\tObject res;\n\t\ttry {\n\t\t\tres = annotationSubService.throwRunTimeExceptionInNewTx(action);\n\t\t\tuniActionLogDao.insert(res);\n\t\t\treturn res;\n\t\t} catch (Exception e) {\n\t\t\tres = \"F\";\n\t\t\tuniActionLogDao.insert(res);\n\t\t\tthrow e;\n\t\t}\n\t}", "private void performStateOperation(String tiid, EOperations operation,\n Map<String, Object> parameters) throws HumanTaskManagerException {\n try {\n log.info(operation.toString() + \" on Task \" + tiid);\n sdap.beginTx();\n TaskStructure taskStructure = new TaskStructure(tiid);\n\n // check if the External Task of the structure is already exited by\n // the parent task\n taskStructure.checkExternalTask();\n\n // check if the task is locked or controlled\n taskStructure.checkGeneralOperationPreconditions();\n\n // check if the correct state pair for this operation are given\n taskStructure.checkStatesForOperation(operation);\n\n // propagate operation on all descendants\n taskStructure.propagateStateOperation(operation, parameters);\n\n // propagate operation on all predecessor\n taskStructure.propagateStateToPredecessor();\n\n sdap.commitTx();\n } catch (DatabaseException e) {\n sdap.rollbackTx();\n throw new HumanTaskManagerException(e);\n } finally {\n sdap.close();\n }\n }", "private static boolean writeOperation(Transaction txn, Operation oper) {\n int var_id = oper.getvarid();\n int trans_id = txn.getId();\n List<Variable> variableList = null;\n // ********NEED TO CHANGE\n\n if (txn.checkForWrite(var_id, oper.getValue())) {\n // checking value in own\n System.out.println(\"Writing new value to self locked variable\");\n return true;\n }\n\n if (!isVariableLocked(var_id)) {\n // Along side locking the variable, check if the variable is justRecovered\n // If so, set the justRecovered flag of the variable to false for the site\n // which is recovering. (Not for the DOWN or UP site)\n // TO DO .. check for all the sites where this variable resides\n // If the site status is RECOVERING, set the justRecovered flag to false\n // for that copy of the variable.\n\n // System.out.println(\"writeOperation::Variable not locked\");\n // getting all variable copies\n variableList = writelockVariable(var_id);\n\n if (!variableList.isEmpty()) {\n\n // not sure about use of this below statement\n txn.addOperationToTransaction(oper);\n\n // add to transaction variable-transaction map\n addVariableToMap(trans_id, var_id);\n\n // since we got the lock we can execute it\n // add all the variables of each site to the commit map of transaction\n for (Variable v : variableList) {\n\n txn.addOperationToCommitMap(v, oper.getValue());\n }\n\n System.out\n .println(\"T\" + trans_id + \" Writing \" + oper.getValue() + \" to variable x\" + var_id);\n\n } else {\n Tuple<Transaction, Operation> t = new Tuple<Transaction, Operation>(txn, oper);\n System.out.println(\"T\" + trans_id + \" needs to Wait\");\n\n waitingRecoverOperations.add(t);\n // releaseResources(trans_id);\n // clearWaitingOperations();\n }\n\n } else {\n // check if already waiting\n // if (!alreadyWaiting(txn, oper)) {\n\n\n // }\n\n\n // add to waiting transaction list\n // we need to add edge to the graph\n // first we check if an edge already exists that is\n // check the dependency between transactions\n // and check if there is a deadlock;\n // find the transaction which has lock on this variables\n // and add the dependency edge.\n\n\n // System.out.println(\"writeOperation::Variable is locked\");\n List<Integer> independent_trans_ids = transaction_variable_map.get(var_id);\n\n\n // read locked by self\n if (independent_trans_ids.contains(trans_id)) {\n // System.out.println(\"self contained \");\n List<Integer> list = getTransactionsWaiting(var_id);\n\n if (!list.isEmpty()) {\n // some other transaction is waiting for same variable\n // and this variable was previously locked by me too\n // so deadlock\n int secondTrans = list.get(0);\n if (transactions.get(secondTrans).getStartTime() <= transactions.get(trans_id)\n .getStartTime()) {\n\n // i M getting killed\n releaseResources(trans_id);\n System.out.println(\"Aborted :\" + trans_id);\n clearWaitingOperations();\n return false;\n\n } else {\n // i am not youngest, i can get lock now\n releaseResources(secondTrans);\n clearWaitingOperations();\n System.out.println(\"Aborted :\" + secondTrans);\n }\n\n\n\n }\n\n\n if (independent_trans_ids.size() == 1) {\n // i am the only transaction working on this variable so i can upgrade my lock\n System.out.println(\"Upgrading lock\");\n variableList = writelockVariable(var_id);\n\n if (!variableList.isEmpty()) {\n\n // not sure about use of this below statement\n txn.addOperationToTransaction(oper);\n\n // add to transaction variable-transaction map\n addVariableToMap(trans_id, var_id);\n\n // since we got the lock we can execute it\n // add all the variables of each site to the commit map of transaction\n for (Variable v : variableList) {\n\n txn.addOperationToCommitMap(v, oper.getValue());\n }\n System.out.println(\n \"T\" + trans_id + \" Writing \" + oper.getValue() + \" to variable x\" + var_id);\n\n\n\n } else {\n Tuple<Transaction, Operation> t = new Tuple<Transaction, Operation>(txn, oper);\n\n waitingRecoverOperations.add(t);\n System.out.println(\"T\" + trans_id + \" needs to Wait\");\n // releaseResources(trans_id);\n // clearWaitingOperations();\n }\n\n return true;\n }\n\n\n }\n\n System.out.println(\"T\" + trans_id + \" needs to Wait\");\n\n for (Integer independent_trans_id : independent_trans_ids) {\n if (independent_trans_id == trans_id)\n continue;\n if (checkAndAddDependency(trans_id, independent_trans_id)) {\n\n if (!alreadyWaiting(txn, oper)) {\n // System.out.println(\"writeOperation:: Not already waiting\");\n Tuple<Transaction, Operation> t = new Tuple<Transaction, Operation>(txn, oper);\n\n waitingOperations.add(t);\n\n\n\n }\n }\n }\n\n\n return false;\n }\n\n return true;\n\n }", "public boolean reducir_log(){\n\t\t//se carga la consulta a una varible tipo string\n\t\tString query = \"exec sp_reducir_log_de_transacciones\";\n\t\t//variable distancia a la clase connection\n\t\tConnection con = new Connexion().conexion();\n //se declara la variable que prepara el query primero nula\n\t\tPreparedStatement pstmt = null;\n\t //intenta o carga el error \t\n\t\t\n\t\t\n\t\t\t\n\t\ttry {\n\t \t//se inicializa ala transaccion en falto hasta el commit\n\t\t\tcon.setAutoCommit(false);\n\t\t\t//prepara la coneccion con el query\n\t\t\tpstmt = con.prepareStatement(query);\n\t\t\t//ejecuta el query \n\t\t\tpstmt.execute();\n //si se ejecuta la transaccion la marcara como verdadero \t\t\n \t\t\tcon.commit();\n\t\t\t//cacha el error\n \t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tif (con != null){\n\t\t\t\ttry {\n\t\t\t\t\tSystem.out.println(\"La transacción ha sido abortada\");\n\t\t\t\t\tcon.rollback();\n\t\t\t\t} catch(SQLException ex) {\n\t\t\t\t\tSystem.out.println(ex.getMessage());\n\t\t\t\t}\n\t\t\t} \n\t\t\treturn false;\n\t\t\t\n\t\t}finally{\n\t\t\ttry {\n\t\t\t\tpstmt.close();\n\t\t\t\tcon.close();\n\t\t\t} catch(SQLException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\t\t\n\t\treturn true;\n\t}", "public void transact() {\n\t\truPay.transact();\n\n\t}", "public boolean recoverMovement(int op_id, int mv_amount, int account_id, int final_balance, Connection con){\n try {\n executeMovement(op_id, mv_amount, account_id, final_balance, con);\n } catch (SQLException e) {\n try {\n con.rollback();\n return false;\n } catch (SQLException e1) {\n e1.printStackTrace();\n return false;\n }\n }\n return true;\n }", "public static void deshabilitarTransaccionManual() {\n try {\n\n con.setAutoCommit(true);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void recovery() {\n\t\tRecordTable recordTable = new RecordTable(); \n\t\tjava.util.List<FileRecordInfoModel> lst = null;\n\t\ttry {\n\t\t\tlst = recordTable.findAllRows();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor(FileRecordInfoModel model : lst)\n\t\t\t_recordSingle.addParam(model,false);\n\t\t\t// 读取配置,看是否需要扫描文件。--以后加\n\t}", "@Transactional\n\tpublic Object rollBackAllWithSameTx2(String action) {\n\t\tObject res;\n\t\ttry {\n\t\t\tres = annotationSubService.throwRunTimeExceptionInSameTx(action);\n\t\t} catch (Exception e) {\n\t\t\tres = \"F\";\n\t\t}\n\t\tuniActionLogDao.insert(res);\n\t\treturn res;\n\t}", "@Override\n\tpublic boolean blockRestored(String id) {\n\t\treturn true;\n\t}", "public void preMigration(Context context , String[]args) throws Exception\r\n {\r\n\t try {\r\n\t\t mqlLogRequiredInformationWriter(\"\\n\\n\");\r\n\t\t mqlLogRequiredInformationWriter(\"Inside PreMigration method to stamp the ids ----->\"+ \"\\n\");\r\n\t\t //loadResourceFile(context, \"emxConfigurationMigration\");\r\n\t\t mqlLogRequiredInformationWriter(\"Resource file loaded ------> emxConfigurationMigration.properties\");\r\n\t\t mqlLogRequiredInformationWriter(\"\\n\\n\");\r\n\r\n\t\t String strMqlCommandOff = \"trigger off\";\r\n\t\t MqlUtil.mqlCommand(context,strMqlCommandOff,true);\r\n\t\t mqlLogRequiredInformationWriter(\" 'trigger off' done at the start of preMigration \" + \"\\n\");\r\n\r\n\t\t IS_CONFLICT = false;\r\n\t\t StringBuffer sbRelPattern = new StringBuffer(50);\r\n\t\t sbRelPattern.append(ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM);\r\n\t\t sbRelPattern.append(\",\");\r\n\t\t sbRelPattern.append(ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO);\r\n\t\t sbRelPattern.append(\",\");\r\n\t\t sbRelPattern.append(ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM);\r\n\r\n\t\t StringBuffer sbTypePattern1 = new StringBuffer(50);\r\n\t\t sbTypePattern1.append(ConfigurationConstants.TYPE_FEATURES);\r\n\t\t sbTypePattern1.append(\",\");\r\n\t\t sbTypePattern1.append(ConfigurationConstants.TYPE_FEATURE_LIST);\r\n\t\t sbTypePattern1.append(\",\");\r\n\t\t sbTypePattern1.append(ConfigurationConstants.TYPE_PRODUCTS);\r\n\r\n\t\t emxVariantConfigurationIntermediateObjectMigration_mxJPO jpoInst= new emxVariantConfigurationIntermediateObjectMigration_mxJPO(context, new String[0]);\r\n\t\t StringList slDerivationChangedType1 = jpoInst.getDerivationChangedType(context,new String[0]);\r\n\t\t for(int i=0;i<slDerivationChangedType1.size();i++){\r\n\t\t\t sbTypePattern1.append(\",\");\r\n\t\t\t sbTypePattern1.append(slDerivationChangedType1.get(i));\r\n }\r\n\r\n\t\t StringList fsObjSelects = new StringList();\r\n\t\t fsObjSelects.addElement(SELECT_ID);\r\n\t\t fsObjSelects.addElement(SELECT_TYPE);\r\n\t\t fsObjSelects.addElement(SELECT_NAME);\r\n\t\t fsObjSelects.addElement(SELECT_REVISION);\r\n\t\t fsObjSelects.addElement(SELECT_LEVEL);\r\n\t\t fsObjSelects.addElement(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE + \"]\");\r\n\t\t fsObjSelects.addElement(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT + \"]\");\r\n\t\t fsObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.type\");\r\n\t\t fsObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.id\");\r\n\t\t fsObjSelects.addElement(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].from.attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE + \"]\");\r\n\r\n\t\t //Added to check for GBOM connection if any\r\n\t\t fsObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\t\t fsObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_TO+\"].to.id\");\r\n\r\n\r\n\t\t StringBuffer sbRelPattern1 = new StringBuffer(50);\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_GBOM);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_GBOM_FROM);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_INACTIVE_GBOM);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_CUSTOM_GBOM);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_VARIES_BY);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_INACTIVE_VARIES_BY);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(RELATIONSHIP_MANAGED_SERIES);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_QUANTITY_RULE);\r\n\r\n\t\t StringBuffer sbTypePattern2 = new StringBuffer(50);\r\n\t\t sbTypePattern2.append(ConfigurationConstants.TYPE_GBOM);\r\n\t\t sbTypePattern2.append(\",\");\r\n\t\t sbTypePattern2.append(ConfigurationConstants.TYPE_FEATURES);\r\n\t\t sbTypePattern2.append(\",\");\r\n\t\t sbTypePattern2.append(ConfigurationConstants.TYPE_QUANTITY_RULE);\r\n\t\t sbTypePattern2.append(\",\");\r\n\t\t sbTypePattern2.append(ConfigurationConstants.TYPE_MASTER_FEATURE);\r\n\r\n\r\n\t\t warningLog = new FileWriter(documentDirectory + \"migration.log\", true);\r\n\r\n\r\n\t\t documentDirectory = args[0];\r\n\t\t String fileSeparator = java.io.File.separator;\r\n\t\t if(documentDirectory != null && !documentDirectory.endsWith(fileSeparator)){\r\n\t\t\t documentDirectory = documentDirectory + fileSeparator;\r\n\t\t }\r\n\r\n\r\n\t\t if(args.length > 3){\r\n\r\n\t\t\t RESOLVE_CONFLICTS = args[3];\r\n\t\t\t mqlLogRequiredInformationWriter( \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"This step will also resolve the conflicts related \"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"to 'Mixed Composition' and 'Malformed GBOM/Feature List' Object ids\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"at the end of the step, \"\r\n \t\t\t\t\t\t + \" if present.\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"NOTE : User has to resolve the conflicts related \"\r\n\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"to 'Mixed Usage' and 'Incorrect Mapping' related Object ids\"\r\n\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"at the end of the step, \"\r\n\t\t\t\t\t \t\t\t\t\t\t + \" if present.\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"\\n\");\r\n\r\n\t\t }else{\r\n\r\n\t\t\t mqlLogRequiredInformationWriter( \"\\n\"\r\n\t\t\t\t\t\t \t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t\t \t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t\t \t\t\t\t\t + \"This step will resolve the conflicts related \"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"to 'Malformed GBOM/Feature List' Object ids\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"at the end of the step, \"\r\n \t\t\t\t\t\t + \" if present.\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t\t \t\t\t\t\t + \"NOTE : User has to resolve the conflicts related \"\r\n\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"to 'Mixed Composition','Mixed Usage' and 'Incorrect Mapping' related Object ids\"\r\n\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"at the end of the step, \"\r\n\t\t\t\t\t \t\t\t\t\t\t + \" if present.\"\r\n\t\t\t\t\t\t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t\t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t\t\t\t\t\t\t +\"\\n\");\r\n\t\t }\r\n\r\n\t\t\t String strMinRange = args[1].toString();\r\n\t\t\t minRange = Integer.parseInt(strMinRange);\r\n\t\t\t if (\"n\".equalsIgnoreCase(args[2])){\r\n\t\t\t\t maxRange = getTotalFilesInDirectory();\r\n\t\t\t } else {\r\n\t\t\t\t maxRange = Integer.parseInt(args[2]);\r\n\t\t\t }\r\n\r\n\t\t\t // Execute schema changes needed for migration\r\n\t\t\t //we should only call this once the first time the Find Objects Pre Migration is called.\r\n\t\t\t //If In process of PreMigration, do not call again\r\n\t\t\t int migrationStatus = getAdminMigrationStatus(context);\r\n\t\t\t mqlLogRequiredInformationWriter(\"If Migration Status is -------> 0 \"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"'VariantConfigurationR212SchemaChangesForMigration.tcl' will be executed.\"+\"\\n\\n\");\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"If Migration Status is ------->'PreMigrationInProcess' \"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"'VariantConfigurationR212SchemaChangesForMigration.tcl' will not be executed\"\r\n\t\t\t \t\t\t\t\t\t\t\t +\"\\n\"\r\n\t\t\t \t\t\t\t\t\t\t\t + \"as this TCL is already executed\"+\"\\n\\n\");\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"If Migration Status is ------->'PreMigrationComplete' \"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"Pre Migration step is done.\"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"Please execute the next step to continue with Migration.\"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\\n\");\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"Now the Migration Status is \"+ migrationStatus +\"\\n\\n\");\r\n\r\n\t\t\t if(migrationStatus == 0){\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"'VariantConfigurationR212SchemaChangesForMigration.tcl' execution started...\" + \"\\n\\n\");\r\n\t\t\t\t String cmdString = \"execute program VariantConfigurationR212SchemaChangesForMigration.tcl\";\r\n\t\t\t\t ContextUtil.pushContext(context);\r\n\t\t\t\t MqlUtil.mqlCommand(context, cmdString);\r\n\r\n\t\t\t\t //${CLASS:emxAdminCache}.reloadSymbolicName(context, \"type_ConfigurationFeature\");\r\n\r\n\t\t\t\t TYPE_CONFIGURATION_FEATURE = getSchemaProperty(context, \"type_ConfigurationFeature\");\r\n\r\n\t\t\t\t ContextUtil.popContext(context);\r\n\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"'VariantConfigurationR212SchemaChangesForMigration.tcl' execution is done...\"+ \"\\n\");\r\n\t\t\t }\r\n\t\t\t //------------------------------------------------\r\n\t\t\t //Now to read the files\r\n\t\t\t //------------------------------------------------\r\n\t\t\t int m = 0;\r\n\t\t\t for( m = minRange;m <= maxRange; m++){\r\n\t\t\t\t StringList objectList = new StringList();\r\n\t\t\t\t try{\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Pre-migration in process for objects in objectids_\"+ m +\".txt file. \\n\\n\");\r\n\r\n\t\t\t\t\t //setting admin property MigrationR212VariantConfiguration in eServiceSystemInformation.tcl\r\n\t\t\t\t\t setAdminMigrationStatus(context,\"PreMigrationInProcess\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Migration Status set to value ----->\"+ \"'PreMigrationInProcess'\" +\"\\n\\n\");\r\n\r\n\t\t\t\t\t objectList = readFiles(m);\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"objectids_\"+ m +\".txt file traversal started \" + \"\\n\\n\");\r\n\t\t\t\t\t for(int iCntObjList=0 ;iCntObjList<objectList.size();iCntObjList++){\r\n\t\t\t\t\t\t String topLevelObjectId = (String)objectList.get(iCntObjList);\r\n\r\n\t\t\t\t\t\t String topLevelObjectType =\"\";\r\n\t\t\t\t\t\t DomainObject domTopLevelObject = DomainObject.newInstance(context, topLevelObjectId);\r\n\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"topLevelObjectType------------\"+ topLevelObjectType + \"\\n\");\r\n\t\t\t\t\t\t //topLevelObjectType = domTopLevelObject.getInfo(context, ConfigurationConstants.SELECT_TYPE);\r\n\t\t\t\t\t\t Map htTopLevelObjData = (Map) domTopLevelObject.getInfo(context, fsObjSelects);\r\n\t\t\t\t\t\t topLevelObjectType = (String)htTopLevelObjData.get(ConfigurationConstants.SELECT_TYPE);\r\n\t\t\t\t\t\t String topLevelObjectName= (String)htTopLevelObjData.get(ConfigurationConstants.SELECT_NAME);\r\n\t\t\t\t\t\t String topLevelObjectRevision = (String)htTopLevelObjData.get(ConfigurationConstants.SELECT_REVISION);\r\n\t\t\t\t\t\t Integer iCnt;\r\n\t\t\t\t\t\t iCnt= iCntObjList+1;\r\n\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"------------------------------------------------------------------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Stamping of objects for below Top level object's structure started----->\"+\" --- \"+now()+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Object Count in text file ----->\"+iCnt+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object Id ----------->\"+topLevelObjectId+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object Type --------->\"+topLevelObjectType+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object Name --------->\"+topLevelObjectName+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object Revision ----->\"+topLevelObjectRevision+\"\\n\");\r\n\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t //Check if \"GBOM\" object is connected to Configuration Feature or Configuration Option\r\n\t\t\t\t\t\t //DomainObject domFeatObj = new DomainObject(strFeatureId);\r\n\t\t\t\t\t\t StringList TopLevelfeatureObjSelects = new StringList();\r\n\t\t\t\t\t\t TopLevelfeatureObjSelects.addElement(SELECT_TYPE);\r\n\t\t\t\t\t\t TopLevelfeatureObjSelects.addElement(SELECT_NAME);\r\n\t\t\t\t\t\t TopLevelfeatureObjSelects.addElement(SELECT_REVISION);\r\n\t\t\t\t\t\t TopLevelfeatureObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\r\n\t\t\t\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\t\t\t\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\r\n\t\t\t\t\t\t //topLevelObjectType = domTopLevelObject.getInfo(context, ConfigurationConstants.SELECT_TYPE);\r\n\t\t\t\t\t\t topLevelObjectType = (String)htTopLevelObjData.get(SELECT_TYPE);\r\n\r\n\t\t\t\t\t\t\t StringList sLTopLevelGBOMIds = new StringList();\r\n\r\n\t\t\t\t\t\t\t String TopLevelGBOMSelect = \"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\";\r\n\t\t\t\t\t\t\t Object objTopLevelGBOMId = htTopLevelObjData.get(TopLevelGBOMSelect);\r\n\r\n\t\t\t\t\t\t\t if (objTopLevelGBOMId instanceof StringList) {\r\n\t\t\t\t\t\t\t\t sLTopLevelGBOMIds = (StringList) htTopLevelObjData.get(TopLevelGBOMSelect);\r\n\t\t\t\t\t\t\t } else if (objTopLevelGBOMId instanceof String) {\r\n\t\t\t\t\t\t\t\t sLTopLevelGBOMIds.addElement((String) htTopLevelObjData.get(TopLevelGBOMSelect));\r\n\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t emxVariantConfigurationIntermediateObjectMigration_mxJPO VariantConfigInterObjMigrationInst= new emxVariantConfigurationIntermediateObjectMigration_mxJPO(context, new String[0]);\r\n\t\t\t\t\t\t StringList slDerivationChangedType = VariantConfigInterObjMigrationInst.getDerivationChangedType(context,new String[0]);\r\n\r\n\r\n\t StringBuffer sbWhereClause = new StringBuffer(50);\r\n\t\tsbWhereClause.append(\"((\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+ \"].from.type.kindof != \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\tsbWhereClause.append(\")||(\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+ \"].from.type.kindof != \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\tsbWhereClause.append(\"))||\");\r\n\t\tsbWhereClause.append(\"((\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+ \"].from.type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\tsbWhereClause.append(\"&&\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+ \"].from.id == \"+topLevelObjectId +\"\");\r\n\t\tsbWhereClause.append(\")||(\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+ \"].from.type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\tsbWhereClause.append(\"&&\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+ \"].from.id == \"+topLevelObjectId +\"\");\r\n\t\tsbWhereClause.append(\")\");\r\n\t\tsbWhereClause.append(\")\");\r\n\r\n\t\t\t\t\t\t\tStringBuffer sbObjWhere = new StringBuffer(50);\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"(\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_FEATURES + \"\\\"\");\r\n\t\t\t\t\t\t\tfor(int i=0;i<slDerivationChangedType.size();i++){\r\n\t\t\t\t\t\t\t\tsbObjWhere.append(\"||\");\r\n\t\t\t\t \t\t\tsbObjWhere.append(\"type == \\\"\" + slDerivationChangedType.get(i).toString() + \"\\\"\");\r\n\t\t\t\t }\r\n\t\t\t\t\t\t\tsbObjWhere.append(\")\");\r\n\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"||\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"||\");\r\n\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"(\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"type == \\\"\" + ConfigurationConstants.TYPE_FEATURE_LIST + \"\\\"\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"&&\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(sbWhereClause);\r\n\t\t\t\t\t\t\tsbObjWhere.append(\")\");\r\n\r\n\r\n\t\t\t\t\t\t\tDomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Query to get the Top level object structure started ------------>\"+\" --- \"+ now() +\"\\n\");\r\n\r\n\t\t\t\t\t\t MapList featureStructureList = domTopLevelObject.getRelatedObjects(context,\r\n\t\t\t\t\t\t\t\t sbRelPattern.toString(), // relationshipPattern\r\n\t\t\t\t\t\t\t\t sbTypePattern1.toString(), // typePattern\r\n\t\t\t\t\t\t\t\t fsObjSelects, // objectSelects\r\n\t\t\t\t\t\t\t\t null, // relationshipSelects\r\n\t\t\t\t\t\t\t\t false, // getTo\r\n\t\t\t\t\t\t\t\t true, // getFrom\r\n\t\t\t\t\t\t\t\t (short) 0, // recurseToLevel\r\n\t\t\t\t\t\t\t\t sbObjWhere.toString(), // objectWhere,\r\n\t\t\t\t\t\t\t\t null, // relationshipWhere\r\n\t\t\t\t\t\t\t\t (int)0); // limit\r\n\r\n\t\t\t\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Query to get the Top level object structure ended ------------>\"+\" --- \"+ now() +\"\\n\");\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\\n\\n\");\r\n\r\n\t\t\t\t\t\t String strNewFeatureType = \"\";\r\n\t\t\t\t\t\t String strResolvedNewFeatureType= \"\";\r\n\r\n\t\t\t\t\t\t // use case for standalone features\r\n\t\t\t\t\t\t if (featureStructureList.size() == 0){\r\n\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\" This Top level object structure doesn't have 'Feature List From' and 'Feature List To' connections \"+\"\\n\");\r\n\t\t\t\t\t //mqlLogRequiredInformationWriter(\" Check if this feature has 'Design Variants'or 'GBOM' or 'Managed Series' or 'Quantity Rules' connected \"+\"\\n\");\r\n\t\t\t\t\t //mqlLogRequiredInformationWriter(\" If 'Yes' then stamp this Feature as 'type_LogicalFeature'\"+\"\\n\");\r\n\t\t\t\t\t //mqlLogRequiredInformationWriter(\" If 'No' then check for the property setting for this Feature \"+\"\\n\");\r\n\t\t\t\t\t //mqlLogRequiredInformationWriter(\" If property setting not found for the given type..Check for Parent Type and then set the Type \"+\"\\n\\n\\n\");\r\n\r\n\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Query to check for 'Design Variants' or 'GBOM' or 'Managed Series' or 'Quantity Rules' connections started ------------>\"+\" --- \"+ now() +\"\\n\");\r\n\t\t\t\t\t\t MapList LF_RelatedList = domTopLevelObject.getRelatedObjects(context,\r\n\t\t\t\t\t\t\t\t\t sbRelPattern1.toString(), // relationshipPattern\r\n\t\t\t\t\t\t\t\t\t sbTypePattern2.toString(), // typePattern\r\n\t\t\t\t\t\t\t\t\t null, // objectSelects\r\n\t\t\t\t\t\t\t\t\t null, // relationshipSelects\r\n\t\t\t\t\t\t\t\t\t true, // getTo\r\n\t\t\t\t\t\t\t\t\t true, // getFrom\r\n\t\t\t\t\t\t\t\t\t (short) 1, // recurseToLevel\r\n\t\t\t\t\t\t\t\t\t null, // objectWhere,\r\n\t\t\t\t\t\t\t\t\t null, // relationshipWhere\r\n\t\t\t\t\t\t\t\t\t (int) 0); // limit\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Query to check for 'Design Variants' or 'GBOM' or 'Managed Series' or 'Quantity Rules' connections ended ------------>\"+\" --- \"+ now() +\"\\n\");\r\n\r\n\r\n\t\t\t\t\t\t\t // if feature has DVs or GBOM or Managed Series or Quantity Rules, it should be stamped as Logical\r\n\t\t\t\t\t\t\t if (!LF_RelatedList.isEmpty()) {\r\n\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"This Top level object has 'Design Variants' or 'GBOM' or 'Managed Series' or 'Quantity Rules' connections'\"+\"\\n\");\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Hence stamp this Feature as attribute ---> NewFeatureType=type_LogicalFeature \"+\"\\n\");\r\n\t\t\t\t\t\t\t\t //strNewFeatureType = getResourceProperty(context,\"emxConfiguration.Migration.TechnicalFeatureType\");\r\n\t\t\t\t\t\t\t\t strNewFeatureType = EnoviaResourceBundle.getProperty(context, \"emxConfigurationMigration\", Locale.US, \"emxConfiguration.Migration.TechnicalFeatureType\");\r\n\t\t\t\t\t\t\t\t stampFeature(context,topLevelObjectId,strNewFeatureType,\"\",EMPTY_STRINGLIST);\r\n\r\n\t\t\t\t\t\t\t } else {\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"This Top level object doesn't have the 'Design Variants' or 'GBOM' or 'Managed Series' or 'Quantity Rules' connections'\"+\"\\n\");\r\n\t\t\t\t\t\t\t\t if(topLevelObjectType!=null\r\n\t\t\t\t\t\t\t\t\t\t && !topLevelObjectType.equalsIgnoreCase(ConfigurationConstants.TYPE_PRODUCT_LINE)\r\n\t\t\t\t\t\t\t\t\t\t && !topLevelObjectType.equalsIgnoreCase(ConfigurationConstants.TYPE_GBOM)\r\n\t\t\t\t\t\t\t\t\t\t && !mxType.isOfParentType(context, topLevelObjectType,ConfigurationConstants.TYPE_PRODUCTS)){\r\n\t\t\t\t\t\t\t\t\t\t //&& !isOfDerivationChangedType(context,topLevelObjectType)){\r\n\r\n\t\t\t\t\t\t\t\t\t String strSymbolicType = FrameworkUtil.getAliasForAdmin(context,DomainConstants.SELECT_TYPE, topLevelObjectType, true);\r\n\t\t\t\t\t\t\t\t\t try{\r\n\t\t\t\t\t\t\t\t\t\t //strNewFeatureType = getResourceProperty(context,\"emxConfiguration.Migration.\"+strSymbolicType);\r\n\t\t\t\t\t\t\t\t\t\t strNewFeatureType = EnoviaResourceBundle.getProperty(context, \"emxConfigurationMigration\", Locale.US, \"emxConfiguration.Migration.\"+strSymbolicType);\r\n\t\t\t\t\t\t\t\t\t }catch (Exception e){\r\n\t\t\t\t\t\t\t\t\t\t //If property setting not found for the given type..Check for Parent Type and then set the Type\r\n\t\t\t\t\t\t\t\t\t\t String strParentType = UICache.getParentTypeName(context,topLevelObjectType);\r\n\t\t\t\t\t\t\t\t\t\t String strParSymbolicType = FrameworkUtil.getAliasForAdmin(context,DomainConstants.SELECT_TYPE, strParentType, true);\r\n\t\t\t\t\t\t\t\t\t\t //strNewFeatureType = getResourceProperty(context,\"emxConfiguration.Migration.\"+strParSymbolicType);\r\n\t\t\t\t\t\t\t\t\t\t strNewFeatureType = EnoviaResourceBundle.getProperty(context, \"emxConfigurationMigration\", Locale.US, \"emxConfiguration.Migration.\"+strParSymbolicType);\r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t // stamping the features\r\n\t\t\t\t\t\t\t\t\t stampFeature(context,topLevelObjectId,strNewFeatureType,\"\",EMPTY_STRINGLIST);\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }else{ // usecase for structures\r\n\r\n\t\t\t\t\t\t\t boolean isMixedUsage = false;\r\n\t\t\t\t\t\t\t boolean isMixedComposition = false;\r\n\t\t\t\t\t\t\t String referenceContextUsage=\"\";\r\n\r\n\t\t\t\t\t\t\t StringList featureTypesList = new StringList();\r\n\t\t\t\t\t\t\t // if toplevelobject is feature\r\n\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object is of Type :: \"+ topLevelObjectType +\"\\n\");\r\n\r\n\t\t\t\t\t\t\t if (mxType.isOfParentType(context, topLevelObjectType,ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t || isOfDerivationChangedType(context, topLevelObjectType)){\r\n\t\t\t\t\t\t\t\t // check for mixed usage\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Mixed Usage starts \"+ \"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t StringList allFeatureTypesList = new StringList();\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tList of Features where this Toplevel Object is used. \"+ featureStructureList.size() +\"\\n\");\r\n\t\t\t\t\t\t\t\t outer: for (int j = 0; j < featureStructureList.size(); j++){\r\n\r\n\t\t\t\t\t\t\t\t\t Map fsMap = new HashMap();\r\n\r\n\t\t\t\t\t\t\t\t\t fsMap = (Map) featureStructureList.get(j);\r\n\r\n\t\t\t\t\t\t\t\t\t String strObjectType = (String) fsMap.get(SELECT_TYPE);\r\n\t\t\t\t\t\t\t\t\t referenceContextUsage = (String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\r\n\t\t\t\t\t\t\t\t\t if(mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t\t\t\t\t\t || isOfDerivationChangedType(context, strObjectType)){\r\n\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tObject Type. \"+ strObjectType +\"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t String featureTypeSelect = \"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].from.attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\";\r\n\t\t\t\t\t\t\t\t\t\t Object objFeatureTypes = fsMap.get(featureTypeSelect);\r\n\t\t\t\t\t\t\t\t\t\t featureTypesList.clear();\r\n\r\n\t\t\t\t\t\t\t\t\t\t if (objFeatureTypes instanceof StringList) {\r\n\t\t\t\t\t\t\t\t\t\t\t featureTypesList = (StringList) fsMap.get(featureTypeSelect);\r\n\t\t\t\t\t\t\t\t\t\t } else if (objFeatureTypes instanceof String) {\r\n\t\t\t\t\t\t\t\t\t\t\t featureTypesList.addElement((String) fsMap.get(featureTypeSelect));\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tList of 'Feature Type' attribute values of connected 'Feature List' objects. \"+ featureTypesList +\"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t if (featureTypesList.size() > 0){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t for (int k = 0; k < featureTypesList.size(); k++){\r\n\t\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) featureTypesList.get(k);\r\n\t\t\t\t\t\t\t\t\t\t\t\t if (!strFeatureType.equals((String) featureTypesList.get(0))){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"As the above list is not consisitent Feature will be marked as 'MixedUsage'.\"+\"\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t isMixedUsage = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"MixedUsage\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t break outer;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Mixed Usage ends \"+ \"\\n\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Mixed Composition starts \"+ \"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t // check for mixed composition\r\n\t\t\t\t\t\t\t\t\t if (!isMixedUsage) {\r\n\t\t\t\t\t\t\t\t\t\t if (mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_FEATURE_LIST)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\t\t\t\t\t\t\t\t\t\t\t allFeatureTypesList.addElement(strFeatureType);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\t\tList of 'Feature Type' attribute values of connected 'Feature List' objects. \"+ allFeatureTypesList +\"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if(!strFeatureType.equals(allFeatureTypesList.get(0))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"As the above list is not consisitent Feature will be marked as 'MixedComposition'.\"+\"\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t isMixedComposition = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"MixedComposition\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t break outer;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Mixed Composition ends \"+ \"\\n\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t //Code to check the \"Feature List\" attribute \"Feature Type\" is correctly mapped against the Type\r\n\t\t\t\t\t\t\t\t\t //Check for incorrect mapping\r\n\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Incorrect Mapping starts \"+ \"\\n\");\r\n\t\t\t\t\t\t\t\t\t\tif (!isMixedUsage\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !isMixedComposition\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_FEATURE_LIST)\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_PRODUCTS)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t //Check for incorrect mapping\r\n\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\t\t\t\t\t\t\t\t\t\t if (strFeatureType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_TECHNICAL)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if(!mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_LOGICAL_STRUCTURES)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"IncorrectMapping\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t break outer;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t }else if(strFeatureType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_MARKETING)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if(!mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"IncorrectMapping\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t break outer;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\tmqlLogRequiredInformationWriter(\"\tCode to check Incorrect Mapping ends \"+ \"\\n\\n\");\r\n\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t // stamp the structure including topLevelObject.\r\n\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Stamp starts \"+ \"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t for (int j = 0; j < featureStructureList.size(); j++) {\r\n\t\t\t\t\t\t\t\t\t Map fsMap = (Map) featureStructureList.get(j);\r\n\r\n\t\t\t\t\t\t\t\t\t StringList sLGBOMIds = new StringList();\r\n\r\n\t\t\t\t\t\t\t\t\t String GBOMSelect = \"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\";\r\n\t\t\t\t\t\t\t\t\t Object objGBOMType = fsMap.get(GBOMSelect);\r\n\r\n\t\t\t\t\t\t\t\t\t if (objGBOMType instanceof StringList) {\r\n\t\t\t\t\t\t\t\t\t\t sLGBOMIds = (StringList) fsMap.get(GBOMSelect);\r\n\t\t\t\t\t\t\t\t\t } else if (objGBOMType instanceof String) {\r\n\t\t\t\t\t\t\t\t\t\t sLGBOMIds.addElement((String) fsMap.get(GBOMSelect));\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t String strObjectId = (String) fsMap.get(SELECT_ID);\r\n\t\t\t\t\t\t\t\t\t String strObjectType = (String) fsMap.get(SELECT_TYPE);\r\n\t\t\t\t\t\t\t\t\t boolean isLeafLevel = false;\r\n\r\n\t\t\t\t\t\t\t\t\t if(mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_FEATURES)){\r\n\t\t\t\t\t\t\t\t\t\t int subFeatureCount = Integer.parseInt((String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT + \"]\"));\r\n\t\t\t\t\t\t\t\t\t\t if(subFeatureCount==0)\r\n\t\t\t\t\t\t\t\t\t\t\t isLeafLevel = true;\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t if(!isMixedUsage && !isMixedComposition){\r\n\t\t\t\t\t\t\t\t\t\t //strNewFeatureType = getNewFeatureType(context,(String)featureTypesList.get(0),isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,(String)allFeatureTypesList.get(0),isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t }else if(isMixedComposition){\r\n\t\t\t\t\t\t\t\t\t\t //Need to get the NewResolvedFeatureType\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top Level Feature Type..\"+referenceContextUsage);\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Is this feature LeafLevel..\"+isLeafLevel);\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Type of Object..\"+strObjectType);\r\n\r\n\t\t\t\t\t\t\t\t\t\t strResolvedNewFeatureType = getNewFeatureType(context,referenceContextUsage,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t if (mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_FEATURES) ||\r\n\t\t\t\t\t\t\t\t\t\t\t mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_PRODUCTS)||\r\n\t\t\t\t\t\t\t\t\t\t\t isOfDerivationChangedType(context, strObjectType)){\r\n\r\n\t\t\t\t\t\t\t\t\t\t stampFeature(context,strObjectId,strNewFeatureType,strResolvedNewFeatureType,sLGBOMIds);\r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t //toplevel object stamping\r\n\t\t\t\t\t\t\t\t //strNewFeatureType = getNewFeatureType(context,(String)featureTypesList.get(0),false,topLevelObjectType);\r\n\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,(String)allFeatureTypesList.get(0),false,topLevelObjectType);\r\n\t\t\t\t\t\t\t\t stampFeature(context,topLevelObjectId,strNewFeatureType,strResolvedNewFeatureType,sLTopLevelGBOMIds);\r\n mqlLogRequiredInformationWriter(\"Stamp ends \"+ \"\\n\");\r\n\r\n\t\t\t\t\t\t\t }//end if toplevelobject is feature\r\n\t\t\t\t\t\t\t // if top level object is Product or ProductLine\r\n\t\t\t\t\t\t\t if (mxType.isOfParentType(context, topLevelObjectType,ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,topLevelObjectType, ConfigurationConstants.TYPE_PRODUCT_LINE)) {\r\n\r\n\t\t\t\t\t\t\t\t Map fsMap=new HashMap();\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t for (int j = 0; j < featureStructureList.size(); j++) {\r\n\r\n\t\t\t\t\t\t\t\t\t fsMap= (Map) featureStructureList.get(j);\r\n\r\n\t\t\t\t\t\t\t\t\t int level = Integer.parseInt((String) fsMap.get(SELECT_LEVEL));\r\n\t\t\t\t\t\t\t\t\t if (level == 1) {\r\n\t\t\t\t\t\t\t\t\t\t String referenceContextUsage2 = (String)fsMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t // check for substructure mixed usage\r\n\t\t\t\t\t\t\t\t\t\t StringList allFeatureTypesList = new StringList();\r\n\t\t\t\t\t\t\t\t\t\t outer2:for (int k = j; k < featureStructureList.size(); k++) {\r\n\t\t\t\t\t\t\t\t\t\t\t Map subFSMap = (Map) featureStructureList.get(k);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t String strObjectType = (String) subFSMap.get(SELECT_TYPE);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t int currentLevel = Integer.parseInt((String) subFSMap.get(SELECT_LEVEL));\r\n\t\t\t\t\t\t\t\t\t\t\t if (currentLevel == 1 && k > j) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t featureTypesList.clear();\r\n\t\t\t\t\t\t\t\t\t\t\t if (mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t ||isOfDerivationChangedType(context, strObjectType)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t String featureTypeSelect = \"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].from.attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t Object objFeatureTypes = subFSMap.get(featureTypeSelect);\r\n\t\t\t\t\t\t\t\t\t\t\t\t if (objFeatureTypes instanceof StringList) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t featureTypesList = (StringList) subFSMap.get(featureTypeSelect);\r\n\t\t\t\t\t\t\t\t\t\t\t\t } else if (objFeatureTypes instanceof String) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t featureTypesList.addElement((String) subFSMap.get(featureTypeSelect));\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t objFeatureTypes=null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t if (featureTypesList.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t for (int l = 0; l < featureTypesList.size(); l++) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) featureTypesList.get(l);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!strFeatureType.equals((String) featureTypesList.get(0))) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t isMixedUsage = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"MixedUsage\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t break outer2;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t if(!isMixedUsage){\r\n\t\t\t\t\t\t\t\t\t\t\t\t if (mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_FEATURE_LIST)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) subFSMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t allFeatureTypesList.addElement(strFeatureType);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t if (!strFeatureType.equals(allFeatureTypesList.get(0))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t isMixedComposition = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"MixedComposition\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n \t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t subFSMap=null;\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t allFeatureTypesList=null;\r\n\t\t\t\t\t\t\t\t\t\t // stamp\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\\nstamp started -----> \"+now()+\"\\n\\n\");\r\n\t\t\t\t\t\t\t\t\t\t String strObjectType=\"\";\r\n\t\t\t\t\t\t\t\t\t\t String strObjectId =\"\";\r\n\r\n\t\t\t\t\t\t\t\t\t\t for (int k = j + 1; k < featureStructureList.size(); k++) {\r\n\t\t\t\t\t\t\t\t\t\t\t Map subFSMap= (Map) featureStructureList.get(k);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t strObjectType = (String) subFSMap.get(SELECT_TYPE);\r\n\t\t\t\t\t\t\t\t\t\t\t strObjectId = (String) subFSMap.get(SELECT_ID);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t StringList sLGBOMIds = new StringList();\r\n\t\t\t\t\t\t\t\t\t\t\t String GBOMSelect = \"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\";\r\n\t\t\t\t\t\t\t\t\t\t\t Object objGBOMType = subFSMap.get(GBOMSelect);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if (objGBOMType instanceof StringList) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t sLGBOMIds = (StringList) subFSMap.get(GBOMSelect);\r\n\t\t\t\t\t\t\t\t\t\t\t } else if (objGBOMType instanceof String) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t sLGBOMIds.addElement((String) subFSMap.get(GBOMSelect));\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t int currentLevel = Integer.parseInt((String) subFSMap.get(SELECT_LEVEL));\r\n\t\t\t\t\t\t\t\t\t\t\t if (currentLevel == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"\\ncurrentLevel == 1\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t //j=k;\r\n\t\t\t\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if ((mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_FEATURES)\r\n \t\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t\t\t\t\t || isOfDerivationChangedType(context, strObjectType)))\r\n\t\t\t\t\t\t\t\t\t\t\t //)&&\r\n \t\t\t\t\t\t\t\t\t\t\t//!isOfDerivationChangedType(context, strObjectType)) {\r\n \t\t\t\t\t\t\t\t\t\t {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t boolean isLeafLevel = false;\r\n\t\t\t\t\t\t\t\t\t\t\t\t if(mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t && currentLevel != 2){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t int subFeatureCount = Integer.parseInt((String) subFSMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT + \"]\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t if(subFeatureCount==0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t isLeafLevel = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t if(!isMixedUsage && !isMixedComposition &&\r\n\t\t\t\t\t\t\t\t\t\t\t\t !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_FEATURE_LIST)\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_PRODUCTS)){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t //Code to check the \"Feature List\" attribute \"Feature Type\" is correctly mapped against the Type\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t //Check for incorrect mapping\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (strFeatureType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_TECHNICAL)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if(!(mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_LOGICAL_STRUCTURES)||\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_PRODUCTS))){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"IncorrectMapping\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }else{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,referenceContextUsage2,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t }else if(strFeatureType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_MARKETING)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if(!mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"IncorrectMapping\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }else{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,referenceContextUsage2,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t }else if(!isMixedUsage && !isMixedComposition && (mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t ||mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_PRODUCTS))){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,referenceContextUsage2,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t }else if(isMixedComposition){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t //Need to get the NewResolvedFeatureType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//Need to get the NewResolvedFeatureType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top Level Feature Type..\"+referenceContextUsage);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Is this feature LeafLevel..\"+isLeafLevel);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Type of Object..\"+strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t strResolvedNewFeatureType = getNewFeatureType(context,referenceContextUsage2,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t stampFeature(context,strObjectId,strNewFeatureType,strResolvedNewFeatureType,sLGBOMIds);\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t subFSMap=null;\r\n\t\t\t\t\t\t\t\t\t\t\t strObjectType=null;\r\n\t\t\t\t\t\t\t\t\t\t\t strObjectId=null;\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t //System.gc();\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\\nstamp END -----> \"+now()+\"\\n\");\r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t featureTypesList=null;\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Object Count in text file DONE ----->\"+ iCnt + \"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Toplevel id.DONE ----->\"+ topLevelObjectId +\"--\"+now()+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t domTopLevelObject=null;\r\n\t\t\t\t\t\t topLevelObjectId=null;\r\n\t\t\t\t\t\t //System.gc();\r\n\t\t\t\t\t }\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Pre-migration done for \"+objectList.size()+\" objects in objectids_\"+m+\".txt file. \\n\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t }catch(FileNotFoundException fnfExp){\r\n\t\t\t\t\t // throw exception if file does not exists\r\n\t\t\t\t\t throw fnfExp;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\r\n\t\t\t // Getting top level objects (this includes Feature,Products and ProductLines and also standalone features\r\n\t\t\t StringBuffer sbTypePattern = new StringBuffer(50);\r\n\t\t\t sbTypePattern.append(ConfigurationConstants.TYPE_FEATURES);\r\n\t\t\t sbTypePattern.append(\",\");\r\n\t\t\t sbTypePattern.append(ConfigurationConstants.TYPE_PRODUCTS);\r\n\t\t\t sbTypePattern.append(\",\");\r\n\t\t\t sbTypePattern.append(ConfigurationConstants.TYPE_PRODUCT_LINE);\r\n\r\n\t\t\t StringBuffer sbObjWhere = new StringBuffer(50);\r\n\t\t\t sbObjWhere.append(\"(\");\r\n\t\t\t sbObjWhere.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"]==False\");\r\n\t\t\t sbObjWhere.append(\"&&\");\r\n\t\t\t sbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_FEATURES + \"\\\"\");\r\n\t\t\t sbObjWhere.append(\")\");\r\n\t\t\t sbObjWhere.append(\"||\");\r\n\t\t\t sbObjWhere.append(\"(\");\r\n\t\t\t sbObjWhere.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"]==False\");\r\n\t\t\t sbObjWhere.append(\"&&\");\r\n\t\t\t sbObjWhere.append(\"from[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+ \"]==True\");\r\n\t\t\t sbObjWhere.append(\"&&\");\r\n\t\t\t sbObjWhere.append(\"(\");\r\n\t\t\t sbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\t\t sbObjWhere.append(\"||\");\r\n\t\t\t sbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCT_LINE + \"\\\"\");\r\n\t\t\t sbObjWhere.append(\")\");\r\n\t\t\t sbObjWhere.append(\")\");\r\n\r\n\t\t\t StringList objSelects = new StringList();\r\n\t\t\t objSelects.addElement(SELECT_ID);\r\n\t\t\t objSelects.addElement(SELECT_TYPE);\r\n\t\t\t objSelects.addElement(SELECT_NAME);\r\n\r\n\r\n\t\t\t //finding if any Feature objects in database or Product objects which have FLT relationship are not stamped\r\n\t\t\t StringBuffer unStampedTypePattern = new StringBuffer(50);\r\n\t\t\t unStampedTypePattern.append(ConfigurationConstants.TYPE_FEATURES);\r\n\t\t\t unStampedTypePattern.append(\",\");\r\n\t\t\t unStampedTypePattern.append(ConfigurationConstants.TYPE_PRODUCTS);\r\n\r\n\t\t\t emxVariantConfigurationIntermediateObjectMigration_mxJPO VariantConfigInterObjMigrationInst= new emxVariantConfigurationIntermediateObjectMigration_mxJPO(context, new String[0]);\r\n\t\t\t StringList slDerivationChangedType = VariantConfigInterObjMigrationInst.getDerivationChangedType(context,new String[0]);\r\n\r\n\t\t\t\tStringBuffer sbWhereClause = new StringBuffer(50);\r\n\t\t\t\tsbWhereClause.append(\"(\");\r\n\t\t\t\tsbWhereClause.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_FEATURES + \"\\\"\");\r\n\r\n\t\t for(int i=0;i<slDerivationChangedType.size();i++){\r\n\t\t \tunStampedTypePattern.append(\",\");\r\n\t\t \tunStampedTypePattern.append(slDerivationChangedType.get(i));\r\n\t \t\t\tsbWhereClause.append(\"||\");\r\n\t \t\t\tsbWhereClause.append(\"type.kindof == \\\"\" + slDerivationChangedType.get(i).toString() + \"\\\"\");\r\n\t\t }\r\n\t\t sbWhereClause.append(\")\");\r\n\r\n StringBuffer unStampedObjWhere = new StringBuffer(100);\r\n unStampedObjWhere.append(\"(\");\r\n unStampedObjWhere.append(sbWhereClause);\r\n unStampedObjWhere.append(\"&&\");\r\n\t\t\t unStampedObjWhere.append(\"interface[\"+ INTERFACE_FTRIntermediateObjectMigration +\"]==FALSE\");\r\n\t\t\t unStampedObjWhere.append(\")\");\r\n\t\t\t /*unStampedObjWhere.append(\"||\");\r\n\t\t\t unStampedObjWhere.append(\"(\");\r\n\t\t\t unStampedObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\t\t unStampedObjWhere.append(\"&&\");\r\n\t\t\t unStampedObjWhere.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"]==True\");\r\n\t\t\t unStampedObjWhere.append(\"&&\");\r\n\t\t\t unStampedObjWhere.append(\"interface[\"+ INTERFACE_FTRIntermediateObjectMigration +\"]==FALSE\");\r\n\t\t\t unStampedObjWhere.append(\")\");*/\r\n\r\n\t\t\t StringList sLobjSelects = new StringList();\r\n\t\t\t sLobjSelects.addElement(SELECT_NAME);\r\n\t\t\t sLobjSelects.addElement(SELECT_TYPE);\r\n\t\t\t sLobjSelects.addElement(SELECT_ID);\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"Check for unStamped Objects starts \"+\"\\n\");\r\n\r\n\t\t\t List unStampedObjectsList = DomainObject.findObjects(\r\n\t\t\t\t\t context,\r\n\t\t\t\t\t unStampedTypePattern.toString(),\r\n\t\t\t\t\t DomainConstants.QUERY_WILDCARD,\r\n\t\t\t\t\t unStampedObjWhere.toString(),\r\n\t\t\t\t\t sLobjSelects);\r\n\t\t\t mqlLogRequiredInformationWriter(\"Check for unStamped Objects ends \"+\"\\n\");\r\n\r\n\t\t\t //setting premigration status\r\n\t\t\t if(unStampedObjectsList.size()==0)\r\n\t\t\t {\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Unstamped object list size is 0.\\n\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Pre-migration is complete.\\n\");\r\n\t\t\t\t setAdminMigrationStatus(context,\"PreMigrationComplete\");\r\n\t\t\t }\r\n\t\t\t else\r\n\t {\r\n\t \tMap unStampedObjMap = new HashMap();\r\n\t \tfor(int i=0;i<unStampedObjectsList.size();i++){\r\n\r\n\t \t\tunStampedObjMap= (Map)unStampedObjectsList.get(i);\r\n\t \t\tString strUnStampId =(String)unStampedObjMap.get(SELECT_ID);\r\n\t \t\twriteOIDToTextFile(strUnStampId,\"unStampedOIDs\");\r\n\t \t}\r\n\r\n\t mqlLogRequiredInformationWriter(\"Pre-migration is not complete.\\n\");\r\n\t mqlLogRequiredInformationWriter(\"WARNING: Some Feature objects are not stamped.\\n\");\r\n\t mqlLogRequiredInformationWriter(\"Please refer unStampedOIDs.txt for details.\\n\");\r\n\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\r\n\t }\r\n\r\n\t\t\t if(IS_CONFLICT){\r\n\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"WARNING: Conflict MixedUsage/MixedComposition/MarketingGBOM exist.\" + \"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Please view file 'Conflict.txt'for a list of these objects\" + \"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"These objects need to be deleted or fixed in order to proceed with the next step of migration..\" + \"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t }\r\n\r\n\r\n\t\t\t String strMqlCommandOn = \"trigger on\";\r\n\t\t\t MqlUtil.mqlCommand(context,strMqlCommandOn,true);\r\n\t\t\t mqlLogRequiredInformationWriter(\"End of preMigration 'trigger on' done\" + \"\\n\");\r\n\r\n\t }catch (Exception e) {\r\n \t\t\te.printStackTrace();\r\n \t\t\tmqlLogRequiredInformationWriter(\"Pre-migration failed. \\n\"+e.getMessage() + \"\\n\");\r\n \t\t}\r\n \t}", "@Override\n\tprotected String perform() {\n\t\tT_work_dj_nsrxx nsrxx = getDj_nsrxx();\n\t\tString nsrsbm = sqlsession.selectOne(\"t_work_dj_nsrxx$getNewNsrxxId\");\n\t\tnsrxx.setNsrsbm(nsrsbm);\n\t\tnsrxx.setZgswjgDm(\"000000\");\n\t\tnsrxx.setSwdjzh(\"-1\");\n\t\tnsrxx.setNsrztDm(\"4\");\n\t\tint i = sqlsession.update(\"t_work_dj_nsrxx$insertSelective\", nsrxx);\n\t\tif (i > 0) {\n\t\t\t/**\n\t\t\t * 1. 首页待办事项标题\n\t\t\t */\n\t\t\tString task_title = \"登记管理:设立登记->确定主管机关\";\n\t\t\t/**\n\t\t\t * 2. 首页待办事项链接, 本系统必须为相对路径,否则为绝对路径\n\t\t\t */\n\t\t\tString task_link = \"/com/jdframe/work/biz/swdj/updateQdzgswjg!init?nsrsbm=\"\n\t\t\t\t\t+ nsrxx.getNsrsbm();\n\t\t\t/**\n\t\t\t * 3. 系统,01为本系统,本系统可以使用相对路径,否则为其他系统不能使用相对路径\n\t\t\t */\n\t\t\tString task_from = \"01\";\n\t\t\t/**\n\t\t\t * 4. 首页待办事项到期时间\n\t\t\t */\n\t\t\tString Task_expire_date = DateUtils.newDateTime(5);\n\t\t\t/**\n\t\t\t * 5. 菜单id,系统根据权限判读那些操作人员有权接收此待办事项\n\t\t\t */\n\t\t\tString menu_id = \"1000028\";\n\t\t\t/**\n\t\t\t * 6. 待办事项优先级\n\t\t\t */\n\t\t\tTokens.PRIORITY priority = Tokens.PRIORITY.CRITICAL;\n\t\t\t// 发送待办事宜\n\t\t\tboolean isSend = sendTask(task_title, priority, task_link,\n\t\t\t\t\ttask_from, Task_expire_date, menu_id);\n\t\t\tif (isSend){\n\t\t\t\tsetSystemMessage(\"设立登记操作成功!\");\n\t\t\t}else{\n\t\t\t\tsetSystemMessage(\"设立登记操作失败,可能无待办事项接收人员!\", true, null);\n\t\t\t\tsqlsession.rollback();\n\t\t\t}\n\t\t} else {\n\t\t\t// 操作失败,并返回input页面\n\t\t\tsetSystemMessage(\"设立登记操作失败!\", true, null);\n\t\t}\n\t\treturn SUCCESS;\n\t}", "public String execute() {\n\t\tString userId = this.getUsername();\n\t\texpired = false;\n\t\tresult = false;\n\t\tlogger.info(\"hdUuid:\"+hdUuid+\",operation:\"+operation+\",serverId:\"+serverId+\",uid\"+uid);\n\t\tif (operation.equals(ATTACH) && (!isExpired())) {\n\t\t\tVolumeAttachment attachment = new VolumeAttachment(null, serverId, null, hdUuid);\n\t\t\tvolumeAttachmentClient.attachVolumeAttachment(userId, serverId, attachment);\n\t\t\tlogger.info(\"挂载成功\");\n\t\t\tthis.addAcMessageLog(AcModuleEnum.VM_ADMIN, UUID.randomUUID().toString().replace(\"-\", \"\"),\n\t\t\t\t\tthis.getUserId(), hdUuid, \"挂载云硬盘\", \"挂载云硬盘[\"+hdUuid+\"]到[\"+serverId+\"]的云主机\", \"HdOperateAction.class\", \n\t\t\t\t\tnull, AcLogLevelEnum.INFO, new Date(System.currentTimeMillis()));\n\t\t\tresult = true;\n\t\t} else if (operation.equals(DETACH)) {\n\t\t\tvolumeAttachmentClient.detachVolumeAttachment(userId, serverId, hdUuid);\n\t\t\tthis.addAcMessageLog(AcModuleEnum.VM_ADMIN, UUID.randomUUID().toString().replace(\"-\", \"\"),\n\t\t\t\t\tthis.getUserId(), hdUuid, \"卸载云硬盘\", \"从[\"+serverId+\"]的云主机卸载云硬盘[\"+hdUuid+\"]\", \"HdOperateAction.class\", \n\t\t\t\t\tnull, AcLogLevelEnum.INFO, new Date(System.currentTimeMillis()));\n\t\t\tlogger.info(\"卸载成功\");\n\t\t\tresult = true;\n\t\t} else if (operation.equals(DELETE)) {\n\t\t\tvolumeClient.deleteVolume(userId, hdUuid);\n\t\t\tnew VmHdEndtimeManager().delEndtimeById(endTimeId);\n\t\t\tthis.addAcMessageLog(AcModuleEnum.VM_ADMIN, UUID.randomUUID().toString().replace(\"-\", \"\"),\n\t\t\t\t\tthis.getUserId(), hdUuid, \"删除云硬盘\", \"删除云硬盘[\"+hdUuid+\"]\", \"HdOperateAction.class\", \n\t\t\t\t\tnull, AcLogLevelEnum.INFO, new Date(System.currentTimeMillis()));\n\t\t\tlogger.info(\"删除成功\");\n\t\t\tresult = true;\n\t\t}\n\t\t\n\t\treturn SUCCESS;\n\t}", "public boolean executeDataActions(com.avaya.sce.runtimecommon.SCESession mySession) throws Exception {\n\t\tjava.util.Collection actions = null;\n\n\t\tactions = new java.util.ArrayList(3);\n\t\tactions.add(new com.avaya.sce.runtime.tracking.TraceInfo(com.avaya.sce.runtimecommon.ITraceInfo.TRACE_LEVEL_INFO, \"Agent Transfer Reason - \", \"appVariables:transferReason\").setDebugId(1032));\n\t\tactions.add(new com.avaya.sce.runtime.tracking.TraceInfo(com.avaya.sce.runtimecommon.ITraceInfo.TRACE_LEVEL_INFO, \"Agent Transfer Reason - \", \"appVariables:TransferVDN\").setDebugId(1033));\n\t\tif(evaluateActions(actions, mySession)) {\n\t\t\treturn true;\n\t\t}\n\t\tactions = null;\n\n\t\tif(((com.avaya.sce.runtime.Condition)new com.avaya.sce.runtime.Condition(\"condition1\", \"Flag_Application_Error\", com.avaya.sce.runtime.Expression.STRING_EQUAL_IGNORE, \"constant:TRUE\", true).setDebugId(1034)).evaluate(mySession)) {\n\t\t\tactions = new java.util.ArrayList(2);\n\t\t\tactions.add(new com.avaya.sce.runtime.tracking.ReportAlarmInfo(com.avaya.sce.runtimecommon.IReportInfo.ALARM_LEVEL_CRITICAL, \"RCOM_RGC_CF_IVR - DB Error while fetching Transfer VDN details\", \"session:sessionid\", true).setDebugId(1035));\n\t\t\tactions.add(new com.avaya.sce.runtime.Next(\"RGC_Flow-TechDiffMsg\", \"Tech_Diff_Msg\").setDebugId(1036));\n\t\t\tif(evaluateActions(actions, mySession)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tactions = null;\n\n\t\t} else {\n\t\t\tactions = new java.util.ArrayList(1);\n\t\t\tactions.add(new com.avaya.sce.runtime.Next(\"RGC_Flow-AgentTransfer\", \"Transfer\").setDebugId(1038));\n\t\t\tif(evaluateActions(actions, mySession)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tactions = null;\n\t\t}\n\n\n\t\t// return false if the evaluation of actions did not cause a servlet forward or redirect\n\t\treturn false;\n\t}", "public static void habilitarTransaccionManual() {\n try {\n con.setAutoCommit(false);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "void rollback();", "public void startMigrating();", "public void run_v0(String clase){\n\t\t//aviso(\"Ejecutando \"+clase+\" Tipo V0\");\n\t\t\n\t\tObject\toc=null;\n\t\t\n\t\t\t\n\t\t\n\t\ttry {\n\t\t\tClass c=Class.forName(clase);\n\t\t\toc=c.newInstance();\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (InstantiationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IllegalAccessException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tif (oc!=null){\n\t\t\tvisual.Task_Model T=(visual.Task_Model) oc;\n\t\t\tint i=0;\n\t\t\tbeta.tools.connector.GTransfer GX=null;\n\t\t\t\n\t\t\twhile (i<this.getConstructor().getParametros().size() & GX==null){\n\t\t\t\tObject[] p=(Object[]) this.getConstructor().getParametros().get(i);\n\t\t\t\tString id=(String)p[0];\n\t\t\t\tObject o=p[1];\n\t\t\t\tif (id.compareTo(\"GX\")==0){\n\t\t\t\t\tGX=(beta.tools.connector.GTransfer)o;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (GX==null){\n\t\t\t\tGX=new beta.tools.connector.GTransfer();\n\t\t\t\tGeneric _default=this.getConstructor().getConnectionHandler().getDefaultConnector();\n\t\t\t\tGX.setHost(_default.getHost());\n\t\t\t\tGX.setPort(_default.getPort());\n\t\t\t\tGX.setDatabase(_default.getDatabase());\n\t\t\t\tGX.setUser(_default.getUser());\n\t\t\t\tGX.setPassword(_default.getPassword());\n\t\t\t\tGX.setSucursal(_default.getId());\n\t\t\t\tGX.ConnectSQL(_default.getId());\n\t\t\t}\n\t\t\tboolean b=true;//esta_autorizado(iduser,clase);\n\t\t\tif (b){\n\t\t\t\tString NEW_LINE = System.getProperty(\"line.separator\");\n\t\t\t\t/*String msg=\"Esta es una aplicacion vieja.\"+NEW_LINE;\n\t\t\t\tmsg+=\"Hasta que no se reprograme. Esta aplicacion quedara inhabilitada por problemas de incompatibilida\";\n\t\t\t\terror(msg);*/\n\t\t\t\t\n\t\t\t\tT.setParameter(\"GX\", GX);\n\t\t\t\tT.setParameter(\"iduser\", this.getConstructor().getIduser());\n\t\t\t\tfor (i=0;i<this.getConstructor().getParametros().size();i++){\n\t\t\t\t\ttry {\n\t\t\t\t\tObject[] p=(Object[]) this.getConstructor().getParametros().get(i);\n\t\t\t\t\tString id=(String)p[0];\n\t\t\t\t\tObject o=p[1];\n\t\t\t\t\tT.setParameter(id, o);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(\"No se pudo Cargar el parametro \"+i+\" >\"+clase+\" \"+e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (javax.swing.SwingUtilities.isEventDispatchThread()){\n\t\t\t\t\tT.run();\n\t\t\t\t}else{\n\t\t\t\t\tfinal visual.Task_Model _T=T;\n\t\t\t\t\tRunnable _execute=new Runnable(){\n\t\t\t\t\t\tpublic void run(){\n\t\t\t\t\t\t\t_T.run();\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tjavax.swing.SwingUtilities.invokeLater(_execute);\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\terror(\"(\"+this.getConstructor().getIduser()+\") No esta Autorizado\");\n\t\t\t\tT=null;\n\t\t\t}\t\n\t\t}\n\t}", "protected abstract void rollbackIndividualTrx();", "void doTransaction (Redis redis) {\n\t \tswitch (redis.EXEC()) {\n\t \tcase OK:\n\t \tbreak;\n\t \tcase FAIL:\n \t\t\tdiscardTransaction(redis);\n\t\t\tbreak;\n\t \t}\n\t}", "private int recover(HttpRequestGenerator requestor, CommCareTransactionParserFactory factory) {\n\t\tthis.publishProgress(PROGRESS_RECOVERY_NEEDED);\n\t\t\n\t\tLogger.log(AndroidLogger.TYPE_USER, \"Sync Recovery Triggered\");\n\n\t\t\n\t\tInputStream cacheIn;\n\t\tBitCache cache = null;\n\t\t\n\t\t//This chunk is the safe field of operations which can all fail in IO in such a way that we can\n\t\t//just report back that things didn't work and don't need to attempt any recovery or additional\n\t\t//work\n\t\ttry {\n\n\t\t\t//Make a new request without all of the flags\n\t\t\tHttpResponse response = requestor.makeCaseFetchRequest(server, false);\n\t\t\tint responseCode = response.getStatusLine().getStatusCode();\n\t\t\t\n\t\t\t//We basically only care about a positive response, here. Anything else would have been caught by the other request.\n\t\t\tif(!(responseCode >= 200 && responseCode < 300)) {\n\t\t\t\treturn PROGRESS_RECOVERY_FAIL_SAFE;\n\t\t\t}\n\t\t\t\n\t\t\t//Otherwise proceed with the restore\n\t\t\tint dataSizeGuess = -1;\n\t\t\tif(response.containsHeader(\"Content-Length\")) {\n\t\t\t\tString length = response.getFirstHeader(\"Content-Length\").getValue();\n\t\t\t\ttry{\n\t\t\t\t\tdataSizeGuess = Integer.parseInt(length);\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\t//Whatever.\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Grab a cache. The plan is to download the incoming data, wipe (move) the existing db, and then\n\t\t\t//restore fresh from the downloaded file\n\t\t\tcache = BitCacheFactory.getCache(c, dataSizeGuess);\n\t\t\tcache.initializeCache();\n\t\t\t\n\t\t\tOutputStream cacheOut = cache.getCacheStream();\n\t\t\tAndroidStreamUtil.writeFromInputToOutput(response.getEntity().getContent(), cacheOut);\n\t\t\n\t\t\tcacheIn = cache.retrieveCache();\n\t\t\t\t\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tif(cache != null) {\n\t\t\t\t//If we made a temp file, we're done with it here.\n\t\t\t\tcache.release();\n\t\t\t}\n\t\t\t//Ok, well, we're bailing here, but we didn't make any changes\n\t\t\tLogger.log(AndroidLogger.TYPE_USER, \"Sync Recovery Failed due to IOException|\" + e.getMessage());\n\t\t\treturn PROGRESS_RECOVERY_FAIL_SAFE;\n\t\t}\n\t\t\n\t\t\n\t\tthis.publishProgress(PROGRESS_RECOVERY_STARTED);\n\t\tLogger.log(AndroidLogger.TYPE_USER, \"Sync Recovery payload downloaded\");\n\n\t\t//Ok. Here's where things get real. We now have a stable copy of the fresh data from the\n\t\t//server, so it's \"safe\" for us to wipe the casedb copy of it.\n\t\t\n\t\t//CTS: We're not doing this in a super good way right now, need to be way more fault tolerant.\n\t\t//this is the temporary implementation of everything past this point\n\t\t\n\t\t//Wipe storage\n\t\t//TODO: move table instead. Should be straightforward with sandboxed db's\n\t\tCommCareApplication._().getUserStorage(ACase.STORAGE_KEY, ACase.class).removeAll();\n\t\t\n\t\t\n\t\tString failureReason = \"\";\n\t\ttry { \n\t\t\t//Get new data\n\t\t\tString syncToken = readInput(cacheIn, factory);\n\t\t\tupdateUserSyncToken(syncToken);\n\t\t\tLogger.log(AndroidLogger.TYPE_USER, \"Sync Recovery Succesful\");\n\t\t\treturn PROGRESS_DONE;\n\t\t} catch (InvalidStructureException e) {\n\t\t\te.printStackTrace();\n\t\t\tfailureReason = e.getMessage();\n\t\t} catch (XmlPullParserException e) {\n\t\t\te.printStackTrace();\n\t\t\tfailureReason = e.getMessage();\n\t\t} catch (UnfullfilledRequirementsException e) {\n\t\t\te.printStackTrace();\n\t\t\tfailureReason = e.getMessage();\n\t\t} catch (StorageFullException e) {\n\t\t\te.printStackTrace();\n\t\t\tfailureReason = e.getMessage();\n\t\t} \n\t\t\n\t\t//These last two aren't a sign that the incoming data is bad, but\n\t\t//we still can't recover from them usefully\n\t\tcatch (SessionUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t\tfailureReason = e.getMessage();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tfailureReason = e.getMessage();\n\t\t} finally {\n\t\t\t//destroy temp file\n\t\t\tcache.release();\n\t\t}\n\t\t\n\t\t//OK, so we would have returned success by now if things had worked out, which means that instead we got an error\n\t\t//while trying to parse everything out. We need to recover from that error here and rollback the changes\n\t\t\n\t\t//TODO: Roll back changes\n\t\tLogger.log(AndroidLogger.TYPE_USER, \"Sync recovery failed|\" + failureReason);\n\t\treturn PROGRESS_RECOVERY_FAIL_BAD;\n\t}", "public final void mo23206tL(int i) {\n AppMethodBeat.m2504i(18974);\n do {\n if (this.kIW > 0) {\n C4990ab.m7417i(\"MicroMsg.SubCoreDBBackup\", \"Recovery stage %d result: %d\", Integer.valueOf(this.kIW), Integer.valueOf(i));\n }\n if (i == 0) {\n this.kIX.delete();\n C7060h.pYm.mo8378a(181, 29, 1, true);\n if (this.kIC != null) {\n this.kIC.mo23206tL(i);\n }\n this.kIY.unLock();\n AppMethodBeat.m2505o(18974);\n return;\n } else if (i == -2) {\n this.kIX.delete();\n C7060h.pYm.mo8378a(181, 3, 1, true);\n if (this.kIC != null) {\n this.kIC.mo23206tL(i);\n }\n this.kIY.unLock();\n AppMethodBeat.m2505o(18974);\n return;\n } else {\n int i2 = this.kIW + 1;\n this.kIW = i2;\n switch (i2) {\n case 1:\n C4990ab.m7417i(\"MicroMsg.SubCoreDBBackup\", \"Database recovery stage %d: REPAIR\", Integer.valueOf(this.kIW));\n i = C11486d.this.mo23212b(null, (C33900b) this);\n continue;\n case 2:\n C4990ab.m7417i(\"MicroMsg.SubCoreDBBackup\", \"Database recovery stage %d: BACKUP RECOVER\", Integer.valueOf(this.kIW));\n i = C11486d.this.mo23210a(null, (C33900b) this);\n continue;\n case 3:\n C4990ab.m7417i(\"MicroMsg.SubCoreDBBackup\", \"Database recovery stage %d: DUMP\", Integer.valueOf(this.kIW));\n i = C11486d.this.mo23209a((C33900b) this);\n continue;\n default:\n this.kIX.delete();\n C7060h.pYm.mo8378a(181, 30, 1, true);\n if (this.kIC != null) {\n this.kIC.mo23206tL(i);\n }\n this.kIY.unLock();\n AppMethodBeat.m2505o(18974);\n return;\n }\n }\n } while (i != 0);\n AppMethodBeat.m2505o(18974);\n }", "private void performMaintenance(String table, MaintenanceOp op) {\n Thread thread = Thread.currentThread();\n String oldThreadName = thread.getName();\n boolean reschedule = true;\n try {\n thread.setName(String.format(\"%s - %s - %s\", oldThreadName, op.getName(), table));\n switch (op.getType()) {\n case METADATA:\n performMetadataMaintenance(table);\n break;\n case DATA:\n performDataMaintenance(table);\n break;\n }\n reschedule = false;\n } catch (FullConsistencyException t) {\n // This is handled the same as any other exception thrown by maintenance except that it logs less loudly.\n // In local testing where the hints poller isn't present force full consistency with the following:\n // curl -s -XPOST \"localhost:8081/tasks/compaction-timestamp?all=$(date -u +\"%Y-%m-%dT%H:%M:%SZ\")\"\n // curl -s -XPOST 'localhost:8081/tasks/compaction-lag?all=PT0.001S'\n _log.info(\"Waiting for full consistency before proceeding with '{}' maintenance on table: {}, {}\",\n op.getName(), table, t.getMessage());\n } catch (PendingTableEventsException t) {\n _log.info(\"Waiting for pending table events to complete before proceeding with {} on table {}, {}\",\n op.getName(), table, t.getMessage());\n } catch (Throwable t) {\n _log.error(\"Unexpected exception performing '{}' maintenance on table: {}\", op.getName(), table, t);\n } finally {\n thread.setName(oldThreadName);\n }\n if (reschedule) {\n scheduleTask(table, MaintenanceOp.reschedule(op, Instant.now().plus(RETRY_DELAY)));\n }\n }", "public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}", "void readOnlyTransaction();", "public BackupRestore(String ip,String argUsername,String argPassword,String argEnPassword,String argDeviceType){\n\t this.repetitiveWork();\n\t log.info(\"Constructor of \"+log.getName()+ \" with 4 parameter was called\\n\");\n\t deviceIP=ip;\n\t log.info(\"deviceIp set to \"+deviceIP+\"\\n\");\n\t if(argDeviceType.toUpperCase().equals(\"CISCO\"))\n\t deviceType=RouterType.CISCO;\n\t else\n\t \t deviceType=RouterType.JUNIPER;\n\t log.info(\"deviceType set to \"+deviceType+\"\\n\");\n\t deviceName=argUsername;\n\t log.info(\"deviceName set to \"+deviceName+\"\\n\");\n\t devicePassword=argPassword;\n\t log.info(\"devicePassword set to \"+\"******\\n\");\n\t deviceEnPassword=argEnPassword;\n\t log.info(\"deviceEnablePassword set to\"+\"******\\n\");\n\t try{\n\t\t properties.load(new FileInputStream(defaultSettingsFile));\n\t\t log.info(\"File \"+DEFAULT_SETTINGS_FILE_LOCATION+\" opened successfully :)\\n\");\n\t\t /*Initializing parameter from the file defaultSettings.properties*/\n\t\t log.info(\"Initializing parameter from the file defaultSettings.properties\\n\");\n\t\t FETCHING_DATA_VIA_DATABASE=Boolean.parseBoolean(properties.getProperty(\"viaDatabase\").toLowerCase());\n\t\t if(FETCHING_DATA_VIA_DATABASE){\n\t\t log.info(\"Method of fetching data is via database\");\n\t\t this.connectToDb();\n\t\t log.info(\"Insering the new device data\");\n\t\t this.dbConnect.insertInto(properties.getProperty(\"deviceDetailsTable\"),deviceIP,deviceName,devicePassword,deviceEnPassword,deviceType);\n\t\t log.info(\"Successfully inserted the data\");\n\t\t this.dbConnector();\n\t\t }\n\t\t else{\n\t\t log.info(\"Method of fetching data is via files\");\n\t\t if(properties.getProperty(\"connectionType\").toUpperCase().equals(\"TELNET\"))\n\t\t\t connectionType=ConnectionType.TELNET;\n\t\t\t else\n\t\t\t\t\tconnectionType=ConnectionType.SSH;\n\t\t log.info(\"Setting the default connection type as \"+connectionType);\n\t\t backupServerName=properties.getProperty(\"backupServerName\");\n\t\t log.info(\"backupServerName set to its default value \"+backupServerName+\"\\n\");\n\t\t backupServerIP=properties.getProperty(\"backupServerIP\");\n\t\t log.info(\"backupServerIP set to its default value \"+backupServerIP+\"\\n\");\n\t\t backupServerPassword=properties.getProperty(\"backupServerPassword\");\n\t\t log.info(\"backupServerPassword set to its default value \"+\"******\"+\"\\n\");\n\t\t backupServerFolderLocation=properties.getProperty(\"backupServerFolderLocation\");\n\t\t log.info(\"backupServerFolderLoaction set to its default value \"+backupServerFolderLocation+\"\\n\");\n\t\t if(properties.getProperty(\"backupServerType\").toLowerCase().equals(\"scp\"))\n\t\t backupServerType=BackupServerType.scp;\n\t\t else\n\t\t \t backupServerType=BackupServerType.tftp;\n\t\t log.info(\"backupServerType set to its default value \"+backupServerType+\"\\n\");\n\t\t }\n\t }catch(Exception e){\n\t\t log.error(\"File \"+DEFAULT_SETTINGS_FILE_LOCATION+\" was not found!!\\n\");\n\t }\n }", "protected void executionSuccess() {\n this.isUndoable = true;\n }", "public void stopMigrating();", "@Secured(\"@\")\n public void doViewStockTransDetail(VStockTransDTO stocktrans) {\n try {\n stockTransActionId = stocktrans.getActionID();\n //Validate ky voffice\n StockTransActionDTO actionDTO = stockTransActionService.findOne(stockTransActionId);\n stockTransVofficeService.doSignedVofficeValidate(actionDTO);\n\n orderStockTag.loadOrderStock(stockTransActionId, true);\n if (orderStockTag.getTransInputDTO().getRegionStockTransId() != null) {\n StockTransDTO regionTransDTO = stockTransService.findOne(orderStockTag.getTransInputDTO().getRegionStockTransId());\n if (regionTransDTO != null) {\n orderStockTag.getTransInputDTO().setRegionStockId(regionTransDTO.getFromOwnerId());\n ShopDTO shopDTO = shopService.findOne(regionTransDTO.getFromOwnerId());\n if (shopDTO != null) {\n orderStockTag.getTransInputDTO().setRegionStockName(shopDTO.getName());\n }\n }\n }\n this.setStockTransActionId(stockTransActionId);\n ConfigListProductTagDTO configListProductTagDTO;\n if (DataUtil.safeEqual(stocktrans.getStockTransStatus(), Const.STOCK_TRANS_STATUS.EXPORT_NOTE)) {\n configListProductTagDTO = new ConfigListProductTagDTO(Const.MODE_SERIAL.MODE_ADD_SERIAL);\n } else {\n configListProductTagDTO = new ConfigListProductTagDTO(Const.MODE_SERIAL.MODE_VIEW);\n }\n exportDepositAgent = false;\n // Neu xuat dat coc thi lay gia dat coc.\n if (DataUtil.isNullOrEmpty(stocktrans.getPayStatus()) &&\n DataUtil.safeEqual(stocktrans.getDepositStatus(), Const.DEPOSIT_STATUS.DEPOSIT_HAVE)) {\n exportDepositAgent = true;\n ShopDTO shopImpDTO = shopService.findOne(stocktrans.getToOwnerID());\n configListProductTagDTO.setRetrieveExpense(true);\n configListProductTagDTO.setBranchId(shopService.getBranchId(shopImpDTO.getShopId()));\n configListProductTagDTO.setPricePolicyId(DataUtil.safeToLong(shopImpDTO.getPricePolicy()));\n configListProductTagDTO.setChannelTypeId(shopImpDTO.getChannelTypeId());\n }\n listProductTag.load(this, stockTransActionId, configListProductTagDTO);\n if (!DataUtil.isNullObject(listProductTag.getLsStockTransFull())\n && DataUtil.isNullOrEmpty(stocktrans.getPayStatus()) &&\n DataUtil.safeEqual(stocktrans.getDepositStatus(), Const.DEPOSIT_STATUS.DEPOSIT_HAVE)) {\n for (StockTransFullDTO stockTransFullDTO : listProductTag.getLsStockTransFull()) {\n if (DataUtil.isNullObject(stockTransFullDTO.getDepositPrice())) {\n haveDepositPrice = true;\n break;\n }\n }\n }\n infoOrderDetail = true;\n if (DataUtil.safeEqual(stocktrans.getStockTransStatus(), Const.STOCK_TRANS_STATUS.IMPORTED)) {\n canPrint = true;\n } else {\n canPrint = false;\n }\n List<StockTransDetailDTO> lsDetail = listProductTag.getListTransDetailDTOs();\n Long total = 0L;\n for (StockTransDetailDTO stock : lsDetail) {\n if (!DataUtil.isNullObject(stock.getCheckSerial()) && stock.getCheckSerial().equals(1L)) {\n total += DataUtil.safeToLong(stock.getQuantity());\n }\n }\n showPanelOffline = total >= limitOffline;\n } catch (LogicException ex) {\n logger.error(ex.getMessage(), ex);\n reportError(\"\", ex);\n topPage();\n } catch (Exception ex) {\n reportError(\"\", \"common.error.happened\", ex);\n logger.error(ex.getMessage(), ex);\n topPage();\n }\n }", "public void executeTransfer(int op_id, int tr_amount, int from_account, int to_account, int from_final_balance,\n int to_final_balance, Connection con) throws SQLException {\n\n PreparedStatement stmt = con.prepareStatement(\n \"insert into OPERATIONS (OP_ID, OP_TYPE, MV_AMOUNT, FROM_ACCOUNT_ID, TO_ACCOUNT_ID, FROM_CURRENT_BALANCE, \" +\n \"TO_CURRENT_BALANCE, TIMESTAMP) values (?,?,?,?,?,?,?,?)\");\n\n stmt.setInt(1, op_id);\n stmt.setInt(2, OP_TYPES.valueOf(\"TRANSFER\").ordinal()+1);\n stmt.setInt(3, tr_amount);\n stmt.setInt(4, from_account);\n stmt.setInt(5, to_account);\n stmt.setInt(6, from_final_balance);\n stmt.setInt(7, to_final_balance);\n stmt.setTimestamp(8, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n }", "public void commissionRunway(String id);", "public long bankTransfer(long id, int optFlag) throws RemoteException {\n\t\treturn cp.bankTransfer(id, optFlag);\r\n\t}", "@Override\n\tpublic TransferCompra detalleCompra(int id) {\n\t\t\n\t\t//Creamos la Transaccion\n\t\tTransactionManager.getInstance().nuevaTransaccion();\n\t\tTransactionManager.getInstance().getTransaccion().start();\n\t\t\n\t\t//Hacemos Commit \n\t\tTransferCompra t = FactoriaDAO.getInstance().createDAOCompra().searchId(id);\n\t\tTransactionManager.getInstance().getTransaccion().commit();\n\t\t\n\t\t//Finalmente cerramos la Transaccion\n\t\tTransactionManager.getInstance().eliminaTransaccion();\n\t\treturn t;\n\t}", "private void main_flow() throws SQLException {\n start_operation_complete_monitoring(this);\r\n BuffDBWriterTrell.total_nr_recorded_entries = 0;\r\n //======================\r\n NEW_RECORDS_FOUND = false;\r\n String last_export_date = get_last_export_date(SqlQ.get_latest_export_date());\r\n last_export_date = HelpM.get_date_time_minus_some_time_in_ms(last_export_date, \"yyyy-MM-dd HH:mm:ss\", 600000);// 10 min\r\n //======================\r\n export_procedure_1(last_export_date);\r\n //======================\r\n\r\n if (NEW_RECORDS_FOUND) {\r\n wait_();\r\n String msg = \" (nr rec.= \" + (BufferedDBWriterSuper.total_nr_recorded_entries - 1) + \" )\";\r\n SimpleLoggerLight.logg(\"main_flow.log\", msg);\r\n// write_to_update_table(\"main_flow\", \"\", DBT_trell.INTERFACE_TRIGER_TABLE_NAME,\r\n// \"mc\",\r\n// \"trell\",\r\n// bWriterTrell);\r\n } else {\r\n SimpleLoggerLight.logg_no_append(\"last_check.log\", \"-> LAST CHECK\");\r\n// write_to_update_table(\r\n// \"main_flow\", \"last_check\", DBT_trell.INTERFACE_TRIGER_TABLE_NAME,\r\n// \"mc\",\r\n// \"trell\",\r\n// bWriterTrell);\r\n }\r\n }", "public static void makeWriteOperation(int trans_id, int var_id, int var_value) {\n\n // System.out.println(\"makeWriteOperation\");\n System.out.println(\"T\" + trans_id + \" wishes to write x\" + var_id + \" to all available copies\");\n Transaction txn = null;\n Operation oper = new Operation(trans_id, var_id, var_value);\n\n if (transactions.containsKey(trans_id))\n txn = transactions.get(trans_id);\n\n if (txn != null) {\n writeOperation(txn, oper);\n } else {\n // aborted\n System.out.println(\"Aborted :T\" + trans_id);\n }\n\n }", "@Test(timeout = 4000)\n public void test004() throws Throwable {\n Recover recover0 = new Recover();\n recover0.openFile(\"databene\", (String) null, true);\n ErrorHandler errorHandler0 = ErrorHandler.getDefault();\n DBExecutionResult dBExecutionResult0 = DBUtil.runScript(\"databene\", (String) null, '<', (Connection) null, false, errorHandler0);\n assertNotNull(dBExecutionResult0);\n }", "@Override\n\tpublic void transferBalnace() {\n\t\tSystem.out.println(\"balance is transferd\");\n\t}", "boolean supportsRollbackAfterDDL();", "public void operationSave() {\n\r\n\t\tstatusFeldSave();\r\n\t}", "public void execute() {\n\n try {\n int source = data_path.IR.decimal(15, 0);\n int destination = data_path.IR.decimal(23, 16);\n\n System.out.println(\"Source: \" + source);\n data_path.master_bus.store(source);\n data_path.bank.load(destination);\n\n } catch (Exception e) {\n System.err.println(\"In Controler:LOADI0:increment_clock\");\n System.err.println(e);\n }\n }", "@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }", "@Override\n public void rollbackTx() {\n \n }", "public static void deshacerTransaccion() {\n try {\n con.rollback();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "protected void stateTransfer(Set<String> endpoints, CorfuRuntime runtime,\n Layout.LayoutSegment segment) throws ExecutionException, InterruptedException {\n\n int batchSize = runtime.getParameters().getBulkReadSize();\n\n long trimMark = runtime.getAddressSpaceView().getTrimMark().getSequence();\n // Send the trimMark to the new/healing nodes.\n // If this times out or fails, the Action performing the stateTransfer fails and retries.\n for (String endpoint : endpoints) {\n // TrimMark is the first address present on the log unit server.\n // Perform the prefix trim on the preceding address = (trimMark - 1).\n // Since the LU will reject trim decisions made from older epochs, we\n // need to adjust the new trim mark to have the new layout's epoch.\n Token prefixToken = new Token(newLayout.getEpoch(), trimMark - 1);\n CFUtils.getUninterruptibly(runtime.getLayoutView().getRuntimeLayout(newLayout)\n .getLogUnitClient(endpoint)\n .prefixTrim(prefixToken));\n }\n\n if (trimMark > segment.getEnd()) {\n log.info(\"stateTransfer: Nothing to transfer, trimMark {} greater than end of segment {}\",\n trimMark, segment.getEnd());\n return;\n }\n\n // State transfer should start from segment start address or trim mark whichever is lower.\n long segmentStart = Math.max(trimMark, segment.getStart());\n\n for (long chunkStart = segmentStart; chunkStart < segment.getEnd()\n ; chunkStart = chunkStart + batchSize) {\n long chunkEnd = Math.min((chunkStart + batchSize - 1), segment.getEnd() - 1);\n\n long ts1 = System.currentTimeMillis();\n\n Map<Long, ILogData> dataMap = runtime.getAddressSpaceView()\n .cacheFetch(ContiguousSet.create(\n Range.closed(chunkStart, chunkEnd),\n DiscreteDomain.longs()));\n\n long ts2 = System.currentTimeMillis();\n\n log.info(\"stateTransfer: read {}-{} in {} ms\", chunkStart, chunkEnd, (ts2 - ts1));\n\n List<LogData> entries = new ArrayList<>();\n for (long x = chunkStart; x <= chunkEnd; x++) {\n if (dataMap.get(x) == null) {\n log.error(\"Missing address {} in range {}-{}\", x, chunkStart, chunkEnd);\n throw new IllegalStateException(\"Missing address\");\n }\n entries.add((LogData) dataMap.get(x));\n }\n\n for (String endpoint : endpoints) {\n // Write segment chunk to the new logunit\n ts1 = System.currentTimeMillis();\n boolean transferSuccess = runtime.getLayoutView().getRuntimeLayout(newLayout)\n .getLogUnitClient(endpoint)\n .writeRange(entries).get();\n ts2 = System.currentTimeMillis();\n\n if (!transferSuccess) {\n log.error(\"stateTransfer: Failed to transfer {}-{} to {}\", chunkStart,\n chunkEnd, endpoint);\n throw new IllegalStateException(\"Failed to transfer!\");\n }\n\n log.info(\"stateTransfer: Transferred address chunk [{}, {}] to {} in {} ms\",\n chunkStart, chunkEnd, endpoint, (ts2 - ts1));\n }\n }\n }", "public void rollback();", "public Transaction getDummyTransaction(String action) {\n\n\t\t// Long payerAccountNum = 111l;\n\t\tLong payerRealmNum = 0l;\n\t\tLong payerShardNum = 0l;\n\t\t// Long nodeAccountNum=123l;\n\t\tLong nodeRealmNum = 0l;\n\t\tLong nodeShardNum = 0l;\n\t\tlong transactionFee = 0l;\n\t\tTimestamp startTime =\n\t\t\t\tRequestBuilder.getTimestamp(Instant.now(Clock.systemUTC()).minusSeconds(13));\n\t\tDuration transactionDuration = RequestBuilder.getDuration(100);\n\t\tboolean generateRecord = false;\n\t\tString memo = \"UnitTesting\";\n\t\tint thresholdValue = 10;\n\t\tList<Key> keyList = new ArrayList<>();\n\t\tKeyPair pair = new KeyPairGenerator().generateKeyPair();\n\t\tbyte[] pubKey = ((EdDSAPublicKey) pair.getPublic()).getAbyte();\n\t\tKey akey =\n\t\t\t\tKey.newBuilder().setEd25519(ByteString.copyFromUtf8((MiscUtils.commonsBytesToHex(pubKey)))).build();\n\t\tPrivateKey priv = pair.getPrivate();\n\t\tkeyList.add(akey);\n\t\tlong initBal = 100;\n\t\tlong sendRecordThreshold = 5;\n\t\tlong receiveRecordThreshold = 5;\n\t\tboolean receiverSign = false;\n\t\tDuration autoRenew = RequestBuilder.getDuration(100);\n\t\t;\n\t\tlong proxyAccountNum = 12345l;\n\t\tlong proxyRealmNum = 0l;\n\t\tlong proxyShardNum = 0l;\n\t\tint proxyFraction = 10;\n\t\tint maxReceiveProxyFraction = 10;\n\t\tlong shardID = 0l;\n\t\tlong realmID = 0l;\n\n\t\tTransaction trx = null;\n\t\tSignatureList sigList = SignatureList.getDefaultInstance();\n\t\tTimestamp timestamp = TestHelper.getDefaultCurrentTimestampUTC();\n\n\t\t/**\n\t\t * SignatureList sigList = SignatureList.getDefaultInstance(); Transaction transferTx =\n\t\t * RequestBuilder.getCryptoTransferRequest( payer.getAccountNum(), payer.getRealmNum(),\n\t\t * payer.getShardNum(), nodeAccount.getAccountNum(), nodeAccount.getRealmNum(),\n\t\t * nodeAccount.getShardNum(), 800, timestamp, transactionDuration, false, \"test\", sigList,\n\t\t * payer.getAccountNum(), -100l, nodeAccount.getAccountNum(), 100l); transferTx =\n\t\t * TransactionSigner.signTransaction(transferTx, accountKeys.get(payer));\n\t\t */\n\n\t\tif (\"SolidityIDQuery\".equalsIgnoreCase(action)) {\n\t\t\ttrx = RequestBuilder.getCryptoTransferRequest(payerAccountId.getAccountNum(),\n\t\t\t\t\tpayerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t\t\t\tnodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 800, timestamp,\n\t\t\t\t\ttransactionDuration, false, \"test\", sigList, payerAccountId.getAccountNum(), -100l,\n\t\t\t\t\tnodeAccountId.getAccountNum(), 100l);\n\t\t\t// trx = TransactionSigner.signTransaction(trx, account2keyMap.get(payerAccountId));\n\t\t}\n\n\t\tif (\"createContract\".equalsIgnoreCase(action)) {\n\t\t\tFileID fileID = FileID.newBuilder().setFileNum(9999l).setRealmNum(1l).setShardNum(2l).build();\n\n\t\t\ttrx = RequestBuilder.getCreateContractRequest(payerAccountId.getAccountNum(),\n\t\t\t\t\tpayerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t\t\t\tnodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 50000000000l, timestamp,\n\t\t\t\t\ttransactionDuration, true, \"createContract\", DEFAULT_CONTRACT_OP_GAS, fileID,\n\t\t\t\t\tByteString.EMPTY, 0, transactionDuration,\n\t\t\t\t\tSignatureList.newBuilder().addSigs(\n\t\t\t\t\t\t\tSignature.newBuilder().setEd25519(ByteString.copyFrom(\"testsignature\".getBytes())))\n\t\t\t\t\t\t\t.build(),\n\t\t\t\t\t\"\");\n\t\t}\n\n\t\t// if(\"SolidityIDQuery\".equalsIgnoreCase(action)) {\n\t\t// long durationInSeconds = DAY_SEC * 30;\n\t\t// * Duration contractAutoRenew = Duration.newBuilder().setSeconds(durationInSeconds).build();\n\t\t// * Timestamp timestamp = TestHelper.getDefaultCurrentTimestampUTC();\n\t\t// * Duration transactionDuration = RequestBuilder.getDuration(30, 0);\n\t\t// * Transaction createContractRequest =\n\t\t// RequestBuilder.getCreateContractRequest(payerAccountId.getAccountNum(),\n\t\t// * payerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t// * nodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 100l, timestamp,\n\t\t// transactionDuration, true, \"createContract\",\n\t\t// * DEFAULT_CONTRACT_OP_GAS, contractFile, ByteString.EMPTY, 0, contractAutoRenew,\n\t\t// * SignatureList.newBuilder()\n\t\t// *\n\t\t// .addSigs(Signature.newBuilder().setEd25519(ByteString.copyFrom(\"testsignature\".getBytes())))\n\t\t// * .build());\n\t\t// }\n\n\t\treturn trx;\n\n\t}", "@Override\n public void startTx() {\n \n }", "public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;", "@Override\r\n\tpublic void solicitarTipoTransaccion() {\n\t\tSystem.out.println(\"Escoger tipo de transaccion\");\r\n\t\t\r\n\t}", "public int makeTransfer(int tr_amount, int from_account, int to_account, int from_final_balance, int to_final_balance) {\n int generated_id = 0;\n\n try {\n operationLock.lock();\n executeTransfer(generated_id = currentOperationId++, tr_amount, from_account,\n to_account, from_final_balance, to_final_balance, rawDataSource.getConnection());\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n operationLock.unlock();\n }\n\n updateBalance(from_account, from_final_balance);\n updateBalance(to_account, to_final_balance);\n\n return generated_id;\n }", "@Override\n\tpublic void process(TransferOperation operation, Services service) throws OperationException, AccountException {\n\t\tservice.deposit(operation.getTargetIban(), operation.getValue());\n\t\t\n\t\t// Set the next state\n\t\tif (service.diffBanks(operation.getSourceIban(), operation.getTargetIban())) {\n\t\t\toperation.setState(new Deposited());\n\t\t} else {\n\t\t\toperation.setState(new Completed());\n\t\t}\n\t}", "private void rollbackMerge(int action) {\n\n /* mergeOnly ran so only remove new inserts not what already existed */\n if (action == 2) {\n try {\n logger.info(\"Rolling back merge cascading from the tutor transaction table\");\n callSP(buildSPCall(ROLLBACK_MERGE_TRANSACTION_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error trying to rollback from the tutor_transaction table.\",\n exception);\n }\n\n try {\n logger.info(\"Rolling back subject data\");\n callSP(buildSPCall(ROLLBACK_MERGE_SUBJECT_DATA_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error trying to rollback the subject data.\",\n exception);\n }\n\n try {\n logger.info(\"Rolling back merge cascading from the dataset level table\");\n callSP(buildSPCall(ROLLBACK_MERGE_DATASET_LEVEL_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error trying to rollback from the dataset_level table.\",\n exception);\n }\n } else {\n try {\n logger.info(\"Rolling back merge cascading from the tutor transaction table\");\n callSP(buildSPCall(ROLLBACK_TRANSACTION_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error trying to rollback from the tutor_transaction table.\",\n exception);\n }\n\n try {\n logger.info(\"Rolling back subject data\");\n callSP(buildSPCall(ROLLBACK_SUBJECT_DATA_PROC, \"\\\"\" + mappingDb + \"\\\"\"));\n } catch (SQLException exception) {\n logger.error(\"Error trying to rollback the subject data.\", exception);\n }\n\n try {\n logger.info(\"Rolling back merge cascading from ds_dataset table\");\n callSP(buildSPCall(ROLLBACK_DATASET_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error trying to rollback from the ds_dataset table.\", exception);\n }\n }\n }", "int insertSelective(CmstTransfdevice record);", "private void executeTransaction(ArrayList<Request> transaction) {\n // create a new TransactionMessage\n TransactionMessage tm = new TransactionMessage(transaction);\n //if(tm.getStatementCode(0)!=8&&tm.getStatementCode(0)!=14)\n // return;\n try {\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bos);\n oos.writeObject(tm);\n oos.flush();\n\n byte[] data = bos.toByteArray();\n\n byte[] buffer = null;\n long startTime = System.currentTimeMillis();\n buffer = clientShim.execute(data);\n long endTime = System.currentTimeMillis();\n if (reqIndex < maxNoOfRequests && id > 0) {\n System.out.println(\"#req\" + reqIndex + \" \" + startTime + \" \" + endTime + \" \" + id);\n }\n reqIndex++;\n\n father.addTransaction();\n\n // IN THE MEAN TIME THE INTERACTION IS BEING EXECUTED\n\n\t\t\t\t/*\n\t\t\t\t * possible values of r: 0: commit 1: rollback 2: error\n\t\t\t\t */\n int r = ByteBuffer.wrap(buffer).getInt();\n //System.out.println(\"r = \"+r);\n if (r == 0) {\n father.addCommit();\n } else if (r == 1) {\n father.addRollback();\n } else {\n father.addError();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private String sendTransaction(AgentTransaction txn) {\n\t\tString responseMsg = null;\n\t\t/* vishal end */\n\t\tList<ERRORType> errorType = null;\n\t\tList<ERRORDETAILSType> errorDetails = null;\n\t\tString errorDesc = null;\n\n\n\t\ttry {\n\t\t\tFCUBSCLService service = new FCUBSCLService(); \n\t\t\tFCUBSCLServiceSEI ser = service.getFCUBSCLServiceSEI();\n\t\t\tFCUBSHEADERType fcubsHeaderType = getFcubsHeaderTypeObject();\n\t\t\tif (txn.getTxnType().equals(ServiceConstants.REAPYMENT_STATUS)) {\n\t\t\t\tlogger.info(\"sendTransaction to CBS::REPAYMENT : \"+txn.getId());\n\t\t\t\tCREATEPAYMENTFSFSREQ requestMsg = populateCreatePaymentReq(txn,\n\t\t\t\t\t\tfcubsHeaderType);\n\t\t\t\tCREATEPAYMENTFSFSRES response = ser.createPaymentFS(requestMsg);\n\t\t\t\t/* vishal Start */\n\t\t\t\tif(response != null){\n\t\t\t\t/* vishal end */\t\n\t\t\t\t\t\n\t\t\t\t\tresponseMsg = response.getFCUBSHEADER().getMSGSTAT().value();\n\t\t\t\t\terrorType = response.getFCUBSBODY().getFCUBSERRORRESP();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tlogger.info(\"sendTransaction to CBS::REPAYMENT NULL RESPONSE: \"+ txn.getId());\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t} else {\n\t\t\t\tlogger.info(\"sendTransaction to CBS::DISBURSEMENT : \"+txn.getId());\n\t\t\t\tCREATEDISBURSEMENTIOPKREQ requestMsg = populateCreateDisbrReq(\n\t\t\t\t\t\ttxn, fcubsHeaderType);\n\t\t\t\tCREATEDISBURSEMENTIOPKRES response = ser\n\t\t\t\t\t\t.createDisbursementIO(requestMsg);\n\t\t\t\t/* vishal Start */\n\t\t\t\tif(response != null){\t\t\t\t\n\t\t\t\t\tresponseMsg = response.getFCUBSHEADER().getMSGSTAT().value();\n\t\t\t\t\terrorType = response.getFCUBSBODY().getFCUBSERRORRESP();\n\t\t\t\t} else {\n\t\t\t\t\tlogger.info(\"sendTransaction to CBS::FAILED ::RESPONSE NULL:: \"+txn.getId());\n\t\t\t\n\t\t\t\t}\n\t\t\t\t/* vishal end */\n\t\t\t}\n\t\t\t/* vishal Start */\n\t\t\tif (errorType != null && !errorType.isEmpty()) {\n\t\t\t/* vishal End */\n\t\t\t\terrorDetails = errorType.get(0).getERROR();\n\t\t\t/* vishal Start */\n\t\t\t\tif (errorDetails != null && !errorDetails.isEmpty()) {\n\t\t\t/* vishal End */\n\t\t\t\t\terrorDesc = errorDetails.get(0).getEDESC();\n\t\t\t\t\tgetFcubsCbsWebDao().updateTxnWithErrorMsg(errorDesc,\n\t\t\t\t\t\t\ttxn.getTxnId());\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (WebServiceException e) {\n\t\t\tlogger.info(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tthrow new WebServiceException();\n\t\t}\n\t\treturn responseMsg;\n\t}", "private LoanProtocol processRollback(LoanProtocol protocol)\n\t{\n\t\ttransferLock.countDown();\n\t\tshouldRollback = true;\n\t\treturn null;\n\t}", "private void executeRicercaAccertamentoPerOrdinativo() {\n \tif (model.getGestioneOrdinativoStep1Model().getAnnoAccertamento() == null || model.getGestioneOrdinativoStep1Model().getNumeroAccertamento() == null) {\n\n \t\tif(!sonoInAggiornamento()){\n \t\t\t\n \t\t\tmodel.getGestioneOrdinativoStep2Model().setListaAccertamento(new ArrayList<Accertamento>());\n \t\t\tmodel.getGestioneOrdinativoStep2Model().setListaAccertamentoOriginale(new ArrayList<Accertamento>());\n \t\t\tmodel.getGestioneOrdinativoStep2Model().setResultSize(0);\n\n \t\t\tRicercaAccertamentiSubAccertamenti request= new RicercaAccertamentiSubAccertamenti();\n \t\t\trequest.setEnte(sessionHandler.getEnte());\n \t\t\trequest.setRichiedente(sessionHandler.getRichiedente());\n\n\n \t\t\tParametroRicercaAccSubAcc param= new ParametroRicercaAccSubAcc();\n \t\t\tparam.setAnnoEsercizio(Integer.parseInt(sessionHandler.getAnnoEsercizio()));\n \t\t\tparam.setAnnoAccertamento(Integer.parseInt(sessionHandler.getAnnoEsercizio()));\n \t\t\tparam.setDisponibilitaAdIncassare(true);\n\n \t\t\t// Capitolo\n \t\t\tif (model.getGestioneOrdinativoStep1Model().getCapitolo() != null) {\n \t\t\t\tparam.setNumeroCapitolo(model.getGestioneOrdinativoStep1Model().getCapitolo().getNumCapitolo());\n \t\t\t\tparam.setNumeroArticolo(model.getGestioneOrdinativoStep1Model().getCapitolo().getArticolo());\n \t\t\t\tif(null!=model.getGestioneOrdinativoStep1Model().getCapitolo().getUeb()){\n \t\t\t\t\tparam.setNumeroUEB(model.getGestioneOrdinativoStep1Model().getCapitolo().getUeb().intValue());\n \t\t\t\t}\n \t\t\t}\n\n\n \t\t\tparam.setCodiceDebitore(model.getGestioneOrdinativoStep1Model().getSoggetto().getCodCreditore());\n \t\t\tparam.setIsRicercaDaAccertamento(false);\n \t\t\trequest.setParametroRicercaAccSubAcc(param);\n\n\n \t\t\taddNumAndPageSize(request, \"listaAccertamentoOrdinativoId\");\n\n \t\t\tRicercaAccertamentiSubAccertamentiResponse response= movimentoGestionService.ricercaAccertamentiSubAccertamentiPerOrdinativoIncasso(request);\n\n \t\t\tif(response.isFallimento() || !response.getErrori().isEmpty()){\n\n \t\t\t\t//setto gli errori cosi che siano segnalati lato app!\n \t\t\t\taddErrori(response.getErrori());\n\n \t\t\t}else{\n\n \t\t\t\tif (response.getListaAccertamenti() != null && response.getListaAccertamenti().size() > 0) {\n \t\t\t\t\tfor (Accertamento currentAccetamento : response.getListaAccertamenti()) {\n \t\t\t\t\t\taddAccertamentiESubAccertamentiInUnicaLista(currentAccetamento);\n \t\t\t\t\t}\n\n \t\t\t\t\tmodel.getGestioneOrdinativoStep2Model().setResultSize(response.getNumRisultati());\n \t\t\t\t\t\n \t\t\t\t\tif(model.getGestioneOrdinativoStep2Model().getListaAccertamento()==null || model.getGestioneOrdinativoStep2Model().getListaAccertamento().size()==0){\n \t\t\t\t\t\taddPersistentActionWarning(ErroreFin.CRU_WAR_1003.getErrore().getCodice()+\" : \"+ErroreFin.CRU_WAR_1003.getErrore(\" accertamenti o subaccertamenti\").getDescrizione());\n \t\t\t\t\t}\n \t\t\t\t} else {\n \t\t\t\t\taddPersistentActionWarning(ErroreFin.CRU_WAR_1003.getErrore().getCodice()+\" : \"+ErroreFin.CRU_WAR_1003.getErrore(\" accertamenti o subaccertamenti\").getDescrizione());\n \t\t\t\t}\n \t\t\t}\n\n \t\t}\n \t}\n }", "@Override\r\n\tpublic void realizarTransacción() {\n\t\tSystem.out.println(\"Transaccion en progreso\");\r\n\t}", "void rollBack();", "@Override\n public void setRecoveryMode(boolean isForInitialization) throws IOException {\n synchronized(this) {\n if (this.isDrainingDone) {\n // when there is no outstanding splitlogtask after master start up, we already have up to \n // date recovery mode\n return;\n }\n }\n if (this.watcher == null) {\n // when watcher is null(testing code) and recovery mode can only be LOG_SPLITTING\n synchronized(this) {\n this.isDrainingDone = true;\n this.recoveryMode = RecoveryMode.LOG_SPLITTING;\n }\n return;\n }\n boolean hasSplitLogTask = false;\n boolean hasRecoveringRegions = false;\n RecoveryMode previousRecoveryMode = RecoveryMode.UNKNOWN;\n RecoveryMode recoveryModeInConfig =\n (isDistributedLogReplay(conf)) ? RecoveryMode.LOG_REPLAY : RecoveryMode.LOG_SPLITTING;\n\n // Firstly check if there are outstanding recovering regions\n try {\n List<String> regions = ZKUtil.listChildrenNoWatch(watcher, watcher.recoveringRegionsZNode);\n if (regions != null && !regions.isEmpty()) {\n hasRecoveringRegions = true;\n previousRecoveryMode = RecoveryMode.LOG_REPLAY;\n }\n if (previousRecoveryMode == RecoveryMode.UNKNOWN) {\n // Secondly check if there are outstanding split log task\n List<String> tasks = listSplitLogTasks();\n if (!tasks.isEmpty()) {\n hasSplitLogTask = true;\n if (isForInitialization) {\n // during initialization, try to get recovery mode from splitlogtask\n int listSize = tasks.size();\n for (int i = 0; i < listSize; i++) {\n String task = tasks.get(i);\n try {\n byte[] data =\n ZKUtil.getData(this.watcher, ZKUtil.joinZNode(watcher.splitLogZNode, task));\n if (data == null) continue;\n SplitLogTask slt = SplitLogTask.parseFrom(data);\n previousRecoveryMode = slt.getMode();\n if (previousRecoveryMode == RecoveryMode.UNKNOWN) {\n // created by old code base where we don't set recovery mode in splitlogtask\n // we can safely set to LOG_SPLITTING because we're in master initialization code\n // before SSH is enabled & there is no outstanding recovering regions\n previousRecoveryMode = RecoveryMode.LOG_SPLITTING;\n }\n break;\n } catch (DeserializationException e) {\n LOG.warn(\"Failed parse data for znode \" + task, e);\n } catch (InterruptedException e) {\n throw new InterruptedIOException();\n }\n }\n }\n }\n }\n } catch (KeeperException e) {\n throw new IOException(e);\n }\n\n synchronized (this) {\n if (this.isDrainingDone) {\n return;\n }\n if (!hasSplitLogTask && !hasRecoveringRegions) {\n this.isDrainingDone = true;\n this.recoveryMode = recoveryModeInConfig;\n return;\n } else if (!isForInitialization) {\n // splitlogtask hasn't drained yet, keep existing recovery mode\n return;\n }\n\n if (previousRecoveryMode != RecoveryMode.UNKNOWN) {\n this.isDrainingDone = (previousRecoveryMode == recoveryModeInConfig);\n this.recoveryMode = previousRecoveryMode;\n } else {\n this.recoveryMode = recoveryModeInConfig;\n }\n }\n }", "public void rechazarTraslado(Long trasllatDippositId) throws InfrastructureException {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tlogger.debug(\"aceptarTraslado ini\");\r\n\t\t\tTrasllat tdi = this.getById(trasllatDippositId);\r\n\t\t\tif(tdi!= null){\r\n\t\t\t\ttdi.setAcceptatTrasllat(Boolean.valueOf(false));\r\n\t\t\t\ttdi.setTraslladant(Boolean.valueOf(false));\r\n\t\t\t\tmakePersistent(tdi);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tlogger.error(\"aceptarTraslado failed\", ex);\r\n\t\t\tthrow new InfrastructureException(ex);\r\n\t\t}\r\n\t\tlogger.debug(\"aceptarTraslado fin\");\t\t\r\n\t}", "public void migrateLogsFromRcToDb();", "public static void main(String[] args) {\n AccountRepository accountRepository=new JdbcAccountRepository();\n TransferServiceImpl transferService = new TransferServiceImpl(accountRepository);\n\n // use phase\n transferService.transfer(1000.00, \"1\", \"2\");\n System.out.println();\n transferService.transfer(1000.00, \"2\", \"1\");\n\n\n // destroy phase\n transferService = null;\n\n\n }", "@Override\n public void alRechazarOperacion() {\n }", "public static void makeReadOperation(int trans_id, int var_id) {\n System.out.println(\"T\" + trans_id + \" wishes to read x\" + var_id);\n Transaction txn = null;\n if (transactions.containsKey(trans_id))\n txn = transactions.get(trans_id);\n if (txn != null) {\n if (txn.getType() == TransactionType.RO) {\n makeReadOnlyOperation(trans_id, var_id);\n return;\n }\n // System.out.println(\"makeReadOperation\");\n\n Operation oper = new Operation(trans_id, var_id);\n readOperation(txn, oper);\n } else {\n // aborted\n System.out.println(\"Aborted : T\" + trans_id);\n }\n\n }", "private void processRollback() throws HsqlException {\n\n String token;\n boolean toSavepoint;\n\n token = tokenizer.getSimpleToken();\n toSavepoint = false;\n\n if (token.equals(Token.T_WORK)) {\n\n // do nothing\n } else if (token.equals(Token.T_TO)) {\n tokenizer.getThis(Token.T_SAVEPOINT);\n\n token = tokenizer.getSimpleName();\n toSavepoint = true;\n } else {\n tokenizer.back();\n }\n\n if (toSavepoint) {\n session.rollbackToSavepoint(token);\n } else {\n session.rollback();\n }\n }", "@Transactional\n public void transfer(Rekening asal, Rekening tujuan, BigDecimal nilai, String keterangan) {\n logTransaksiService.logTransferMulai(asal, tujuan, nilai);\n\n // cek saldo\n if (asal.getSaldo().compareTo(nilai) < 0) {\n throw new IllegalStateException(\"Saldo tidak cukup\");\n }\n\n // kurangi saldo pengirim\n asal.setSaldo(asal.getSaldo().subtract(nilai));\n rekeningDao.save(asal);\n\n // mutasi rekening pengirim\n Mutasi mutasiPengirim = new Mutasi();\n mutasiPengirim.setKeterangan(\"transfer ke \"+tujuan.getNomor());\n mutasiPengirim.setRekening(asal);\n mutasiPengirim.setNilai(nilai.multiply(new BigDecimal(-1)));\n mutasiDao.save(mutasiPengirim);\n\n // mutasi rekening penerima\n Mutasi mutasiPenerima = new Mutasi();\n mutasiPenerima.setKeterangan(\"transfer dari \"+asal.getNomor());\n mutasiPenerima.setRekening(tujuan);\n mutasiPenerima.setNilai(nilai);\n mutasiDao.save(mutasiPenerima);\n\n // tambah saldo penerima\n tujuan.setSaldo(tujuan.getSaldo().add(nilai));\n rekeningDao.save(tujuan);\n\n // log sukses transaksi\n logTransaksiService.logTransferSukses(asal, tujuan, nilai);\n }", "private void importToDB(String id) throws Exception\n\t{\n\t\tboolean locked = false;\n try\n {\n\t\t\tint retries = 0;\n\t\t\tlocked = locker.lockUpload(id);\n\t\t\twhile (!locked && retries < MAX_LOCK_RETRIES)\n\t\t\t{\n\t\t\t\t// Someone may be doing a HEAD or a TERMINATE, wait 50 millisecs ..\n\t\t\t\tThread.sleep(50);\n\t\t\t\tlocked = locker.lockUpload(id);\n\t\t\t\tretries++;\n\t\t\t}\n if (!locked)\n {\n log.error(\"Couldn't lock \" + id);\n throw new TusException.FileLocked();\n }\n whileLocked(id);\n }\n finally\n {\n if (locked)\n {\n locker.unlockUpload(id);\n }\n }\n\t}", "public abstract void rollback() throws DetailException;", "@Override\n\tpublic JSONObject findZzblPlantTeethOperationById(String id) throws Exception {\n\t\treturn opertaionDao.findZzblPlantTeethOperationById(id);\n\t}", "@Override\n\tpublic void recoverProcedure(ProcedureRecoveryInfo procedure, IProgressMonitor monitor) throws LoadFailed\n\t{\n\t\tLogger.info(\"Recovering procedure \" + procedure.getOriginalInstanceId(), Level.PROC, this);\n\t\t// Will hold the model\n\t\tIProcedure model = null;\n\t\t// Will hold the instance identifier\n\t\tString instanceId = null;\n\n\t\t// Start the task in the monitor\n\t\tmonitor.beginTask(\"Recovering procedure\", 6);\n\t\t// Check cancellation\n\t\tif (monitor.isCanceled())\n\t\t\treturn;\n\n\t\t// -----------------------------\n\t\t// PHASE 1, create a local model\n\t\t// -----------------------------\n\t\ttry\n\t\t{\n\t\t\tLogger.debug(\"[1] Create local model\", Level.PROC, this);\n\t\t\t// Create the model, Notify about the progress\n\t\t\tmonitor.subTask(\"Creating model\");\n\t\t\t// Will get an available id\n\t\t\tmodel = m_models.createLocalProcedureModel(procedure.getProcId(), monitor);\n\t\t\tmodel.setReplayMode(true);\n\t\t\tinstanceId = model.getProcId();\n\t\t\tprocedure.setNewInstanceId(instanceId);\n\t\t\tm_models.deleteLocalProcedureModel(instanceId);\n\t\t\tmonitor.worked(1);\n\t\t}\n\t\tcatch (LoadFailed ex)\n\t\t{\n\t\t\tLogger.error(ex.getLocalizedMessage(), Level.PROC, this);\n\t\t\tthrow ex;\n\t\t}\n\n\t\t// Check cancellation\n\t\tif (monitor.isCanceled())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// ----------------------------------------------------\n\t\t// PHASE 2, start the executor process in recovery mode\n\t\t// ----------------------------------------------------\n\t\ttry\n\t\t{\n\t\t\tLogger.debug(\"[2] Start recovered executor\", Level.PROC, this);\n\t\t\t// Report progress\n\t\t\tmonitor.subTask(\"Starting to process\");\n\n\t\t\t// Request context to load the procedure\n\t\t\tLogger.debug(\"Requesting context to recover executor \" + procedure.getProcId(), Level.PROC, this);\n\t\t\ts_ctx.recoverExecutor(procedure);\n\n\t\t\t// Report progress\n\t\t\tmonitor.worked(1);\n\n\t\t}\n\t\tcatch (ContextError ex)\n\t\t{\n\t\t\tLogger.error(ex.getLocalizedMessage(), Level.PROC, this);\n\t\t\tthrow new LoadFailed(ex.getLocalizedMessage());\n\t\t}\n\n\t\t// Check cancellation\n\t\tif (monitor.isCanceled())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Report progress\n\t\tmonitor.subTask(\"Ending load process\");\n\t\t// Report progress\n\t\tmonitor.done();\n\t\tLogger.debug(\"Recovery process done\", Level.PROC, this);\n\t}", "public Account doMoneyTransfer(MoneyTransferDTO moneyTransferDTO, Long id) {\n Account origin = accountService.getAccountById(id);\n Account destination = accountService.getAccountById(moneyTransferDTO.getToAccountId());\n\n // check for fraud detection\n //fraudDetectionService.checkMoneyTransfer(origin, moneyTransferDTO);\n fraudDetectionService.checkMoneyTransferV2(origin, moneyTransferDTO);\n\n // check enough funds in origin account\n BigDecimal currentBalance = origin.getBalance().getAmount();\n BigDecimal transferAmount = moneyTransferDTO.getAmount();\n if (transferAmount.compareTo(currentBalance) > 0)\n throw new ResponseStatusException(HttpStatus.BAD_REQUEST, \"Amount exceeds balance of the account\");\n\n // check if penalty fee has to be deducted later\n BigDecimal result = currentBalance.subtract(transferAmount);\n boolean applyPenaltyFee =\n currentBalance.compareTo(origin.getMinimumBalance().getAmount()) > 0 &&\n result.compareTo(origin.getMinimumBalance().getAmount()) < 0;\n\n // make the transaction\n Transaction transaction = new Transaction(new Money(transferAmount));\n transaction.setType(Type.MONEY_TRANSFER);\n transaction.setFromAccount(origin);\n transaction.setToAccount(destination);\n //transaction.setAmount(new Money(transferAmount));\n transaction.setAuthorName(moneyTransferDTO.getName());\n transaction.setDescription(moneyTransferDTO.getDescription());\n Transaction newTransaction = transactionService.addTransaction(transaction);\n\n // deduct penalty fee with another transaction if needed\n if (applyPenaltyFee) {\n\n Transaction deductionTransaction = new Transaction(origin.getPenaltyFee());\n transaction.setType(Type.PENALTY_FEE);\n deductionTransaction.setFromAccount(origin);\n //deductionTransaction.setToAccount(null);\n //deductionTransaction.setAmount(origin.getPenaltyFee()); // set amount before accounts\n deductionTransaction.setAuthorName(moneyTransferDTO.getName());\n deductionTransaction.setDescription(\"Penalty fee deduction\");\n transactionService.addTransaction(deductionTransaction);\n }\n\n return accountService.saveAccount(origin);\n }", "public boolean onTransact(int r30, android.os.Parcel r31, android.os.Parcel r32, int r33) throws android.os.RemoteException {\n /*\n r29 = this;\n r13 = r29\n r14 = r30\n r15 = r31\n java.lang.String r12 = \"android.app.IBackupAgent\"\n r0 = 1598968902(0x5f4e5446, float:1.4867585E19)\n r16 = 1\n if (r14 == r0) goto L_0x0177\n r0 = 0\n switch(r14) {\n case 1: goto L_0x0124;\n case 2: goto L_0x00e7;\n case 3: goto L_0x00b5;\n case 4: goto L_0x0094;\n case 5: goto L_0x0084;\n case 6: goto L_0x0036;\n case 7: goto L_0x0023;\n case 8: goto L_0x0018;\n default: goto L_0x0013;\n }\n L_0x0013:\n boolean r0 = super.onTransact(r30, r31, r32, r33)\n return r0\n L_0x0018:\n r15.enforceInterface(r12)\n java.lang.String r0 = r31.readString()\n r13.fail(r0)\n return r16\n L_0x0023:\n r15.enforceInterface(r12)\n int r0 = r31.readInt()\n android.os.IBinder r1 = r31.readStrongBinder()\n android.app.backup.IBackupManager r1 = android.app.backup.IBackupManager.Stub.asInterface(r1)\n r13.doRestoreFinished(r0, r1)\n return r16\n L_0x0036:\n r15.enforceInterface(r12)\n int r1 = r31.readInt()\n if (r1 == 0) goto L_0x0049\n android.os.Parcelable$Creator r0 = android.os.ParcelFileDescriptor.CREATOR\n java.lang.Object r0 = r0.createFromParcel(r15)\n android.os.ParcelFileDescriptor r0 = (android.os.ParcelFileDescriptor) r0\n L_0x0047:\n r1 = r0\n goto L_0x004a\n L_0x0049:\n goto L_0x0047\n L_0x004a:\n long r17 = r31.readLong()\n int r19 = r31.readInt()\n java.lang.String r20 = r31.readString()\n java.lang.String r21 = r31.readString()\n long r22 = r31.readLong()\n long r24 = r31.readLong()\n int r26 = r31.readInt()\n android.os.IBinder r0 = r31.readStrongBinder()\n android.app.backup.IBackupManager r27 = android.app.backup.IBackupManager.Stub.asInterface(r0)\n r0 = r13\n r2 = r17\n r4 = r19\n r5 = r20\n r6 = r21\n r7 = r22\n r9 = r24\n r11 = r26\n r14 = r12\n r12 = r27\n r0.doRestoreFile(r1, r2, r4, r5, r6, r7, r9, r11, r12)\n return r16\n L_0x0084:\n r14 = r12\n r15.enforceInterface(r14)\n long r0 = r31.readLong()\n long r2 = r31.readLong()\n r13.doQuotaExceeded(r0, r2)\n return r16\n L_0x0094:\n r14 = r12\n r15.enforceInterface(r14)\n long r6 = r31.readLong()\n int r8 = r31.readInt()\n android.os.IBinder r0 = r31.readStrongBinder()\n android.app.backup.IBackupManager r9 = android.app.backup.IBackupManager.Stub.asInterface(r0)\n int r10 = r31.readInt()\n r0 = r13\n r1 = r6\n r3 = r8\n r4 = r9\n r5 = r10\n r0.doMeasureFullBackup(r1, r3, r4, r5)\n return r16\n L_0x00b5:\n r14 = r12\n r15.enforceInterface(r14)\n int r1 = r31.readInt()\n if (r1 == 0) goto L_0x00c9\n android.os.Parcelable$Creator r0 = android.os.ParcelFileDescriptor.CREATOR\n java.lang.Object r0 = r0.createFromParcel(r15)\n android.os.ParcelFileDescriptor r0 = (android.os.ParcelFileDescriptor) r0\n L_0x00c7:\n r1 = r0\n goto L_0x00ca\n L_0x00c9:\n goto L_0x00c7\n L_0x00ca:\n long r7 = r31.readLong()\n int r9 = r31.readInt()\n android.os.IBinder r0 = r31.readStrongBinder()\n android.app.backup.IBackupManager r10 = android.app.backup.IBackupManager.Stub.asInterface(r0)\n int r11 = r31.readInt()\n r0 = r13\n r2 = r7\n r4 = r9\n r5 = r10\n r6 = r11\n r0.doFullBackup(r1, r2, r4, r5, r6)\n return r16\n L_0x00e7:\n r14 = r12\n r15.enforceInterface(r14)\n int r1 = r31.readInt()\n if (r1 == 0) goto L_0x00fa\n android.os.Parcelable$Creator r1 = android.os.ParcelFileDescriptor.CREATOR\n java.lang.Object r1 = r1.createFromParcel(r15)\n android.os.ParcelFileDescriptor r1 = (android.os.ParcelFileDescriptor) r1\n goto L_0x00fb\n L_0x00fa:\n r1 = r0\n L_0x00fb:\n long r7 = r31.readLong()\n int r2 = r31.readInt()\n if (r2 == 0) goto L_0x010f\n android.os.Parcelable$Creator r0 = android.os.ParcelFileDescriptor.CREATOR\n java.lang.Object r0 = r0.createFromParcel(r15)\n android.os.ParcelFileDescriptor r0 = (android.os.ParcelFileDescriptor) r0\n L_0x010d:\n r4 = r0\n goto L_0x0110\n L_0x010f:\n goto L_0x010d\n L_0x0110:\n int r9 = r31.readInt()\n android.os.IBinder r0 = r31.readStrongBinder()\n android.app.backup.IBackupManager r10 = android.app.backup.IBackupManager.Stub.asInterface(r0)\n r0 = r13\n r2 = r7\n r5 = r9\n r6 = r10\n r0.doRestore(r1, r2, r4, r5, r6)\n return r16\n L_0x0124:\n r14 = r12\n r15.enforceInterface(r14)\n int r1 = r31.readInt()\n if (r1 == 0) goto L_0x0137\n android.os.Parcelable$Creator r1 = android.os.ParcelFileDescriptor.CREATOR\n java.lang.Object r1 = r1.createFromParcel(r15)\n android.os.ParcelFileDescriptor r1 = (android.os.ParcelFileDescriptor) r1\n goto L_0x0138\n L_0x0137:\n r1 = r0\n L_0x0138:\n int r2 = r31.readInt()\n if (r2 == 0) goto L_0x0147\n android.os.Parcelable$Creator r2 = android.os.ParcelFileDescriptor.CREATOR\n java.lang.Object r2 = r2.createFromParcel(r15)\n android.os.ParcelFileDescriptor r2 = (android.os.ParcelFileDescriptor) r2\n goto L_0x0148\n L_0x0147:\n r2 = r0\n L_0x0148:\n int r3 = r31.readInt()\n if (r3 == 0) goto L_0x0158\n android.os.Parcelable$Creator r0 = android.os.ParcelFileDescriptor.CREATOR\n java.lang.Object r0 = r0.createFromParcel(r15)\n android.os.ParcelFileDescriptor r0 = (android.os.ParcelFileDescriptor) r0\n L_0x0156:\n r3 = r0\n goto L_0x0159\n L_0x0158:\n goto L_0x0156\n L_0x0159:\n long r9 = r31.readLong()\n int r11 = r31.readInt()\n android.os.IBinder r0 = r31.readStrongBinder()\n android.app.backup.IBackupManager r12 = android.app.backup.IBackupManager.Stub.asInterface(r0)\n int r17 = r31.readInt()\n r0 = r13\n r4 = r9\n r6 = r11\n r7 = r12\n r8 = r17\n r0.doBackup(r1, r2, r3, r4, r6, r7, r8)\n return r16\n L_0x0177:\n r14 = r12\n r0 = r32\n r0.writeString(r14)\n return r16\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.app.IBackupAgent.Stub.onTransact(int, android.os.Parcel, android.os.Parcel, int):boolean\");\n }", "public void operationDelete() {\n\r\n\t\tstatusFeldDelete();\r\n\t}", "@Test\n\tpublic void testScenario1() {\n\t\tSystem.out.println(\"----------Running Recovery Scenario 1----------\");\n\t\t// Creating a Block.\n\t\tBlock blk1 = new Block(\"filename\", 1);\n\t\tBlock blk2 = new Block(\"filename\", 2);\n\n\t\t// Create a RecoveryManager\n\t\tint txid = 123;\n\t\tint txid2 = 143;\n\t\tRecoveryMgr rm = new RecoveryMgr(txid);\n\t\tRecoveryMgr rm2 = new RecoveryMgr(txid2);\n\n\t\t// Sample setInt\n\t\tBufferMgr basicBufferMgr = new SimpleDB().bufferMgr();\n\t\tBuffer buff = basicBufferMgr.pin(blk1);\n\t\tBuffer buff2 = basicBufferMgr.pin(blk2);\n\t\tint offset = 8;\n\t\tint offset2 = 16;\n\t\tint oldValue = buff.getInt(offset);\n\t\tint oldValue2 = buff2.getInt(offset2);\n\t\tSystem.out.println(\"Old Value: \" + oldValue);\n\t\tSystem.out.println(\"Old Value2: \" + oldValue2);\n\t\tint valueToSet = oldValue + 10;\n\t\tint valueToSet2 = oldValue2 + 20;\n\t\tint lsn = rm.setInt(buff, offset, valueToSet);\n\t\tbuff.setInt(offset, valueToSet, txid, lsn);\n\t\tint lsn2 = rm2.setInt(buff2, offset2, valueToSet2);\n\t\tbuff2.setInt(offset2, valueToSet2, txid2, lsn2);\n\t\tint newValue = buff.getInt(offset);\n\t\tSystem.out.println(\"New Value without committing: \" + newValue);\n\t\tint newValue2 = buff2.getInt(offset2);\n\t\tSystem.out.println(\"New Value2 without committing: \" + newValue2);\n\n\t\trm2.commit();\n\t\trm2.recover();\n\t\tnewValue = buff.getInt(offset);\n\t\tnewValue2 = buff2.getInt(offset2);\n\t\tSystem.out.println(\"New Value after recovering: \" + newValue);\n\t\tSystem.out.println(\"New Value2 after recovering: \" + newValue2);\n\t\tAssert.assertEquals(oldValue, newValue);\n\t\tAssert.assertEquals(valueToSet2, newValue2);\n\t\tSystem.out.println(\"----------Recovery Scenario 1 Run Complete----------\");\n\t}", "public void execute() {\n /*\n r6 = this;\n java.lang.String r0 = \"Failed to close connection after DBUnit operation: \"\n java.util.logging.Logger r1 = log\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n java.lang.String r3 = \"Executing DBUnit operations: \"\n r2.append(r3)\n int r3 = r6.size()\n r2.append(r3)\n java.lang.String r2 = r2.toString()\n r1.info(r2)\n org.dbunit.database.IDatabaseConnection r1 = r6.getConnection() // Catch:{ all -> 0x005a }\n r6.disableReferentialIntegrity(r1) // Catch:{ all -> 0x0058 }\n java.util.Iterator r2 = r6.iterator() // Catch:{ all -> 0x0058 }\n L_0x0027:\n boolean r3 = r2.hasNext() // Catch:{ all -> 0x0058 }\n if (r3 == 0) goto L_0x0037\n java.lang.Object r3 = r2.next() // Catch:{ all -> 0x0058 }\n org.seamless.util.dbunit.DBUnitOperations$Op r3 = (org.seamless.util.dbunit.DBUnitOperations.Op) r3 // Catch:{ all -> 0x0058 }\n r3.execute(r1) // Catch:{ all -> 0x0058 }\n goto L_0x0027\n L_0x0037:\n r6.enableReferentialIntegrity(r1) // Catch:{ all -> 0x0058 }\n if (r1 == 0) goto L_0x0057\n r1.close() // Catch:{ Exception -> 0x0040 }\n goto L_0x0057\n L_0x0040:\n r1 = move-exception\n java.util.logging.Logger r2 = log\n java.util.logging.Level r3 = java.util.logging.Level.WARNING\n java.lang.StringBuilder r4 = new java.lang.StringBuilder\n r4.<init>()\n r4.append(r0)\n r4.append(r1)\n java.lang.String r0 = r4.toString()\n r2.log(r3, r0, r1)\n L_0x0057:\n return\n L_0x0058:\n r2 = move-exception\n goto L_0x005c\n L_0x005a:\n r2 = move-exception\n r1 = 0\n L_0x005c:\n if (r1 == 0) goto L_0x0079\n r1.close() // Catch:{ Exception -> 0x0062 }\n goto L_0x0079\n L_0x0062:\n r1 = move-exception\n java.util.logging.Logger r3 = log\n java.util.logging.Level r4 = java.util.logging.Level.WARNING\n java.lang.StringBuilder r5 = new java.lang.StringBuilder\n r5.<init>()\n r5.append(r0)\n r5.append(r1)\n java.lang.String r0 = r5.toString()\n r3.log(r4, r0, r1)\n L_0x0079:\n goto L_0x007b\n L_0x007a:\n throw r2\n L_0x007b:\n goto L_0x007a\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.seamless.util.dbunit.DBUnitOperations.execute():void\");\n }", "public static void beginTransaction(int trans_id, String trans_type) {\n\n // System.out.println(\"beginTransaction\");\n long currTime = time;\n time++;\n Transaction txn = new Transaction(trans_id, currTime, trans_type);\n transactions.put(trans_id, txn);\n\n if (trans_type == \"RO\") {\n setVariableListForReadOnlyTxn(txn);\n System.out.println(\"T\" + trans_id + \" begins and is Read Only\");\n } else {\n System.out.println(\"T\" + trans_id + \" begins\");\n }\n\n\n }", "public abstract boolean migrate(int userId, String uuid, String tarHost, String content, String conid);", "@Override\n\tpublic void exec() {\n\t\tauto.changerEtat(\"trS\");\n\t}", "@Transactional//expect both \"T\" and \"F\"\n\tpublic Object invalidTxInPublicMethod(String action) {\n\t\tuniActionLogDao.insert(\"T\");\n\t\ttry {\n\t\t\tlogInfo12();\n\t\t} catch (Exception e) {\n\t\t\t//do nothing\n\t\t\treturn \"F1\";\n\t\t}\n\t\treturn \"T1\";\n\t}", "public Receipt recordTransaction(Transaction t) throws RemoteException;", "@Override\n public int execute() throws InterruptedOperationException, CancelOperationException {\n Logger logger = Log4j.getLogger();\n int success = 0;\n try {\n String accountNumber = null;\n BigDecimal amount = BigDecimal.ONE;\n Transaction transaction;\n LocalDateTime now;\n String userId = BankApp.getCurrentUser().getUserId();\n List<String> accountNumbers = accountDao.getAccountNumbers(userId);\n ConsoleHelper.println(\"\");\n ConsoleHelper.displayMenuBanner();\n ConsoleHelper.printlnWithTab(\"[DEPOSIT]\");\n ConsoleHelper.printAccountList();\n\n boolean isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Into: \");\n String input = ConsoleHelper.readString();\n for (int i = 1; i <= accountNumbers.size(); i++) {\n if (input.equals(String.valueOf(i))) {\n accountNumber = accountNumbers.get(i - 1);\n isValidInput = true;\n break;\n }\n }\n\n } while (!isValidInput);\n\n isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Amount: \");\n String input = ConsoleHelper.readString();\n try {\n double inputValue = Double.parseDouble(input);\n amount = BigDecimal.valueOf(inputValue);\n int decimalPlaces = ConsoleHelper.getNumberOfDecimalPlaces(amount);\n if (decimalPlaces == 0 && amount.compareTo(BigDecimal.valueOf(0)) > 0) {\n isValidInput = true;\n } else {\n ConsoleHelper.printlnWithTab(\"Invalid amount, we only accept whole number deposit.\");\n }\n } catch (NumberFormatException e) {\n // the amount format is not valid\n }\n } while (!isValidInput);\n\n int countAccount = accountDao.deposit(accountNumber, amount);\n now = LocalDateTime.now();\n Account account = accountDao.getAccount(accountNumber);\n transaction = new Transaction(TransactionType.DEPOSIT, userId, now, amount, account);\n int countTransaction = transactionDao.addTransaction(transaction);\n success = countAccount == 1 && countTransaction == 1 ? 1 : 0;\n if (success == 1) {\n ConsoleHelper.printlnWithTab(\"Deposit completed.\");\n ConsoleHelper.println(\"\");\n } else {\n ConsoleHelper.printlnWithTab(\"System failure, deposit cancelled. Please try later.\");\n }\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n logger.error(\"Interrupted Exception when thread sleep\", e);\n }\n } catch (CancelOperationException e) {\n // do nothing, allow user to return to main menu\n }\n return success;\n }", "private void testRollback001() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testRollback001\");\n\t\t\tsession = tbc.getDmtAdmin().getSession(\".\", DmtSession.LOCK_TYPE_EXCLUSIVE);\n\t\t\tsession.rollback();\n\t\t\tDefaultTestBundleControl.failException(\"#\",DmtIllegalStateException.class);\n\t\t} catch (DmtIllegalStateException e) {\n\t\t\tDefaultTestBundleControl.pass(\"DmtIllegalStateException correctly thrown\");\n\t\t} catch (Exception e) {\n tbc.failExpectedOtherException(DmtIllegalStateException.class, e);\n\t\t} finally {\n\t\t\ttbc.closeSession(session);\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\t//doing lazy-load\r\n\t\t\t\tmasterAEnt.getDetailAEntCol().size();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest.this\r\n\t\t\t\t\t.manager\r\n\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tSignatureBean signatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQUVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoiZGV0YWlsQUVudENvbCIsInJhd0tleVZhbHVlcyI6WyIxIl0sInJhd0tleVR5cGVOYW1lcyI6WyJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tCollection<DetailAEnt> detailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\tArrayList<DetailAEnt> detailAEntCuttedCol = new ArrayList<>();\r\n\t\t\t\tdetailAEntCuttedCol.add(new ArrayList<>(detailAEntCol).get(0));\r\n\t\t\t\tdetailAEntCuttedCol.add(new ArrayList<>(detailAEntCol).get(1));\r\n\t\t\t\tPlayerSnapshot<Collection<DetailAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(detailAEntCuttedCol);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\t//doing lazy-load\r\n\t\t\t\tmasterAEnt.getDetailAEntCol().size();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest.this\r\n\t\t\t\t\t.manager\r\n\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tSignatureBean signatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQUVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoiZGV0YWlsQUVudENvbCIsInJhd0tleVZhbHVlcyI6WyIxIl0sInJhd0tleVR5cGVOYW1lcyI6WyJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tCollection<DetailAEnt> detailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\tArrayList<DetailAEnt> detailAEntCuttedCol = new ArrayList<>();\r\n\t\t\t\tdetailAEntCuttedCol.add(new ArrayList<>(detailAEntCol).get(1));\r\n\t\t\t\tdetailAEntCuttedCol.add(new ArrayList<>(detailAEntCol).get(2));\r\n\t\t\t\tPlayerSnapshot<Collection<DetailAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(detailAEntCuttedCol);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}", "private void runLater(String table, String id, Operation r) {\n\t\tif (captureHitRatio)\n\t\t\trequestsIn.increment();\n\t\tRowInTable element = new RowInTable(table, id);\n\t\twhile(true) {\n\t\t\tStoreRequest req = new StoreRequest(element);\n\t\t\tStoreRequest tmp = writesByRows.putIfAbsent(element, req);\n\t\t\ttry {\n\t\t\t\tif (tmp == null) {\n\t\t\t\t\t// req was added ; should also be put in the delay queue\n\t\t\t\t\treq.plan();\n\t\t\t\t\tlogger.fine(\"Request planned for \" + table + ':' + id + \" on \" + System.currentTimeMillis() + \" by \" + req);\n\t\t\t\t} else {\n\t\t\t\t\t// Another thread added request for this element before us\n\t\t\t\t\treq = tmp;\n\t\t\t\t}\n\t\t\t\tr.run(req);\n\t\t\t\t// Request is planned and merged ; leaving the infinite loop\n\t\t\t\tbreak;\n\t\t\t} catch (RequestIsOutException x) {\n\t\t\t\t// We've tried to update a request that went out meanwhile\n\t\t\t}\n\t\t\t// retrying eventually\n\t\t\tThread.yield();\n\t\t}\n\t}", "public <A> Future<A> transact(DB<A> op)\n {\n return withConnection(transactional(op), false);\n }", "public void run()\n\tthrows ScheduledTaskException\n{\n\tLog.customer.debug(\"%s::Start of CATMFGDWInvoicePush_FlatFile task ...\",classname);\n\n\t// Read the USPOFlagAction info from cat.dwAction.util\n\tMFGIRFlagAction = ResourceService.getString(\"cat.dwAction\", \"MFGIRFlagAction\");\n\tLog.customer.debug(\"%s::usPOFlagAction ...\", MFGIRFlagAction, classname);\n if (MFGIRFlagAction!=null && ! MFGIRFlagAction.equals(\"None\") && MFGIRFlagAction.indexOf(\"not found\")==-1)\n\t\tisCompletedFlgUpdate = false;\n\tif ( MFGIRFlagAction!=null && MFGIRFlagAction.equals(\"Completed\")&& MFGIRFlagAction.indexOf(\"not found\")==-1)\n \tisCompletedFlgUpdate = true;\n\n\tstartTime = DateFormatter.getStringValue(new ariba.util.core.Date(), \"EEE MMM d hh:mm:ss a z yyyy\", TimeZone.getTimeZone(\"CST\"));\n\tperiodenddate = DateFormatter.toYearMonthDate(Date.getNow());\n\ttry {\n\t\t File out_FlatFile = new File(flatFilePath);\n\t\t Log.customer.debug(\"%s::FilePath:%s\",classname,out_FlatFile);\n\t\t if (!out_FlatFile.exists()) {\n\t\t \tLog.customer.debug(\"%s::if file does not exit then create 1\",classname);\n\t\t\tout_FlatFile.createNewFile();\n\t\t }\n\t\t Log.customer.debug(\"%s::Creating aprint writer obj:\",classname);\n\t\t PrintWriter outPW_FlatFile = new PrintWriter(IOUtil.bufferedOutputStream(out_FlatFile), true);\n\t\t p = Base.getSession().getPartition();\n\t\t message = new FastStringBuffer();\n\t\t mailSubject = \"CATMFGDWInvoicePush_FlatFile Task Completion Status - Completed Successfully\";\n\t\t try\n\t\t {\n\t\t isHeader = false;\n\t\t // Start : SpringRelease_RSD 129 (FDD_131_4.1,4.2 / TDD_131_1.1,1.2)\n\t\t \t\t\t\t\tquery = \"select from ariba.invoicing.core.InvoiceReconciliation\"\n\t\t \t\t\t\t\t+ \" where (DWInvoiceFlag = 'InProcess' or DWInvoiceFlag = 'Processing') \"\n\t\t \t\t\t\t\t+ \"AND this NOT IN (select this from ariba.invoicing.core.InvoiceReconciliation \"\n\t\t \t\t\t\t\t+ \"where (LineItems.Amount.Amount = 0 OR LineItems.Quantity = 0) \"\n\t\t \t\t\t\t\t+ \"AND LineItems.LineType.Category = 1) \";\n \t\t\t\t\t // End : SpringRelease_RSD 129 (FDD_131_4.1,4.2 / TDD_131_1.1,1.2)\n\t\t Log.customer.debug(query);\n AQLQuery aqlquery = null;\n\t\t AQLOptions options = null;\n\t\t AQLResultCollection results = null;\n\n //String topicname = new String(\"InvoiceReconciliationPush\");\n\t\t //String eventsource = new String(\"ibm_caps_invoicereconpush\");\n\n\t\t aqlquery = AQLQuery.parseQuery(query);\n\t\t options = new AQLOptions(p);\n\t\t results = Base.getService().executeQuery(aqlquery, options);\n\t\t totalNumberOfIrs = results.getSize();\n\t\t if(results.getErrors() != null)\n\t\t \tLog.customer.debug(\"ERROR GETTING RESULTS in Results\");\n while(results.next()){\n\t\t\t\tinvrecon = (InvoiceReconciliation)(results.getBaseId(\"InvoiceReconciliation\").get());\n\t\t\t\tif(invrecon != null){\n\t\t\t\t\ttry{\n \tIrLineItem = (BaseVector)invrecon.getLineItems();\n\t\t\t\t\t\tLog.customer.debug(\"%s::Ir Line Item:%s\",classname,IrLineItem);\n\t\t\t\t\t\t// Shaila : Issue 754 : To ensure no IR with zero line item is processed\n\t\t\t\t\t\tint lineCount = invrecon.getLineItemsCount();\n\t\t\t\t\t\tLog.customer.debug(\"%s::Line Item count for IR:%s \",classname,lineCount);\n\t\t\t\t\t\tLog.customer.debug(\"%s::IR_periodenddate:%s\",classname,periodenddate);\n\t\t\t\t\t\tLog.customer.debug(\"%s::IR_datasetFacilityCode:%s\",classname,datasetFacilityCode);\n\t\t\t\t\t\t//outPW_FlatFile.write(periodenddate);\n\t\t\t\t\t\t//outPW_FlatFile.write(datasetFacilityCode);\n\t\t\t\t\t\tpartitionNumber = invrecon.getPartitionNumber();\n\t\t\t\t\t\t//String partition_name = String(partitionName);\n\t\t\t\t\t\tLog.customer.debug(\"%s::IR_Partition:%s\",classname,partitionNumber);\n\n\t\t\t\t\t\tif (partitionNumber==3){\n\t\t\t\t\t\t\t//Date pSD = (Date)invrecon.getFieldValue(\"BlockStampDate\");\n\t\t\t\t\t\t\t// Issue 215\n\t\t\t\t\t\t\t//Date pSD = (Date)invrecon.getFieldValue(\"ControlDate\");\n\t\t\t\t\t\t\tDate pSD = (Date)invrecon.getFieldValue(\"ApprovedDate\");\n\t\t\t\t\t\t\tperiodStartdate = DateFormatter.toYearMonthDate(pSD);\n\t\t\t\t\t\t\tLog.customer.debug(\"%s::Period Start Date:%s\",pSD,classname);\n\t\t\t\t\t\t\tpartitionName = \"mfg1\";\n\t\t\t\t\t\t\tihBookdate = DateFormatter.toYearMonthDate(pSD);\n\t\t\t\t\t\t\t//outPW_FlatFile.write(periodStartdate+\"~/\");\n\t\t\t\t\t\t \t//outPW_FlatFile.write(\"U9\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (lineCount > 0){\n \tint IrLineItem_vector = IrLineItem.size();\n\t\t\t\t\t\t\tfor (int i =0; i<IrLineItem_vector;i++){\n\t\t\t\t\t\t\t\tLineItem irli = (LineItem)IrLineItem.get(i);\n\t\t\t\t\t\t\t\toutPW_FlatFile.write(partitionName+\"~|\");\n\t\t\t\t\t\t\t\tirFacilityFlag = (String)invrecon.getFieldValue(\"FacilityFlag\");\n\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Ir facility flag:%s\",classname,irFacilityFlag);\n\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irFacilityFlag)){\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irFacilityFlag+\"~|\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//outPW_FlatFile.write(recordType+\"~|\");\n\t\t\t\t\t\t\t\t//outPW_FlatFile.write(fileLayoutVersion+\"~|\"+\"M\"+\"~|\");\n\n\t\t\t\t\t\t\t\tirUniqueName = (String)invrecon.getFieldValue(\"UniqueName\");\n\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::irUniqueName: %s\",classname,irUniqueName);\n\t\t\t\t\t\t\t\t//Start: Q4 2013 - RSD117 - FDD 2/TDD 2\n\t\t\t\t\t\t\t\t//outPW_FlatFile.write(irUniqueName+\"~|\");\n\n\t\t\t\t\t\t\t\tString SupInvNumber = (String)invrecon.getDottedFieldValue(\"Invoice.InvoiceNumber\");\n\t\t\t\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile: SupInvNumber: \"+ SupInvNumber);\n\t\t\t\t\t\t\t\tint invleng = SupInvNumber.length();\n\t\t\t\t\t\t\t\tif (invleng > 35)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tString SupInvNumber1 = getFormatattedTxt(SupInvNumber);\n\t\t\t\t\t\t\t\t\tint invleng1 = SupInvNumber1.length();\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile: invleng1: \"+ invleng1);\n\t\t\t\t\t\t\t\t\tString FormattedirUniqueName = getFormatattedTxt(irUniqueName, invleng1);\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile: FormattedirUniqueName: \"+ FormattedirUniqueName);\n\n\t\t\t\t\t\t\t\t\t// Writing IH-Invoice-No - 4\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(FormattedirUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tString FormattedirUniqueName = getFormatattedTxt(irUniqueName, invleng);\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile: FormattedirUniqueName: \"+ FormattedirUniqueName);\n\n\t\t\t\t\t\t\t\t\t// Writing IH-Invoice-No - 4\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(FormattedirUniqueName+\"~|\");\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//End: Q4 2013 - RSD117 - FDD 2/TDD 2\n\n\t\t\t\t\t\t\t\t// Start : SpringRelease_RSD 129 (FDD_129_4.1 / TDD_129_1.1)\n\t\t\t\t\t\t\t\tif(invrecon.getFieldValue(\"Supplier\") != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tirSupplierLocation = (String)invrecon.getDottedFieldValue(\"Supplier.UniqueName\");\n\t\t\t\t\t\t\t\t\t// End : SpringRelease_RSD 129 (FDD_129_4.1 / TDD_129_1.1)\n\t\t\t\t\t\t\t\t\tif (irSupplierLocation != null){\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::irSupplierLocation:%s\",classname,irSupplierLocation);\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irSupplierLocation+\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\tDate Ir_invDate = (Date)invrecon.getFieldValue(\"InvoiceDate\");\n\t\t\t\t\t\t\t\tif (Ir_invDate!=null){\n\t\t\t\t\t\t\t\t\tIrinvdateyymmdd = DateFormatter.toYearMonthDate(Ir_invDate);\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Invoice Date:%s\",classname,Irinvdateyymmdd);\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(Irinvdateyymmdd+\"~|\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//Log.customer.debug(\"%s::ihRecordStatus:%s\",classname,ihRecordStatus);\n\t\t\t\t\t\t\t\t//outPW_FlatFile.write(ihRecordStatus+\"~|\");\n\n\t\t\t\t\t\t\t\tMoney IrTotalcost = (Money)invrecon.getFieldValue(\"TotalCost\");\n\t\t\t\t\t\t\t\tif (IrTotalcost!=null){\n\t\t\t\t\t\t\t\t\tIrtotalcostamount = (BigDecimal)invrecon.getDottedFieldValue(\"TotalCost.Amount\");\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Total cost amount:%s\",classname,Irtotalcostamount);\n\t\t\t\t\t\t\t\t\tif (Irtotalcostamount!=null) {\n\t\t\t\t\t\t\t\t\t\tint Ir_tca = Irtotalcostamount.intValue();\n\t\t\t\t\t\t\t\t\t\tif (Ir_tca >= 0) {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"01\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (Ir_tca < 0){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"02\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ihBookdate+\"~|\");\n\t\t\t\t\t\t\t\t\t\tirTotalCostCurrency = IrTotalcost.getCurrency().getUniqueName();\n\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irTotalCostCurrency)){\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::TotalCost Currency:%s\",classname,irTotalCostCurrency);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irTotalCostCurrency+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tirstngTotalCost = BigDecimalFormatter.getStringValue(Irtotalcostamount);\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Writing IR total cost:%s\",classname,irstngTotalCost);\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irstngTotalCost+\"~|\");\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ihBookdate+\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ihBookdate+\"~|\");\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t}\n irTotalInvoiceDiscountDollarAmount = (BigDecimal)invrecon.getDottedFieldValue(\"TotalInvoiceDiscountDollarAmount.Amount\");\n\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::TotalInvoiceDiscountDollarAmount:%s\",classname,irTotalInvoiceDiscountDollarAmount);\n\t\t\t\t\t\t\t\t/* if (irTotalInvoiceDiscountDollarAmount==Constants.ZeroBigDecimal) {\n\t\t\t\t\t\t\t\t\t//Log.customer.debug(\"%s::TotalInvoiceDiscountDollarAmount is:%s\",classname,TotalInvoiceDiscountDollarAmount_2);\n\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(\"0000000000000.00\"+\"\\n\");\n\t\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\t\tif (irTotalInvoiceDiscountDollarAmount!=null) {\n\t\t\t\t\t\t\t\t\t\tint ir_TIDDA = irTotalInvoiceDiscountDollarAmount.intValue();\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::TotalInvoiceDiscountDollarAmount integer value:%s\",classname,ir_TIDDA);\n\t\t\t\t\t\t\t\t\t\tif (ir_TIDDA==0){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0000000000000.00\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tstrgDiscountAmount = BigDecimalFormatter.getStringValue(irTotalInvoiceDiscountDollarAmount);\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Writting the discount amount:%s\",classname,strgDiscountAmount);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(strgDiscountAmount+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n }\n else {\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::No value for irTotalInvoiceDiscountDollarAmount so leaving it blanck\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t IrLineItem2 = (InvoiceReconciliationLineItem)IrLineItem.get(i);\n\t\t\t\t\t\t\t\t\t IrnumberInCollection = IrLineItem2.getNumberInCollection();\n\t\t\t\t\t\t\t\t\t numberInCollection = IntegerFormatter.getStringValue(IrnumberInCollection);\n\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::IR number in collection:%s\",classname,numberInCollection);\n\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(numberInCollection+\"~|\");\n\n\t\t\t\t\t\t\t\t\t IrLineDescritpiton = IrLineItem2.getDescription();\n\t\t\t\t\t\t\t\t\t if (IrLineDescritpiton!=null){\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::IR_LineDescription:%s\",classname,IrLineDescritpiton);\n\t\t\t\t\t\t\t\t\t\tirDescItemNumber = IrLineDescritpiton.getItemNumber(); //what if this is blanck, right now considering blanck also as null\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Writing IR_LineDescription Item Number:%s\",classname,irDescItemNumber);\n\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irDescItemNumber)){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irDescItemNumber+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"K\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//Writing item desc-15\n\t\t\t\t\t\t\t\t\t\t// Start : SpringRelease_RSD 129 (FDD_129_4.2 / TDD_129_1.2)\n\t\t\t\t\t\t\t\t\t\tString descDescription = \"\";\n\t\t\t\t\t\t\t\t\t\tString commonCCId = \"\";\n\t\t\t\t\t\t\t\t\t\tdescDescription_temp = (String)IrLineDescritpiton.getFieldValue(\"Description\");\n\t\t\t\t\t\t\t\t\t\tcommonCC = IrLineDescritpiton.getCommonCommodityCode();\n\t\t\t\t\t\t\t\t\t\tif (commonCC!=null)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcommonCCId = (String)commonCC.getName().getPrimaryString();\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR Description CommodityCode UniqueName:%s\",classname,commonCCId);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::CommonCommdityCode:%s\",classname,commonCCId);\n\n\n\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(descDescription_temp))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::itemDescription array is:%s\",classname,descDescription_temp);\n\n\t\t\t\t\t\t\t\t\t\t char[] c_array;\n\t\t\t\t\t\t\t\t\t\t String c_string;\n\t\t\t\t\t\t\t\t\t\t byte[] c_byte_array;\n\t\t\t\t\t\t\t\t\t\t c_array = descDescription_temp.toCharArray();\n\n\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::itemDescription:%s\",classname,c_array);\n\t\t\t\t\t\t\t\t\t\t for (char c : c_array)\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t c_string = Character.toString(c);\n\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::itemDescription:%s\",classname,c_string);\n\n\t\t\t\t\t\t\t\t\t\t\t System.out.print(c_string);\n\t\t\t\t\t\t\t\t\t\t\t c_byte_array = c_string.getBytes();\n\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::itemDescription byte array:%s\",classname,c_byte_array);\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::itemDescription byte array length:%s\",classname,c_byte_array.length);\n\n\t\t\t\t\t\t\t\t\t\t\t if (c_byte_array.length > 1)\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::itemDescription byte array length > 1\",classname);\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::itemDescription:%s\",classname,c_byte_array);\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::itemDescription:%s\",classname,c_string);\n\t\t\t\t\t\t\t\t\t\t\t\t\tdescDescription_temp = commonCCId;\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Setting Description as Common commodity code:%s\",classname,descDescription_temp);\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t// End : SpringRelease_RSD 129 (FDD_129_4.2 / TDD_129_1.2)\n\n\t\t\t\t\t\t\t\t\t\t\t// Filtering Non-ASCII characters\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Description after checking bytes is:%s\",classname,descDescription_temp);\n\n\n\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(descDescription_temp))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tdescDescription = descDescription_temp.replaceAll(\"[^\\\\p{ASCII}]\", \"\");\n\t\t\t\t\t\t\t\t\t\t\t\tdescDescription = StringUtil.replaceCharByChar(descDescription,'\\r',' ');\n\t\t\t\t\t\t\t\t\t\t\t\tdescDescription = StringUtil.replaceCharByChar(descDescription,'\\t',' ');\n\t\t\t\t\t\t\t\t\t\t\t\tdescDescription = StringUtil.replaceCharByChar(descDescription,'\\n',' ');\n\t\t\t\t\t\t\t\t\t\t\t\tdescDescription = StringUtil.replaceCharByChar(descDescription,'\\'',' ');\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Description:%s\",classname,descDescription);\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(descDescription+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tirCommodityCode = IrLineDescritpiton.getCommonCommodityCode();\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR Description CommodityCode:%s\",classname,irCommodityCode);\n\t\t\t\t\t\t\t\t\t\tif (irCommodityCode!=null){\n\t\t\t\t\t\t\t\t\t\t\tccUniqueName = irCommodityCode.getUniqueName();\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR Description CommodityCode UniqueName:%s\",classname,ccUniqueName);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ccUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdescSupplierPartNumber = IrLineDescritpiton.getSupplierPartNumber();\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Description_SupplierPartNumber:%s\",classname,descSupplierPartNumber);\n\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(descSupplierPartNumber)){\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Writing Description_SupplierPartNumber:%s\",classname,descSupplierPartNumber);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(descSupplierPartNumber+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tIrLineType = IrLineItem2.getLineType();\n\t\t\t\t\t\t\t\t\tif(IrLineType!=null){\n\t\t\t\t\t\t\t\t\t\tint category = IrLineType.getCategory();\n\t\t\t\t\t\t\t\t\t\tif (category==1){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"01\"+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\telse if (category==2){\n\t\t\t\t\t\t\t\t\t\t\tString irLineTypeString = (String)IrLineType.getFieldValue(\"UniqueName\");\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: LineType of Ir Line::%s\",classname,irLineTypeString);\n\t\t\t\t\t\t\t\t\t\t\tif(irLineTypeString.equals(\"VATCharge\")){\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"96\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"02\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (category==4){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"05\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (category==8) {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"27\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (category==16){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"13\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (category==32) {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"12\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\tBoolean isHaz = (Boolean)IrLineItem2.getFieldValue(\"IsHazmat\");\n\t\t\t\t\t\t\t\t\t// irHazmat = BooleanFormatter.getStringValue(IrLineItem2.getFieldValue(\"IsHazmat\"));\n\t\t\t\t\t\t\t\t\tif(isHaz != null)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t boolean irHazmatBoolean = isHaz.booleanValue();\n\t\t\t\t\t\t\t\t\t// Log.customer.debug(\"Ir Hazmat value:\",irHazmatBoolean);\n\t\t\t\t\t\t\t\t\t if(irHazmatBoolean)\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"3\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0~|\");\n\t\t\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t\tirHazmat = BooleanFormatter.getStringValue(IrLineItem2.getFieldValue(\"IsHazmat\"));\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Ir Hazmat value:%s\",classname,irHazmat);\n\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irHazmat)){\n\t\t\t\t\t\t\t\t\t\tif (irHazmat==\"true\"){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"3\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0~|\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t*/\n\n\n\t\t\t\t\t\t\t\t\t// Start : SpringRelease_RSD 129/131 (FDD_129_4.4 / TDD_129_1.4 / FDD_131_4.4/TDD_131_1.5)\n\t\t\t\t\t\t\t\t\t //BigDecimal irliAmount = IrLineItem2.getAmount().getAmount();\n\t\t\t\t\t\t\t\t\t BigDecimal IrLineQuantity1 = IrLineItem2.getQuantity();\n\t\t\t\t\t\t\t\t\t Log.customer.debug(\"::IR LineQuantity:\" +IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t String irliQuantity = \"\";\n\n\t\t\t\t\t\t\t\t\t // Writing IL-Bill-Qty-20\n\t\t\t\t\t\t\t\t\t if (IrLineQuantity1 != null)\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tif(IrLineType!=null && IrLineType.getCategory()== 2)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"Its Tax line item passing Quantity as 1: \"+taxLineQuantity);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(taxLineQuantity+\"~|\");\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (IrLineItem2.getAmount().isNegative())\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(IrLineQuantity1.intValue() < 0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"IR LineAmount is negative and quantity is also negative no change required:\" +IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t\t\t\tirliQuantity = BigDecimalFormatter.getStringValue(IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR LineQuantity:%s\",classname,irliQuantity);\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irliQuantity+\"~|\");\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tIrLineQuantity1 = IrLineQuantity1.multiply(new BigDecimal(-1));\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"IR LineAmount is negative hence setting LI Quantity as negative:\" +IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t\t\t\tirliQuantity = BigDecimalFormatter.getStringValue(IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR LineQuantity:%s\",classname,irliQuantity);\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irliQuantity+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tirliQuantity = BigDecimalFormatter.getStringValue(IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR LineQuantity:%s\",classname,irliQuantity);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irliQuantity+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t //End : SpringRelease_RSD 129/131 (FDD_129_4.4 / TDD_129_1.4 / FDD_131_4.4/TDD_131_1.5)\n\n\n\n\t\t\t\t\t\t\t\t\t//IrUOM = (UnitOfMeasure)IrLineDescritpiton.getUnitOfMeasure();\n\n\t\t\t\t\t\t\t\t\t// Start : SpringRelease_RSD 131 (FDD_131_4.4 / TDD_131_1.5)\n\n\t\t\t\t\t\t\t\t\t // Writing IL-Bill-Qty-Unit-Of-Measure-21\n\t\t\t\t\t\t\t\t\t //IrUOM = (UnitOfMeasure)IrLineDescritpiton.getUnitOfMeasure();\n\t\t\t\t\t\t\t\t\t String irUOM_UniqueName1 = \"\";\n\n\t\t\t\t\t\t\t\t \tif(IrLineType!=null && IrLineType.getCategory()== 2)\n\t\t\t\t\t\t\t\t \t{\n\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"Its Tax line item passing UOM as LOT: \");\n\t\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(irUOM_UniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if ( IrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure\") != null)\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t// End : SpringRelease_RSD 131 (FDD_131_4.4 / TDD_131_1.5)\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"Not tax line item\");\n\t\t\t\t\t\t\t\t\t\t\tString uOMUniqueName = (String)IrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure.UniqueName\");\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::uOMUniqueName 1 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t\t Object irUOM_object = \tIrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure.CAPSUnitOfMeasure\");\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::irUOM_object 2 %s\",classname,irUOM_object);\n\t\t\t\t\t\t\t\t\t\t\t if(irUOM_object != null)\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\tirUOM_UniqueName1 = irUOM_object.toString();\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR Desc UOM 3:%s\",classname,irUOM_UniqueName1);\n\t\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irUOM_UniqueName1))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irUOM_UniqueName1+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::irUOM_UniqueName writen ti file 4 %s\",classname,irUOM_UniqueName1);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t//\t\t\t\t\t\t\t\t\t\t\t\t\t IF CAPSUnitOfMeasure = Enpty THEN LineItems.Description.UnitOfMeasure.UniqueName\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(uOMUniqueName))\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(uOMUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::CAPSUnitOfMeasure = Enpty 5 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t// IF CAPSUnitOfMeasure = NULL THEN LineItems.Description.UnitOfMeasure.UniqueName\n\t\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(uOMUniqueName))\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(uOMUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::CAPSUnitOfMeasure = Enpty 6 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\tif (IrTotalcost!=null){\n\t\t\t\t\t\t\t\t\t\tirTotalCostCurrency = IrTotalcost.getCurrency().getUniqueName();\n\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irTotalCostCurrency)){\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::TotalCost Currency:%s\",classname,irTotalCostCurrency);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irTotalCostCurrency+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\n\n\t\t\t\t\t\t\t\t\t// Start : SpringRelease_RSD 129 (FDD_129_4.4 / TDD_129_1.4)\n\t\t\t\t\t\t\t\t\tirdecsPrice = BigDecimalFormatter.getStringValue(IrLineDescritpiton.getPrice().getAmount().abs());\n\t\t\t\t\t\t\t\t\t // End : SpringRelease_RSD 129 (FDD_129_4.4 / TDD_129_1.4)\n\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::Ir desc Price:%s\",classname,irdecsPrice);\n\t\t\t\t\t\t\t\t\t if (!StringUtil.nullOrEmptyOrBlankString(irdecsPrice)){\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(irdecsPrice+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\n\n\t\t\t\t\t\t\t\t\t // Start : SpringRelease_RSD 131 (FDD_131_4.4 / TDD_131_1.5)\n\t\t\t\t\t\t\t\t\tString irUOM_UniqueName2 = \"\";\n\n\t\t\t\t\t\t\t\t if ( IrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure\") != null)\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t if(IrLineType!=null && IrLineType.getCategory()== 2)\n\t\t\t\t\t\t\t\t\t {\n\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"Its Tax line item passing UOM as LOT: \");\n\t\t\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(irUOM_UniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// End : SpringRelease_RSD 131 (FDD_131_4.4 / TDD_131_1.5)\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"Not tax line item\");\n\t\t\t\t\t\t\t\t\t\tString uOMUniqueName = (String)IrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure.UniqueName\");\n\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::uOMUniqueName 1 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t Object irUOM_object = \tIrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure.CAPSUnitOfMeasure\");\n\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::irUOM_object 2 %s\",classname,irUOM_object);\n\t\t\t\t\t\t\t\t\t\t if(irUOM_object != null)\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tirUOM_UniqueName2 = irUOM_object.toString();\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR Desc UOM 3:%s\",classname,irUOM_UniqueName2);\n\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irUOM_UniqueName2))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irUOM_UniqueName2+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::irUOM_UniqueName writen ti file 4 %s\",classname,irUOM_UniqueName2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\t\t\t\t\t IF CAPSUnitOfMeasure = Enpty THEN LineItems.Description.UnitOfMeasure.UniqueName\n\t\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(uOMUniqueName))\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(uOMUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::CAPSUnitOfMeasure = Enpty 5 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// IF CAPSUnitOfMeasure = NULL THEN LineItems.Description.UnitOfMeasure.UniqueName\n\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(uOMUniqueName))\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(uOMUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::CAPSUnitOfMeasure = Enpty 6 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(\"1.0\"+\"~|\");\n\t\t\t\t\t\t\t\t\t irLineAmount = BigDecimalFormatter.getStringValue(IrLineItem2.getAmount().getAmount());\n\t\t\t\t\t\t\t\t\t if (!StringUtil.nullOrEmptyOrBlankString(irLineAmount)) {\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::Ir Line Amount:%s\",classname,irLineAmount);\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irLineAmount+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(\"00000.0000\"+\"~|\");\n\t\t\t\t\t\t\t\t\t irLineCapsCharge = (ClusterRoot)IrLineItem2.getFieldValue(\"CapsChargeCode\");\n\t\t\t\t\t\t\t\t\t if (irLineCapsCharge!=null){\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::Ir Line caps charge code:%s\",classname,irLineCapsCharge);\n\t\t\t\t\t\t\t\t\t\tirCapsUniqueName = (String)irLineCapsCharge.getFieldValue(\"UniqueName\");\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Ir Line caps charge code UniqueName:%s\",classname,irCapsUniqueName);\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irCapsUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t irLinePoNumber = (String)invrecon.getFieldValue(\"PONumber\");\n\t\t\t\t\t\t\t\t\t if (!StringUtil.nullOrEmptyOrBlankString(irLinePoNumber)){\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::IR Line PO Number:%s\",classname,irLinePoNumber);\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(irLinePoNumber+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t irLinePoLineNumber = IntegerFormatter.getIntValue(IrLineItem2.getFieldValue(\"POLineItemNumber\"));\n\t\t\t\t\t\t\t\t\t irLinePoLinenoString = IntegerFormatter.getStringValue(irLinePoLineNumber);\n\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::Line po Line number:%s\",classname,irLinePoLineNumber);\n\t\t\t\t\t\t\t\t\t if (!StringUtil.nullOrEmptyOrBlankString(irLinePoLinenoString) && !irLinePoLinenoString.equals(\"0\")){\n\n\t\t\t\t\t\t\t\t\t \t\tLog.customer.debug(\"%s::Ir Line Po Line Number:%s\",classname,irLinePoLinenoString);\n\t\t\t\t\t\t\t\t\t \t\t//String irLinePoLinenoString = IntegerFormatter.getStringValue(irLinePoLineNumber);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irLinePoLinenoString+\"~|\");\n\t\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t\t\t \telse {\n\t\t\t\t\t\t\t\t\t \t\t// IF IR.LineItems. POLineItemNumber is NULL THEN SEND VALUE OF 1\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"1\"+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t if (irLinePoNumber!=null){\n\t\t\t\t\t\t\t\t\t \tif (StringUtil.startsWithIgnoreCase(irLinePoNumber , \"C\")){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"C\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"P\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"N\"+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\n\n\t\t\t\t\t\t\t\t\t int partitionNumber_2 = invrecon.getPartitionNumber();\n\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::partiton number 2nd place:%s\",classname,partitionNumber_2);\n\t\t\t\t\t\t\t\t\t if (partitionNumber_2==2){\n\t\t\t\t\t\t\t\t\t \tirAccounting = IrLineItem2.getAccountings();\n\t\t\t\t\t\t\t\t\t\tif (irAccounting!=null){\n\t\t\t\t\t\t\t\t\t\t\tirSplitAccounting = (BaseVector)irAccounting.getSplitAccountings();\n\t\t\t\t\t\t\t\t\t\t\tirSplitaccSize = irSplitAccounting.size();\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Split acc size:%s\",classname,irSplitaccSize);\n\t\t\t\t\t\t\t\t\t\t\tif (irSplitaccSize > 0){\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug (\"%s::getting accounting facility\",classname);\n\t\t\t\t\t\t\t\t\t\t\t\tString ir_AccFac= null;\n\t\t\t\t\t\t\t\t\t\t\t\tString ir_Order_name = null;\n\t\t\t\t\t\t\t\t\t\t\t\tfor (int j = 0; j<irSplitaccSize;j++){\n\t\t\t\t\t\t\t\t\t\t\t\t\tirSplitAccounting2 = (SplitAccounting)irSplitAccounting.get(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t//String irAccountingFacility = (String)irSplitAccounting2.getFieldValue(\"AccountingFacility\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tString irAccountingFacility = (String)irSplitAccounting2.getFieldValue(\"Facility.UniqueName\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Accounting facility:%s\",classname,irAccountingFacility);\n\t\t\t\t\t\t\t\t\t\t\t\t\tString ir_Order = (String)irSplitAccounting2.getFieldValue(\"Order\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(irAccountingFacility)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Accounting facility:%s\",classname,irAccountingFacility);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tir_AccFac = irAccountingFacility+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(irAccountingFacility+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tir_AccFac = (\"AA\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// outPW_FlatFile.write(\"~|\"+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(ir_Order)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Accounting Order:%s\",classname,ir_Order);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tir_Order_name = ir_Order;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tir_Order_name =(\"~|\");\n }\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ir_AccFac);\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ir_Order_name);\n }\n\t\t\t\t\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\"+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \tirAccounting = IrLineItem2.getAccountings();\n\t\t\t\t\t\t\t\t\t\tif (irAccounting!=null){\n\t\t\t\t\t\t\t\t\t\t\tirSplitAccounting = (BaseVector)irAccounting.getSplitAccountings();\n\t\t\t\t\t\t\t\t\t\t\tirSplitaccSize = irSplitAccounting.size();\n\t\t\t\t\t\t\t\t\t\t\tif (irSplitaccSize > 0){\n\n\t\t\t\t\t\t\t\t\t\t\t\tfor (int k = 0; k<irSplitaccSize;k++){\n\t\t\t\t\t\t\t\t\t\t\t\t\tirSplitAccounting2 = (SplitAccounting)irSplitAccounting.get(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\tirFacility = (ClusterRoot)irSplitAccounting2.getFieldValue(\"Facility\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (irFacility!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tIrFacilityUniqueName = (String)irFacility.getFieldValue(\"UniqueName\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(IrFacilityUniqueName)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: IR Facility:%s\",classname,IrFacilityUniqueName);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac = IrFacilityUniqueName+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac2 = IrFacilityUniqueName+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(IrFacilityUniqueName+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac2 = (\"AA\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\"+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac2 = (\"AA\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tirCostCenter = (ClusterRoot)irSplitAccounting2.getFieldValue(\"CostCenter\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (irCostCenter!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirCC = (String)irCostCenter.getFieldValue(\"CostCenterCode\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(irCC)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: IR Cost Center:%s\",classname,irCC);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirCCString = irCC+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirCCString = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirCCString = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tirSubAcc = (ClusterRoot)irSplitAccounting2.getFieldValue(\"SubAccount\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (irSubAcc!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirSubAccStrng = (String)irSubAcc.getFieldValue(\"UniqueName\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(irSubAccStrng)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: IR Sub Account:%s\",classname,irSubAccStrng);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirStrngsubacc = irSubAccStrng+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirStrngsubacc = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirStrngsubacc = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tirAccount = (ClusterRoot)irSplitAccounting2.getFieldValue(\"Account\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(irAccount!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirAccCode = (String)irAccount.getFieldValue(\"AccountCode\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(irAccCode)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: IR Account code:%s\",classname,irAccCode);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirAccCodeStrng = irAccCode+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirAccCodeStrng = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n }\n\t\t\t\t\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t \tirAccCodeStrng = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\n }\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irFac);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irFac2);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irFac);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irCCString);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irStrngsubacc);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irAccCodeStrng);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irFac);\n }\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\tirBuyerCode = (ClusterRoot)IrLineItem2.getFieldValue(\"BuyerCode\");\n\t\t\t\t\t\t\t\t\t\t\tif (irBuyerCode!=null){\n\t\t\t\t\t\t\t\t\t\t\t\tirBuyercc = (String)irBuyerCode.getFieldValue(\"BuyerCode\");\n\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(irBuyercc)){\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: IR Buyer Code:%s\",classname,irBuyercc);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irBuyercc);\n\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\tirLineOrder = (DirectOrder)IrLineItem2.getOrder();\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR line Purchase Order:%s\",classname,irLineOrder);\n\t\t\t\t\t\t\t\t\t\t\t\tif (irLineOrder!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\tirOrderLineItem = (ariba.purchasing.core.POLineItem)IrLineItem2.getOrderLineItem();\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Order Line Item:%s\",classname,irOrderLineItem);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (irOrderLineItem!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirPOLineBuyerCode = (ClusterRoot)irOrderLineItem.getFieldValue(\"BuyerCode\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (irPOLineBuyerCode!= null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirPOlinebuyercc = (String)irPOLineBuyerCode.getFieldValue(\"BuyerCode\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Ir PO Line Buyer Code\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irPOlinebuyercc +\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//IsAdHoc - catalog or non catalog, Issue #269 - Dharshan\n\t\t\t\t\t\t\t\t\t\tisAdHocBoolean = true;\n\t\t\t\t\t\t\t\t\t\tisAdHoc = null;\n\t\t\t\t\t\t\t\t\t\tif (irli.getDottedFieldValue(\"IsAdHoc\") != null) {\n\t\t\t\t\t\t\t\t\t\t\tisAdHoc = (Boolean) irli.getDottedFieldValue(\"IsAdHoc\");\n\t\t\t\t\t\t\t\t\t\t\tisAdHocBoolean = BooleanFormatter.getBooleanValue(isAdHoc);\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::isAdHocBoolean:%s\",classname,isAdHocBoolean);\n\t\t\t\t\t\t\t\t\t\t\tif(isAdHocBoolean == false){\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|Catalog Item:\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse {Log.customer.debug(\"%s::isAdHocBoolean is true, not catalog item\",classname);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {Log.customer.debug(\"%s::isAdHocBoolean is null, leave blank\",classname);\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"\\n\");\n\n\n\n\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t totalNumberOfIrWritten++;\n\t\t\t\t\t\t\t\t\t if(isCompletedFlgUpdate) {\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::MFGIRFlagAction is Completed setting DWInvoiceFlag ...\", classname);\n\t\t\t\t\t\t\t\t\t \tinvrecon.setFieldValue(\"DWInvoiceFlag\", \"Completed\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::MFGIRFlagAction is None no action req DWInvoiceFlag ...\", classname);\n\t\t\t\t\t\t\t\t\t \tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t catch(Exception e){\n\t\t\t\t\t\t\t \tLog.customer.debug(e.toString());\n\t\t\t\t\t\t\t \tnew ScheduledTaskException(\"Error : \" + e.toString(), e);\n throw new ScheduledTaskException(\"Error : \" + e.toString(), e);\n\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t //Base.getSession().transactionCommit();\n\t\t\t\t\t\t\t Log.customer.debug(\"Ending DWInvoicePush program .....\");\n\t\t\t\t\t\t\t //invrecon.setFieldValue(\"DWInvoiceFlag\", \"Completed\");\n\t\t\t\t\t\t\t //Update DWPOFlag in DO based on config\n\n\t\t\t\t\t }\n\t\t\t\t }\n }\n\t\t\tcatch(Exception e){\n\t\t\t\tLog.customer.debug(e.toString());\n\t\t\t\tnew ScheduledTaskException(\"Error : \" + e.toString(), e);\n throw new ScheduledTaskException(\"Error : \" + e.toString(), e);\n\n\t\t\t}\n\t\t\tif (outPW_FlatFile!=null){\n\t\t\t\toutPW_FlatFile.flush();\n\t\t\t\toutPW_FlatFile.close();\n\t\t\t}\n\t\t\tendTime = DateFormatter.getStringValue(new Date(), \"EEE MMM d hh:mm:ss a z yyyy\", TimeZone.getTimeZone(\"CST\"));\n //Process runDWFTP = Runtime.getRuntime().exec(\"/usr/bin/sh /msc/arb821/Server/config/java/schedule/DWFileFTP_UK.sh\");\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tLog.customer.debug(e.toString());\n\t\t\tmessage.append(\"Task start time : \"+ startTime);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"Task end time : \" + endTime);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"No of IR Written for DW : \"+ totalNumberOfIrWritten);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"No of IR could not be Written :\"+ (totalNumberOfIrs - totalNumberOfIrWritten));\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"CATMFGDWInvoicePush_FlatFile Task Failed - Exception details below\");\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(e.toString());\n\t\t\tmailSubject = \"CATMFGDWInvoicePush_FlatFile Task Failed\";\n\t\t\tLog.customer.debug(\"%s: Inside Exception message \"+ message.toString() , classname);\n\t\t\tnew ScheduledTaskException(\"Error : \" + e.toString(), e);\n throw new ScheduledTaskException(\"Error : \" + e.toString(), e);\n\t\t}\n\t\tfinally {\n\n\t\t\t\t//Change made by Soumya begins\n\t\t\t\tLog.customer.debug(\"%s::Archive File Path:%s\",classname,archiveFileDataPath);\n\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile:Starting Copying the flat file to Archive \");\n\t\t\t\tCATFaltFileUtil.copyFile(flatFilePath, archiveFileDataPath);\n\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile:Completed Copying the flat file to Archive \");\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile:Changing file permission of Data file.\");\n\t\t\t\t\tRuntime.getRuntime().exec(\"chmod 666 \" + flatFilePath);\n\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile:Changed file permission of Data file.\");\n\t\t\t\t}catch (IOException e1) {\n\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile:Error in changing Permission. \"+ e1);\n\t\t\t\t}\n\n\t\t\t\t//Change made by Soumya end\n\n\n\t\t\tLog.customer.debug(\"%s: Inside Finally \", classname);\n\t\t\tmessage.append(\"Task start time : \"+ startTime);\n\t\t\tLog.customer.debug(\"%s: Inside Finally added start time\", classname);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"Task end time : \" + endTime);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"Total number of IRs to be Written : \"+ totalNumberOfIrs);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"Total number of IRs Written : \"+ totalNumberOfIrWritten);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tLog.customer.debug(\"%s: Inside Finally message \"+ message.toString() , classname);\n\n\t\t\t// Sending email\n\t\t\tCatEmailNotificationUtil.sendEmailNotification(mailSubject, message.toString(), \"cat.java.emails\", \"DWPushNotify\");\n\t\t\tmessage = null;\n\t\t\ttotalNumberOfIrWritten =0;\n\t\t\ttotalNumberOfIrs =0;\n\t }\n}", "int insertSelective(GatewayLog record);", "public final void saveAction(){\r\n\t\ttestReqmtService.saveAction(uiTestReqEditModel);\r\n\t\tgeteditDetails(uiTestReqEditModel.getObjId());\r\n\t\taddInfoMessage(SAVETR, \"save.TRsuccess\"); \r\n\t\tfor (UITestReqModel reqmnt : uiTestReqModel.getResultList()) {\r\n\t\t\tif(reqmnt.isTrLink()){\r\n\t\t\t\treqmnt.setTrLink(false);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void migrateRule(Context context, StringList objectIdList)\r\n throws Exception\r\n {\r\n \t\t int migrationStatus = getAdminMigrationStatus(context);\r\n \t \r\n\tif ((objectIdList == null || objectIdList.size() <= 0) && (migrationStatus == 9 || migrationStatus == 10 )) {\t\t\r\n\t\tsetAdminMigrationStatus(context,\"RuleComplete\");\r\n\t\tmqlLogRequiredInformationWriter(\"All Rule Migration Completely done\\n\");\r\n\t\t\r\n \t\t\t }\r\n\telse if ((objectIdList == null || objectIdList.size() <= 0)) {\t\t\r\n \t\t\t setAdminMigrationStatus(context,\"RuleObjectsNotFound\");\r\n\t\tmqlLogRequiredInformationWriter(\"Rules not found in the file\\n\");\r\n\t\t\r\n \t\t }\r\n\telse{\r\n\r\n try{\r\n \t\t //STEP1 - turn triggers off\r\n \t\t String strMqlCommand = \"trigger off\";\r\n \t\t MqlUtil.mqlCommand(context,strMqlCommand,true);\r\n\r\n \t setAdminMigrationStatus(context,\"RuleInProcess\");\r\n\t\tmqlLogRequiredInformationWriter(\"Migration Status set to RuleInProcess\" + \"\\n\");\r\n\r\n \t //Get the info related to all Rule Objects in the list\r\n \t String[] oidsArray = new String[objectIdList.size()];\r\n oidsArray = (String[])objectIdList.toArray(oidsArray);\r\n\r\n StringList objectSelects = new StringList();\r\n objectSelects.addElement(SELECT_TYPE);\r\n objectSelects.addElement(SELECT_NAME);\r\n objectSelects.addElement(SELECT_REVISION);\r\n objectSelects.addElement(SELECT_ID);\r\n objectSelects.addElement(ConfigurationConstants.SELECT_DESIGNVARIANTS);\r\n objectSelects.addElement(ConfigurationConstants.SELECT_RULE_COMPLEXITY);\r\n objectSelects.addElement(\"interface[\"+INTERFACE_FTRIntermediateObjectMigration +\"]\");\r\n\r\n //Related to LE\r\n objectSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_LEFT_EXPRESSION+ \"].id\");\r\n //Related to RE\r\n objectSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_RIGHT_EXPRESSION+ \"].id\");\r\n objectSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_RIGHT_EXPRESSION+ \"].to.id\");\r\n DomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ ConfigurationConstants.RELATIONSHIP_LEFT_EXPRESSION+ \"].id\");\r\n DomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ ConfigurationConstants.RELATIONSHIP_RIGHT_EXPRESSION+ \"].id\");\r\n DomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ ConfigurationConstants.RELATIONSHIP_RIGHT_EXPRESSION+ \"].to.id\");\r\n\t\t //DomainConstants.MULTI_VALUE_LIST.add(ConfigurationConstants.SELECT_DESIGNVARIANTS);\r\n\r\n\r\n MapList mapList = DomainObject.getInfo(context, oidsArray, objectSelects);\r\n Iterator itr = mapList.iterator();\r\n Map ruleInfoMap = new HashMap();\r\n String strRuleId = \"\";\r\n //String strType = \"\";\r\n //String strName = \"\";\r\n //String strRevision = \"\";\r\n //String revId = \"\";\r\n String strInterfaceAdded =\"\";\r\n boolean isAllRulesStamped = true;\r\n while (itr.hasNext())\r\n {\r\n \t //convert Rule objects\r\n \t ruleInfoMap = (Map) itr.next();\r\n \t //strType = (String)ruleInfoMap.get(SELECT_TYPE);\r\n //strName = (String)ruleInfoMap.get(SELECT_NAME);\r\n //strRevision = (String)ruleInfoMap.get(SELECT_REVISION);\r\n strRuleId = (String)ruleInfoMap.get(SELECT_ID);\r\n\r\n mqlLogRequiredInformationWriter(\"Rule Id in Process :: \"+ strRuleId +\"\\n\\n\");\r\n\r\n strInterfaceAdded = (String)ruleInfoMap.get(\"interface[\"+INTERFACE_FTRIntermediateObjectMigration +\"]\");\r\n\r\n try{\r\n boolean bRuleMigrated = updateRuleCache(context,ruleInfoMap);\r\n \t \t //Need to stamp the converted Rules with the migration stamp interface to indicate that it has been converted.\r\n \t \t if(bRuleMigrated){\r\n if(strInterfaceAdded!=null && strInterfaceAdded.equalsIgnoreCase(\"FALSE\")){\r\n \t \t\t\tstampRuleObject(context,strRuleId);\r\n \t \t\t }\r\n \t \t }else{\r\n \t \t\t //To indicate that Rule is not stamped.\r\n \t \t\t isAllRulesStamped = false;\r\n \t \t }\r\n\r\n \t \t loadMigratedOids(strRuleId);\r\n \t \t mqlLogRequiredInformationWriter(\"Migration for Rule id :: \"+ strRuleId + \" is done.\"+\"\\n\\n\\n\\n\");\r\n\r\n \t }catch(Exception e)\r\n \t {\r\n \t\t e.printStackTrace();\r\n \t\t String strCommand = strRuleId + \" : \" + e.getMessage()+\"\\n\";\r\n \t\t\t\t writeUnconvertedOID(strCommand,strRuleId);\r\n \t\t continue;\r\n \t }\r\n }\r\n\r\n if(isAllRulesStamped)\r\n {\r\n // E2W Commented out below to not stop rule migration mid way \t \r\n \t //setAdminMigrationStatus(context,\"RuleComplete\");\r\n mqlLogRequiredInformationWriter(\"!!!!!!!!!!!!!! Rule Migration for Ids in this file are Complete. \\n\");\r\n mqlLogRequiredInformationWriter(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\\n\");\r\n \t mqlLogRequiredInformationWriter(\"!!!!!!!!!!!!!! Rule Migration Complete. \\n\");\r\n \t mqlLogRequiredInformationWriter(\"\\n\");\r\n }\r\n else{\r\n\r\n \t mqlLogRequiredInformationWriter(\"Rule Migration Successful but not complete as still migration of some Rule objects is not done.\\n\");\r\n \t mqlLogRequiredInformationWriter(\"\\n\");\r\n }\r\n\r\n //turn triggers off\r\n \t\t strMqlCommand = \"trigger on\";\r\n \t\t MqlUtil.mqlCommand(context,strMqlCommand,true);\r\n }catch(Exception e)\r\n {\r\n \t e.printStackTrace();\r\n \t mqlLogRequiredInformationWriter(\"Rule Migration Failed. \\n\");\r\n \t mqlLogRequiredInformationWriter(\"\\n\");\r\n \t throw e;\r\n }\r\n }\r\n return;\r\n }", "public interface IUserTransactionOperation {\n\n /**\n * Add the new invited transaction into this user's list\n * @param transaction the new invited transaction\n */\n void addInvitedTrans(ITransaction transaction, String userId);\n\n /**\n * Remove the new invited transaction into this user's list\n * @param transaction the invited transaction which is needed to be removed\n */\n void removeInvitedTrans(ITransaction transaction, String userId);\n\n /**\n * Used to receive transaction from one user.\n * @param meeting the transaction information which is used for two user.\n */\n void receiveTransaction(IMeeting meeting, String userId);\n\n\n /**\n * Used to edit the specific information about transaction.\n * @param trans the transaction information which is used for two user.\n * @param tradeItem the item which is users want to trade\n * @param time the meeting time of trading\n * @param place the meeting type of trading\n * @param tradeType the trading type of this transaction\n */\n void editTransaction(ITransaction trans, ItemInterface tradeItem, String time, String place\n , String tradeType, IUserAccount user);\n\n /**\n * Send the one way transaction information to target user.\n * @param target the user who start user want to trade with.\n * @param trans the one way transaction between this user and target user\n */\n void sendTransaction(IUserAccount target, ITransaction trans, IUserAccount user);\n\n /**\n * Confirm this transaction and change the value of confirmRealWorldTrade\n * @param trans the transaction information which is used for two user.\n */\n void confirmRealWorldTrade(IUserAccount user, ITransaction trans);\n\n /**\n * Confirm this transaction and change the value of confirmTrans\n * @param trans the transaction information which is used for two user.\n\n */\n void confirmTrans(ITransaction trans);\n\n void declineTrans(ITransaction trans) ;\n\n /**\n * Add the transaction which is confirmed into this user confirmedTransaction list\n * @param transId the transaction which is confirmed by user and he/she want to add\n */\n void addConfirmedTransaction(int transId, String userId);\n\n /**\n * Remove the transaction which is confirmed into this user confirmedTransaction list\n * @param transId the transaction which is confirmed by user and he/she want to remove\n */\n void removeConfirmedTransaction(int transId, String userId);\n\n /**\n * this method is used for targetUser to perform final confirm of the transaction.\n * @param trans the transaction need to get a final confirm.\n */\n void finalConfirm(ITransaction trans,boolean confirmation, String userId);\n\n void addUserItemRating(IUserAccount user, int ItemId, int rating);\n}", "private boolean insertTransactions(String filename) {\n\n login = HibernateDaoFactory.DEFAULT.getAnalysisDatabaseLogin();\n\n mysqlDb = HibernateDaoFactory.DEFAULT.getAnalysisDatabaseName();\n mysqlUser = login.get(\"user\");\n mysqlPwd = login.get(\"password\");\n\n Runtime runTime = Runtime.getRuntime();\n\n String[] commands = new String[]{MYSQL, mysqlDb, userFlag + mysqlUser, pwdFlag + mysqlPwd,\n executeFlag, sourceCommand + filename};\n String[] commandsToPrint = new String[]{MYSQL, mysqlDb,\n userFlag + mysqlUser, pwdFlag + \"*****\",\n executeFlag, sourceCommand + filename};\n try {\n logger.info(\"Beginning insert of transactions. Command Params:\"\n + Arrays.toString(commandsToPrint));\n\n Process proc = runTime.exec(commands);\n\n StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), \"ERROR\");\n\n StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), \"OUTPUT\");\n\n errorGobbler.start();\n outputGobbler.start();\n\n try {\n if (proc.waitFor() == 1) {\n logger.error(\"Return code indicates error in running the DBMerge mysql \"\n + \"process\");\n return false;\n }\n } catch (InterruptedException exception) {\n logger.error(\"Interrupted Exception while running the DBMerge mysql process.\",\n exception);\n return false;\n }\n\n } catch (IOException exception) {\n logger.error(\"Attempt to spawn a DBMerge mysql process failed for file: \"\n + filename, exception);\n return false;\n }\n return true;\n }", "public void testSaveTableByTimeAllTransactional() throws Exception {\n\t\tfailed = false;\n\t\tlogger.info(\"loop test 1\");\n\n\t\tExecutorService executor = Executors.newFixedThreadPool(nThreads * 2);\n\t\tList<Callable<Object>> tasks1 = insertTasks();\n\n\t\tList<Callable<Object>> tasks2 = updateTasksPassing();\n\n\t\tCollection<Callable<Object>> tasks = new ArrayList<>();\n\t\ttasks.addAll(tasks1);\n\t\ttasks.addAll(tasks2);\n\n\t\trunTasks(executor, tasks);\n\n\t\tshutdownExecutor(executor);\n\n\t\tlogger.info(\"I have {} Tables saved\", getCountTablePassing());\n\t}", "@Test\n\tpublic void testScenario2() {\n\t\tSystem.out.println(\"----------Running Recovery Scenario 2----------\");\n\t\t// Creating a Block.\n\t\tBlock blk1 = new Block(\"filename\", 1);\n\t\tBlock blk2 = new Block(\"filename\", 2);\n\n\t\t// Create a RecoveryManager\n\t\tint txid = 123;\n\t\tint txid2 = 143;\n\t\tRecoveryMgr rm = new RecoveryMgr(txid);\n\t\tRecoveryMgr rm2 = new RecoveryMgr(txid2);\n\n\t\t// Sample setInt\n\t\tBufferMgr basicBufferMgr = new SimpleDB().bufferMgr();\n\t\tBuffer buff = basicBufferMgr.pin(blk1);\n\t\tBuffer buff2 = basicBufferMgr.pin(blk2);\n\t\tint offset = 8;\n\t\tint offset2 = 16;\n\t\tint oldValue = buff.getInt(offset);\n\t\tint oldValue2 = buff2.getInt(offset2);\n\t\tSystem.out.println(\"Old Value: \" + oldValue);\n\t\tSystem.out.println(\"Old Value2: \" + oldValue2);\n\t\tint valueToSet = oldValue + 10;\n\t\tint valueToSet2 = oldValue2 + 20;\n\t\tint lsn = rm.setInt(buff, offset, valueToSet);\n\t\tbuff.setInt(offset, valueToSet, txid, lsn);\n\t\tint lsn2 = rm2.setInt(buff2, offset2, valueToSet2);\n\t\tbuff2.setInt(offset2, valueToSet2, txid2, lsn2);\n\t\tint newValue = buff.getInt(offset);\n\t\tSystem.out.println(\"New Value without committing: \" + newValue);\n\t\tint newValue2 = buff2.getInt(offset2);\n\t\tSystem.out.println(\"New Value2 without committing: \" + newValue2);\n\n\t\trm.commit();\n\t\trm2.commit();\n\t\trm2.recover();\n\t\tnewValue = buff.getInt(offset);\n\t\tnewValue2 = buff2.getInt(offset2);\n\t\tSystem.out.println(\"New Value after recovering: \" + newValue);\n\t\tSystem.out.println(\"New Value2 after recovering: \" + newValue2);\n\t\tAssert.assertEquals(valueToSet, newValue);\n\t\tAssert.assertEquals(valueToSet2, newValue2);\n\t\tSystem.out.println(\"----------Recovery Scenario 2 Run Complete----------\");\n\t}", "void rollbackTransaction();", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic void dealfailsms() {\n\t\tlogger.info(\"begin --- dealfailsms --- task \");\n\t\tint SerialId = AsynDataIns.getSequence(\"COMMONLOG.SERIAL_ID\");\n\t\tPltCommonLog PltCommonLogIns = new PltCommonLog();\n\t\tPltCommonLogIns.setLOG_TYPE(\"70\");\n\t\tPltCommonLogIns.setSERIAL_ID(SerialId);\n\t\tPltCommonLogIns.setSPONSOR(\"dealfailsms\");\n\t\tPltCommonLogIns.setBUSI_CODE(\"dealfailsms_index\");\n\t\t\n\t\tint index = 1;\t//默认值\n\t\tint step = 500; //每次数量\n\t\t\n\t\t//获取index\n\t\tString fail_sms = AsynDataIns.getValueFromGlobal(\"DEAL_FAIL_SMS_INDEX\");\n\t\tString[] args = fail_sms.split(\"\\\\|\");\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(DateFomart.EN_DATE); \n\t\tCalendar cal = Calendar.getInstance();\n\t\ttry {\n\t\t\t//如果获取数据和now不是同一天,则循环处理之前的数据,防止服务停滞几天或者遗漏11点后的数据。\n\t\t\tcal.setTime(sdf.parse(args[0]));\n\t\t\twhile(!isSameDay(cal.getTime(),new Date())){\n\t\t\t\tString index1 = AsynDataIns.getValueFromGlobal(\"DEAL_FAIL_SMS_INDEX\").split(\"\\\\|\")[1]; //获取上次的index\n\t\t\t\tString queryTime = new SimpleDateFormat(DateFomart.EN_DATE).format(cal.getTime()); //转换格式为yyyy-MM-dd\n\t\t\t\tindex1 = callAndUpdate(Integer.parseInt(index1), step ,queryTime); \n\t\t\t\tcal.add(Calendar.DATE, +1);\n\t\t\t\tAsynDataIns.setValueToGlobal(\"DEAL_FAIL_SMS_INDEX\", new SimpleDateFormat(DateFomart.EN_DATE).format(cal.getTime())+ \"|1\");\n\t\t\t\tPltCommonLogIns.setSTART_TIME(new Date());\n\t\t\t\tPltCommonLogIns.setBUSI_ITEM_1( index1);\n\t\t\t\tAsynDataIns.insertPltCommonLog(PltCommonLogIns);\n\t\t\t}\n\t\t\t\n\t\t} catch (ParseException e) {\n\t\t\tlogger.info(\"----dealfailsms-----时间转换错误----检查DEAL_FAIL_SMS_INDEX配置 ----\");\n\t\t\te.printStackTrace();\n\t\t} \n\t\t//正常处理当天数据\n\t\tString today = CurrentDate.currentDateFomart(DateFomart.EN_DATE);\n\t\tindex = Integer.parseInt(AsynDataIns.getValueFromGlobal(\"DEAL_FAIL_SMS_INDEX\").split(\"\\\\|\")[1]);\n\t\tString reIndex = callAndUpdate(index, step , today);\n\t\tAsynDataIns.setValueToGlobal(\"DEAL_FAIL_SMS_INDEX\",today + \"|\" + reIndex);\n\t\t\n\t\tPltCommonLogIns.setSTART_TIME(new Date());\n\t\tPltCommonLogIns.setBUSI_ITEM_1( reIndex);\n\t\tAsynDataIns.insertPltCommonLog(PltCommonLogIns);\n\t\tlogger.info(\"end --- dealfailsms --- task \");\n\n//\t\tif (jedis != null) {\n// \t jedis.close();\n// \t }\n\t}" ]
[ "0.5818072", "0.5159379", "0.5154203", "0.51266766", "0.5107775", "0.5086439", "0.5074803", "0.50532806", "0.5053073", "0.504354", "0.50359136", "0.50126207", "0.4989375", "0.49681884", "0.49346963", "0.49164826", "0.4891039", "0.48711297", "0.48629206", "0.48541167", "0.4853828", "0.48515657", "0.48440233", "0.4836267", "0.48274264", "0.48227993", "0.47889912", "0.4784396", "0.47782198", "0.47714898", "0.47637606", "0.47490937", "0.47475263", "0.4732331", "0.47320205", "0.47277665", "0.47035378", "0.47025785", "0.46925145", "0.46884257", "0.46847942", "0.4653112", "0.46493387", "0.46486282", "0.4628053", "0.46240973", "0.4615879", "0.46146235", "0.4611407", "0.46106097", "0.46063748", "0.46062008", "0.4595793", "0.45850694", "0.4584744", "0.45834035", "0.458259", "0.45793384", "0.45777023", "0.4577467", "0.45759767", "0.45749083", "0.45735058", "0.45619178", "0.45611265", "0.45588094", "0.45584524", "0.4546913", "0.45450822", "0.45384976", "0.45353055", "0.45329913", "0.45310354", "0.4516393", "0.45137227", "0.4507506", "0.45017365", "0.45006478", "0.44918746", "0.44908258", "0.44792637", "0.44705284", "0.44672757", "0.44665015", "0.44621015", "0.44593555", "0.44587615", "0.44581667", "0.4458123", "0.44577968", "0.44573623", "0.4452707", "0.44486743", "0.4447053", "0.443864", "0.4436478", "0.44340006", "0.44292462", "0.44187015", "0.44176558" ]
0.5664412
1
Execute transfer statement with given parameters
public void executeTransfer(int op_id, int tr_amount, int from_account, int to_account, int from_final_balance, int to_final_balance, Connection con) throws SQLException { PreparedStatement stmt = con.prepareStatement( "insert into OPERATIONS (OP_ID, OP_TYPE, MV_AMOUNT, FROM_ACCOUNT_ID, TO_ACCOUNT_ID, FROM_CURRENT_BALANCE, " + "TO_CURRENT_BALANCE, TIMESTAMP) values (?,?,?,?,?,?,?,?)"); stmt.setInt(1, op_id); stmt.setInt(2, OP_TYPES.valueOf("TRANSFER").ordinal()+1); stmt.setInt(3, tr_amount); stmt.setInt(4, from_account); stmt.setInt(5, to_account); stmt.setInt(6, from_final_balance); stmt.setInt(7, to_final_balance); stmt.setTimestamp(8, new Timestamp(System.currentTimeMillis())); stmt.execute(); stmt.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CommandResult execute();", "abstract public void execute(Parameters p);", "@Override\n\tpublic void execute(String[] params) {\n\n\t}", "String execute(String... parameters);", "protected abstract Object execute(JdbcChannel con,\n PreparedStatement stmt,\n String flags)\n throws ProcedureException;", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "public int execute();", "protected abstract void execute();", "public void execute();", "public void execute();", "public void execute();", "public void execute();", "protected abstract void execute(final SimulationParameters params) throws TurnoverException;", "abstract protected void execute();", "R execute();", "public void execute(){\n\t\t\n\t}", "public void executeTransaction(Transaction transaction) {\n logger.info(\"Execute money transaction: {}\", transaction);\n validateTransaction(transaction);\n transferHKD(transaction);\n }", "public abstract int execute();", "protected void execute() {}", "public abstract void execute();", "public abstract void execute();", "public abstract void execute();", "@Override\n\tpublic String execute() throws Exception {\n\t\treturn \"send\";\n\t}", "void execute(final ReadWriteTransaction readWriteTransaction);", "CommandResult execute(String commandText) throws Exception;", "T execute() throws Exception;", "public boolean execute(UniversalDatabaseConnector target);", "public void execute() {\n\t\t\n\t}", "public void executeSshPassShellScript() {\n\n\t\tString executableScriptCommand = null;\n\t\tArrayList<String> sshResultArray;\n\t\tArrayList<String> listExecuteCmdArray = new ArrayList<String>();\n\t\tlistExecuteCmdArray.add(targetScriptFilePath.toString());\n\t\tlistExecuteCmdArray.add(newNode.getIpAddress());\n\t\tlistExecuteCmdArray.add(newNode.getUserName());\n\t\tlistExecuteCmdArray.add(newNode.getPassword());\n\t\tString actionCmd = createSshCommand(diskName, byteSize, blockCount );\n\t\tlog.debug(\"actionCmd :\" + actionCmd);\n\t\tlistExecuteCmdArray.add(actionCmd);\n\t\tSshpassClientConnection sshpassConn = new SshpassClientConnection();\n\t\tsshResultArray = sshpassConn.executeProcess(listExecuteCmdArray);\n\t\tlistExecuteCmdArray.remove(4);\n\t\tlistExecuteCmdArray.clear();\n\n\t}", "protected void execute() {\n \t\n }", "protected void execute() {\n \t\n }", "void excuteCommand(Command commandToExecute, String [] params);", "void execute() throws Exception;", "public void execute() {\n execute0();\n }", "void execute(Integer num1, Integer num2);", "protected void execute() {\n\t\t\n\t}", "public void execute() {\r\n\t\r\n\t}", "void execute() throws CommandExecutionException;", "public native int execute(String name);", "public abstract T execute() throws Exception;", "public void execute() {\n\n\t}", "private void executeRequest(String sql) {\n\t}", "public abstract ExecuteResult<T> execute() throws SQLException;", "boolean execute();", "@SuppressWarnings(\"unchecked\")\n public void execute() {\n execute(null, null);\n }", "private void executeQuery() {\n }", "@Test\n\tpublic void execute() {\n\t\tcommand.execute(request);\n\t}", "public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}", "public void execute() throws SQLException {\n\t\ttry {\n\t\t\tselect.setUsername(\"INTRANET\");\n\t\t\tselect.setPassword(\"INTRANET\");\n\t\t\tselect.execute();\n\t\t}\n\n\t\t// Liberar recursos del objeto select.\n\t\tfinally {\n\t\t\tselect.close();\n\t\t}\n\t}", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\n\t\t\r\n\t}", "public abstract boolean execute(Condition condition, Map<String, String> executionParameterMap, Grant grant);", "@Override\r\n\tpublic void execute() {\n }", "T execute() throws MageException;", "@Override\n\tpublic void execute() {\n\t\t\n\t}", "protected void execute()\n\t{\n\t}", "@Override\n protected TransactionStatus executeWork(Connection conn, TransactionType nextTransaction)\n throws UserAbortException, SQLException {\n try {\n TPCCProcedure proc = (TPCCProcedure) this.getProcedure(nextTransaction.getProcedureClass());\n\n // The districts should be chosen randomly from [1,10] for the following transactions:\n // 1. NewOrder TPC-C 2.4.1.2\n // 2. Payment TPC-C 2.5.1.2\n // 3. OrderStatus TPC-C 2.6.1.2\n // The 'StockLevel' transaction has a fixed districtId for the whole terminal.\n int lowDistrictId = terminalDistrictID;\n int highDistrictId = terminalDistrictID;\n if (nextTransaction.getName().equals(\"NewOrder\") ||\n nextTransaction.getName().equals(\"Payment\") ||\n nextTransaction.getName().equals(\"OrderStatus\")) {\n lowDistrictId = 1;\n highDistrictId = TPCCConfig.configDistPerWhse;\n }\n proc.run(conn, gen, terminalWarehouseID, wrkld.getTotalWarehousesAcrossShards(),\n lowDistrictId, highDistrictId, this);\n } catch (ClassCastException ex){\n //fail gracefully\n LOG.error(\"We have been invoked with an INVALID transactionType?!\");\n throw new RuntimeException(\"Bad transaction type = \"+ nextTransaction);\n }\n conn.commit();\n return (TransactionStatus.SUCCESS);\n }", "@Override\n public void execute() {}", "protected void execute() {\n\n\t}", "protected abstract void execute() throws Exception;", "ExecutionResult<Void> execute();", "public void execute() {\n }", "public void execute() {\n /*\n r6 = this;\n java.lang.String r0 = \"Failed to close connection after DBUnit operation: \"\n java.util.logging.Logger r1 = log\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n java.lang.String r3 = \"Executing DBUnit operations: \"\n r2.append(r3)\n int r3 = r6.size()\n r2.append(r3)\n java.lang.String r2 = r2.toString()\n r1.info(r2)\n org.dbunit.database.IDatabaseConnection r1 = r6.getConnection() // Catch:{ all -> 0x005a }\n r6.disableReferentialIntegrity(r1) // Catch:{ all -> 0x0058 }\n java.util.Iterator r2 = r6.iterator() // Catch:{ all -> 0x0058 }\n L_0x0027:\n boolean r3 = r2.hasNext() // Catch:{ all -> 0x0058 }\n if (r3 == 0) goto L_0x0037\n java.lang.Object r3 = r2.next() // Catch:{ all -> 0x0058 }\n org.seamless.util.dbunit.DBUnitOperations$Op r3 = (org.seamless.util.dbunit.DBUnitOperations.Op) r3 // Catch:{ all -> 0x0058 }\n r3.execute(r1) // Catch:{ all -> 0x0058 }\n goto L_0x0027\n L_0x0037:\n r6.enableReferentialIntegrity(r1) // Catch:{ all -> 0x0058 }\n if (r1 == 0) goto L_0x0057\n r1.close() // Catch:{ Exception -> 0x0040 }\n goto L_0x0057\n L_0x0040:\n r1 = move-exception\n java.util.logging.Logger r2 = log\n java.util.logging.Level r3 = java.util.logging.Level.WARNING\n java.lang.StringBuilder r4 = new java.lang.StringBuilder\n r4.<init>()\n r4.append(r0)\n r4.append(r1)\n java.lang.String r0 = r4.toString()\n r2.log(r3, r0, r1)\n L_0x0057:\n return\n L_0x0058:\n r2 = move-exception\n goto L_0x005c\n L_0x005a:\n r2 = move-exception\n r1 = 0\n L_0x005c:\n if (r1 == 0) goto L_0x0079\n r1.close() // Catch:{ Exception -> 0x0062 }\n goto L_0x0079\n L_0x0062:\n r1 = move-exception\n java.util.logging.Logger r3 = log\n java.util.logging.Level r4 = java.util.logging.Level.WARNING\n java.lang.StringBuilder r5 = new java.lang.StringBuilder\n r5.<init>()\n r5.append(r0)\n r5.append(r1)\n java.lang.String r0 = r5.toString()\n r3.log(r4, r0, r1)\n L_0x0079:\n goto L_0x007b\n L_0x007a:\n throw r2\n L_0x007b:\n goto L_0x007a\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.seamless.util.dbunit.DBUnitOperations.execute():void\");\n }", "public void execute (T target);", "CommandResult execute(String commandText) throws CommandException, ParseException, UnmappedPanelException;", "public void execute(){\n\n }", "void transactTo_execCommand(int code, String transactName, ComponentName who, Map param1, String param2, int userId) {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n IBinder binder = ServiceManager.getService(\"device_policy\");\n if (binder != null) {\n if (HWFLOW) {\n Log.i(TAG, \"Transact:\" + transactName + \" to device policy manager service. code is \" + code);\n }\n _data.writeInterfaceToken(ConstantValue.DESCRIPTOR);\n if (who != null) {\n _data.writeInt(1);\n who.writeToParcel(_data, 0);\n } else {\n _data.writeInt(0);\n }\n _data.writeMap(param1);\n _data.writeString(param2);\n _data.writeInt(userId);\n binder.transact(code, _data, _reply, 0);\n _reply.readException();\n }\n _reply.recycle();\n _data.recycle();\n } catch (RemoteException localRemoteException) {\n Log.e(TAG, \"transactTo \" + transactName + \" failed: \" + localRemoteException.getMessage());\n } catch (Throwable th) {\n _reply.recycle();\n _data.recycle();\n }\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "@Override\n public int execute() throws InterruptedOperationException, CancelOperationException {\n Logger logger = Log4j.getLogger();\n int success = 0;\n try {\n String accountNumber = null;\n BigDecimal amount = BigDecimal.ONE;\n Transaction transaction;\n LocalDateTime now;\n String userId = BankApp.getCurrentUser().getUserId();\n List<String> accountNumbers = accountDao.getAccountNumbers(userId);\n ConsoleHelper.println(\"\");\n ConsoleHelper.displayMenuBanner();\n ConsoleHelper.printlnWithTab(\"[DEPOSIT]\");\n ConsoleHelper.printAccountList();\n\n boolean isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Into: \");\n String input = ConsoleHelper.readString();\n for (int i = 1; i <= accountNumbers.size(); i++) {\n if (input.equals(String.valueOf(i))) {\n accountNumber = accountNumbers.get(i - 1);\n isValidInput = true;\n break;\n }\n }\n\n } while (!isValidInput);\n\n isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Amount: \");\n String input = ConsoleHelper.readString();\n try {\n double inputValue = Double.parseDouble(input);\n amount = BigDecimal.valueOf(inputValue);\n int decimalPlaces = ConsoleHelper.getNumberOfDecimalPlaces(amount);\n if (decimalPlaces == 0 && amount.compareTo(BigDecimal.valueOf(0)) > 0) {\n isValidInput = true;\n } else {\n ConsoleHelper.printlnWithTab(\"Invalid amount, we only accept whole number deposit.\");\n }\n } catch (NumberFormatException e) {\n // the amount format is not valid\n }\n } while (!isValidInput);\n\n int countAccount = accountDao.deposit(accountNumber, amount);\n now = LocalDateTime.now();\n Account account = accountDao.getAccount(accountNumber);\n transaction = new Transaction(TransactionType.DEPOSIT, userId, now, amount, account);\n int countTransaction = transactionDao.addTransaction(transaction);\n success = countAccount == 1 && countTransaction == 1 ? 1 : 0;\n if (success == 1) {\n ConsoleHelper.printlnWithTab(\"Deposit completed.\");\n ConsoleHelper.println(\"\");\n } else {\n ConsoleHelper.printlnWithTab(\"System failure, deposit cancelled. Please try later.\");\n }\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n logger.error(\"Interrupted Exception when thread sleep\", e);\n }\n } catch (CancelOperationException e) {\n // do nothing, allow user to return to main menu\n }\n return success;\n }", "public void execute() throws ServerException;", "protected abstract void execute(INPUT input);", "protected void execute()\n {\n }", "public void executeMovement(int op_id, int mv_amount, int account_id, int final_balance, Connection con) throws SQLException {\n PreparedStatement stmt = con.prepareStatement(\n \"insert into OPERATIONS (OP_ID, OP_TYPE, MV_AMOUNT, FROM_ACCOUNT_ID, FROM_CURRENT_BALANCE, TIMESTAMP) \" +\n \"values (?,?,?,?,?,?)\");\n\n stmt.setInt(1, op_id);\n stmt.setInt(2, OP_TYPES.valueOf(\"MOVEMENT\").ordinal()+1);\n stmt.setInt(3, mv_amount);\n stmt.setInt(4, account_id);\n stmt.setInt(5, final_balance);\n stmt.setTimestamp(6, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n }", "protected void execute() {\n\t}", "protected void execute() {\r\n }", "void sendTransaction(IUserAccount target, ITransaction trans, IUserAccount user);", "@Override\n\tsynchronized void execute() {\n\t\t_dataOUTPipe.dataIN(op1.getText());\n\t\t_dataOUTPipe.dataIN(op2.getText());\n\t\t_dataOUTPipe.dataIN(op.getText());\n\t}", "public String walletTransaction(long senderMobileNo, long receiverMobileNo, float transferAmount) throws Exception {\n\t\tConnection conn = Connect.connect();\n\t\tCallableStatement cStmt = conn.prepareCall(\"{call wallet_proc(?,?,?,?)}\");\n\t\tcStmt.setLong(1,senderMobileNo);\n\t\tcStmt.setLong(2,receiverMobileNo);\n\t\tcStmt.setFloat(3,transferAmount);\n\t\tcStmt.registerOutParameter(4, Types.VARCHAR);\n\t\tcStmt.executeUpdate();\n\t\tString result = cStmt.getString(4);\n\t\tconn.close();\n\t\treturn result;\n\t\t\n\t}", "public State execute(int command, State state);", "public void executeTransaction(List<String> sql) throws SQLException {\n try (Connection connection = getConnection()) {\n\n Statement statement = connection.createStatement();\n\n String into = \"\";\n\n //connection.setAutoCommit(false);\n for (String s : sql) {\n if (s.trim().equals((\"\")) || s.trim().startsWith(\"/*\")) {\n continue;\n }\n into += s;\n\n if (s.endsWith(\";\")) {\n statement.addBatch(into);\n into = \"\";\n }\n }\n\n statement.executeBatch();\n\n statement.close();\n\n //connection.commit();\n }\n }", "Future<Object> execCmd(byte[] cmd, byte[]... params);", "@Override\n\tpublic void execute() throws TranslatorException {\n\n\t\tif (command instanceof Update) {\n\t\t\texecuteUpdate();\n\t\t}\n\t\telse if (command instanceof Delete) {\n\t\t\texecuteDelete();\n\t\t}\n\t\telse if (command instanceof Insert) {\n\t\t\texecuteInsert();\n\t\t}\n//\t\telse {\n// final String msg = LDAPPlugin.Util.getString(\"LDAPUpdateExecution.incorrectCommandError\"); //$NON-NLS-1$\n//\t\t\tthrow new TranslatorException(msg);\n//\t\t}\n\t}" ]
[ "0.6467017", "0.6318051", "0.600034", "0.5865705", "0.5823841", "0.5792009", "0.5792009", "0.5792009", "0.5792009", "0.5792009", "0.5792009", "0.5792009", "0.5727782", "0.5648048", "0.5644448", "0.5644448", "0.5644448", "0.5644448", "0.5623459", "0.5618628", "0.56003773", "0.5589092", "0.55842924", "0.55823797", "0.55823433", "0.55595875", "0.55595875", "0.55595875", "0.55186987", "0.5496374", "0.5493459", "0.5484614", "0.5482841", "0.5469287", "0.5451914", "0.5432519", "0.5432519", "0.5416582", "0.54056376", "0.5394562", "0.5394151", "0.53809214", "0.53791755", "0.5374629", "0.5367973", "0.5367609", "0.536533", "0.53600097", "0.53555083", "0.5351488", "0.53451794", "0.53349745", "0.5329377", "0.53192157", "0.53155655", "0.5302287", "0.5302287", "0.5302287", "0.529366", "0.52906924", "0.52867097", "0.5286255", "0.5285942", "0.5281331", "0.52680963", "0.52650046", "0.52589977", "0.5244434", "0.52357084", "0.5230664", "0.5221586", "0.5219134", "0.5217968", "0.52126193", "0.52126074", "0.52126074", "0.52126074", "0.52126074", "0.52126074", "0.52126074", "0.52126074", "0.52126074", "0.52126074", "0.52126074", "0.52126074", "0.52126074", "0.521236", "0.5206676", "0.52064455", "0.5197281", "0.51902586", "0.5187747", "0.5187272", "0.51790094", "0.51757133", "0.5171238", "0.5166519", "0.51591325", "0.5154802", "0.51512015" ]
0.6410492
1
Log account creation in the operations table (recovery mode)
public boolean logNewAccount(int op_id, int account_id, int current_balance, Connection con){ try { PreparedStatement stmt = con.prepareStatement( "insert into OPERATIONS (OP_ID, OP_TYPE, FROM_ACCOUNT_ID, FROM_CURRENT_BALANCE, TIMESTAMP) " + "values (?,?,?,?,?)"); stmt.setInt(1, op_id); stmt.setInt(2, OP_TYPES.valueOf("CREATE").ordinal()+1); stmt.setInt(3, account_id); stmt.setInt(4, current_balance); stmt.setTimestamp(5, new Timestamp(System.currentTimeMillis())); stmt.execute(); stmt.close(); } catch (SQLException e) { try { con.rollback(); return false; } catch (SQLException e1) { e1.printStackTrace(); return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void logNewAccount(int op_id, int account_id, int current_balance){\n try {\n PreparedStatement stmt = rawDataSource.getConnection().prepareStatement(\n \"insert into OPERATIONS (OP_ID, OP_TYPE, FROM_ACCOUNT_ID, FROM_CURRENT_BALANCE, TIMESTAMP) \" +\n \"values (?,?,?,?,?)\");\n stmt.setInt(1, op_id);\n stmt.setInt(2, OP_TYPES.valueOf(\"CREATE\").ordinal()+1);\n stmt.setInt(3, account_id);\n stmt.setInt(4, current_balance);\n stmt.setTimestamp(5, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void create() {\n String salt = PasswordUtils.getSalt(30);\n\n // Protect user's password. The generated value can be stored in DB.\n String mySecurePassword = PasswordUtils.generateSecurePassword(password, salt);\n\n // Print out protected password\n System.out.println(\"My secure password = \" + mySecurePassword);\n System.out.println(\"Salt value = \" + salt);\n Operator op = new Operator();\n op.setUsername(username);\n op.setDescription(description);\n op.setSalt(salt);\n op.setPassword(mySecurePassword);\n op.setRol(rol);\n operatorService.create(op);\n message = \"Se creo al usuario \" + username;\n username = \"\";\n description = \"\";\n password = \"\";\n rol = null;\n }", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "private void createLoginTable() {\r\n jdbcExecutor.executeQuery(new Work() {\r\n @Override\r\n public void execute(Connection connection) throws SQLException {\r\n connection.createStatement().executeUpdate(\"CREATE TABLE login ( id numeric(19,0), user_id numeric(19,0), timestamp TIMESTAMP )\");\r\n }\r\n });\r\n }", "private void logUser() {\n }", "@Override\npublic int addSysLog(EhrUser user, LogOperateType operation, Module module ,String operationInfo)\n\t\tthrows Exception {\n\tEhrSysLog log = new EhrSysLog();\n\tlog.setUserId(user.getUserId());\n\tlog.setUserName(user.getUserName());\n\tlog.setOperateType(operation.getValue());\n\tlog.setModule(module.getModuleName());\n\t\n\tif (user.getCompany() != null) {\n\t\tlog.setCompanyId(user.getCompany().getCompanyId());\n\t\tlog.setCompanyCode(user.getCompany().getCompanyCode());\n\t\tlog.setCompanyName(user.getCompany().getCompanyName());\n\t} else {\n\t\tEhrCompany company = companyMapper.selectByPrimaryKey(user.getCompanyId());\n\t\tlog.setCompanyId(company.getCompanyId());\n\t\tlog.setCompanyCode(company.getCompanyCode());\n\t\tlog.setCompanyName(company.getCompanyName());\n\t}\n\tlog.setOperateInfo(operationInfo);\n\tlog.setOperateDate(new Date());\n\treturn logMapper.insertSelective(log);\n\n}", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "public void createAccountTable() throws SQLException {\r\n\t\tConnection connection = dbAdministration.getConnection();\r\n\t\t// Prüfung, ob Tabelle bereits besteht\r\n\t\tResultSet resultSet = connection.getMetaData().getTables(\"%\", \"%\", \"%\", new String[] { \"TABLE\" });\r\n\t\tboolean shouldCreateTable = true;\r\n\t\twhile (resultSet.next() && shouldCreateTable) {\r\n\t\t\tif (resultSet.getString(\"TABLE_NAME\").equalsIgnoreCase(\"ACCOUNT\")) {\r\n\t\t\t\tshouldCreateTable = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tresultSet.close();\r\n\r\n\t\tif (shouldCreateTable) {\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tString sql = \"CREATE table account (id int not null primary key, owner varchar(\"\r\n\t\t\t\t\t+ DatabaseAdministration.ownerLength + \") not null, number varchar(4) not null)\";\r\n\t\t\t// Tabelle wird erstellt\r\n\t\t\tstatement.execute(sql);\r\n\t\t\tstatement.close();\r\n\t\t\tlogger.info(\"SQL-Statement ausgeführt: \" + sql);\r\n\t\t\tlogger.info(\"Tabelle \\\"Account\\\" wurde erstellt.\");\r\n\t\t\tbankAccountExists = false;\r\n\t\t\t// Das Bank-Konto wird angelegt\r\n\t\t\taddAccount(\"0000\", \"BANK\", BigDecimal.ZERO);\r\n\t\t\tbankAccountExists = true;\r\n\t\t}\r\n\t\tconnection.close();\r\n\t}", "@Override\r\n\tpublic int addAccntDao(Account ac) {\n\t\treturn dao.accountCreation(ac);\r\n\t}", "@Override\n public void insertAccount() throws Exception {\n\n }", "private void initial(){\n storeAccount(\"201799990001030047\");\n }", "public void createAdmin()\r\n\t{\r\n\t\tSystem.out.println(\"Administrator account not exist, please create the administrator account by setting up a password for it.\");\r\n\t\tString password=\"\",repassword=\"\";\r\n\t\tboolean flag=false;\r\n\t\twhile(!flag)\r\n\t\t{\r\n\t\t\tboolean validpassword=false;\r\n\t\t\twhile(!validpassword)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter the password: \");\r\n\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\tif(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"Please re-enter the password: \");\r\n\t\t\trepassword=sc.nextLine();\r\n\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\tif(!flag)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString hash_password=hashfunction(password); \r\n\t\tString last_login=java.time.LocalDate.now().toString();\r\n\t\tuser_records.add(new User(\"administrator\",hash_password,\"administrator\",\"\",0,0,last_login,false));\r\n\t\tSystem.out.println(\"Administrator account created successfully!\");\r\n\t}", "@Test\n\tpublic void testAdminCreate() {\n\t\tAccount acc1 = new Account(00000, \"ADMIN\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"ADMIN\", 00000, 0, \"A\"));\n\t\ttransactions.add(1, new Transaction(05, \"new acc\", 00001, 100.00, \"A\"));\n\t\ttransactions.add(2, new Transaction(00, \"ADMIN\", 00000, 0, \"A\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Account Created\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to create account as admin\", testResult);\n\t}", "private void createCDAccountsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE cdAccounts \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY ( START WITH 3000000001, INCREMENT BY 1 ), \" + \"owner INT, \"\n\t\t\t\t\t+ \"term INT, \" + \"balance DOUBLE, \" + \"intRate DOUBLE, \"\n\t\t\t\t\t+ \"timeCreated BIGINT, \" + \"lastPaidInterest DOUBLE, \"\n\t\t\t\t\t+ \"dateOfLastPaidInterest BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table cdAccounts\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of cdAccounts table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "private void createNewAccount() {\n\n // if user has not provided valid data, do not create an account and return from method\n if (!validateData()) {\n return;\n }\n\n // If flag value is false, that means email provided by user doesn't exists in database\n // so initialize the loader to create a new account\n if (!mEmailExistsFlag) {\n getLoaderManager().initLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n } else {\n // If flag is true, that means email provided by user already exists in database\n // so restart the loader and allow user to enter new email address for account\n getLoaderManager().restartLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n }\n\n }", "Account create();", "public static void insertOper(SysUserOperLog obj) throws Exception {\n\t\tMDbUtils.insert(CbDao.sys, obj);\n\t}", "public void createUserAccount(UserAccount account);", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "private void createCheckingAccountsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE checkingAccounts \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY ( START WITH 1000000001, INCREMENT BY 1 ), \" + \"owner INT, \"\n\t\t\t\t\t+ \"balance DOUBLE, \" + \"intRate DOUBLE, \"\n\t\t\t\t\t+ \"timeCreated BIGINT, \" + \"lastPaidInterest DOUBLE, \"\n\t\t\t\t\t+ \"dateOfLastPaidInterest BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table checkingAccounts\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of checkingAccounts table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "int insert(PlatformAdminRoleUser record);", "@FXML\r\n void createAccount(MouseEvent event) throws SQLException {\r\n ta_employeeAccount.clear();\r\n account();\r\n\r\n }", "UserLogin recordLogin(UserLogin login);", "public void create() throws DuplicateException, InvalidUserDataException, \n NoSuchAlgorithmException, SQLException {\n\tUserDA.create(this);\n }", "@Override\n\tpublic void createSavingAccount(Account as) {\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\tString saving = \"insert into savings( owner_id, balance) values (?,?)\";\n\t\t\tCallableStatement chaccount = con.prepareCall(saving);\n\t\t\n\t\t\tchaccount.setInt(1,as.getOwner_id() );\n\t\t\tchaccount.setDouble(2, as.getBalance());\n\t\t\tchaccount.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"In CheckingDaoDB Exception\");\n\t\t\te.printStackTrace();\n\t\t}\n}", "int insertSelective(PlatformAdminRoleUser record);", "public void userCreated(UserCreateCommand command) {\n\t\t}", "GenerateUserAccount () {\r\n }", "Registration registration(long idUser, long idTrail);", "private TicketLog createLog() throws SQLException {\n\t\t\t\t\treturn new TicketLog(rs.getLong(1), rs.getString(2),\n\t\t\t\t\t\t\trs.getLong(3),\n\t\t\t\t\t\t\tTicketLog.Action.valueOf(rs.getString(4)),\n\t\t\t\t\t\t\trs.getInt(5));\n\t\t\t\t}", "@Override\r\n\tpublic boolean createAccount(Account account) throws Exception {\n\t\tboolean flag = false;\r\n\t\ttry {\r\n\t\t\tflag = this.dao.createAccount(account);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "int insert(SysRoleUser record);", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "public static void createTable() throws SQLException\n {\n Statement statement = ConnectionManager.getConnection()\n .createStatement();\n\n statement.executeUpdate(\"DROP TABLE IF EXISTS Account\");\n statement\n .executeUpdate(\"CREATE TABLE Account(accountId INTEGER PRIMARY KEY AUTOINCREMENT, name, address, manager)\");\n\n statement.close();\n\n insertAccount(new Account(0, \"Administrator\", \"\", true));\n\n PreparedStatement ps = ConnectionManager\n .getConnection()\n .prepareStatement(\n \"UPDATE sqlite_sequence SET seq = ? WHERE name = 'Account'\");\n ps.setInt(1, Account.LOW_ACCOUNT_ID - 1);\n ps.executeUpdate();\n ps.close();\n }", "int insert(SysRoleFunction record);", "public int createAccount(User user) throws ExistingUserException,\n UnsetPasswordException;", "@Test\n\tpublic void testLoginAdminAccExist() {\n\t\tAccount acc1 = new Account(00000, \"ADMIN\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"ADMIN\", 00000, 0, \"A\"));\n\t\ttransactions.add(1, new Transaction(00, \"ADMIN\", 00000, 0, \"A\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Session Started Admin\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to find that admin account\", testResult);\n\t}", "@Override\n\tpublic void addTransactionToDatabase(Transaction trans) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString insertQuery = \"insert into transaction_history values(default, ?, ?, ?, now())\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(insertQuery);\n \n\t\t\tprepStmt.setInt(1, trans.getAccountId());\n\t\t\tprepStmt.setString(2, trans.getUsername());\n\t\t\tprepStmt.setDouble(3, trans.getAmount());\n\t\t\tprepStmt.executeUpdate();\n\t}", "@Override\n\tpublic void createAccount(Account p) {\n\t\t\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\t\n\t\t\tString deleteFromTable = \"DELETE FROM accounts WHERE owner_id='8'\";\n\t try (Connection conn = conUtil.getConnection();\n\t PreparedStatement pstmt = conn.prepareStatement(deleteFromTable)) {\n\n\t // set the corresponding param\n\t pstmt.setInt(1, p.getOwner_id());\n\t // execute the delete statement\n\t pstmt.executeUpdate();\n\n\t } catch (SQLException e) {\n\t System.out.println(e.getMessage());\n\t }\n\t\t\t\n\t\t\tString sql = \"insert into accounts( owner_id, balance ) values (?,?)\";\n\t\t\tCallableStatement cs = con.prepareCall(sql);\n\t\t\t\n\t\t\tcs.setInt(1, p.getOwner_id());\n\t\t\tcs.setDouble(2, p.getBalance());\n\t\t\t\n\t\t\tcs.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void createTable() {\n try (Statement st = this.conn.createStatement()) {\n st.execute(\"CREATE TABLE IF NOT EXISTS users (user_id SERIAL PRIMARY KEY, name VARCHAR(100) NOT NULL, \"\n + \"login VARCHAR(100) UNIQUE NOT NULL, email VARCHAR(100) NOT NULL, createDate TIMESTAMP NOT NULL);\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void createTable() {\n\t\tSystem.out.println(\"++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\ttry {\n\t\t\tTableUtils.createTable(connectionSource, UserEntity.class);\n\t\t\tTableUtils.createTable(connectionSource, Downloads.class);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\");\n\t\t}\n\t}", "private void createCustomersTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE customers \"\n\t\t\t\t\t+ \"(id INT GENERATED ALWAYS AS IDENTITY, \"\n\t\t\t\t\t+ \"name VARCHAR(40), \" + \"email VARCHAR(40), \"\n\t\t\t\t\t+ \"pass VARCHAR(40), \" + \"ssn VARCHAR(9), \"\n\t\t\t\t\t+ \"address VARCHAR(255), \" + \"hphone VARCHAR(10), \"\n\t\t\t\t\t+ \"cphone VARCHAR(10), \" + \"signuptime BIGINT, \"\n\t\t\t\t\t+ \"chkacct BIGINT, \" + \"savacct BIGINT, \" + \"cdacct BIGINT, \"\n\t\t\t\t\t+ \"hasStock VARCHAR(6))\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table users\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of user table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void allAcctsSuperUserCreation() {\n\t\t Report.createTestLogHeader(\"MuMv\", \"Verify the Super user creation and their Audit entry in DB\"); \t \t \t \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"Switchtopaperlessacctspecifics\");\n\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SubmitMeterReadodb\");\n\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"SlingshotCrmDetailsSuperuser\"); \n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.SuperUserCreation()\n\t\t.SuperUserOverlayyes();\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewSuperUser(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTable(userProfile)\n\t\t.AdduserConfirmationPage();\n\t/*\t.confirmationPageVerificationLinks();\n\t\t/*.UserJourney_SuperUserAccessVerification(userProfile,smrProfile);\n\t\tnew SapCrmAction()\n\t\t.loginDetails(crmuserProfile)\n\t\t.searchCrmFieldsVerification(crmuserProfile, userProfile);\n*/\n\t}", "public void createAdminLog(TadminLog adminlog) {\n\t\tadminLogDao.create(adminlog);\n\t}", "private void charge_up() throws GB_Exception {\n try{\n if(PersonalDataController.getInstance().existRegistry(username)){\n putPersonalInformation();\n }else{\n putDefaultInformation();\n }\n } catch (SQLException | IOException ex) {\n LOG.error(ex);\n throw new GB_Exception(\"Error al carga informacion de usuario. Comuniquese con su administrador.\");\n }\n }", "@Override\n\tpublic Employee create(Employee emp) {\n\t\tlog.debug(\"Welcome to logging\");\n\t\tSystem.out.println(\"Server logs \");\n\t\temployeeDAO.create(emp);\n\t\treturn null;\n\t}", "int insert(SysAuthentication record);", "@Override\r\n\tpublic boolean createAccount(Account account) {\n\t\treturn dao.createAccount(account);\r\n\t}", "private void createGuestProfile() {\n saveData();\n signupDelegate.enableNextButton(Boolean.FALSE);\n SwingUtil.setCursor(this, java.awt.Cursor.WAIT_CURSOR);\n errorMessageJLabel.setText(getString(\"SigningUp\"));\n errorMessageJLabel.paintImmediately(0, 0, errorMessageJLabel.getWidth(),\n errorMessageJLabel.getHeight());\n try {\n getSignupHelper().createGuestProfile();\n } catch (final OfflineException ox) {\n logger.logError(ox, \"An offline error has occured.\");\n addInputError(getSharedString(\"ErrorOffline\"));\n } catch (final ReservationExpiredException rex) {\n logger.logWarning(rex, \"The username/e-mail reservation has expired.\");\n addInputError(getString(\"ErrorReservationExpired\"));\n } catch (final Throwable t) {\n logger.logFatal(t, \"An unexpected error has occured.\");\n addInputError(getSharedString(\"ErrorUnexpected\"));\n } finally {\n errorMessageJLabel.setText(\" \");\n }\n }", "public void createNewTable() throws WoodsException{\n\t\t\tuserTable = new Table(tableName);\n\t\t\tDatabase.get().storeTable(tableName, userTable);\n\t\t}", "int insert(TmpUserPayAccount record);", "public void insertUser() {}", "public void logincredentials() {\n\t\tutil.entertext(prop.getValue(\"locators.text.uname\"), \"admin\");\n\t\tutil.entertext(prop.getValue(\"locators.text.password\"), \"Admin123\");\n\t\tutil.ClickElement(prop.getValue(\"locators.button.regdesk\"));\n\t\tutil.ClickElement(prop.getValue(\"locators.button.login\"));\n\t\tlogreport.info(\"logged into the application\");\n\n\t}", "int insert(SysUser record);", "int insert(SysUser record);", "public void create_loginFile(String account){\n try {\n outputStreamWriter = new OutputStreamWriter(context.openFileOutput(Constant.LOGIN_FILE, Context.MODE_PRIVATE));\n outputStreamWriter.write(account+\" logged in,\");\n outputStreamWriter.close();\n }\n catch (Exception e){\n Message.logMessages(\"ERROR: \",e.toString());\n }\n }", "@Override\n public void logWithdrawal(UUID userUUID, double amount) {\n }", "@Override\n public void createOnlineAccount(String name, \n String ssn, String id, String psw)\n {\n final String url = \n \"jdbc:mysql://mis-sql.uhcl.edu/<username>?useSSL=false\";\n \n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n \n try\n {\n \n //connect to the databse\n connection = DriverManager.getConnection(url, \n db_id, db_password);\n connection.setAutoCommit(false);\n //crate the statement\n statement = connection.createStatement();\n \n //do a query\n resultSet = statement.executeQuery(\"Select * from onlineAccount \"\n + \"where id = '\" + id + \"' or ssn = '\"\n + ssn + \"'\");\n \n if(resultSet.next())\n {\n //either the ssn is used or the id is used\n System.out.println(\"Account creation failed\");\n }\n else\n {\n //insert a record into onlineAccount\n int r = statement.executeUpdate(\"insert into onlineAccount values\"\n + \"('\" + name + \"', '\" + id + \"', '\" + ssn + \"', '\"\n + psw +\"')\");\n System.out.println(\"Account creation successful!\");\n System.out.println();\n }\n connection.commit();\n connection.setAutoCommit(true);\n \n }\n catch (SQLException e)\n {\n System.out.println(\"Something wrong during the creation process!\");\n e.printStackTrace();\n }\n finally\n {\n //close the database\n try\n {\n resultSet.close();\n statement.close();\n connection.close();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n }", "private void log() {\n\t\t\n//\t\tif (trx_loggin_on){\n\t\t\n\t\tif ( transLogModelThreadLocal.get().isTransLoggingOn() ) {\n\t\t\t\n\t\t\tTransLogModel translog = transLogModelThreadLocal.get();\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\ttransactionLogger.info(\"\"); // don't really need a msg here\n\t\t\t\n\t\t\t// TODO MDC maybe conflic with existing MDC using in the project\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\t\n\t\t\ttranslog.getAttributesOnce().clear();\n\t\t}\n\t\t\n\t}", "public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','pit@gmail.com',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','pit234@gmail.com',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }", "@Override\n public void run() {\n try {\n stringOrganizationIds.remove(defaultOrg);\n List<Integer> organizationIds = FluentIterable.from(stringOrganizationIds)\n .transform(Ints.stringConverter()).toList();\n\n newUser.setActive(false);\n UserProfileStruct savedUser = createAccountInternal(conn, newUser, password, resetQuestion,\n resetAnswer, givenName, surname, organizationId);\n for (Integer orgId : organizationIds) {\n Profile profile = new Profile();\n profile.setGivenName(givenName);\n profile.setSurname(surname);\n profile.setOrganizationId(orgId);\n profile.setUserId(savedUser.credentialedUser.getId());\n profile = profilePersister.createProfile(profile, conn);\n\n authService.grantAtLeast(profile.getId(), ROLE_READER, orgId);\n authService.grantAtLeast(orgId, ROLE_ADMIN, profile.getId());\n }\n\n User user = savedUser.credentialedUser.getUser();\n user.setActive(true);\n persistenceService.process(conn, new UserPersister.UpdateUserFunc(user));\n conn.commit();\n } catch (Exception e) {\n closeConnection(conn);\n }\n }", "public void addTrainingInitialAdmin(TrainingInitialAdmin ti) {\n Integer id = null;\n\n Session session = ConnectionFactory.getInstance().getSession();\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n\n session.saveOrUpdate(ti);\n tx.commit();\n\n\n } catch (HibernateException e) {\n try {\n tx.rollback(); //error\n } catch (HibernateException he) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n\n }", "int insertSelective(UserPasswordDO record);", "public void createAccount(Account account) \n\t\t\tthrows SQLException, RegisterAccountDBException {\n\t\t\n\t\tString msg =\"Could not create account\";\n\t\tint updateRows=0;\n\t\t\n\t\ttry {\n\t\t\t//if(!accountExist(account.getPersonnr())) {\n\t\t\tif(getStudentInfo(account.getPersonnr())==null) {\n\t\t\tString personnr = account.getPersonnr();\n\t\t\tcreateAccountStmt.setString(1, personnr);\n\t\t updateRows = createAccountStmt.executeUpdate();\n\t\t if(updateRows!=1) {\n\t\t \thandleException(msg, null);\n\t\t }\n\t\t\tconnection.commit();\n\t\t }\n\t\t}catch (SQLException ex) {\n\t\t\thandleException(msg , ex);\t\n\t\t}\n\t}", "int insert(AdminUser record);", "int insert(AdminUser record);", "void go() {\n\t\tthis.conn = super.getConnection();\n\t\tcreateCustomersTable();\n\t\tcreateBankersTable();\n\t\tcreateCheckingAccountsTable();\n\t\tcreateSavingsAccountsTable();\n\t\tcreateCDAccountsTable();\n\t\tcreateTransactionsTable();\n\t\tcreateStocksTable();\n\t\tif(createAdminBanker) addAdminBanker();\n\t\tSystem.out.println(\"Database Created\");\n\n\t}", "@Override\n public void logDeposit(UUID userUUID, double amount) {\n }", "int insert(Privilege record);", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,TarjetaCredito tarjetacredito,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(tarjetacredito.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(tarjetacredito.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!tarjetacredito.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(tarjetacredito.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "int insertSelective(SysRoleUser record);", "int insert(UserPasswordDO record);", "int insert(User_Role record);", "public int subsAccount(NguoiNhap nn) throws SQLException {\r\n System.out.println(nn.getUsername() + nn.getPassword() + nn.getName() + nn.getGender() + nn.getBirthday());\r\n return this.connectionAdminToAccessData(\r\n \"INSERT INTO USER() VALUES('\"\r\n + nn.getUsername() + \"','\"\r\n + nn.getPassword() + \"','\"\r\n + nn.getName() + \"','\"\r\n + nn.getGender() + \"','\"\r\n + nn.getBirthday() + \"')\");\r\n }", "@Override\r\n\tpublic int createProfileDAO() {\n\t\treturn 1;\r\n\t}", "public void clkcreateAccountBtn() {\n\t\tcreateAccountBtn.click();\n\t\tExtentTestManager.getTest().log(LogStatus.INFO, \"Click on 'Create an account' button\");\n\t}", "int createAccount(Account account);", "private void createAccount(User user) throws IOException {\n File accounts = new File(\"accounts.txt\");\n if (!accounts.exists()) {\n accounts.createNewFile();\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(accounts, true);\n BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream));\n\n bufferedWriter.write(user.getUserName() + \":\" + user.getUserPass());\n bufferedWriter.newLine();\n bufferedWriter.flush();\n }", "public void createTable() {\r\n\t\tclient.createTable();\r\n\t}", "@Override\n\tpublic int addAccount(AccountUser au) {\n\t\tau.setName(au.getUsername());\n\t\tau.setStatus(1);\n\t\tau.setPwd(\"666666\");\n\t\tau.setSalt(CommTool.getSalt());\n\t\tau.setPwd(PasswordUtil.generate(au.getPwd(), au.getSalt()));\n\t\treturn auMapper.addAccount(au);\n\t}", "@Override\n public void onClick(View v) {\n CreateAccount();\n }", "public void addAccount() {\n\t\t\n\t\ttry {\n\t\t\tlog.log(Level.INFO, \"Please enter name\");\n String custName = scan.next();\n validate.checkName(custName);\n \t\tlog.log(Level.INFO, \"Select Account Type: \\n 1 for Savings \\n 2 for Current \\n 3 for FD \\n 4 for DEMAT\");\n\t\t\tint bankAccType = Integer.parseInt(scan.next());\n\t\t\tvalidate.checkAccType(bankAccType);\n\t\t\tlog.log(Level.INFO, \"Please Enter your Aadar Card Number\");\n\t\t\tString aadarNumber = scan.next();\n\t\t\tlog.log(Level.INFO, \"Please Enter Phone Number: \");\n\t\t\tString custMobileNo = scan.next();\n\t\t\tvalidate.checkPhoneNum(custMobileNo);\n\t\t\tlog.log(Level.INFO, \"Please Enter Customer Email Id: \");\n\t\t\tString custEmail = scan.next();\n\t\t\tvalidate.checkEmail(custEmail);\n\t\t\tbankop.add(accountNumber, custName, bankAccType, custMobileNo, custEmail, aadarNumber);\n\t\t\taccountNumber();\n\t\t\n\t\t} catch (AccountDetailsException message) {\n\t\t\tlog.log(Level.INFO, message.getMessage()); \n }\n\n\t}", "@Test\n\tpublic void createAccTest() {\n\t\tCustomer cus = new Customer(\"wgl\", myDate, \"Beijing\");\n\t\tbc.createAccount(cus, 1);\n\t\tassertEquals(1, cus.getAccList().size());\n\t}", "public LoginOra() {\n super(\"Oracle Login\");\n\n }", "@Override\r\n\tpublic Admin savelog(Admin log) {\n\t\treturn user.savelog(log);\r\n\t}", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "private void CreateNewAccount(final String phone, final String password, final String name) {\n if (TextUtils.isEmpty(phone)){\n Toast.makeText(this,\"Please enter your phone number ...\",Toast.LENGTH_SHORT).show();\n }\n else if(TextUtils.isEmpty(password)){\n Toast.makeText(this,\"Please enter your phone password ...\",Toast.LENGTH_SHORT).show();\n }\n else if(TextUtils.isEmpty(name)){\n Toast.makeText(this,\"Please enter your phone name ...\",Toast.LENGTH_SHORT).show();\n }\n else{\n //start creating account\n LoadingBar.show();\n\n final DatabaseReference mRef;\n mRef = FirebaseDatabase.getInstance().getReference();\n mRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n if (!(snapshot.child(\"Users\").child(phone).exists())){\n //if user not exist then we create account in database\n HashMap<String,Object> userdata = new HashMap<>();\n userdata.put(\"phone\",phone);\n userdata.put(\"password\",password);\n userdata.put(\"name\",name);\n mRef.child(\"Users\").child(phone).updateChildren(userdata)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n LoadingBar.dismiss();\n Toast.makeText(RegisterActivity.this,\"Registration Successful\",Toast.LENGTH_SHORT).show();\n }\n else{\n LoadingBar.dismiss();\n Toast.makeText(RegisterActivity.this,\"Please try again after sometime ....\",Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n else{\n LoadingBar.dismiss();\n Toast.makeText(RegisterActivity.this,\"User with this number already exist ....\",Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n\n }\n }", "public void transaction() throws DBException {\n\t\tUsersTransaction transaction = new UsersTransaction();\n\t\tScanner scan = new Scanner(System.in);\n\t\tLogger.info(\"================TRANSACTION DETAILS TO DONATE======================\");\n\t\tLogger.info(\"Enter the transaction ID\");\n\t\ttransactionId = scan.nextInt();\n\t\tLogger.info(\"Enter the donor ID\");\n\t\tdonorId = scan.nextInt();\n\t\tLogger.info(\"Enter the fund Id\");\n\t\tfundRequestId = scan.nextInt();\n\t\tLogger.info(\"Enter the amount to be funded\");\n\t\ttargetAmount = scan.nextInt();\n\t\ttransaction.setTransactionId(transactionId);\n\t\ttransaction.setDonorId(donorId);\n\t\ttransaction.setFundRequestId(fundRequestId);\n\t\ttransaction.setTargetAmount(targetAmount);\n\t\tinsert(transaction);\n\t\tdonorFundRequest(reqType);\n\t}", "private void logOperation(String operation, String function) {\r\n m_logger.debug(\"ObjectPool2 '\" + m_desc + \"' \" + operation + \" \" + function);\r\n }", "@Override\r\n\t\t\tpublic void onSwitchAccount() {\n\t\t\t\tshowToast(\"onSwitchAccount---\");\r\n\t\t\t}", "private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }", "void createUser() throws SQLException {\n String name = regName.getText();\n String birthdate = regAge.getText();\n String username = regUserName.getText();\n String password = regPassword.getText();\n String query = \" insert into users (name, birthdate, username, password)\"\n + \" values (?, ?, ?, ?)\";\n\n DB.registerUser(name, birthdate, username, password, query);\n }", "public void migrateLogsFromRcToDb();", "@Test(groups ={Slingshot,Regression})\n\tpublic void allAcctsStdUserCreation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether the user can successfully enter details in Add new user page and registers it\"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUserCreation();\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewStdUser(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTable(userProfile)\n\t\t.AdduserConfirmationPage()\n\t\t.confirmationPageVerificationLinks();\n\t}", "@Test\n\tvoid testCreateAccount() {\n\t\t\n\t\t// Data Object for unregister user\n\t\tUser user = new User(\"Create AccountExample\", \"CreateAccount\", \"CreateAccount@upr.edu\");\n\t\t\n\t\t// Prepare data\n\t\tUserDAO dao = new UserDAO();\n\t\tboolean exist = false;\n\t\t\n\t\ttry {\n\t\t\t// Creating User in DB\n\t\t\tdao.createAccount(user, \"CreateAccountPassword\");\n\t\t\t\n\t\t\t// Boolean confirming if exist\n\t\t\texist = !dao.availabilityUsername(user.getUsername());\n\t\t\t\n\t\t\t// Deleting account\n\t\t\tdao.deleteAccount(user.getUsername());\n\t\t\t\n\t\t} catch (ClassNotFoundException | UnsupportedEncodingException | SQLException | GeneralSecurityException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// Asserting that the create account works\n\t\tassertTrue(exist);\n\t}", "public ResultSet adduser(String firstname, String lastname, String username,\r\n\t\tString password, String address, String city, String eMail, Long phone,\r\n\t\tString security, String answer, String dob,\r\n\t\tLong pincode)throws SQLException {\n\tLong logid=null;\r\n\tint i=DbConnect.getStatement().executeUpdate(\"insert into login values(login_seq.nextval,'\"+username+\"'||username_seq.nextval,'\"+password+\"','not approved','user','\"+security+\"','\"+answer+\"') \");\r\n\tint j=DbConnect.getStatement().executeUpdate(\"insert into customer values(user_seq.nextval,'\"+firstname+\"','\"+lastname+\"','\"+city+\"','\"+eMail+\"',\"+phone+\",'\"+dob+\"',sysdate,\"+pincode+\",login_seq.nextval-1,'\"+address+\"')\");\r\n\tResultSet rss=DbConnect.getStatement().executeQuery(\"select login_seq.nextval-2 from dual\");\r\n\tif(rss.next())\r\n\t{\r\n\t\tlogid=rss.getLong(1);\r\n\t}\r\n\trs=DbConnect.getStatement().executeQuery(\"select username from login where login_id=\"+logid+\"\");\r\n\treturn rs;\r\n}", "int insertSelective(SysAuthentication record);", "protected void logEventCreation(final GossipEvent event) {\n logger.debug(CREATE_EVENT.getMarker(), \"Creating {}\", event::toString);\n }", "@Test\n\tpublic void testLoginStandardAccExist() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Session Started Standard\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\t\tassertTrue(\"unable to find that standard account\", testResult);\n\t}", "int insert(SysRole record);" ]
[ "0.61591005", "0.58144873", "0.5795855", "0.5656081", "0.56433636", "0.55987", "0.5500723", "0.5491125", "0.54723096", "0.54041904", "0.5401949", "0.53929645", "0.5350146", "0.53406787", "0.53106546", "0.53086025", "0.5304167", "0.5287316", "0.5265868", "0.5249864", "0.5237637", "0.5196803", "0.5173327", "0.5162008", "0.51280063", "0.5127136", "0.5126003", "0.51162994", "0.50773907", "0.50758195", "0.5059779", "0.50553447", "0.5050657", "0.50393015", "0.5028401", "0.5009635", "0.4985271", "0.49694514", "0.4968661", "0.4951066", "0.49501398", "0.493769", "0.49376538", "0.49309853", "0.49305156", "0.4930088", "0.49278352", "0.4925394", "0.4921088", "0.49205312", "0.49159265", "0.49133173", "0.49114656", "0.48982137", "0.48982137", "0.48971352", "0.48952708", "0.48925644", "0.48915717", "0.48887733", "0.48788065", "0.48780498", "0.48767048", "0.48748693", "0.48746967", "0.48746967", "0.4874294", "0.48726222", "0.48688215", "0.4862702", "0.48623574", "0.48586747", "0.48548758", "0.4844915", "0.48408335", "0.48406094", "0.4838904", "0.48371452", "0.48297203", "0.482869", "0.48286733", "0.4827286", "0.48235536", "0.48227543", "0.4822313", "0.48217526", "0.4821725", "0.48147324", "0.48130918", "0.48128155", "0.48121908", "0.48033392", "0.48014376", "0.47973645", "0.47843117", "0.47829434", "0.47811434", "0.47775394", "0.47758228", "0.47735834" ]
0.58948994
1
Log account creation in the operations table
public void logNewAccount(int op_id, int account_id, int current_balance){ try { PreparedStatement stmt = rawDataSource.getConnection().prepareStatement( "insert into OPERATIONS (OP_ID, OP_TYPE, FROM_ACCOUNT_ID, FROM_CURRENT_BALANCE, TIMESTAMP) " + "values (?,?,?,?,?)"); stmt.setInt(1, op_id); stmt.setInt(2, OP_TYPES.valueOf("CREATE").ordinal()+1); stmt.setInt(3, account_id); stmt.setInt(4, current_balance); stmt.setTimestamp(5, new Timestamp(System.currentTimeMillis())); stmt.execute(); stmt.close(); } catch (SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void create() {\n String salt = PasswordUtils.getSalt(30);\n\n // Protect user's password. The generated value can be stored in DB.\n String mySecurePassword = PasswordUtils.generateSecurePassword(password, salt);\n\n // Print out protected password\n System.out.println(\"My secure password = \" + mySecurePassword);\n System.out.println(\"Salt value = \" + salt);\n Operator op = new Operator();\n op.setUsername(username);\n op.setDescription(description);\n op.setSalt(salt);\n op.setPassword(mySecurePassword);\n op.setRol(rol);\n operatorService.create(op);\n message = \"Se creo al usuario \" + username;\n username = \"\";\n description = \"\";\n password = \"\";\n rol = null;\n }", "public boolean logNewAccount(int op_id, int account_id, int current_balance, Connection con){\n try {\n PreparedStatement stmt = con.prepareStatement(\n \"insert into OPERATIONS (OP_ID, OP_TYPE, FROM_ACCOUNT_ID, FROM_CURRENT_BALANCE, TIMESTAMP) \" +\n \"values (?,?,?,?,?)\");\n stmt.setInt(1, op_id);\n stmt.setInt(2, OP_TYPES.valueOf(\"CREATE\").ordinal()+1);\n stmt.setInt(3, account_id);\n stmt.setInt(4, current_balance);\n stmt.setTimestamp(5, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n } catch (SQLException e) {\n try {\n con.rollback();\n return false;\n } catch (SQLException e1) {\n e1.printStackTrace();\n return false;\n }\n }\n\n return true;\n }", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "private void createLoginTable() {\r\n jdbcExecutor.executeQuery(new Work() {\r\n @Override\r\n public void execute(Connection connection) throws SQLException {\r\n connection.createStatement().executeUpdate(\"CREATE TABLE login ( id numeric(19,0), user_id numeric(19,0), timestamp TIMESTAMP )\");\r\n }\r\n });\r\n }", "Account create();", "private void createCDAccountsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE cdAccounts \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY ( START WITH 3000000001, INCREMENT BY 1 ), \" + \"owner INT, \"\n\t\t\t\t\t+ \"term INT, \" + \"balance DOUBLE, \" + \"intRate DOUBLE, \"\n\t\t\t\t\t+ \"timeCreated BIGINT, \" + \"lastPaidInterest DOUBLE, \"\n\t\t\t\t\t+ \"dateOfLastPaidInterest BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table cdAccounts\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of cdAccounts table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "public void createAccountTable() throws SQLException {\r\n\t\tConnection connection = dbAdministration.getConnection();\r\n\t\t// Prüfung, ob Tabelle bereits besteht\r\n\t\tResultSet resultSet = connection.getMetaData().getTables(\"%\", \"%\", \"%\", new String[] { \"TABLE\" });\r\n\t\tboolean shouldCreateTable = true;\r\n\t\twhile (resultSet.next() && shouldCreateTable) {\r\n\t\t\tif (resultSet.getString(\"TABLE_NAME\").equalsIgnoreCase(\"ACCOUNT\")) {\r\n\t\t\t\tshouldCreateTable = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tresultSet.close();\r\n\r\n\t\tif (shouldCreateTable) {\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tString sql = \"CREATE table account (id int not null primary key, owner varchar(\"\r\n\t\t\t\t\t+ DatabaseAdministration.ownerLength + \") not null, number varchar(4) not null)\";\r\n\t\t\t// Tabelle wird erstellt\r\n\t\t\tstatement.execute(sql);\r\n\t\t\tstatement.close();\r\n\t\t\tlogger.info(\"SQL-Statement ausgeführt: \" + sql);\r\n\t\t\tlogger.info(\"Tabelle \\\"Account\\\" wurde erstellt.\");\r\n\t\t\tbankAccountExists = false;\r\n\t\t\t// Das Bank-Konto wird angelegt\r\n\t\t\taddAccount(\"0000\", \"BANK\", BigDecimal.ZERO);\r\n\t\t\tbankAccountExists = true;\r\n\t\t}\r\n\t\tconnection.close();\r\n\t}", "public void createUserAccount(UserAccount account);", "public void userCreated(UserCreateCommand command) {\n\t\t}", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "private void createCheckingAccountsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE checkingAccounts \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY ( START WITH 1000000001, INCREMENT BY 1 ), \" + \"owner INT, \"\n\t\t\t\t\t+ \"balance DOUBLE, \" + \"intRate DOUBLE, \"\n\t\t\t\t\t+ \"timeCreated BIGINT, \" + \"lastPaidInterest DOUBLE, \"\n\t\t\t\t\t+ \"dateOfLastPaidInterest BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table checkingAccounts\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of checkingAccounts table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "@Override\r\n\tpublic int addAccntDao(Account ac) {\n\t\treturn dao.accountCreation(ac);\r\n\t}", "private void logUser() {\n }", "@FXML\r\n void createAccount(MouseEvent event) throws SQLException {\r\n ta_employeeAccount.clear();\r\n account();\r\n\r\n }", "@Test\n\tpublic void testAdminCreate() {\n\t\tAccount acc1 = new Account(00000, \"ADMIN\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"ADMIN\", 00000, 0, \"A\"));\n\t\ttransactions.add(1, new Transaction(05, \"new acc\", 00001, 100.00, \"A\"));\n\t\ttransactions.add(2, new Transaction(00, \"ADMIN\", 00000, 0, \"A\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Account Created\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to create account as admin\", testResult);\n\t}", "@Override\n\tpublic void createAccount(Account p) {\n\t\t\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\t\n\t\t\tString deleteFromTable = \"DELETE FROM accounts WHERE owner_id='8'\";\n\t try (Connection conn = conUtil.getConnection();\n\t PreparedStatement pstmt = conn.prepareStatement(deleteFromTable)) {\n\n\t // set the corresponding param\n\t pstmt.setInt(1, p.getOwner_id());\n\t // execute the delete statement\n\t pstmt.executeUpdate();\n\n\t } catch (SQLException e) {\n\t System.out.println(e.getMessage());\n\t }\n\t\t\t\n\t\t\tString sql = \"insert into accounts( owner_id, balance ) values (?,?)\";\n\t\t\tCallableStatement cs = con.prepareCall(sql);\n\t\t\t\n\t\t\tcs.setInt(1, p.getOwner_id());\n\t\t\tcs.setDouble(2, p.getBalance());\n\t\t\t\n\t\t\tcs.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n public void insertAccount() throws Exception {\n\n }", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "@Override\npublic int addSysLog(EhrUser user, LogOperateType operation, Module module ,String operationInfo)\n\t\tthrows Exception {\n\tEhrSysLog log = new EhrSysLog();\n\tlog.setUserId(user.getUserId());\n\tlog.setUserName(user.getUserName());\n\tlog.setOperateType(operation.getValue());\n\tlog.setModule(module.getModuleName());\n\t\n\tif (user.getCompany() != null) {\n\t\tlog.setCompanyId(user.getCompany().getCompanyId());\n\t\tlog.setCompanyCode(user.getCompany().getCompanyCode());\n\t\tlog.setCompanyName(user.getCompany().getCompanyName());\n\t} else {\n\t\tEhrCompany company = companyMapper.selectByPrimaryKey(user.getCompanyId());\n\t\tlog.setCompanyId(company.getCompanyId());\n\t\tlog.setCompanyCode(company.getCompanyCode());\n\t\tlog.setCompanyName(company.getCompanyName());\n\t}\n\tlog.setOperateInfo(operationInfo);\n\tlog.setOperateDate(new Date());\n\treturn logMapper.insertSelective(log);\n\n}", "private void createNewAccount() {\n\n // if user has not provided valid data, do not create an account and return from method\n if (!validateData()) {\n return;\n }\n\n // If flag value is false, that means email provided by user doesn't exists in database\n // so initialize the loader to create a new account\n if (!mEmailExistsFlag) {\n getLoaderManager().initLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n } else {\n // If flag is true, that means email provided by user already exists in database\n // so restart the loader and allow user to enter new email address for account\n getLoaderManager().restartLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n }\n\n }", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "GenerateUserAccount () {\r\n }", "@Override\n public void onClick(View v) {\n CreateAccount();\n }", "public void clkcreateAccountBtn() {\n\t\tcreateAccountBtn.click();\n\t\tExtentTestManager.getTest().log(LogStatus.INFO, \"Click on 'Create an account' button\");\n\t}", "int insert(PlatformAdminRoleUser record);", "private void createTable() {\n try (Statement st = this.conn.createStatement()) {\n st.execute(\"CREATE TABLE IF NOT EXISTS users (user_id SERIAL PRIMARY KEY, name VARCHAR(100) NOT NULL, \"\n + \"login VARCHAR(100) UNIQUE NOT NULL, email VARCHAR(100) NOT NULL, createDate TIMESTAMP NOT NULL);\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void createSavingAccount(Account as) {\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\tString saving = \"insert into savings( owner_id, balance) values (?,?)\";\n\t\t\tCallableStatement chaccount = con.prepareCall(saving);\n\t\t\n\t\t\tchaccount.setInt(1,as.getOwner_id() );\n\t\t\tchaccount.setDouble(2, as.getBalance());\n\t\t\tchaccount.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"In CheckingDaoDB Exception\");\n\t\t\te.printStackTrace();\n\t\t}\n}", "private void createCustomersTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE customers \"\n\t\t\t\t\t+ \"(id INT GENERATED ALWAYS AS IDENTITY, \"\n\t\t\t\t\t+ \"name VARCHAR(40), \" + \"email VARCHAR(40), \"\n\t\t\t\t\t+ \"pass VARCHAR(40), \" + \"ssn VARCHAR(9), \"\n\t\t\t\t\t+ \"address VARCHAR(255), \" + \"hphone VARCHAR(10), \"\n\t\t\t\t\t+ \"cphone VARCHAR(10), \" + \"signuptime BIGINT, \"\n\t\t\t\t\t+ \"chkacct BIGINT, \" + \"savacct BIGINT, \" + \"cdacct BIGINT, \"\n\t\t\t\t\t+ \"hasStock VARCHAR(6))\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table users\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of user table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "public void insertUser() {}", "public static void insertOper(SysUserOperLog obj) throws Exception {\n\t\tMDbUtils.insert(CbDao.sys, obj);\n\t}", "UserLogin recordLogin(UserLogin login);", "int createAccount(Account account);", "BankAccount(){\n\t\tSystem.out.println(\"NEW ACCOUNT CREATED\");\t\n\t}", "public void createAdmin()\r\n\t{\r\n\t\tSystem.out.println(\"Administrator account not exist, please create the administrator account by setting up a password for it.\");\r\n\t\tString password=\"\",repassword=\"\";\r\n\t\tboolean flag=false;\r\n\t\twhile(!flag)\r\n\t\t{\r\n\t\t\tboolean validpassword=false;\r\n\t\t\twhile(!validpassword)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter the password: \");\r\n\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\tif(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"Please re-enter the password: \");\r\n\t\t\trepassword=sc.nextLine();\r\n\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\tif(!flag)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString hash_password=hashfunction(password); \r\n\t\tString last_login=java.time.LocalDate.now().toString();\r\n\t\tuser_records.add(new User(\"administrator\",hash_password,\"administrator\",\"\",0,0,last_login,false));\r\n\t\tSystem.out.println(\"Administrator account created successfully!\");\r\n\t}", "public void create() throws DuplicateException, InvalidUserDataException, \n NoSuchAlgorithmException, SQLException {\n\tUserDA.create(this);\n }", "public void makeNewUser(String name, int age, String address, String password)\n throws SQLException, ConnectionFailedException, DatabaseInsertException {\n if (this.currentUserAuthenticated) {\n // find the role ID that corresponds to customer\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n int roleId = map.roleIds.get(Roles.CUSTOMER);\n int userId = DatabaseInsertHelper.insertNewUser(name, age, address, roleId, password);\n System.out.println(\"User ID - \" + userId);\n System.out.println(\"succesfully made user\");\n } else {\n System.out.println(\"failed making user\");\n throw new ConnectionFailedException();\n }\n }", "public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','pit@gmail.com',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','pit234@gmail.com',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }", "public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }", "private void createSavingsAccountsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE savingsAccounts \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY ( START WITH 2000000001, INCREMENT BY 1), \" + \"owner INT, \"\n\t\t\t\t\t+ \"balance DOUBLE, \" + \"intRate DOUBLE, \"\n\t\t\t\t\t+ \"timeCreated BIGINT, \" + \"lastPaidInterest DOUBLE, \"\n\t\t\t\t\t+ \"dateOfLastPaidInterest BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table SavingsAccounts\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of SavingsAccounts table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "@Override\n\tpublic void addTransactionToDatabase(Transaction trans) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString insertQuery = \"insert into transaction_history values(default, ?, ?, ?, now())\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(insertQuery);\n \n\t\t\tprepStmt.setInt(1, trans.getAccountId());\n\t\t\tprepStmt.setString(2, trans.getUsername());\n\t\t\tprepStmt.setDouble(3, trans.getAmount());\n\t\t\tprepStmt.executeUpdate();\n\t}", "OperacionColeccion createOperacionColeccion();", "private void initial(){\n storeAccount(\"201799990001030047\");\n }", "public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}", "void go() {\n\t\tthis.conn = super.getConnection();\n\t\tcreateCustomersTable();\n\t\tcreateBankersTable();\n\t\tcreateCheckingAccountsTable();\n\t\tcreateSavingsAccountsTable();\n\t\tcreateCDAccountsTable();\n\t\tcreateTransactionsTable();\n\t\tcreateStocksTable();\n\t\tif(createAdminBanker) addAdminBanker();\n\t\tSystem.out.println(\"Database Created\");\n\n\t}", "public void buildAccountStatus() {\n try (PreparedStatement prep = Database.getConnection()\n .prepareStatement(\"CREATE TABLE IF NOT EXISTS account_status (user_id\"\n + \" TEXT UNIQUE, status INT, FOREIGN KEY (user_id) REFERENCES users\"\n + \"(id)\" + \" ON DELETE CASCADE ON UPDATE CASCADE);\")) {\n prep.executeUpdate();\n } catch (final SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void run() {\n try {\n stringOrganizationIds.remove(defaultOrg);\n List<Integer> organizationIds = FluentIterable.from(stringOrganizationIds)\n .transform(Ints.stringConverter()).toList();\n\n newUser.setActive(false);\n UserProfileStruct savedUser = createAccountInternal(conn, newUser, password, resetQuestion,\n resetAnswer, givenName, surname, organizationId);\n for (Integer orgId : organizationIds) {\n Profile profile = new Profile();\n profile.setGivenName(givenName);\n profile.setSurname(surname);\n profile.setOrganizationId(orgId);\n profile.setUserId(savedUser.credentialedUser.getId());\n profile = profilePersister.createProfile(profile, conn);\n\n authService.grantAtLeast(profile.getId(), ROLE_READER, orgId);\n authService.grantAtLeast(orgId, ROLE_ADMIN, profile.getId());\n }\n\n User user = savedUser.credentialedUser.getUser();\n user.setActive(true);\n persistenceService.process(conn, new UserPersister.UpdateUserFunc(user));\n conn.commit();\n } catch (Exception e) {\n closeConnection(conn);\n }\n }", "@Test\n\tpublic void createAccTest() {\n\t\tCustomer cus = new Customer(\"wgl\", myDate, \"Beijing\");\n\t\tbc.createAccount(cus, 1);\n\t\tassertEquals(1, cus.getAccList().size());\n\t}", "public void AddToAccountInfo();", "Operacion createOperacion();", "@Override\r\n\tpublic boolean createAccount(Account account) {\n\t\treturn dao.createAccount(account);\r\n\t}", "public void run() {\n int id = getIdentity();\n iUser user = createUser(id);\n boolean userCreated = (user != null);\n if (userCreated) {\n presenter.printAccountCreated();\n } else {\n presenter.printRequestDeclined();\n }\n }", "public static void createTable() throws SQLException\n {\n Statement statement = ConnectionManager.getConnection()\n .createStatement();\n\n statement.executeUpdate(\"DROP TABLE IF EXISTS Account\");\n statement\n .executeUpdate(\"CREATE TABLE Account(accountId INTEGER PRIMARY KEY AUTOINCREMENT, name, address, manager)\");\n\n statement.close();\n\n insertAccount(new Account(0, \"Administrator\", \"\", true));\n\n PreparedStatement ps = ConnectionManager\n .getConnection()\n .prepareStatement(\n \"UPDATE sqlite_sequence SET seq = ? WHERE name = 'Account'\");\n ps.setInt(1, Account.LOW_ACCOUNT_ID - 1);\n ps.executeUpdate();\n ps.close();\n }", "private TicketLog createLog() throws SQLException {\n\t\t\t\t\treturn new TicketLog(rs.getLong(1), rs.getString(2),\n\t\t\t\t\t\t\trs.getLong(3),\n\t\t\t\t\t\t\tTicketLog.Action.valueOf(rs.getString(4)),\n\t\t\t\t\t\t\trs.getInt(5));\n\t\t\t\t}", "Registration registration(long idUser, long idTrail);", "@Override\n public void createOnlineAccount(String name, \n String ssn, String id, String psw)\n {\n final String url = \n \"jdbc:mysql://mis-sql.uhcl.edu/<username>?useSSL=false\";\n \n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n \n try\n {\n \n //connect to the databse\n connection = DriverManager.getConnection(url, \n db_id, db_password);\n connection.setAutoCommit(false);\n //crate the statement\n statement = connection.createStatement();\n \n //do a query\n resultSet = statement.executeQuery(\"Select * from onlineAccount \"\n + \"where id = '\" + id + \"' or ssn = '\"\n + ssn + \"'\");\n \n if(resultSet.next())\n {\n //either the ssn is used or the id is used\n System.out.println(\"Account creation failed\");\n }\n else\n {\n //insert a record into onlineAccount\n int r = statement.executeUpdate(\"insert into onlineAccount values\"\n + \"('\" + name + \"', '\" + id + \"', '\" + ssn + \"', '\"\n + psw +\"')\");\n System.out.println(\"Account creation successful!\");\n System.out.println();\n }\n connection.commit();\n connection.setAutoCommit(true);\n \n }\n catch (SQLException e)\n {\n System.out.println(\"Something wrong during the creation process!\");\n e.printStackTrace();\n }\n finally\n {\n //close the database\n try\n {\n resultSet.close();\n statement.close();\n connection.close();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n }", "UserAccount createUserAccount(User user, double amount);", "int insert(SysAuthentication record);", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "int insert(SysRoleUser record);", "@Override\r\n\tpublic boolean createAccount(Account account) throws Exception {\n\t\tboolean flag = false;\r\n\t\ttry {\r\n\t\t\tflag = this.dao.createAccount(account);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "Account() { }", "public abstract void createAccount(final GDataAccount account)\n throws ServiceException;", "int insertSelective(PlatformAdminRoleUser record);", "int insert(Privilege record);", "int insert(Account record);", "int insert(Account record);", "public void createNewTable() throws WoodsException{\n\t\t\tuserTable = new Table(tableName);\n\t\t\tDatabase.get().storeTable(tableName, userTable);\n\t\t}", "public void account() throws SQLException {\r\n String name = tf_firstAndLastName.getText();\r\n String password = tf_employeePass.getText();\r\n if ((!name.equals(\"\")) && (!password.equals(\"\"))) {\r\n myEmployee = new Employee(name, password);\r\n if ((!myEmployee.getUsername().equals(\"\")) && (!myEmployee.getPassword().equals(\"\"))) {\r\n String employeeCode = JOptionPane.showInputDialog(\"Input Employee Code\");\r\n if (employeeCode.equals(\"AS123\")) {\r\n String productQuery = \"INSERT INTO EMPLOYEE(NAME, USERNAME, PASSWORD, EMAIL) VALUES (?,?,?,?)\";\r\n PreparedStatement addEmployee = Login_Controller.conn.prepareStatement(productQuery);\r\n\r\n addEmployee.setString(1, name);\r\n addEmployee.setString(2, myEmployee.getUsername());\r\n addEmployee.setString(3, password);\r\n addEmployee.setString(4, myEmployee.getEmail());\r\n addEmployee.executeUpdate();\r\n addEmployee.close();\r\n\r\n tf_firstAndLastName.clear();\r\n tf_employeePass.clear();\r\n ta_employeeAccount.appendText(myEmployee.toString() + \"\\n\\n\");\r\n\r\n } else {\r\n JOptionPane.showMessageDialog(null, \"Invalid employee code. \" +\r\n \"\\nNote: Only employees need to create accounts and log in\");\r\n }\r\n } else {\r\n JFrame frame = new JFrame(\"\");\r\n JOptionPane.showMessageDialog(\r\n frame.getContentPane(),\r\n \"Username or password has invalid format.\\n\",\r\n \"Invalid Format\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n } else {\r\n JOptionPane.showMessageDialog(null, \"Name or password is empty.\");\r\n }\r\n\r\n }", "@Override\n\tpublic void addToUserAccountTable(int accountId,String username) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString insertQuery = \"insert into user_account values(?, ?)\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(insertQuery);\n \n\t\t\tprepStmt.setString(1, username);\n\t\t\tprepStmt.setInt(2, accountId);\n\t\t\tprepStmt.executeUpdate();\n\t}", "public void createTable() {\r\n\t\tclient.createTable();\r\n\t}", "int insert(AdminUser record);", "int insert(AdminUser record);", "public void createUser() {\n try {\n conn = dao.getConnection();\n\n ps = conn.prepareStatement(\"INSERT INTO Users(username, password) VALUES(?, ?)\");\n ps.setString(1, this.username);\n ps.setString(2, this.password);\n\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void addCustomer() {\n\t\tSystem.out.println(\"Enter your first name.\");\n\t\tString fn = scan.nextLine();\n\t\tSystem.out.println(\"Enter your last name.\");\n\t\tString ln = scan.nextLine();\n\t\tSystem.out.println(\"Enter your username.\");\n\t\tString user = scan.nextLine();\n\t\tSystem.out.println(\"Enter your password.\");\n\t\tString pw = scan.nextLine();\n\t\tSystem.out.println(\"Password once more (to be safe.)\");\n\t\tString pw2 = scan.nextLine();\n\t\t/*if (pw.toString() != pw2.toString()) {\n\t\t\tSystem.out.println(\"Whoops! Let's try that again.\");\n\t\t\taddCustomer();\n\t\t}\n\t\t*/\n\t\t//else {\n String sql = \"INSERT INTO bank.login (first_name, last_name, user_name, password) VALUES (\"+\"\\\"\"+fn+\"\\\"\"+\", \"+\"\\\"\"+ln+\"\\\"\"+\", \"\n\t\t+\"\\\"\"+user+\"\\\"\"+\", \"+\"\\\"\"+pw+\"\\\"\"+\")\";\n\n try{\n \t\n \tconnect.databaseUtil();\n Statement statement = Database.connection.createStatement();\n // ResultSet resultSet =\n \t\tstatement.executeUpdate(sql);\n try {\n \t\t\tconnect.databaseClose();\n \t\t} catch (SQLException e) {\n \t\t\t\n \t\t\te.printStackTrace();\n \t\t}\n\n bank.start();\n }\n \n\n catch(SQLException e){\n \t\te.printStackTrace();\n Menus.custMenu();\n\n }\n\n \n\t\t\n\t}", "@Override\n\tpublic void createTable() {\n\t\tSystem.out.println(\"++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\ttry {\n\t\t\tTableUtils.createTable(connectionSource, UserEntity.class);\n\t\t\tTableUtils.createTable(connectionSource, Downloads.class);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\");\n\t\t}\n\t}", "int insert(User_Role record);", "void createUser() throws SQLException {\n String name = regName.getText();\n String birthdate = regAge.getText();\n String username = regUserName.getText();\n String password = regPassword.getText();\n String query = \" insert into users (name, birthdate, username, password)\"\n + \" values (?, ?, ?, ?)\";\n\n DB.registerUser(name, birthdate, username, password, query);\n }", "public int createAccount(User user) throws ExistingUserException,\n UnsetPasswordException;", "private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n startActivity(new Intent(this, DashboardActivity.class));\n } else {\n makeToast(result);\n formContainer.setAlpha(1f);\n progressContainer.setVisibility(View.GONE);\n progressContainer.setOnClickListener(null);\n }\n });\n }", "@Override\n\tpublic Employee create(Employee emp) {\n\t\tlog.debug(\"Welcome to logging\");\n\t\tSystem.out.println(\"Server logs \");\n\t\temployeeDAO.create(emp);\n\t\treturn null;\n\t}", "int insert(TmpUserPayAccount record);", "int insert(SysRoleFunction record);", "String addAccount(UserInfo userInfo);", "private void createAccount(User user) throws IOException {\n File accounts = new File(\"accounts.txt\");\n if (!accounts.exists()) {\n accounts.createNewFile();\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(accounts, true);\n BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream));\n\n bufferedWriter.write(user.getUserName() + \":\" + user.getUserPass());\n bufferedWriter.newLine();\n bufferedWriter.flush();\n }", "private void addAccount(Account account)\n\t {\n\t\t if(accountExists(account)) return;\n\t\t \n\t\t ContentValues values = new ContentValues();\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_USERNAME, account.getUsername());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_BALANCE, account.getBalance());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_AUTH_TOKEN, account.getAuthenticationToken());\n\t\t \n\t\t db.insert(DatabaseContract.AccountContract.TABLE_NAME,\n\t\t\t\t null,\n\t\t\t\t values);\n\t\t \n\t }", "int insert(SysUser record);", "int insert(SysUser record);", "int insert(LoginRecordDO record);", "public void insertUserTable(String username, String password) throws SQLException {\n\n\t\tSQLInsert insertStatement = new SQLInsert();\n\t\tinsertStatement.insertUserTable(username, password);\n\t\tcurrentUser = username;\n\n\t}", "public void createAccount(Account account) \n\t\t\tthrows SQLException, RegisterAccountDBException {\n\t\t\n\t\tString msg =\"Could not create account\";\n\t\tint updateRows=0;\n\t\t\n\t\ttry {\n\t\t\t//if(!accountExist(account.getPersonnr())) {\n\t\t\tif(getStudentInfo(account.getPersonnr())==null) {\n\t\t\tString personnr = account.getPersonnr();\n\t\t\tcreateAccountStmt.setString(1, personnr);\n\t\t updateRows = createAccountStmt.executeUpdate();\n\t\t if(updateRows!=1) {\n\t\t \thandleException(msg, null);\n\t\t }\n\t\t\tconnection.commit();\n\t\t }\n\t\t}catch (SQLException ex) {\n\t\t\thandleException(msg , ex);\t\n\t\t}\n\t}", "public void addAccount() {\n\t\t\n\t\ttry {\n\t\t\tlog.log(Level.INFO, \"Please enter name\");\n String custName = scan.next();\n validate.checkName(custName);\n \t\tlog.log(Level.INFO, \"Select Account Type: \\n 1 for Savings \\n 2 for Current \\n 3 for FD \\n 4 for DEMAT\");\n\t\t\tint bankAccType = Integer.parseInt(scan.next());\n\t\t\tvalidate.checkAccType(bankAccType);\n\t\t\tlog.log(Level.INFO, \"Please Enter your Aadar Card Number\");\n\t\t\tString aadarNumber = scan.next();\n\t\t\tlog.log(Level.INFO, \"Please Enter Phone Number: \");\n\t\t\tString custMobileNo = scan.next();\n\t\t\tvalidate.checkPhoneNum(custMobileNo);\n\t\t\tlog.log(Level.INFO, \"Please Enter Customer Email Id: \");\n\t\t\tString custEmail = scan.next();\n\t\t\tvalidate.checkEmail(custEmail);\n\t\t\tbankop.add(accountNumber, custName, bankAccType, custMobileNo, custEmail, aadarNumber);\n\t\t\taccountNumber();\n\t\t\n\t\t} catch (AccountDetailsException message) {\n\t\t\tlog.log(Level.INFO, message.getMessage()); \n }\n\n\t}", "public void logincredentials() {\n\t\tutil.entertext(prop.getValue(\"locators.text.uname\"), \"admin\");\n\t\tutil.entertext(prop.getValue(\"locators.text.password\"), \"Admin123\");\n\t\tutil.ClickElement(prop.getValue(\"locators.button.regdesk\"));\n\t\tutil.ClickElement(prop.getValue(\"locators.button.login\"));\n\t\tlogreport.info(\"logged into the application\");\n\n\t}", "public void switchToCreateAccount() {\r\n\t\tlayout.show(this, \"createPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "public void createAccount(String username, String password) {\n\t\tString send;\n\t\tsend = \"<NewAccount=\" + username + \",\" + password + \">\";\n\n\t\ttry {\n\t\t\tdos.writeUTF(send);\n\t\t} catch (Exception e) {\n\t\t\t//TODO\n\t\t}\n\t}", "public account() {\n initComponents();\n autoID();\n branch();\n }", "public void create_loginFile(String account){\n try {\n outputStreamWriter = new OutputStreamWriter(context.openFileOutput(Constant.LOGIN_FILE, Context.MODE_PRIVATE));\n outputStreamWriter.write(account+\" logged in,\");\n outputStreamWriter.close();\n }\n catch (Exception e){\n Message.logMessages(\"ERROR: \",e.toString());\n }\n }", "public void actionPerformed(ActionEvent e) \n {\n\t\t\t\tWrapper conn = null;\n\t\t\t\ttry //try block\n {\n //declare variables\n\t\t\t\tString username = \"\";\n\t\t\t\tString password = \"\";\n\t\t\t\t\n\t\t\t\t//get values using getText() method\n\t\t\t\tusername = txtUser.getText().trim();\n\t\t\t\tpassword = txtPassword.getText().trim();\n\t\t\t\t\n // check condition it field equals to blank throw error message\n\t\t\t\tif (username.equals(\"\")|| password.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\" name or password or Role is wrong\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t\telse //else insert query is run properly\n {\n\t\t\t\t\tString IQuery = \"INSERT INTO `demo`.`loginaccount`(`username`,`password`,`ts`) VALUES('\"+username+\"', '\"+password+\"',current_timestamp)\";\n\t\t\t\t\tSystem.out.println(IQuery);//print on console\n\t\t\t\t\tSystem.out.println(\"Connecting to a selected database...\");\n\t\t\t\t\n\t\t\t\t//STEP 3: Open a connection\n\t\t\t\tconn = DriverManager.getConnection(DB_URL, USER, PASS);\n\t\t\t\t\tSystem.out.println(\"Connected database successfully...\");\n\t\t\t\t\t \n\t\t\t\t((Connection)conn).createStatement().execute(IQuery);//select the rows\n\t\t\t\t\t// define SMessage variable\n\t\t\t\t\tString SMessage = \"Record added for \"+username;\n\t\t\t\t\t\n // create dialog ox which is print message\n\t JOptionPane.showMessageDialog(null,SMessage,\"Message\",JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\t//close connection\n\t\t\t\t\t((java.sql.Connection)conn).close();\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tcatch (SQLException se) \n\t\t\t{\n\t\t\t\t//handle errors for JDBC\n\t\t\t\tse.printStackTrace();\n\t\t\t}\n\t\t\tcatch (Exception a) //catch block\n\t\t\t{\n\t\t\t\ta.printStackTrace();\n\t\t\t}\n\t\t }", "@Override\n\tpublic void insertUserAndShopData() {\n\t\t\n\t}", "int insert(ShopAccount record);" ]
[ "0.6318144", "0.63178897", "0.62839377", "0.62578535", "0.59769934", "0.5949582", "0.593044", "0.58919877", "0.5852407", "0.58402634", "0.5833295", "0.5825775", "0.57497275", "0.57003665", "0.56537014", "0.56162196", "0.5571479", "0.5570771", "0.5550633", "0.55469376", "0.5527983", "0.55205816", "0.5511022", "0.5497164", "0.54922223", "0.54666847", "0.54535145", "0.5450331", "0.5441745", "0.5434232", "0.5418706", "0.5402204", "0.53876656", "0.53702796", "0.5342621", "0.53281814", "0.53237826", "0.53194106", "0.5318045", "0.5310289", "0.5308757", "0.5304786", "0.53005445", "0.5291552", "0.5288075", "0.5274234", "0.5273268", "0.5253447", "0.5253055", "0.5252702", "0.5245979", "0.5243904", "0.52308846", "0.52281404", "0.5210812", "0.5210577", "0.52062947", "0.52061707", "0.52050936", "0.5189644", "0.51858175", "0.51785207", "0.5175291", "0.51712203", "0.5166832", "0.51632524", "0.51632524", "0.515983", "0.5156106", "0.51548237", "0.51525146", "0.51491505", "0.51491505", "0.51485246", "0.5145665", "0.5142433", "0.5138604", "0.5137892", "0.513788", "0.51346076", "0.51297474", "0.5128335", "0.5128277", "0.51188123", "0.51171285", "0.511584", "0.51151013", "0.51151013", "0.511482", "0.510833", "0.5108264", "0.51078266", "0.50993323", "0.50957334", "0.50931185", "0.508484", "0.5079949", "0.5073888", "0.5070567", "0.5070222" ]
0.6692133
0
Make new account in recovery execution mode(logs de creation with given id accounts table)
public boolean recoverAccount(int account_id, int balance, Connection con){ try { executeNewAccount(account_id, balance, con); } catch (SQLException e) { try { con.rollback(); return false; } catch (SQLException e1) { e1.printStackTrace(); return false; } } cache.add(new Account(account_id, balance)); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "public int makeNewAccount(int balance){\n int generated_id = 0;\n\n try {\n accountLock.lock();\n executeNewAccount(generated_id = currentAccountId++, balance, rawDataSource.getConnection());\n accountLock.unlock();\n\n cache.add(new Account(generated_id, balance));\n\n operationLock.lock();\n logNewAccount(currentOperationId, generated_id, balance);\n currentOperationId++;\n operationLock.unlock();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return generated_id;\n }", "Account create();", "int createAccount(Account account);", "@Override\n\tpublic void createSavingAccount(Account as) {\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\tString saving = \"insert into savings( owner_id, balance) values (?,?)\";\n\t\t\tCallableStatement chaccount = con.prepareCall(saving);\n\t\t\n\t\t\tchaccount.setInt(1,as.getOwner_id() );\n\t\t\tchaccount.setDouble(2, as.getBalance());\n\t\t\tchaccount.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"In CheckingDaoDB Exception\");\n\t\t\te.printStackTrace();\n\t\t}\n}", "public void logNewAccount(int op_id, int account_id, int current_balance){\n try {\n PreparedStatement stmt = rawDataSource.getConnection().prepareStatement(\n \"insert into OPERATIONS (OP_ID, OP_TYPE, FROM_ACCOUNT_ID, FROM_CURRENT_BALANCE, TIMESTAMP) \" +\n \"values (?,?,?,?,?)\");\n stmt.setInt(1, op_id);\n stmt.setInt(2, OP_TYPES.valueOf(\"CREATE\").ordinal()+1);\n stmt.setInt(3, account_id);\n stmt.setInt(4, current_balance);\n stmt.setTimestamp(5, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "private void createNewAccount() {\n\n // if user has not provided valid data, do not create an account and return from method\n if (!validateData()) {\n return;\n }\n\n // If flag value is false, that means email provided by user doesn't exists in database\n // so initialize the loader to create a new account\n if (!mEmailExistsFlag) {\n getLoaderManager().initLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n } else {\n // If flag is true, that means email provided by user already exists in database\n // so restart the loader and allow user to enter new email address for account\n getLoaderManager().restartLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n }\n\n }", "private void initial(){\n storeAccount(\"201799990001030047\");\n }", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "public void createUserAccount(UserAccount account);", "Registration registration(long idUser, long idTrail);", "@Override\n public void insertAccount() throws Exception {\n\n }", "@Override\n public void createOnlineAccount(String name, \n String ssn, String id, String psw)\n {\n final String url = \n \"jdbc:mysql://mis-sql.uhcl.edu/<username>?useSSL=false\";\n \n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n \n try\n {\n \n //connect to the databse\n connection = DriverManager.getConnection(url, \n db_id, db_password);\n connection.setAutoCommit(false);\n //crate the statement\n statement = connection.createStatement();\n \n //do a query\n resultSet = statement.executeQuery(\"Select * from onlineAccount \"\n + \"where id = '\" + id + \"' or ssn = '\"\n + ssn + \"'\");\n \n if(resultSet.next())\n {\n //either the ssn is used or the id is used\n System.out.println(\"Account creation failed\");\n }\n else\n {\n //insert a record into onlineAccount\n int r = statement.executeUpdate(\"insert into onlineAccount values\"\n + \"('\" + name + \"', '\" + id + \"', '\" + ssn + \"', '\"\n + psw +\"')\");\n System.out.println(\"Account creation successful!\");\n System.out.println();\n }\n connection.commit();\n connection.setAutoCommit(true);\n \n }\n catch (SQLException e)\n {\n System.out.println(\"Something wrong during the creation process!\");\n e.printStackTrace();\n }\n finally\n {\n //close the database\n try\n {\n resultSet.close();\n statement.close();\n connection.close();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n }", "public void createESEAccount(String farmerId, String farmerAcctNo, Date txnTime, int type);", "@Override\r\n\tpublic boolean create(Account newAccount) {\n\t\treturn daoref.create(newAccount);\r\n\t}", "public boolean createUser(Account account, Enrollee enrollee) throws DBException {\n boolean result = true;\n PreparedStatement statement = null;\n ResultSet resultSet;\n try {\n connection = DBManager.getConnection();\n connection.setAutoCommit(false);\n connection.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);\n\n statement = connection.prepareStatement(CREATE_ACCOUNT);\n statement.setString(1, account.getEmail());\n statement.setString(2, account.getPassword());\n statement.setInt(3, account.getRole_id().ordinal());\n statement.setBoolean(4, account.is_banned());\n statement.executeUpdate();\n\n statement = connection.prepareStatement(GET_ACCOUNT_ID_BY_EMAIL);\n statement.setString(1, account.getEmail());\n resultSet = statement.executeQuery();\n if (resultSet.next()) {\n account.setId(resultSet.getLong(Field.ID));\n }\n\n statement = connection.prepareStatement(CREATE_ENROLLEE);\n statement.setString(1, enrollee.getFirst_name());\n statement.setString(2, enrollee.getLast_name());\n statement.setString(3, enrollee.getPatronymic());\n statement.setInt(4, enrollee.getCertificate_score());\n statement.setLong(5, account.getId());\n statement.setLong(6, enrollee.getLevel_id());\n statement.executeUpdate();\n connection.commit();\n } catch (SQLException e) {\n DBManager.rollback(connection);\n LOG.error(e.getMessage(), e);\n throw new DBException(e.getMessage(), e);\n } finally {\n DBManager.closeStatement(statement);\n DBManager.closeConnection(connection);\n }\n return result;\n }", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "@Override\r\n\tpublic boolean createAccount(Account account) throws Exception {\n\t\tboolean flag = false;\r\n\t\ttry {\r\n\t\t\tflag = this.dao.createAccount(account);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "@Override\n public void run() {\n try {\n stringOrganizationIds.remove(defaultOrg);\n List<Integer> organizationIds = FluentIterable.from(stringOrganizationIds)\n .transform(Ints.stringConverter()).toList();\n\n newUser.setActive(false);\n UserProfileStruct savedUser = createAccountInternal(conn, newUser, password, resetQuestion,\n resetAnswer, givenName, surname, organizationId);\n for (Integer orgId : organizationIds) {\n Profile profile = new Profile();\n profile.setGivenName(givenName);\n profile.setSurname(surname);\n profile.setOrganizationId(orgId);\n profile.setUserId(savedUser.credentialedUser.getId());\n profile = profilePersister.createProfile(profile, conn);\n\n authService.grantAtLeast(profile.getId(), ROLE_READER, orgId);\n authService.grantAtLeast(orgId, ROLE_ADMIN, profile.getId());\n }\n\n User user = savedUser.credentialedUser.getUser();\n user.setActive(true);\n persistenceService.process(conn, new UserPersister.UpdateUserFunc(user));\n conn.commit();\n } catch (Exception e) {\n closeConnection(conn);\n }\n }", "public static void requestNewAccount(String uid){\n accountManager.requestNewAccount(uid);\n }", "@Override\r\n\tpublic boolean createAccount(Account account) {\n\t\treturn dao.createAccount(account);\r\n\t}", "@Override\n public void createNewAccount(String accountType) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.create_container, new CreateAccount().newInstance(accountType)).commit();\n }", "int insert(TmpUserPayAccount record);", "@Override\n\tpublic void createAccount(Account p) {\n\t\t\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\t\n\t\t\tString deleteFromTable = \"DELETE FROM accounts WHERE owner_id='8'\";\n\t try (Connection conn = conUtil.getConnection();\n\t PreparedStatement pstmt = conn.prepareStatement(deleteFromTable)) {\n\n\t // set the corresponding param\n\t pstmt.setInt(1, p.getOwner_id());\n\t // execute the delete statement\n\t pstmt.executeUpdate();\n\n\t } catch (SQLException e) {\n\t System.out.println(e.getMessage());\n\t }\n\t\t\t\n\t\t\tString sql = \"insert into accounts( owner_id, balance ) values (?,?)\";\n\t\t\tCallableStatement cs = con.prepareCall(sql);\n\t\t\t\n\t\t\tcs.setInt(1, p.getOwner_id());\n\t\t\tcs.setDouble(2, p.getBalance());\n\t\t\t\n\t\t\tcs.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void performRecovery();", "private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"driver@uclive.ac.nz\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }", "public long createTransaction(Credentials c, TransactionType tt) throws RelationException;", "public void createAccount(Account account) \n\t\t\tthrows SQLException, RegisterAccountDBException {\n\t\t\n\t\tString msg =\"Could not create account\";\n\t\tint updateRows=0;\n\t\t\n\t\ttry {\n\t\t\t//if(!accountExist(account.getPersonnr())) {\n\t\t\tif(getStudentInfo(account.getPersonnr())==null) {\n\t\t\tString personnr = account.getPersonnr();\n\t\t\tcreateAccountStmt.setString(1, personnr);\n\t\t updateRows = createAccountStmt.executeUpdate();\n\t\t if(updateRows!=1) {\n\t\t \thandleException(msg, null);\n\t\t }\n\t\t\tconnection.commit();\n\t\t }\n\t\t}catch (SQLException ex) {\n\t\t\thandleException(msg , ex);\t\n\t\t}\n\t}", "int insertSelective(FinanceAccount record);", "public void recreateAccount(int sin)\n\t{\n\t\tthis.name=name;\n\t\tthis.sin=sin;\n\t\tthis.balance=this.balance;\n\t}", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "int insert(Account record);", "int insert(Account record);", "Account create(Context context);", "public static int insert(Account new_emp)\n {\n String sql = \"SELECT COUNT(em_id) FROM Account\"; // tạo id mới cho employee cần thêm vào database\n try(Connection cn = new DBConnection().getCon();\n PreparedStatement st = cn.prepareStatement(sql);\n ResultSet rs = st.executeQuery();){\n \n if(rs.next()){\n int current_number_oftbEmployee = rs.getInt(1);\n \n sql = \"INSERT Account VALUES (?, ?, ?, ?, ?, ?, ?, ?)\";\n int result = 0;\n do{\n String newid = createid(\"AC\", String.valueOf(++current_number_oftbEmployee), 10);\n new_emp.setAccount_id(newid);\n\n\n\n try(PreparedStatement st2 = cn.prepareStatement(sql);){\n\n st2.setString(1, new_emp.getAccount_id());\n st2.setString(2, new_emp.getUsername());\n st2.setString(3, new_emp.getPassword());\n st2.setString(4, new_emp.getName());\n st2.setDate(5, new_emp.getBirth_day());\n st2.setString(6, new_emp.getAddress());\n st2.setString(7, new_emp.getEmail());\n st2.setString(8, new_emp.getPhone());\n\n result = st2.executeUpdate();\n }\n } while(result == 0);\n return result;\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n Logger.getLogger(AccountDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return 0;\n }", "public boolean logNewAccount(int op_id, int account_id, int current_balance, Connection con){\n try {\n PreparedStatement stmt = con.prepareStatement(\n \"insert into OPERATIONS (OP_ID, OP_TYPE, FROM_ACCOUNT_ID, FROM_CURRENT_BALANCE, TIMESTAMP) \" +\n \"values (?,?,?,?,?)\");\n stmt.setInt(1, op_id);\n stmt.setInt(2, OP_TYPES.valueOf(\"CREATE\").ordinal()+1);\n stmt.setInt(3, account_id);\n stmt.setInt(4, current_balance);\n stmt.setTimestamp(5, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n } catch (SQLException e) {\n try {\n con.rollback();\n return false;\n } catch (SQLException e1) {\n e1.printStackTrace();\n return false;\n }\n }\n\n return true;\n }", "private static void onAccountCreated(Account newAccount, Context context) {\n ScoreSyncAdapter.configurePeriodicSync(context);\n /*\n * Without calling setSyncAutomatically, our periodic sync will not be enabled.\n */\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n\n /*\n * Finally, let's do a sync to get things started\n */\n syncImmediately(context);\n }", "public ResultSet addbroker(String firstname, String lastname, String username,\r\n\t\tString password, String address, String gender, String eMail,\r\n\t\tNumber phone, String experience, String security, String answer, Long demat, Long bankacc, Double amt) throws SQLException {\n\tLong logid=null;\r\n\tint i=DbConnect.getStatement().executeUpdate(\"insert into login values(login_seq.nextval,'\"+username+\"'||username_seq.nextval,'\"+password+\"','not approved','broker','\"+security+\"','\"+answer+\"') \");\r\n\tint j=DbConnect.getStatement().executeUpdate(\"insert into broker values(broker_seq.nextval,'\"+firstname+\"','\"+lastname+\"','\"+address+\"','\"+gender+\"','\"+eMail+\"',\"+phone+\",'\"+experience+\"',login_seq.nextval-1,\"+demat+\",\"+bankacc+\")\");\r\n int k=DbConnect.getStatement().executeUpdate(\"insert into account values(\"+bankacc+\",\"+amt+\")\");\r\n\tResultSet rss=DbConnect.getStatement().executeQuery(\"select login_seq.nextval-2 from dual\");\r\n\tif(rss.next())\r\n\t{\r\n\t\tlogid=rss.getLong(1);\r\n\t}\r\n\trs=DbConnect.getStatement().executeQuery(\"select username from login where login_id=\"+logid+\"\");\r\n\treturn rs;\r\n\t\r\n}", "public void startAccountUpdater() {\n\t}", "@Override\r\n\tpublic int addAccntDao(Account ac) {\n\t\treturn dao.accountCreation(ac);\r\n\t}", "public boolean makeNewAccount(String name, BigDecimal balance, int type)\n throws SQLException, ConnectionFailedException, DatabaseInsertException {\n if (currentCustomerAuthenticated && currentUserAuthenticated) {\n int id = DatabaseInsertHelper.insertAccount(name, balance, type);\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n // find out what account type the account is and create and add that account to the customer\n if (type == map.accountTypes.get(AccountTypes.CHEQUING)) {\n ChequingAccount chequing = new ChequingAccountImpl(id, name, balance);\n currentCustomer.addAccount(chequing);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.SAVINGS)) {\n SavingsAccount savings = new SavingsAccountImpl(id, name, balance);\n currentCustomer.addAccount(savings);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.TFSA)) {\n TFSA tfsa = new TFSAImpl(id, name, balance);\n currentCustomer.addAccount(tfsa);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.RESTRICTEDSAVING)) {\n RestrictedSavingsAccount rsavings = new RestrictedSavingsAccountImpl(id, name, balance);\n currentCustomer.addAccount(rsavings);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n }\n return false;\n }\n System.out.println(\"reached here\");\n throw new ConnectionFailedException();\n }", "private void createCDAccountsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE cdAccounts \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY ( START WITH 3000000001, INCREMENT BY 1 ), \" + \"owner INT, \"\n\t\t\t\t\t+ \"term INT, \" + \"balance DOUBLE, \" + \"intRate DOUBLE, \"\n\t\t\t\t\t+ \"timeCreated BIGINT, \" + \"lastPaidInterest DOUBLE, \"\n\t\t\t\t\t+ \"dateOfLastPaidInterest BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table cdAccounts\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of cdAccounts table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "Account apply();", "@Override\r\n\tpublic void NroAccount() {\n\t\t\r\n\t}", "public void createAccount(String acctId, String pass, String cardNo, String email) {\n accountId = acctId;\n password = pass;\n cardNumber = cardNo;\n customerEmail = email;\n \n try {\n //conect to database\n Class.forName(\"com.mysql.jdbc.Driver\");\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/make_order_request\", \"root\", \"admin\");\n Statement mystmt = con.createStatement();\n\n //write SQL query to update code in database\n String query = \"INSERT INTO customer_account(account_id, password, card_no, customer_email) VALUES (?,?,?,?)\";\n PreparedStatement ps = con.prepareStatement(query);\n ps.setString(1, accountId);\n ps.setString(2, password);\n ps.setInt(3, Integer.parseInt(cardNumber));\n ps.setString(4, customerEmail);\n\n ps.executeUpdate();\n\n return;\n\n } catch (Exception e) {\n e.printStackTrace();\n \n }\n\n }", "@FXML\r\n void createAccount(MouseEvent event) throws SQLException {\r\n ta_employeeAccount.clear();\r\n account();\r\n\r\n }", "public Account()\n {\n id = UUID.randomUUID();\n }", "public void saveAccount() {\n\n }", "private static void onAccountCreated(Account newAccount, Context context) {\n MovieSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_FLEXTIME);\n\n /*\n * Without calling setSyncAutomatically, our periodic sync will not be enabled.\n */\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n\n /*\n * Finally, let's do a sync to get things started\n */\n syncImmediately(context);\n }", "int insert(FinanceAccount record);", "UserAccount createUserAccount(User user, double amount);", "@Test\n\tpublic void createAccountDebtsTest() {\n\t\tsetChequingRadioDefaultOff();\n\t\trdbtnDebt.setSelected(true);\n\t\tdata.setRdbtnDebt(rdbtnDebt);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.DEBITS.getAccountType());\n\t\tassertEquals(accountTest, account);\n\t}", "public account() {\n initComponents();\n autoID();\n branch();\n }", "private static void onAccountCreated(Account newAccount, Context context) {\n MovieSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_INTERVAL/2);\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n syncNextPage(context, true);\n }", "public void linkAccount() {}", "int insertSelective(Account record);", "public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }", "public void transaction() throws DBException {\n\t\tUsersTransaction transaction = new UsersTransaction();\n\t\tScanner scan = new Scanner(System.in);\n\t\tLogger.info(\"================TRANSACTION DETAILS TO DONATE======================\");\n\t\tLogger.info(\"Enter the transaction ID\");\n\t\ttransactionId = scan.nextInt();\n\t\tLogger.info(\"Enter the donor ID\");\n\t\tdonorId = scan.nextInt();\n\t\tLogger.info(\"Enter the fund Id\");\n\t\tfundRequestId = scan.nextInt();\n\t\tLogger.info(\"Enter the amount to be funded\");\n\t\ttargetAmount = scan.nextInt();\n\t\ttransaction.setTransactionId(transactionId);\n\t\ttransaction.setDonorId(donorId);\n\t\ttransaction.setFundRequestId(fundRequestId);\n\t\ttransaction.setTargetAmount(targetAmount);\n\t\tinsert(transaction);\n\t\tdonorFundRequest(reqType);\n\t}", "public void addAccount() {\n\t\t\n\t\ttry {\n\t\t\tlog.log(Level.INFO, \"Please enter name\");\n String custName = scan.next();\n validate.checkName(custName);\n \t\tlog.log(Level.INFO, \"Select Account Type: \\n 1 for Savings \\n 2 for Current \\n 3 for FD \\n 4 for DEMAT\");\n\t\t\tint bankAccType = Integer.parseInt(scan.next());\n\t\t\tvalidate.checkAccType(bankAccType);\n\t\t\tlog.log(Level.INFO, \"Please Enter your Aadar Card Number\");\n\t\t\tString aadarNumber = scan.next();\n\t\t\tlog.log(Level.INFO, \"Please Enter Phone Number: \");\n\t\t\tString custMobileNo = scan.next();\n\t\t\tvalidate.checkPhoneNum(custMobileNo);\n\t\t\tlog.log(Level.INFO, \"Please Enter Customer Email Id: \");\n\t\t\tString custEmail = scan.next();\n\t\t\tvalidate.checkEmail(custEmail);\n\t\t\tbankop.add(accountNumber, custName, bankAccType, custMobileNo, custEmail, aadarNumber);\n\t\t\taccountNumber();\n\t\t\n\t\t} catch (AccountDetailsException message) {\n\t\t\tlog.log(Level.INFO, message.getMessage()); \n }\n\n\t}", "private void CreateNewAccount(final String phone, final String password, final String name) {\n if (TextUtils.isEmpty(phone)){\n Toast.makeText(this,\"Please enter your phone number ...\",Toast.LENGTH_SHORT).show();\n }\n else if(TextUtils.isEmpty(password)){\n Toast.makeText(this,\"Please enter your phone password ...\",Toast.LENGTH_SHORT).show();\n }\n else if(TextUtils.isEmpty(name)){\n Toast.makeText(this,\"Please enter your phone name ...\",Toast.LENGTH_SHORT).show();\n }\n else{\n //start creating account\n LoadingBar.show();\n\n final DatabaseReference mRef;\n mRef = FirebaseDatabase.getInstance().getReference();\n mRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n if (!(snapshot.child(\"Users\").child(phone).exists())){\n //if user not exist then we create account in database\n HashMap<String,Object> userdata = new HashMap<>();\n userdata.put(\"phone\",phone);\n userdata.put(\"password\",password);\n userdata.put(\"name\",name);\n mRef.child(\"Users\").child(phone).updateChildren(userdata)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n LoadingBar.dismiss();\n Toast.makeText(RegisterActivity.this,\"Registration Successful\",Toast.LENGTH_SHORT).show();\n }\n else{\n LoadingBar.dismiss();\n Toast.makeText(RegisterActivity.this,\"Please try again after sometime ....\",Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n else{\n LoadingBar.dismiss();\n Toast.makeText(RegisterActivity.this,\"User with this number already exist ....\",Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n\n }\n }", "public abstract void createAccount(final GDataAccount account)\n throws ServiceException;", "@Override\n public void onClick(View v) {\n CreateAccount();\n }", "public Account createAccount(Account account){\n\t\t\n\t\taccount.createdDate = new Date();\n\t\taccount.isActive = true;\n\t\t\n\t\t\n\t\taccount.person = personService.createPerson(account.person);\n\t\taccount.person.personSettings = personalSettingsService.createSettings(account.person.personSettings);\n\t\t\n\t\t\n\t\treturn account;\n\t}", "GenerateUserAccount () {\r\n }", "private static void registerIdentity() {\n lastBlockchainIdentity.registerIdentity(null);\n //System.out.println(\"Identity created: \" + lastIdentityId);\n //this is the base58 id\n lastIdentityId = lastTx.getCreditBurnIdentityIdentifier().toStringBase58();\n\n System.out.println(\"Identity created: \" + lastTx.getCreditBurnIdentityIdentifier().toStringBase58());\n /*DashPlatformProtocol dpp = new DashPlatformProtocol(dataProvider);\n\n kit.wallet().getBlockchainIdentityFundingKeyChain().getKeyByPubKeyHash(lastTx.getCreditBurnPublicKeyId().getBytes());\n IdentityPublicKey identityPublicKey = new IdentityPublicKey(lastTx.getUsedDerivationPathIndex()+1,\n IdentityPublicKey.TYPES.ECDSA_SECP256K1, Base64.toBase64String(lastTx.getCreditBurnPublicKey().getPubKey()), true);\n List<IdentityPublicKey> keyList = new ArrayList<>();\n keyList.add(identityPublicKey);\n Identity identity = dpp.identity.create(Base58.encode(lastTx.getCreditBurnIdentityIdentifier().getBytes()), Identity.IdentityType.USER,\n keyList);\n IdentityCreateTransition st = new IdentityCreateTransition(Identity.IdentityType.USER,\n lastTx.getLockedOutpoint().toStringBase64(), keyList, 0);\n\n st.sign(identityPublicKey, Utils.HEX.encode(lastTx.getCreditBurnPublicKey().getPrivKeyBytes()));\n\n DapiClient client = new DapiClient(EvoNetParams.MASTERNODES[1], true);\n client.applyStateTransition(st);\n client.shutdown();\n lastIdentityId = lastTx.getCreditBurnIdentityIdentifier().toStringBase58();\n System.out.println(\"Identity created: \" + lastIdentityId);\n*/\n //sleep(30*1000);\n lastBlockchainIdentity.watchIdentity(1, 1000, RetryDelayType.LINEAR,\n new RegisterIdentityCallback() {\n @Override\n public void onComplete(@NotNull String uniqueId) {\n System.out.println(\"Identity created and found\");\n blockchainUser(lastTx);\n }\n\n @Override\n public void onTimeout() {\n System.out.println(\"Identity was not created or found.\");\n }\n }\n );\n //lastBlockchainIdentity.monitorForBlockchainIdentityWithRetryCount(30, 5000, BlockchainIdentity.RetryDelayType.LINEAR);\n }", "@Override\n\tvoid make_deposit(DataStore ds){\n\tds.setbalancedepositAccount1(ds.getbalanceAccount1_temp()+ds.getdepositAccount1());\n\t}", "@Transactional\n\tpublic String addTransaction(int toAccNo, int fromAccNo, Transaction tran) {\n\t\t\tEntityManager entityManager = getEntityManager();\n\t\t\tAccountdetail acc = (Accountdetail) entityManager.createQuery(\"select a from Accountdetail a where a.accountnumber =: toaccNo\").setParameter(\"toaccNo\", toAccNo ).getSingleResult();\n\t\t\tAccountdetail acc1 = (Accountdetail) entityManager.createQuery(\"select ac from Accountdetail ac where ac.accountnumber =: fromAccNo\").setParameter(\"fromAccNo\", fromAccNo ).getSingleResult();\n\t\t\t\n\t\t\t//Validation -----> The Balance amount should be greater than the Amount Transfered \n\t\t\tif(acc1.getCurrentbalance()>=tran.getAmounttransferred()) {\n\t\t\t\t\ttran.setAccountto(acc);\n\t\t\t\t\ttran.setAccountfrom(acc1);\n\t\t\t\t\tentityManager.merge(tran);\n\t\t\t\t\t\n\t\t\t\t\t//Taking the amount transfered\n\t\t\t\t\tint amt = tran.getAmounttransferred();\n\t\t\t\t\tSystem.out.println(toAccNo);\n\t\t\t\t\t\n\t\t\t\t\t//Also crediting and debiting the amount from the accounts \n\t\t\t\t\tacc.setCurrentbalance(acc.getCurrentbalance()+amt);\n\t\t\t\t\tacc1.setCurrentbalance(acc1.getCurrentbalance()-amt);\n\t\t\t\t\t\n\t\t\t\t\t//Mailing the details of the transaction to the Respective Account Numbers\n\t\t\t\t\tString info_deb = \"Amount debited from your account.\\nAmount -->\"+amt+\"\\nTo Account -->\"+acc.getAccountnumber();\n String info_rec = \"Amount credited to your account.\\nAmount -->\"+amt+\"\\nFrom Account -->\"+acc1.getAccountnumber();\n mailService.sendMail(info_deb, acc1.getCustomerdetail().getEmail());\n mailService.sendMail(info_rec, acc.getCustomerdetail().getEmail());\n \n\t\t\t\t\treturn \"Transaction Inserted\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//If Balance is less than the Amount Transfered \n\t\t\t\telse if(acc1.getCurrentbalance()<tran.getAmounttransferred()) {\n\t\t\t\t\treturn \"insufficient funds\";\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//If the Details is wrong\n\t\t\t\telse {\n\t\t\t\t\treturn \"Wrong details. Please try again\";\n\t\t\t\t}\n\t }", "void accountSet(boolean admin, String username, String password, String fName, String lName, int accountId);", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "public void switchToCreateAccount() {\r\n\t\tlayout.show(this, \"createPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "public void executeNewAccount(int account_id, int balance, Connection con) throws SQLException {\n PreparedStatement stmt = con.prepareStatement(\n \"insert into ACCOUNTS (ACCOUNT_ID, BALANCE, TIMESTAMP) values (?,?,?)\");\n\n stmt.setInt(1, account_id);\n stmt.setInt(2, balance);\n stmt.setTimestamp(3, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n }", "private void createAccounts(){\r\n for(int i = 0; i < accountInTotal; i++){\r\n try {\r\n Account tempAccount = new Account(startingBonds);\r\n theAccounts.add(tempAccount);\r\n } catch(Exception e){\r\n System.err.println(\"Error\");\r\n }\r\n }\r\n }", "@Override\n public void onCreate(SQLiteDatabase db) {\n db.execSQL(\"create table Accounts (id integer primary key autoincrement, name text, surname text, phone text, password text, status text, chatID text);\");\n }", "private void createCheckingAccountsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE checkingAccounts \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY ( START WITH 1000000001, INCREMENT BY 1 ), \" + \"owner INT, \"\n\t\t\t\t\t+ \"balance DOUBLE, \" + \"intRate DOUBLE, \"\n\t\t\t\t\t+ \"timeCreated BIGINT, \" + \"lastPaidInterest DOUBLE, \"\n\t\t\t\t\t+ \"dateOfLastPaidInterest BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table checkingAccounts\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of checkingAccounts table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "public void run() {\n int id = getIdentity();\n iUser user = createUser(id);\n boolean userCreated = (user != null);\n if (userCreated) {\n presenter.printAccountCreated();\n } else {\n presenter.printRequestDeclined();\n }\n }", "@Test\n\tpublic void Accounts_23214_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\t\t\n\t\tDataSource ds = testData.get(testName);\n\t\tmyAccount.navToRecord();\n\t\tStandardSubpanel accSub = sugar().accounts.recordView.subpanels.get(\"Accounts\");\n\t\taccSub.addRecord();\t\t\n\t\tsugar().accounts.createDrawer.showMore();\n\t\tsugar().accounts.createDrawer.getEditField(\"name\").set(ds.get(0).get(\"name\"));\n\t\tsugar().accounts.createDrawer.getEditField(\"billingAddressCity\").set(ds.get(0).get(\"billingAddressCity\"));\n\t\tsugar().accounts.createDrawer.getEditField(\"workPhone\").set(ds.get(0).get(\"workPhone\"));\n\t\tsugar().contacts.createDrawer.save();\n\t\tVoodooUtils.waitForAlertExpiration();\n\t\t//VOOD-609\n\t\tnew VoodooControl(\"span\", \"css\", \"div.filtered.layout_Accounts tbody span.fld_name.list\").assertEquals(ds.get(0).get(\"name\"), true);\n\t\tnew VoodooControl(\"span\", \"css\", \"div.filtered.layout_Accounts tbody span.fld_billing_address_city.list\").assertEquals(ds.get(0).get(\"billingAddressCity\"), true);\n\t\tnew VoodooControl(\"span\", \"css\", \"div.filtered.layout_Accounts tbody span.fld_phone_office.list\").assertEquals(ds.get(0).get(\"workPhone\"), true);\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}", "void openAccount(String name, String address, String cnic, int contact_no, int age, String email_address,\r\n int noOfAccounts, String incomeSource, String AccountType, String securityquestion) {\n\r\n if (bankPolicy.isEligibilityCriteriaFulfilled(age)) {// is customer eligible\r\n System.out.println(\"Criteria fulfilled\");\r\n\r\n boolean newCustomer = isItANewCustomer(cnic);\r\n\r\n if (newCustomer) {// is customer new\r\n Customer C = new Customer(Integer.toString(customers.size() + 1), cnic, name, address, contact_no,\r\n email_address, incomeSource, securityquestion);\r\n // Print and ASK FOR SECURITY QUESTION\r\n System.out.println(\"Its a new Customer\");\r\n System.out.println(\"Password: \" + C.credentials.password);\r\n // add customer to arraylist\r\n customers.add(C);\r\n // save new customer to database\r\n record.SaveCustomer(C);\r\n // save customer credentials to database\r\n record.SaveCredentials(C.credentials, C.customerID);\r\n\r\n }\r\n int index = -1;\r\n for (int i = 0; i < customers.size(); i++) {\r\n if (customers.get(i).CNIC.equals(cnic))\r\n index = i;\r\n }\r\n\r\n Account A = new Account(String.valueOf(accounts.size() + 1), getDateFormat(), AccountType,\r\n \"Pending\", customers.get(index).customerID);\r\n // add account to customer\r\n accounts.add(A);\r\n customers.get(index).customerAccount.add(A);\r\n // save account to database\r\n record.SaveAccount(A);\r\n }\r\n\r\n }", "AionAddress createAccount(String password);", "public Transaction createTransaction(Credentials user, TransactionType tt) throws RelationException;", "public static void createTable() throws SQLException\n {\n Statement statement = ConnectionManager.getConnection()\n .createStatement();\n\n statement.executeUpdate(\"DROP TABLE IF EXISTS Account\");\n statement\n .executeUpdate(\"CREATE TABLE Account(accountId INTEGER PRIMARY KEY AUTOINCREMENT, name, address, manager)\");\n\n statement.close();\n\n insertAccount(new Account(0, \"Administrator\", \"\", true));\n\n PreparedStatement ps = ConnectionManager\n .getConnection()\n .prepareStatement(\n \"UPDATE sqlite_sequence SET seq = ? WHERE name = 'Account'\");\n ps.setInt(1, Account.LOW_ACCOUNT_ID - 1);\n ps.executeUpdate();\n ps.close();\n }", "public boolean regRamAccount(Long ramId, Long emailId) throws Exception;", "@Override\n\tpublic int addAccount(Account account) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString selectQuery = \"insert into accounts values(default, ?, ?) returning id\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(selectQuery);\n\t\tprepStmt.setString(1, account.getType());\n\t\tprepStmt.setDouble(2, account.getBalance());\n\t\tResultSet rs = prepStmt.executeQuery();\n\t\tint id = 0;\n\t\twhile(rs.next()) {\n\t\t\tid = rs.getInt(1);\n\t\t}\n\t\treturn id;\n\t}", "@Override\n public Employee process(Employee employee) throws Exception {\n try {\n if (employee.getId() % 13 == 0) {\n throw new Exception(\"unable to create account for employee with id \" + employee.getId());\n }\n employee.setUserId(\"userId\" + employee.getId());\n } catch (Exception e) {\n // otherwise the job halts!\n LOG.error(\"error \", e);\n }\n return employee;\n }", "int insertSelective(ShopAccount record);", "private String newQi4jAccount()\n throws UnitOfWorkCompletionException\n {\n UnitOfWork work = unitOfWorkFactory.newUnitOfWork();\n EntityBuilder<AccountComposite> entityBuilder = work.newEntityBuilder( AccountComposite.class );\n AccountComposite accountComposite = entityBuilder.instance();\n accountComposite.name().set( ACCOUNT_NAME );\n accountComposite = entityBuilder.newInstance();\n String accoutnIdentity = accountComposite.identity().get();\n work.complete();\n\n return accoutnIdentity;\n }", "public void createAccountTable() throws SQLException {\r\n\t\tConnection connection = dbAdministration.getConnection();\r\n\t\t// Prüfung, ob Tabelle bereits besteht\r\n\t\tResultSet resultSet = connection.getMetaData().getTables(\"%\", \"%\", \"%\", new String[] { \"TABLE\" });\r\n\t\tboolean shouldCreateTable = true;\r\n\t\twhile (resultSet.next() && shouldCreateTable) {\r\n\t\t\tif (resultSet.getString(\"TABLE_NAME\").equalsIgnoreCase(\"ACCOUNT\")) {\r\n\t\t\t\tshouldCreateTable = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tresultSet.close();\r\n\r\n\t\tif (shouldCreateTable) {\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tString sql = \"CREATE table account (id int not null primary key, owner varchar(\"\r\n\t\t\t\t\t+ DatabaseAdministration.ownerLength + \") not null, number varchar(4) not null)\";\r\n\t\t\t// Tabelle wird erstellt\r\n\t\t\tstatement.execute(sql);\r\n\t\t\tstatement.close();\r\n\t\t\tlogger.info(\"SQL-Statement ausgeführt: \" + sql);\r\n\t\t\tlogger.info(\"Tabelle \\\"Account\\\" wurde erstellt.\");\r\n\t\t\tbankAccountExists = false;\r\n\t\t\t// Das Bank-Konto wird angelegt\r\n\t\t\taddAccount(\"0000\", \"BANK\", BigDecimal.ZERO);\r\n\t\t\tbankAccountExists = true;\r\n\t\t}\r\n\t\tconnection.close();\r\n\t}", "@Test\n\tpublic void createNewAccountWithOpeningBalanceDebitTest() {\n\t\tcreateAccountDebtsTest();\n\t\tcreateNewAccountWithOpeningBalanceHelper();\n\t}", "public Account createAccount(String accountId) throws LedgerException {\n // Check uniqueness of 'accountId'\n if (getExistingAccount(accountId) != null) {\n throw new LedgerException(\n \"create account\",\n String.format(\"The account '%s' already exists.\", accountId)\n );\n }\n\n // The accountId is unique, so create new account\n Account newAccount = new Account(accountId);\n\n // Update currentBlock with new account\n this.currentBlock.addAccount(newAccount);\n return newAccount;\n }", "public void createER(final Context ctx, final Transaction trans, final String id, final int resultCode,\r\n final int ocgResultCode)\r\n {\r\n RecurringRechargeSupport.createRechargeER(ctx, trans, getSub(), id, resultCode, ocgResultCode,\r\n sub_.getSubscriptionType());\r\n }", "public void enrolStudent(String id) {\r\n System.out.println(\"conectado con model ---> metodo enrolStudent\");\r\n //TODO\r\n }", "void addNewAccountToFile(Account newAccount);", "public final void activateAccount() {\n\t\tthis.setIsAccountLocked(false);\n\t}", "public void createAdmin()\r\n\t{\r\n\t\tSystem.out.println(\"Administrator account not exist, please create the administrator account by setting up a password for it.\");\r\n\t\tString password=\"\",repassword=\"\";\r\n\t\tboolean flag=false;\r\n\t\twhile(!flag)\r\n\t\t{\r\n\t\t\tboolean validpassword=false;\r\n\t\t\twhile(!validpassword)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter the password: \");\r\n\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\tif(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"Please re-enter the password: \");\r\n\t\t\trepassword=sc.nextLine();\r\n\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\tif(!flag)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString hash_password=hashfunction(password); \r\n\t\tString last_login=java.time.LocalDate.now().toString();\r\n\t\tuser_records.add(new User(\"administrator\",hash_password,\"administrator\",\"\",0,0,last_login,false));\r\n\t\tSystem.out.println(\"Administrator account created successfully!\");\r\n\t}", "int insert(ShopAccount record);", "@Override\n public void actionPerformed(ActionEvent e){\n int starNum = Integer.valueOf(JOptionPane.showInputDialog(\"Starting Balance?\"));\n \n String nam = JOptionPane.showInputDialog(\"Account Name?\");\n \n String type = JOptionPane.showInputDialog(\"Type Of Account?\");\n \n Account newAcc = null;\n \n if(type.equals(\"Checking\")) {\n \n newAcc = new CheckingAccount(nam, starNum);\n \n } else {\n \n newAcc = new SavingsAccount(nam, starNum);\n \n }\n \n bankSystem.addAcc(newAcc);\n \n current = newAcc;\n \n }", "@Override\n\tprotected String perform() {\n\t\tT_work_dj_nsrxx nsrxx = getDj_nsrxx();\n\t\tString nsrsbm = sqlsession.selectOne(\"t_work_dj_nsrxx$getNewNsrxxId\");\n\t\tnsrxx.setNsrsbm(nsrsbm);\n\t\tnsrxx.setZgswjgDm(\"000000\");\n\t\tnsrxx.setSwdjzh(\"-1\");\n\t\tnsrxx.setNsrztDm(\"4\");\n\t\tint i = sqlsession.update(\"t_work_dj_nsrxx$insertSelective\", nsrxx);\n\t\tif (i > 0) {\n\t\t\t/**\n\t\t\t * 1. 首页待办事项标题\n\t\t\t */\n\t\t\tString task_title = \"登记管理:设立登记->确定主管机关\";\n\t\t\t/**\n\t\t\t * 2. 首页待办事项链接, 本系统必须为相对路径,否则为绝对路径\n\t\t\t */\n\t\t\tString task_link = \"/com/jdframe/work/biz/swdj/updateQdzgswjg!init?nsrsbm=\"\n\t\t\t\t\t+ nsrxx.getNsrsbm();\n\t\t\t/**\n\t\t\t * 3. 系统,01为本系统,本系统可以使用相对路径,否则为其他系统不能使用相对路径\n\t\t\t */\n\t\t\tString task_from = \"01\";\n\t\t\t/**\n\t\t\t * 4. 首页待办事项到期时间\n\t\t\t */\n\t\t\tString Task_expire_date = DateUtils.newDateTime(5);\n\t\t\t/**\n\t\t\t * 5. 菜单id,系统根据权限判读那些操作人员有权接收此待办事项\n\t\t\t */\n\t\t\tString menu_id = \"1000028\";\n\t\t\t/**\n\t\t\t * 6. 待办事项优先级\n\t\t\t */\n\t\t\tTokens.PRIORITY priority = Tokens.PRIORITY.CRITICAL;\n\t\t\t// 发送待办事宜\n\t\t\tboolean isSend = sendTask(task_title, priority, task_link,\n\t\t\t\t\ttask_from, Task_expire_date, menu_id);\n\t\t\tif (isSend){\n\t\t\t\tsetSystemMessage(\"设立登记操作成功!\");\n\t\t\t}else{\n\t\t\t\tsetSystemMessage(\"设立登记操作失败,可能无待办事项接收人员!\", true, null);\n\t\t\t\tsqlsession.rollback();\n\t\t\t}\n\t\t} else {\n\t\t\t// 操作失败,并返回input页面\n\t\t\tsetSystemMessage(\"设立登记操作失败!\", true, null);\n\t\t}\n\t\treturn SUCCESS;\n\t}", "boolean activateAccount(Integer userId);", "@Test\n\tpublic void createAccTest() {\n\t\tCustomer cus = new Customer(\"wgl\", myDate, \"Beijing\");\n\t\tbc.createAccount(cus, 1);\n\t\tassertEquals(1, cus.getAccList().size());\n\t}", "@Test\n\tpublic void createAccountCashTest() {\n\t\tsetChequingRadioDefaultOff();\n\t\trdbtnCash.setSelected(true);\n\t\tdata.setRdbtnCash(rdbtnCash);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.CASH.getAccountType());\n\t\tassertEquals(accountTest, account);\n\n\t}", "public Account createAccount(Account newAccount, Integer userId){\n if(!userRepository.existsById(userId))\n return null;\n\n List<Account> ownersAccounts = getAllAccountsFromUser(userId);\n\n // User already has two accounts, a user is allowed to have only one current account and one savings account.\n if(ownersAccounts.size() == 1) {\n Account ownersAccount = ownersAccounts.get(0);\n // User already has a current account\n if(ownersAccount.getAccountType() == Account.AccountTypeEnum.CURRENT && newAccount.getAccountType() == Account.AccountTypeEnum.CURRENT)\n return null;\n // User already has a savings account\n else if(ownersAccount.getAccountType() == Account.AccountTypeEnum.SAVINGS && newAccount.getAccountType() == Account.AccountTypeEnum.SAVINGS)\n return null;\n }\n if(!(newAccount.getAccountType() == Account.AccountTypeEnum.CURRENT || newAccount.getAccountType() == Account.AccountTypeEnum.SAVINGS))\n return null;\n\n // User does not already have an account with the same accounttype, he is allowed to make another account.\n newAccount.setIban(createIban());\n newAccount.setOwner(userId);\n\n bankAccount.addAmountToBankBalance(newAccount.getBalance());\n accountRepository.save(newAccount);\n return newAccount;\n\n }" ]
[ "0.61381984", "0.601171", "0.59125125", "0.57258034", "0.57077485", "0.5677954", "0.5675161", "0.5646665", "0.55907696", "0.55717456", "0.5525302", "0.55227655", "0.55128556", "0.5498487", "0.5459581", "0.5428703", "0.54001594", "0.53863007", "0.53736585", "0.5371789", "0.5354265", "0.53520465", "0.5349123", "0.5346815", "0.5330377", "0.5308143", "0.52677965", "0.5267744", "0.5260026", "0.5258813", "0.522678", "0.5223247", "0.5223247", "0.52230054", "0.52223307", "0.5214033", "0.52133834", "0.52110666", "0.519576", "0.51916426", "0.51914877", "0.5187646", "0.51861864", "0.5167449", "0.5160139", "0.51570183", "0.51498777", "0.5149172", "0.5148939", "0.5142111", "0.5131518", "0.5130088", "0.51276654", "0.51264375", "0.5117413", "0.5109106", "0.50950575", "0.5090048", "0.5089764", "0.50810355", "0.5079213", "0.507837", "0.5077085", "0.5068828", "0.5066666", "0.50645804", "0.5052756", "0.5048148", "0.5045582", "0.50439614", "0.5042557", "0.50244385", "0.5022237", "0.501271", "0.50117916", "0.50098616", "0.50052357", "0.50045675", "0.500173", "0.49999437", "0.49958304", "0.49947977", "0.49903756", "0.49901044", "0.49889916", "0.4979738", "0.49773666", "0.4974844", "0.49730518", "0.4971335", "0.4971319", "0.49646208", "0.49586126", "0.4954283", "0.49441996", "0.49419737", "0.49341017", "0.49306017", "0.49260956", "0.49169904" ]
0.5436486
15
Make new account in normal execution mode(logs the new account accounts table and logs the operation operations table)
public int makeNewAccount(int balance){ int generated_id = 0; try { accountLock.lock(); executeNewAccount(generated_id = currentAccountId++, balance, rawDataSource.getConnection()); accountLock.unlock(); cache.add(new Account(generated_id, balance)); operationLock.lock(); logNewAccount(currentOperationId, generated_id, balance); currentOperationId++; operationLock.unlock(); } catch (SQLException e) { e.printStackTrace(); } return generated_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void logNewAccount(int op_id, int account_id, int current_balance){\n try {\n PreparedStatement stmt = rawDataSource.getConnection().prepareStatement(\n \"insert into OPERATIONS (OP_ID, OP_TYPE, FROM_ACCOUNT_ID, FROM_CURRENT_BALANCE, TIMESTAMP) \" +\n \"values (?,?,?,?,?)\");\n stmt.setInt(1, op_id);\n stmt.setInt(2, OP_TYPES.valueOf(\"CREATE\").ordinal()+1);\n stmt.setInt(3, account_id);\n stmt.setInt(4, current_balance);\n stmt.setTimestamp(5, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public boolean logNewAccount(int op_id, int account_id, int current_balance, Connection con){\n try {\n PreparedStatement stmt = con.prepareStatement(\n \"insert into OPERATIONS (OP_ID, OP_TYPE, FROM_ACCOUNT_ID, FROM_CURRENT_BALANCE, TIMESTAMP) \" +\n \"values (?,?,?,?,?)\");\n stmt.setInt(1, op_id);\n stmt.setInt(2, OP_TYPES.valueOf(\"CREATE\").ordinal()+1);\n stmt.setInt(3, account_id);\n stmt.setInt(4, current_balance);\n stmt.setTimestamp(5, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n } catch (SQLException e) {\n try {\n con.rollback();\n return false;\n } catch (SQLException e1) {\n e1.printStackTrace();\n return false;\n }\n }\n\n return true;\n }", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "BankAccount(){\n\t\tSystem.out.println(\"NEW ACCOUNT CREATED\");\t\n\t}", "@Override\r\n\tpublic void NroAccount() {\n\t\t\r\n\t}", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "@Test\n\tpublic void testAdminCreate() {\n\t\tAccount acc1 = new Account(00000, \"ADMIN\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"ADMIN\", 00000, 0, \"A\"));\n\t\ttransactions.add(1, new Transaction(05, \"new acc\", 00001, 100.00, \"A\"));\n\t\ttransactions.add(2, new Transaction(00, \"ADMIN\", 00000, 0, \"A\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Account Created\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to create account as admin\", testResult);\n\t}", "@Test\n\tpublic void Accounts_23214_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\t\t\n\t\tDataSource ds = testData.get(testName);\n\t\tmyAccount.navToRecord();\n\t\tStandardSubpanel accSub = sugar().accounts.recordView.subpanels.get(\"Accounts\");\n\t\taccSub.addRecord();\t\t\n\t\tsugar().accounts.createDrawer.showMore();\n\t\tsugar().accounts.createDrawer.getEditField(\"name\").set(ds.get(0).get(\"name\"));\n\t\tsugar().accounts.createDrawer.getEditField(\"billingAddressCity\").set(ds.get(0).get(\"billingAddressCity\"));\n\t\tsugar().accounts.createDrawer.getEditField(\"workPhone\").set(ds.get(0).get(\"workPhone\"));\n\t\tsugar().contacts.createDrawer.save();\n\t\tVoodooUtils.waitForAlertExpiration();\n\t\t//VOOD-609\n\t\tnew VoodooControl(\"span\", \"css\", \"div.filtered.layout_Accounts tbody span.fld_name.list\").assertEquals(ds.get(0).get(\"name\"), true);\n\t\tnew VoodooControl(\"span\", \"css\", \"div.filtered.layout_Accounts tbody span.fld_billing_address_city.list\").assertEquals(ds.get(0).get(\"billingAddressCity\"), true);\n\t\tnew VoodooControl(\"span\", \"css\", \"div.filtered.layout_Accounts tbody span.fld_phone_office.list\").assertEquals(ds.get(0).get(\"workPhone\"), true);\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}", "Account apply();", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "private void initial(){\n storeAccount(\"201799990001030047\");\n }", "@Override\n public void insertAccount() throws Exception {\n\n }", "public void startAccountUpdater() {\n\t}", "public void active() {\n createClassIfNotExists();\n\n globalHook = new OAuditingHook(security);\n\n retainTask =\n new TimerTask() {\n public void run() {\n retainLogs();\n }\n };\n\n long delay = 1000L;\n long period = 1000L * 60L * 60L * 24L;\n\n timer.scheduleAtFixedRate(retainTask, delay, period);\n\n Orient.instance().addDbLifecycleListener(this);\n if (context instanceof OServerAware) {\n if (((OServerAware) context).getDistributedManager() != null) {\n ((OServerAware) context).getDistributedManager().registerLifecycleListener(this);\n }\n }\n\n if (systemDbImporter != null && systemDbImporter.isEnabled()) {\n systemDbImporter.start();\n }\n }", "void go() {\n\t\tthis.conn = super.getConnection();\n\t\tcreateCustomersTable();\n\t\tcreateBankersTable();\n\t\tcreateCheckingAccountsTable();\n\t\tcreateSavingsAccountsTable();\n\t\tcreateCDAccountsTable();\n\t\tcreateTransactionsTable();\n\t\tcreateStocksTable();\n\t\tif(createAdminBanker) addAdminBanker();\n\t\tSystem.out.println(\"Database Created\");\n\n\t}", "private void logUser() {\n }", "private void createNewAccount() {\n\n // if user has not provided valid data, do not create an account and return from method\n if (!validateData()) {\n return;\n }\n\n // If flag value is false, that means email provided by user doesn't exists in database\n // so initialize the loader to create a new account\n if (!mEmailExistsFlag) {\n getLoaderManager().initLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n } else {\n // If flag is true, that means email provided by user already exists in database\n // so restart the loader and allow user to enter new email address for account\n getLoaderManager().restartLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n }\n\n }", "@Override\n\tpublic void work() {\n\t\tSystem.out.println(\"Accountant accounting.\");\n\t}", "Account create();", "private void createCDAccountsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE cdAccounts \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY ( START WITH 3000000001, INCREMENT BY 1 ), \" + \"owner INT, \"\n\t\t\t\t\t+ \"term INT, \" + \"balance DOUBLE, \" + \"intRate DOUBLE, \"\n\t\t\t\t\t+ \"timeCreated BIGINT, \" + \"lastPaidInterest DOUBLE, \"\n\t\t\t\t\t+ \"dateOfLastPaidInterest BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table cdAccounts\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of cdAccounts table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "private static void onAccountCreated(Account newAccount, Context context) {\n ScoreSyncAdapter.configurePeriodicSync(context);\n /*\n * Without calling setSyncAutomatically, our periodic sync will not be enabled.\n */\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n\n /*\n * Finally, let's do a sync to get things started\n */\n syncImmediately(context);\n }", "public void addAccount() {\n\t\t\n\t\ttry {\n\t\t\tlog.log(Level.INFO, \"Please enter name\");\n String custName = scan.next();\n validate.checkName(custName);\n \t\tlog.log(Level.INFO, \"Select Account Type: \\n 1 for Savings \\n 2 for Current \\n 3 for FD \\n 4 for DEMAT\");\n\t\t\tint bankAccType = Integer.parseInt(scan.next());\n\t\t\tvalidate.checkAccType(bankAccType);\n\t\t\tlog.log(Level.INFO, \"Please Enter your Aadar Card Number\");\n\t\t\tString aadarNumber = scan.next();\n\t\t\tlog.log(Level.INFO, \"Please Enter Phone Number: \");\n\t\t\tString custMobileNo = scan.next();\n\t\t\tvalidate.checkPhoneNum(custMobileNo);\n\t\t\tlog.log(Level.INFO, \"Please Enter Customer Email Id: \");\n\t\t\tString custEmail = scan.next();\n\t\t\tvalidate.checkEmail(custEmail);\n\t\t\tbankop.add(accountNumber, custName, bankAccType, custMobileNo, custEmail, aadarNumber);\n\t\t\taccountNumber();\n\t\t\n\t\t} catch (AccountDetailsException message) {\n\t\t\tlog.log(Level.INFO, message.getMessage()); \n }\n\n\t}", "private void log() {\n\t\t\n//\t\tif (trx_loggin_on){\n\t\t\n\t\tif ( transLogModelThreadLocal.get().isTransLoggingOn() ) {\n\t\t\t\n\t\t\tTransLogModel translog = transLogModelThreadLocal.get();\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\ttransactionLogger.info(\"\"); // don't really need a msg here\n\t\t\t\n\t\t\t// TODO MDC maybe conflic with existing MDC using in the project\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\t\n\t\t\ttranslog.getAttributesOnce().clear();\n\t\t}\n\t\t\n\t}", "private void handleAccountUpdateOnPre() {\n }", "@Override\n public void run() {\n try {\n stringOrganizationIds.remove(defaultOrg);\n List<Integer> organizationIds = FluentIterable.from(stringOrganizationIds)\n .transform(Ints.stringConverter()).toList();\n\n newUser.setActive(false);\n UserProfileStruct savedUser = createAccountInternal(conn, newUser, password, resetQuestion,\n resetAnswer, givenName, surname, organizationId);\n for (Integer orgId : organizationIds) {\n Profile profile = new Profile();\n profile.setGivenName(givenName);\n profile.setSurname(surname);\n profile.setOrganizationId(orgId);\n profile.setUserId(savedUser.credentialedUser.getId());\n profile = profilePersister.createProfile(profile, conn);\n\n authService.grantAtLeast(profile.getId(), ROLE_READER, orgId);\n authService.grantAtLeast(orgId, ROLE_ADMIN, profile.getId());\n }\n\n User user = savedUser.credentialedUser.getUser();\n user.setActive(true);\n persistenceService.process(conn, new UserPersister.UpdateUserFunc(user));\n conn.commit();\n } catch (Exception e) {\n closeConnection(conn);\n }\n }", "public SavingAccount()\n\t\t{\n\t\t\tsuper();\n\t\t}", "public void clkcreateAccountBtn() {\n\t\tcreateAccountBtn.click();\n\t\tExtentTestManager.getTest().log(LogStatus.INFO, \"Click on 'Create an account' button\");\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tacctadd();\r\n\r\n\t}", "public void saveAccount() {\n\n }", "public void executeNewAccount(int account_id, int balance, Connection con) throws SQLException {\n PreparedStatement stmt = con.prepareStatement(\n \"insert into ACCOUNTS (ACCOUNT_ID, BALANCE, TIMESTAMP) values (?,?,?)\");\n\n stmt.setInt(1, account_id);\n stmt.setInt(2, balance);\n stmt.setTimestamp(3, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n }", "private static void onAccountCreated(Account newAccount, Context context) {\n MovieSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_INTERVAL/2);\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n syncNextPage(context, true);\n }", "public void AddToAccountInfo();", "private static void onAccountCreated(Account newAccount, Context context) {\n MovieSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_FLEXTIME);\n\n /*\n * Without calling setSyncAutomatically, our periodic sync will not be enabled.\n */\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n\n /*\n * Finally, let's do a sync to get things started\n */\n syncImmediately(context);\n }", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "public account() {\n initComponents();\n autoID();\n branch();\n }", "public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }", "@Override\n\tpublic void createSavingAccount(Account as) {\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\tString saving = \"insert into savings( owner_id, balance) values (?,?)\";\n\t\t\tCallableStatement chaccount = con.prepareCall(saving);\n\t\t\n\t\t\tchaccount.setInt(1,as.getOwner_id() );\n\t\t\tchaccount.setDouble(2, as.getBalance());\n\t\t\tchaccount.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"In CheckingDaoDB Exception\");\n\t\t\te.printStackTrace();\n\t\t}\n}", "@Test\n\tpublic void createAccTest() {\n\t\tCustomer cus = new Customer(\"wgl\", myDate, \"Beijing\");\n\t\tbc.createAccount(cus, 1);\n\t\tassertEquals(1, cus.getAccList().size());\n\t}", "public void createAccountTable() throws SQLException {\r\n\t\tConnection connection = dbAdministration.getConnection();\r\n\t\t// Prüfung, ob Tabelle bereits besteht\r\n\t\tResultSet resultSet = connection.getMetaData().getTables(\"%\", \"%\", \"%\", new String[] { \"TABLE\" });\r\n\t\tboolean shouldCreateTable = true;\r\n\t\twhile (resultSet.next() && shouldCreateTable) {\r\n\t\t\tif (resultSet.getString(\"TABLE_NAME\").equalsIgnoreCase(\"ACCOUNT\")) {\r\n\t\t\t\tshouldCreateTable = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tresultSet.close();\r\n\r\n\t\tif (shouldCreateTable) {\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tString sql = \"CREATE table account (id int not null primary key, owner varchar(\"\r\n\t\t\t\t\t+ DatabaseAdministration.ownerLength + \") not null, number varchar(4) not null)\";\r\n\t\t\t// Tabelle wird erstellt\r\n\t\t\tstatement.execute(sql);\r\n\t\t\tstatement.close();\r\n\t\t\tlogger.info(\"SQL-Statement ausgeführt: \" + sql);\r\n\t\t\tlogger.info(\"Tabelle \\\"Account\\\" wurde erstellt.\");\r\n\t\t\tbankAccountExists = false;\r\n\t\t\t// Das Bank-Konto wird angelegt\r\n\t\t\taddAccount(\"0000\", \"BANK\", BigDecimal.ZERO);\r\n\t\t\tbankAccountExists = true;\r\n\t\t}\r\n\t\tconnection.close();\r\n\t}", "@Override\n\tpublic void run(String... args) throws Exception {\n\t\taccountListRepository.deleteAll();\n\t\taccountTransactionRepository.deleteAll();\n\t\t\n\t\tAccountListDTO account1 = new AccountListDTO();\n\t\taccount1.setAccountNumber(585309209);\n\t\taccount1.setAccountName(\"SGSavings726\");\n\t\taccount1.setAccountType(\"Savings\");\n\t\taccount1.setBalanceDate(LocalDate.of(2018, 11, 8));\n\t\taccount1.setCurrency(\"SGD\");\n\t\taccount1.setOpeningAvailableBalance(84327.51);\n\t\taccountListRepository.save(AccountListDTO.prepareAccountListEntity(account1));\n\t\t\n\t\tAccountListDTO account2 = new AccountListDTO();\n\t\taccount2.setAccountNumber(791066619);\n\t\taccount2.setAccountName(\"AUSavings933\");\n\t\taccount2.setAccountType(\"Savings\");\n\t\taccount2.setBalanceDate(LocalDate.of(2018, 11, 8));\n\t\taccount2.setCurrency(\"AUD\");\n\t\taccount2.setOpeningAvailableBalance(88005.93);\n\t\taccountListRepository.save(AccountListDTO.prepareAccountListEntity(account2));\n\t\t\n\t\tAccountListDTO account3 = new AccountListDTO();\n\t\taccount3.setAccountNumber(347786244);\n\t\taccount3.setAccountName(\"AUCurrent433\");\n\t\taccount3.setAccountType(\"Current\");\n\t\taccount3.setBalanceDate(LocalDate.of(2018, 11, 8));\n\t\taccount3.setCurrency(\"AUD\");\n\t\taccount3.setOpeningAvailableBalance(38010.62);\n\t\taccountListRepository.save(AccountListDTO.prepareAccountListEntity(account3));\n\t\t\n\t\tAccountTransactionDTO transaction1 = new AccountTransactionDTO();\n\t\ttransaction1.setAccountNumber(1232223212);\n\t\ttransaction1.setAccountName(\"Current Account\");\n\t\ttransaction1.setValueDate(LocalDate.of(2012, 1, 12));\n\t\ttransaction1.setCurrency(\"SGD\");\n\t\ttransaction1.setCreditAmount(9540.98);\n\t\ttransaction1.setDebitOrCredit(\"Credit\");\n\t\taccountTransactionRepository.save(AccountTransactionDTO.prepareAccountTransactionEntity(transaction1));\n\t\t\n\t\tAccountTransactionDTO transaction2 = new AccountTransactionDTO();\n\t\ttransaction2.setAccountNumber(1232223212);\n\t\ttransaction2.setAccountName(\"Current Account\");\n\t\ttransaction2.setValueDate(LocalDate.of(2012, 1, 12));\n\t\ttransaction2.setCurrency(\"SGD\");\n\t\ttransaction2.setCreditAmount(7497.82);\n\t\ttransaction2.setDebitOrCredit(\"Credit\");\n\t\taccountTransactionRepository.save(AccountTransactionDTO.prepareAccountTransactionEntity(transaction2));\n\t\t\n\t\tAccountTransactionDTO transaction3 = new AccountTransactionDTO();\n\t\ttransaction3.setAccountNumber(1232223212);\n\t\ttransaction3.setAccountName(\"Current Account\");\n\t\ttransaction3.setValueDate(LocalDate.of(2012, 1, 12));\n\t\ttransaction3.setCurrency(\"SGD\");\n\t\ttransaction3.setCreditAmount(5564.79);\n\t\ttransaction3.setDebitOrCredit(\"Credit\");\n\t\taccountTransactionRepository.save(AccountTransactionDTO.prepareAccountTransactionEntity(transaction3));\n\t\t\n\t}", "public static void requestNewAccount(String uid){\n accountManager.requestNewAccount(uid);\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void allAcctsSuperUserCreation() {\n\t\t Report.createTestLogHeader(\"MuMv\", \"Verify the Super user creation and their Audit entry in DB\"); \t \t \t \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"Switchtopaperlessacctspecifics\");\n\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SubmitMeterReadodb\");\n\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"SlingshotCrmDetailsSuperuser\"); \n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.SuperUserCreation()\n\t\t.SuperUserOverlayyes();\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewSuperUser(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTable(userProfile)\n\t\t.AdduserConfirmationPage();\n\t/*\t.confirmationPageVerificationLinks();\n\t\t/*.UserJourney_SuperUserAccessVerification(userProfile,smrProfile);\n\t\tnew SapCrmAction()\n\t\t.loginDetails(crmuserProfile)\n\t\t.searchCrmFieldsVerification(crmuserProfile, userProfile);\n*/\n\t}", "void openAccount(String name, String address, String cnic, int contact_no, int age, String email_address,\r\n int noOfAccounts, String incomeSource, String AccountType, String securityquestion) {\n\r\n if (bankPolicy.isEligibilityCriteriaFulfilled(age)) {// is customer eligible\r\n System.out.println(\"Criteria fulfilled\");\r\n\r\n boolean newCustomer = isItANewCustomer(cnic);\r\n\r\n if (newCustomer) {// is customer new\r\n Customer C = new Customer(Integer.toString(customers.size() + 1), cnic, name, address, contact_no,\r\n email_address, incomeSource, securityquestion);\r\n // Print and ASK FOR SECURITY QUESTION\r\n System.out.println(\"Its a new Customer\");\r\n System.out.println(\"Password: \" + C.credentials.password);\r\n // add customer to arraylist\r\n customers.add(C);\r\n // save new customer to database\r\n record.SaveCustomer(C);\r\n // save customer credentials to database\r\n record.SaveCredentials(C.credentials, C.customerID);\r\n\r\n }\r\n int index = -1;\r\n for (int i = 0; i < customers.size(); i++) {\r\n if (customers.get(i).CNIC.equals(cnic))\r\n index = i;\r\n }\r\n\r\n Account A = new Account(String.valueOf(accounts.size() + 1), getDateFormat(), AccountType,\r\n \"Pending\", customers.get(index).customerID);\r\n // add account to customer\r\n accounts.add(A);\r\n customers.get(index).customerAccount.add(A);\r\n // save account to database\r\n record.SaveAccount(A);\r\n }\r\n\r\n }", "BankAccount(String accountType){\n\t\tSystem.out.println(\"NEW ACCOUNT: \" + accountType);\n\t\tthis.accountType = accountType; \n\t}", "GenerateUserAccount () {\r\n }", "@FXML\r\n void createAccount(MouseEvent event) throws SQLException {\r\n ta_employeeAccount.clear();\r\n account();\r\n\r\n }", "public static void main(String[] args) {\n Bank newBank = new Bank(123456789);\n newBank.createAccount(45);\n newBank.createAccount(9);\n newBank.createAccount(342267);\n newBank.createAccount(7);\n newBank.createAccount(3);\n newBank.createAccount(343);\n newBank.createAccount(7);\n newBank.createAccount(789);\n newBank.createAccount(5645);\n //newBank.removeAccount(7);\n //System.out.println(\"New account: \" + newBank.createAccount(44));\n //System.out.println(\"2. account \" + newBank.createAccount(6));\n newBank.printAllAccounts();\n }", "private void createAccounts(){\r\n for(int i = 0; i < accountInTotal; i++){\r\n try {\r\n Account tempAccount = new Account(startingBonds);\r\n theAccounts.add(tempAccount);\r\n } catch(Exception e){\r\n System.err.println(\"Error\");\r\n }\r\n }\r\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void allAcctsStdUserCreation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether the user can successfully enter details in Add new user page and registers it\"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUserCreation();\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewStdUser(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTable(userProfile)\n\t\t.AdduserConfirmationPage()\n\t\t.confirmationPageVerificationLinks();\n\t}", "private void createCheckingAccountsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE checkingAccounts \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY ( START WITH 1000000001, INCREMENT BY 1 ), \" + \"owner INT, \"\n\t\t\t\t\t+ \"balance DOUBLE, \" + \"intRate DOUBLE, \"\n\t\t\t\t\t+ \"timeCreated BIGINT, \" + \"lastPaidInterest DOUBLE, \"\n\t\t\t\t\t+ \"dateOfLastPaidInterest BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table checkingAccounts\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of checkingAccounts table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "public Account(){\r\n System.out.println(\"Called of empty constructor.\");\r\n }", "@Override\n\tpublic void createAccount(Account p) {\n\t\t\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\t\n\t\t\tString deleteFromTable = \"DELETE FROM accounts WHERE owner_id='8'\";\n\t try (Connection conn = conUtil.getConnection();\n\t PreparedStatement pstmt = conn.prepareStatement(deleteFromTable)) {\n\n\t // set the corresponding param\n\t pstmt.setInt(1, p.getOwner_id());\n\t // execute the delete statement\n\t pstmt.executeUpdate();\n\n\t } catch (SQLException e) {\n\t System.out.println(e.getMessage());\n\t }\n\t\t\t\n\t\t\tString sql = \"insert into accounts( owner_id, balance ) values (?,?)\";\n\t\t\tCallableStatement cs = con.prepareCall(sql);\n\t\t\t\n\t\t\tcs.setInt(1, p.getOwner_id());\n\t\t\tcs.setDouble(2, p.getBalance());\n\t\t\t\n\t\t\tcs.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\r\n\tpublic boolean create(Account newAccount) {\n\t\treturn daoref.create(newAccount);\r\n\t}", "public static void main(String[] args) {\n Account firstAccount = new Account(\"first Account\",100.00);\n \n \n System.out.println(\"Initial State\");\n System.out.println(firstAccount);\n \n \n firstAccount.deposit(20);\n System.out.println(\"the balance of first Account is : \" + firstAccount.toString());\n \n \n }", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "public void createUserAccount(UserAccount account);", "@Test(groups = \"Transactions Tests\", description = \"Create new transaction\")\n\tpublic void createNewTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"Extra income\");\n\t\tTransactionsScreen.typeTransactionAmount(\"300\");\n\t\tTransactionsScreen.clickTransactionType();\n\t\tTransactionsScreen.typeTransactionNote(\"Extra income from this month\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"Sub-account created successfully and the value is correct\");\n\n\t\t//Testing if the transaction was created in the 'Double Entry' account, if the value is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"'Double Entry' account also have the transaction and the value is correct\");\n\n\t}", "@Test\n\tpublic void testLoginStandardAccExist() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Session Started Standard\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\t\tassertTrue(\"unable to find that standard account\", testResult);\n\t}", "public final void activateAccount() {\n\t\tthis.setIsAccountLocked(false);\n\t}", "@Override\n\tpublic void addTransactionToDatabase(Transaction trans) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString insertQuery = \"insert into transaction_history values(default, ?, ?, ?, now())\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(insertQuery);\n \n\t\t\tprepStmt.setInt(1, trans.getAccountId());\n\t\t\tprepStmt.setString(2, trans.getUsername());\n\t\t\tprepStmt.setDouble(3, trans.getAmount());\n\t\t\tprepStmt.executeUpdate();\n\t}", "Account() { }", "@Override\n public void onClick(View v) {\n CreateAccount();\n }", "public static void main(String[] args) {\n \n \n \n Admin admin = new Admin();\n admin.setFirstName(\"Admin\");\n admin.setLastName(\"Admin\");\n admin.setEmail(\"peyman@gmail.com\");\n admin.setGender(\"Male\");\n admin.setUserName(\"admin\");\n admin.setPassword(\"7110eda4d09e062aa5e4a390b0a572ac0d2c0220\");\n admin.setPhoneNumber(\"514-999-0000\");\n //cl.setClientCard(new ClientCard(\"12-34-56\", DateTime.now(),cl));\n admin.saveUser();\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n }", "private void createLoginTable() {\r\n jdbcExecutor.executeQuery(new Work() {\r\n @Override\r\n public void execute(Connection connection) throws SQLException {\r\n connection.createStatement().executeUpdate(\"CREATE TABLE login ( id numeric(19,0), user_id numeric(19,0), timestamp TIMESTAMP )\");\r\n }\r\n });\r\n }", "int createAccount(Account account);", "@Override\n public void run(ApplicationArguments args) throws Exception {\n User alice = new User();\n alice.firstName(\"Alice\");\n alice.lastName(\"Alixon\");\n alice.emailAddress(\"alice@example.com\");\n alice.addRoleItem(UserRole.EMPLOYEE);\n alice.phone(\"+31 6 12345678\");\n alice.transactionLimit(BigDecimal.valueOf(100f));\n alice.dayLimit(1000f);\n alice.birthDate(LocalDate.of(2010, 10, 10));\n alice.password(\"idk\");\n\n userService.add(alice);\n\n // Charlie is just a customer\n User bob = new User();\n bob.firstName(\"Bob\");\n bob.lastName(\"Bobson\");\n bob.emailAddress(\"bob@example.com\");\n bob.addRoleItem(UserRole.CUSTOMER);\n bob.phone(\"+31 6 87654321\");\n bob.transactionLimit(BigDecimal.valueOf(50f));\n bob.dayLimit(2000f);\n bob.birthDate(LocalDate.of(2012, 12, 12));\n bob.password(\"idk\");\n\n userService.add(bob);\n\n // Charlie has both the customer and employee role\n User charlie = new User();\n charlie.firstName(\"Charlie\");\n charlie.lastName(\"Charhan\");\n charlie.emailAddress(\"charlie@example.com\");\n charlie.addRoleItem(UserRole.CUSTOMER);\n charlie.addRoleItem(UserRole.EMPLOYEE);\n charlie.phone(\"+31 6 12348765\");\n charlie.transactionLimit(BigDecimal.valueOf(200f));\n charlie.dayLimit(500f);\n charlie.birthDate(LocalDate.of(1980, 8, 18));\n charlie.password(\"idk\");\n\n userService.add(charlie);\n\n // Add account for\n // Bank\n\n Account bank = new Account();\n bank.setBalance(0f);\n bank.setAccountType(AccountType.CURRENT);\n bank.setIBAN(\"NL01INHO0000000001\");\n bank.setMinimumLimit(0f);\n bank.setUserId(null);\n accountRepository.save(bank);\n\n Account account = new Account();\n account.setBalance(1000f);\n account.setAccountType(AccountType.CURRENT);\n account.setIBAN(\"NL01INHO0000000002\");\n account.setMinimumLimit(50f);\n account.setUserId(2);\n accountRepository.save(account);\n\n Account accountBobSave = new Account();\n accountBobSave.setBalance(1000f);\n accountBobSave.setAccountType(AccountType.CURRENT);\n accountBobSave.setIBAN(\"NL01INHO0000000003\");\n accountBobSave.setMinimumLimit(50f);\n accountBobSave.setUserId(2);\n accountRepository.save(accountBobSave);\n\n Account accountSave = new Account();\n accountSave.setBalance(1000f);\n accountSave.setAccountType(AccountType.SAVING);\n accountSave.setIBAN(\"NL01INHO0000000004\");\n accountSave.setMinimumLimit(50f);\n accountSave.setUserId(3);\n accountRepository.save(accountSave);\n\n PostTransBody postTran = new PostTransBody();\n postTran.setAmount(50f);\n postTran.setTransactionType(TransactionType.TRANSFER);\n postTran.setTransferFrom(\"NL01INHO0000000002\");\n postTran.setTransferTo(\"NL01INHO0000000003\");\n\n PostTransBody postWith = new PostTransBody();\n postWith.setAmount(50f);\n postWith.setTransactionType(TransactionType.WITHDRAW);\n postWith.setTransferFrom(\"NL01INHO0000000002\");\n postWith.setTransferTo(\"\");\n\n PostTransBody postDrop = new PostTransBody();\n postDrop.setAmount(50f);\n postDrop.setTransactionType(TransactionType.DEPOSIT);\n postDrop.setTransferFrom(\"\");\n postDrop.setTransferTo(\"NL01INHO0000000002\");\n\n transactionService.createTransaction(bob.getEmailAddress(), postTran);\n\n transactionService.createTransaction(bob.getEmailAddress(), postWith);\n\n transactionService.createTransaction(charlie.getEmailAddress(), postDrop);\n }", "public void credit(){\n\t\tSystem.out.println(\"HSBC BANK :: CREDIT\");\n\t}", "@Override\r\n\tpublic void showAccount() {\n\t\t\r\n\t}", "void startTA() {\r\n ta_employeeAccount.appendText(\"Are you an employee with the shelter? \\n\" +\r\n \"enter your Last name and First Name \\n\" +\r\n \"Then enter a Password to create an account \\n\\n\" +\r\n \"P.S dont forget the employee code given \\n\" +\r\n \"by the shelter\");\r\n }", "public boolean makeNewAccount(String name, BigDecimal balance, int type)\n throws SQLException, ConnectionFailedException, DatabaseInsertException {\n if (currentCustomerAuthenticated && currentUserAuthenticated) {\n int id = DatabaseInsertHelper.insertAccount(name, balance, type);\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n // find out what account type the account is and create and add that account to the customer\n if (type == map.accountTypes.get(AccountTypes.CHEQUING)) {\n ChequingAccount chequing = new ChequingAccountImpl(id, name, balance);\n currentCustomer.addAccount(chequing);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.SAVINGS)) {\n SavingsAccount savings = new SavingsAccountImpl(id, name, balance);\n currentCustomer.addAccount(savings);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.TFSA)) {\n TFSA tfsa = new TFSAImpl(id, name, balance);\n currentCustomer.addAccount(tfsa);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.RESTRICTEDSAVING)) {\n RestrictedSavingsAccount rsavings = new RestrictedSavingsAccountImpl(id, name, balance);\n currentCustomer.addAccount(rsavings);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n }\n return false;\n }\n System.out.println(\"reached here\");\n throw new ConnectionFailedException();\n }", "public void printTransaction() {\n\t\tdao.printTransaction();\r\n\t\t\r\n\t}", "public void create() {\n String salt = PasswordUtils.getSalt(30);\n\n // Protect user's password. The generated value can be stored in DB.\n String mySecurePassword = PasswordUtils.generateSecurePassword(password, salt);\n\n // Print out protected password\n System.out.println(\"My secure password = \" + mySecurePassword);\n System.out.println(\"Salt value = \" + salt);\n Operator op = new Operator();\n op.setUsername(username);\n op.setDescription(description);\n op.setSalt(salt);\n op.setPassword(mySecurePassword);\n op.setRol(rol);\n operatorService.create(op);\n message = \"Se creo al usuario \" + username;\n username = \"\";\n description = \"\";\n password = \"\";\n rol = null;\n }", "@Override\n public void createOnlineAccount(String name, \n String ssn, String id, String psw)\n {\n final String url = \n \"jdbc:mysql://mis-sql.uhcl.edu/<username>?useSSL=false\";\n \n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n \n try\n {\n \n //connect to the databse\n connection = DriverManager.getConnection(url, \n db_id, db_password);\n connection.setAutoCommit(false);\n //crate the statement\n statement = connection.createStatement();\n \n //do a query\n resultSet = statement.executeQuery(\"Select * from onlineAccount \"\n + \"where id = '\" + id + \"' or ssn = '\"\n + ssn + \"'\");\n \n if(resultSet.next())\n {\n //either the ssn is used or the id is used\n System.out.println(\"Account creation failed\");\n }\n else\n {\n //insert a record into onlineAccount\n int r = statement.executeUpdate(\"insert into onlineAccount values\"\n + \"('\" + name + \"', '\" + id + \"', '\" + ssn + \"', '\"\n + psw +\"')\");\n System.out.println(\"Account creation successful!\");\n System.out.println();\n }\n connection.commit();\n connection.setAutoCommit(true);\n \n }\n catch (SQLException e)\n {\n System.out.println(\"Something wrong during the creation process!\");\n e.printStackTrace();\n }\n finally\n {\n //close the database\n try\n {\n resultSet.close();\n statement.close();\n connection.close();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n }", "void addNewAccountToFile(Account newAccount);", "@Override\r\n\tpublic boolean createAccount(Account account) throws Exception {\n\t\tboolean flag = false;\r\n\t\ttry {\r\n\t\t\tflag = this.dao.createAccount(account);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "@Override\r\n\tpublic boolean createAccount(Account account) {\n\t\treturn dao.createAccount(account);\r\n\t}", "public void run() {\n int id = getIdentity();\n iUser user = createUser(id);\n boolean userCreated = (user != null);\n if (userCreated) {\n presenter.printAccountCreated();\n } else {\n presenter.printRequestDeclined();\n }\n }", "public void createAccount(Account account) \n\t\t\tthrows SQLException, RegisterAccountDBException {\n\t\t\n\t\tString msg =\"Could not create account\";\n\t\tint updateRows=0;\n\t\t\n\t\ttry {\n\t\t\t//if(!accountExist(account.getPersonnr())) {\n\t\t\tif(getStudentInfo(account.getPersonnr())==null) {\n\t\t\tString personnr = account.getPersonnr();\n\t\t\tcreateAccountStmt.setString(1, personnr);\n\t\t updateRows = createAccountStmt.executeUpdate();\n\t\t if(updateRows!=1) {\n\t\t \thandleException(msg, null);\n\t\t }\n\t\t\tconnection.commit();\n\t\t }\n\t\t}catch (SQLException ex) {\n\t\t\thandleException(msg , ex);\t\n\t\t}\n\t}", "@Override\n public void createNewAccount(String accountType) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.create_container, new CreateAccount().newInstance(accountType)).commit();\n }", "void updateAccount();", "@Override\n\tpublic void saveData()\n\t{\n ssaMain.d1.pin = ssaMain.tmp_pin1;\n ssaMain.d1.balance = ssaMain.tmp_balance1;\n System.out.println(\"Your account has been established successfully.\");\n\t}", "@Override\n public int execute() throws InterruptedOperationException, CancelOperationException {\n Logger logger = Log4j.getLogger();\n int success = 0;\n try {\n String accountNumber = null;\n BigDecimal amount = BigDecimal.ONE;\n Transaction transaction;\n LocalDateTime now;\n String userId = BankApp.getCurrentUser().getUserId();\n List<String> accountNumbers = accountDao.getAccountNumbers(userId);\n ConsoleHelper.println(\"\");\n ConsoleHelper.displayMenuBanner();\n ConsoleHelper.printlnWithTab(\"[DEPOSIT]\");\n ConsoleHelper.printAccountList();\n\n boolean isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Into: \");\n String input = ConsoleHelper.readString();\n for (int i = 1; i <= accountNumbers.size(); i++) {\n if (input.equals(String.valueOf(i))) {\n accountNumber = accountNumbers.get(i - 1);\n isValidInput = true;\n break;\n }\n }\n\n } while (!isValidInput);\n\n isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Amount: \");\n String input = ConsoleHelper.readString();\n try {\n double inputValue = Double.parseDouble(input);\n amount = BigDecimal.valueOf(inputValue);\n int decimalPlaces = ConsoleHelper.getNumberOfDecimalPlaces(amount);\n if (decimalPlaces == 0 && amount.compareTo(BigDecimal.valueOf(0)) > 0) {\n isValidInput = true;\n } else {\n ConsoleHelper.printlnWithTab(\"Invalid amount, we only accept whole number deposit.\");\n }\n } catch (NumberFormatException e) {\n // the amount format is not valid\n }\n } while (!isValidInput);\n\n int countAccount = accountDao.deposit(accountNumber, amount);\n now = LocalDateTime.now();\n Account account = accountDao.getAccount(accountNumber);\n transaction = new Transaction(TransactionType.DEPOSIT, userId, now, amount, account);\n int countTransaction = transactionDao.addTransaction(transaction);\n success = countAccount == 1 && countTransaction == 1 ? 1 : 0;\n if (success == 1) {\n ConsoleHelper.printlnWithTab(\"Deposit completed.\");\n ConsoleHelper.println(\"\");\n } else {\n ConsoleHelper.printlnWithTab(\"System failure, deposit cancelled. Please try later.\");\n }\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n logger.error(\"Interrupted Exception when thread sleep\", e);\n }\n } catch (CancelOperationException e) {\n // do nothing, allow user to return to main menu\n }\n return success;\n }", "@Override\r\n\t\t\tpublic void onSwitchAccount() {\n\t\t\t\tshowToast(\"onSwitchAccount---\");\r\n\t\t\t}", "public void editAccount() {\n try {\n editAccountEndpointLocal.editAccount(accountDTO);\n ResourceBundles.emitMessageWithFlash(null,\"page.edit.account.message\");\n } catch (AppOptimisticLockException ex) {\n log.severe(ex.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, \"error.account.optimisticlock\");\n } catch (ExceededTransactionRetriesException ex) {\n log.severe(ex.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, ex.getMessage());\n } catch (DatabaseQueryException ex) {\n log.severe(ex.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, ex.getMessage());\n } catch (DatabaseConnectionException ex){\n log.severe(ex.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, ex.getMessage());\n } catch (ValidationException e) {\n log.severe(e.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageByPlainText(null, e.getMessage());\n } catch (AppBaseException e) {\n log.severe(e.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, e.getMessage());\n }\n }", "private void updateAccountStatus() {\n\r\n }", "Account refresh();", "public void addTrainingInitialAdmin(TrainingInitialAdmin ti) {\n Integer id = null;\n\n Session session = ConnectionFactory.getInstance().getSession();\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n\n session.saveOrUpdate(ti);\n tx.commit();\n\n\n } catch (HibernateException e) {\n try {\n tx.rollback(); //error\n } catch (HibernateException he) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n\n }", "public void logincredentials() {\n\t\tutil.entertext(prop.getValue(\"locators.text.uname\"), \"admin\");\n\t\tutil.entertext(prop.getValue(\"locators.text.password\"), \"Admin123\");\n\t\tutil.ClickElement(prop.getValue(\"locators.button.regdesk\"));\n\t\tutil.ClickElement(prop.getValue(\"locators.button.login\"));\n\t\tlogreport.info(\"logged into the application\");\n\n\t}", "public void recreateAccount(int sin)\n\t{\n\t\tthis.name=name;\n\t\tthis.sin=sin;\n\t\tthis.balance=this.balance;\n\t}", "Account.Update update();", "public Account createAccount(Account account){\n\t\t\n\t\taccount.createdDate = new Date();\n\t\taccount.isActive = true;\n\t\t\n\t\t\n\t\taccount.person = personService.createPerson(account.person);\n\t\taccount.person.personSettings = personalSettingsService.createSettings(account.person.personSettings);\n\t\t\n\t\t\n\t\treturn account;\n\t}", "private static void loginToAccount() {\n\n\t\tSystem.out.println(\"Please enter your userName : \");\n\t\tString userName=scan.nextLine();\n\n\t\tSystem.out.println(\"Please enter your Password : \");\n\t\tString password=scan.nextLine();\n\n\t\tif(userName.equals(userName)&& password.equals(password))\n\t\t\tSystem.out.println(\"Welcome to AnnyBank\");\n\n\t\ttransactions();\n\t}", "public void createAccount(String acctId, String pass, String cardNo, String email) {\n accountId = acctId;\n password = pass;\n cardNumber = cardNo;\n customerEmail = email;\n \n try {\n //conect to database\n Class.forName(\"com.mysql.jdbc.Driver\");\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/make_order_request\", \"root\", \"admin\");\n Statement mystmt = con.createStatement();\n\n //write SQL query to update code in database\n String query = \"INSERT INTO customer_account(account_id, password, card_no, customer_email) VALUES (?,?,?,?)\";\n PreparedStatement ps = con.prepareStatement(query);\n ps.setString(1, accountId);\n ps.setString(2, password);\n ps.setInt(3, Integer.parseInt(cardNumber));\n ps.setString(4, customerEmail);\n\n ps.executeUpdate();\n\n return;\n\n } catch (Exception e) {\n e.printStackTrace();\n \n }\n\n }", "protected void finishLogin() {\n\t\tLog.i(TAG, \"finishLogin()\");\n\t\tfinal Account account = new Account(data.getmHost(), Constants.ACCOUNT_TYPE);\n\n\t\tif (data.ismRequestNewAccount()) {\n\t\t\tBundle userData = new Bundle();\n\t\t\tuserData.putString(Constants.PARAM_USERNAME, data.getmUsername());\n\t\t\tuserData.putString(Constants.PARAM_PORT, data.getmPort() + \"\");\n\t\t\tuserData.putString(Constants.PARAM_HOST, data.getmHost());\n\t\t\tuserData.putString(Constants.PARAM_ENCRYPTION, data.getmEncryption() + \"\");\n\t\t\tuserData.putString(Constants.PARAM_SEARCHFILTER, data.getmSearchFilter());\n\t\t\tuserData.putString(Constants.PARAM_BASEDN, data.getmBaseDN());\n\t\t\t// Mappings for LDAP data\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.FIRSTNAME, data.getmFirstName());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.LASTNAME, data.getmLastName());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.TELEPHONE, data.getmOfficePhone());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.MOBILE, data.getmCellPhone());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.HOMEPHONE, data.getmHomePhone());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.MAIL, data.getmEmail());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.PHOTO, data.getmImage());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.STREET, data.getmStreet());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.CITY, data.getmCity());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.ZIP, data.getmZip());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.STATE, data.getmState());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.COUNTRY, data.getmCountry());\n\t\t\tdata.getmAccountManager().addAccountExplicitly(account, data.getmPassword(), userData);\n\n\t\t\t// Set contacts sync for this account.\n\t\t\tContentResolver.setSyncAutomatically(account, ContactsContract.AUTHORITY, true);\n\t\t\tContactManager.makeGroupVisible(account.name, getContentResolver());\n\t\t} else {\n\t\t\tdata.getmAccountManager().setPassword(account, data.getmPassword());\n\t\t}\n\t\tfinal Intent intent = new Intent();\n\t\tdata.setmAuthtoken(data.getmPassword());\n\t\tintent.putExtra(AccountManager.KEY_ACCOUNT_NAME, account.name);\n\t\tintent.putExtra(AccountManager.KEY_ACCOUNT_TYPE, Constants.ACCOUNT_TYPE);\n\t\tif (data.getmAuthtokenType() != null && data.getmAuthtokenType().equals(Constants.AUTHTOKEN_TYPE)) {\n\t\t\tintent.putExtra(AccountManager.KEY_AUTHTOKEN, data.getmAuthtoken());\n\t\t}\n\t\tsetAccountAuthenticatorResult(intent.getExtras());\n\t\tsetResult(RESULT_OK, intent);\n\t\tfinish();\n\t}", "public static void createTable() throws SQLException\n {\n Statement statement = ConnectionManager.getConnection()\n .createStatement();\n\n statement.executeUpdate(\"DROP TABLE IF EXISTS Account\");\n statement\n .executeUpdate(\"CREATE TABLE Account(accountId INTEGER PRIMARY KEY AUTOINCREMENT, name, address, manager)\");\n\n statement.close();\n\n insertAccount(new Account(0, \"Administrator\", \"\", true));\n\n PreparedStatement ps = ConnectionManager\n .getConnection()\n .prepareStatement(\n \"UPDATE sqlite_sequence SET seq = ? WHERE name = 'Account'\");\n ps.setInt(1, Account.LOW_ACCOUNT_ID - 1);\n ps.executeUpdate();\n ps.close();\n }", "@Override\n public void actionPerformed(ActionEvent e){\n int starNum = Integer.valueOf(JOptionPane.showInputDialog(\"Starting Balance?\"));\n \n String nam = JOptionPane.showInputDialog(\"Account Name?\");\n \n String type = JOptionPane.showInputDialog(\"Type Of Account?\");\n \n Account newAcc = null;\n \n if(type.equals(\"Checking\")) {\n \n newAcc = new CheckingAccount(nam, starNum);\n \n } else {\n \n newAcc = new SavingsAccount(nam, starNum);\n \n }\n \n bankSystem.addAcc(newAcc);\n \n current = newAcc;\n \n }", "private void addAccount(Account account)\n\t {\n\t\t if(accountExists(account)) return;\n\t\t \n\t\t ContentValues values = new ContentValues();\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_USERNAME, account.getUsername());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_BALANCE, account.getBalance());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_AUTH_TOKEN, account.getAuthenticationToken());\n\t\t \n\t\t db.insert(DatabaseContract.AccountContract.TABLE_NAME,\n\t\t\t\t null,\n\t\t\t\t values);\n\t\t \n\t }", "public void createAdmin()\r\n\t{\r\n\t\tSystem.out.println(\"Administrator account not exist, please create the administrator account by setting up a password for it.\");\r\n\t\tString password=\"\",repassword=\"\";\r\n\t\tboolean flag=false;\r\n\t\twhile(!flag)\r\n\t\t{\r\n\t\t\tboolean validpassword=false;\r\n\t\t\twhile(!validpassword)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter the password: \");\r\n\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\tif(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"Please re-enter the password: \");\r\n\t\t\trepassword=sc.nextLine();\r\n\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\tif(!flag)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString hash_password=hashfunction(password); \r\n\t\tString last_login=java.time.LocalDate.now().toString();\r\n\t\tuser_records.add(new User(\"administrator\",hash_password,\"administrator\",\"\",0,0,last_login,false));\r\n\t\tSystem.out.println(\"Administrator account created successfully!\");\r\n\t}", "public void doLog() {\n SelfInvokeTestService self = (SelfInvokeTestService)context.getBean(\"selfInvokeTestService\");\n self.selfLog();\n //selfLog();\n }", "public static void main (String[] args)\r\n{\nAccount a = new SavingsAccount(\"john\",500,4);\r\nSystem.out.println(\"\\n Savings Account details\");\r\nSystem.out.println(\"----------------------\");\r\nSystem.out.println(\"\"+a.getName()+\"has an initial balance of:\"+a.getBalance());\r\na.deposit(200);\r\na.withdraw(200);\r\nSystem.out.println(\"\"+a.getName()+\"at the end of transaction has a balance of \"+a.getBalance());\r\n\r\nSystem.out.println(\"\\n checking account details\");\r\nSystem.out.println(\"----------------------\");\r\nCheckingAccount cAobj = new CheckingAccount(\"Stephen\",200,200);\r\nSystem.out.println(\"\\n Savings Account details\");\r\nSystem.out.println(\"----------------------\");\r\nSystem.out.println(\"\"+cAobj.getName()+\"has an initial balance of:\"+cAobj.getBalance());\r\ncAobj.deposit(200);\r\ncAobj.withdraw(500);\r\nSystem.out.println(\"\"+cAobj.getName()+\"at the end of transaction has a balance of \"+cAobj.getBalance());\r\n}" ]
[ "0.672681", "0.6305094", "0.6298384", "0.570925", "0.5673103", "0.5597531", "0.55646366", "0.5524966", "0.5494628", "0.5488504", "0.54831636", "0.54305553", "0.54222965", "0.5378733", "0.5367744", "0.5363199", "0.5347561", "0.5337572", "0.5322875", "0.53217417", "0.5315899", "0.530981", "0.530594", "0.5285889", "0.5285057", "0.5283475", "0.5233813", "0.52319896", "0.5225622", "0.5222899", "0.5207365", "0.520278", "0.52016896", "0.51977885", "0.5195939", "0.51810825", "0.5172034", "0.5171066", "0.5165866", "0.516383", "0.51574224", "0.5144901", "0.51281583", "0.51264805", "0.5121025", "0.5107981", "0.5099792", "0.50943244", "0.50942147", "0.5088838", "0.5076663", "0.50740916", "0.5073738", "0.50644636", "0.5057356", "0.50513047", "0.5047103", "0.504233", "0.5037117", "0.5028508", "0.50231814", "0.50190824", "0.501187", "0.5006977", "0.50051147", "0.50021493", "0.49930903", "0.49882483", "0.49824852", "0.4979798", "0.4977837", "0.49747875", "0.4970491", "0.49650726", "0.4960146", "0.49575478", "0.49574745", "0.49571934", "0.49541077", "0.49358347", "0.49333617", "0.49325648", "0.49317157", "0.4929656", "0.4929138", "0.492312", "0.49186054", "0.4916557", "0.49099776", "0.49065876", "0.49060974", "0.48982593", "0.48970425", "0.48959303", "0.4885213", "0.48800543", "0.4877012", "0.48751456", "0.48744267", "0.48707166" ]
0.5414147
13
Execute new account creation with given parameters
public void executeNewAccount(int account_id, int balance, Connection con) throws SQLException { PreparedStatement stmt = con.prepareStatement( "insert into ACCOUNTS (ACCOUNT_ID, BALANCE, TIMESTAMP) values (?,?,?)"); stmt.setInt(1, account_id); stmt.setInt(2, balance); stmt.setTimestamp(3, new Timestamp(System.currentTimeMillis())); stmt.execute(); stmt.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Account create();", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "public void createUserAccount(UserAccount account);", "int createAccount(Account account);", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }", "protected void createAccount(JSONArray args, final CallbackContext callbackContext) {\n\t\tLog.d(TAG, \"CREATEACCOUNT\");\n\t\ttry {\n\t\t\tString email = args.getString(0);\n\t\t\tString password = args.getString(1);\n\t\t\tString userName = null;\n\t\t\tif (args.length() == 3) {\n\t\t\t\tuserName = args.optString(2);\n\t\t\t}\n\t\t\tNotificare.shared().createAccount(email, password, userName, new NotificareCallback<Boolean>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Boolean result) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.success();\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onError(NotificareError error) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.error(error.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (JSONException e) {\n\t\t\tcallbackContext.error(\"JSON parse error\");\n\t\t}\n\t}", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "public abstract void createAccount(JSONObject account);", "AionAddress createAccount(String password);", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "Account create(Context context);", "WithCreate withProperties(AccountProperties properties);", "public CreateAccountTest(String arg1, int arg2, int arg3, int arg4, int arg5){\n\t\tthis.arg1 = arg1;\n\t\tthis.arg2 = arg2;\n\t\tthis.arg3 = arg3;\n\t\tthis.arg4 = arg4;\n\t\tthis.arg5 = arg5;\n\t}", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "private void createNewAccount() {\n\n // if user has not provided valid data, do not create an account and return from method\n if (!validateData()) {\n return;\n }\n\n // If flag value is false, that means email provided by user doesn't exists in database\n // so initialize the loader to create a new account\n if (!mEmailExistsFlag) {\n getLoaderManager().initLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n } else {\n // If flag is true, that means email provided by user already exists in database\n // so restart the loader and allow user to enter new email address for account\n getLoaderManager().restartLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n }\n\n }", "GenerateUserAccount () {\r\n }", "private void createAccount(String username, String passphrase, String email) {\n\tif (!AccountManager.getUniqueInstance().candidateUsernameExists(username)) {\n\t try {\n\t\tAccountManager.getUniqueInstance().createCandidateAccount(username, \n\t\t\t\t\t\t\t\t\t passphrase, \n\t\t\t\t\t\t\t\t\t email);\n\t } catch (Exception e) {\n\t\tthrow new RuntimeException(\"creation failed\");\n\t }\n\t} else {\n\t throw new RuntimeException(\"username already exists\");\n\t}\n }", "public abstract void createAccount(final GDataAccount account)\n throws ServiceException;", "public void createAccount(String username, String password) {\n\t\tString send;\n\t\tsend = \"<NewAccount=\" + username + \",\" + password + \">\";\n\n\t\ttry {\n\t\t\tdos.writeUTF(send);\n\t\t} catch (Exception e) {\n\t\t\t//TODO\n\t\t}\n\t}", "UserAccount createUserAccount(User user, double amount);", "Document createAccount(String username, String accountDisplayName,\n String accountFullName, double balance, double interestRate);", "@Override\n\tpublic void createAccount(Account p) {\n\t\t\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\t\n\t\t\tString deleteFromTable = \"DELETE FROM accounts WHERE owner_id='8'\";\n\t try (Connection conn = conUtil.getConnection();\n\t PreparedStatement pstmt = conn.prepareStatement(deleteFromTable)) {\n\n\t // set the corresponding param\n\t pstmt.setInt(1, p.getOwner_id());\n\t // execute the delete statement\n\t pstmt.executeUpdate();\n\n\t } catch (SQLException e) {\n\t System.out.println(e.getMessage());\n\t }\n\t\t\t\n\t\t\tString sql = \"insert into accounts( owner_id, balance ) values (?,?)\";\n\t\t\tCallableStatement cs = con.prepareCall(sql);\n\t\t\t\n\t\t\tcs.setInt(1, p.getOwner_id());\n\t\t\tcs.setDouble(2, p.getBalance());\n\t\t\t\n\t\t\tcs.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "HttpStatus createUserAccount(final String realm, final String username, final String firstName,\n\t\t\tfinal String lastName, final String email, final String password);", "int newUser(String username, String password, Time creationTime);", "@POST\r\n @Path(\"/create\")\r\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public NewAccount createNewCustomerAccount(@FormParam(\"accountNumber\") int accountNumber,\r\n @FormParam(\"accountType\") String accountType,\r\n @FormParam(\"accountBalance\") double accountBalance\r\n ){\r\n return newaccountservice.createNewAccount(accountNumber, accountType, accountBalance);\r\n }", "public void creatUser(String name, String phone, String email, String password);", "private void createAccount() {\n mAuth.createUserWithEmailAndPassword(mTextEmail.getText().toString(), mTextPassword.getText().toString()).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n if(!task.isSuccessful()){\n Toast.makeText(SignInActivity.this, \"Account creation failed!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(SignInActivity.this, \"Account creation success!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@Override\n\tpublic String createUserAccountQuery(String username, String password, String firstName, String lastName,\n\t\t\tString dob, String accountType, String accountID, String creationDate, String requestDate,\n\t\t\tString phoneNumber, String email, boolean isApproved) {\n\t\treturn null;\n\t}", "public void createAccount(Account account) \n\t\t\tthrows SQLException, RegisterAccountDBException {\n\t\t\n\t\tString msg =\"Could not create account\";\n\t\tint updateRows=0;\n\t\t\n\t\ttry {\n\t\t\t//if(!accountExist(account.getPersonnr())) {\n\t\t\tif(getStudentInfo(account.getPersonnr())==null) {\n\t\t\tString personnr = account.getPersonnr();\n\t\t\tcreateAccountStmt.setString(1, personnr);\n\t\t updateRows = createAccountStmt.executeUpdate();\n\t\t if(updateRows!=1) {\n\t\t \thandleException(msg, null);\n\t\t }\n\t\t\tconnection.commit();\n\t\t }\n\t\t}catch (SQLException ex) {\n\t\t\thandleException(msg , ex);\t\n\t\t}\n\t}", "public int createAccount(User user) throws ExistingUserException,\n UnsetPasswordException;", "@Test(priority=1, dataProvider=\"User Details\")\n\t\tpublic void registration(String firstname,String lastname,String emailAddress,\n\t\t\t\tString telephoneNum,String address1,String cityName,String postcodeNum,\n\t\t\t\tString country,String zone,String pwd,String confirm_pwd) throws Exception{\n\t\t\t\n\t\t\thomePage = new HomePage(driver);\n//'**********************************************************\t\t\t\n//Calling method to click on 'Create Account' link\n\t\t\tregistraionPageOC = homePage.clickCreateAccount();\n//'**********************************************************\t\t\t\n//Calling method to fill user details in Registration page and verify account is created\n\t\t\tregistraionPageOC.inputDetails(firstname,lastname,emailAddress,telephoneNum,address1,cityName,postcodeNum,country,zone,pwd,confirm_pwd);\n\t\t\ttry{\n\t\t\tAssert.assertEquals(\"Your Account Has Been Created!\", driver.getTitle(),\"Titles Not Matched: New Account Not Created\");\n\t\t\textentTest.log(LogStatus.PASS, \"Registration: New User Account is created\");\n\t\t\t}catch(Exception e){\n\t\t\t\textentTest.log(LogStatus.FAIL, \"Registration is not successful\");\n\t\t\t}\n\t\t}", "BankAccount(){\n\t\tSystem.out.println(\"NEW ACCOUNT CREATED\");\t\n\t}", "public Account createAccount(Account account){\n\t\t\n\t\taccount.createdDate = new Date();\n\t\taccount.isActive = true;\n\t\t\n\t\t\n\t\taccount.person = personService.createPerson(account.person);\n\t\taccount.person.personSettings = personalSettingsService.createSettings(account.person.personSettings);\n\t\t\n\t\t\n\t\treturn account;\n\t}", "@Override\n public void createOnlineAccount(String name, \n String ssn, String id, String psw)\n {\n final String url = \n \"jdbc:mysql://mis-sql.uhcl.edu/<username>?useSSL=false\";\n \n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n \n try\n {\n \n //connect to the databse\n connection = DriverManager.getConnection(url, \n db_id, db_password);\n connection.setAutoCommit(false);\n //crate the statement\n statement = connection.createStatement();\n \n //do a query\n resultSet = statement.executeQuery(\"Select * from onlineAccount \"\n + \"where id = '\" + id + \"' or ssn = '\"\n + ssn + \"'\");\n \n if(resultSet.next())\n {\n //either the ssn is used or the id is used\n System.out.println(\"Account creation failed\");\n }\n else\n {\n //insert a record into onlineAccount\n int r = statement.executeUpdate(\"insert into onlineAccount values\"\n + \"('\" + name + \"', '\" + id + \"', '\" + ssn + \"', '\"\n + psw +\"')\");\n System.out.println(\"Account creation successful!\");\n System.out.println();\n }\n connection.commit();\n connection.setAutoCommit(true);\n \n }\n catch (SQLException e)\n {\n System.out.println(\"Something wrong during the creation process!\");\n e.printStackTrace();\n }\n finally\n {\n //close the database\n try\n {\n resultSet.close();\n statement.close();\n connection.close();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n }", "String addAccount(UserInfo userInfo);", "public void createAccount() {\n\t\t// Assigns variables based on user input\n\t\tString username = usernameField.getText();\n\t\tString firstName = firstNameField.getText();\n\t\tString lastName = lastNameField.getText();\n\t\tString address = addressField.getText();\n\t\tString postCode = postcodeField.getText();\n\t\tString phoneNumber = phoneNumberField.getText();\n\t\tlong phoneNumberLong;\n\t\tif (username.isEmpty() || firstName.isEmpty() || lastName.isEmpty() || address.isEmpty() || postCode.isEmpty()\n\t\t\t\t|| phoneNumber.isEmpty()) { // Checks if number is correct format\n\n\t\t\tAlert alert = new Alert(AlertType.ERROR); // Error message\n\t\t\talert.setTitle(\"Error\");\n\n\t\t\talert.setHeaderText(\"Could not create an user\");\n\t\t\talert.setContentText(\"Make sure you fill all fields and press button again\");\n\t\t\talert.showAndWait();\n\n\t\t\treturn;\n\t\t}\n\n\t\telse {\n\t\t\ttry {\n\t\t\t\tphoneNumberLong = Long.parseLong(phoneNumber);\n\t\t\t} catch (Exception e) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"Wrong format of phone number\");\n\t\t\t\talert.setContentText(\"Please enter correct phone number\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(FileReader.exists(username)) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"User with the username \"+ username +\" already exists. \");\n\t\t\t\talert.setContentText(\"Please choose another username\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tString userdata = \"\";\n\t\t\tuserdata += \"\\n Username: \" + username;\n\t\t\tuserdata += \"\\n First name: \" + firstName;\n\t\t\tuserdata += \"\\n Last name: \" + lastName;\n\t\t\tuserdata += \"\\n Address: \" + address;\n\t\t\tuserdata += \"\\n Post code: \" + postCode;\n\t\t\tuserdata += \"\\n Phone number: \" + phoneNumberLong;\n\t\t\t\n\n\t\t\tif(custom) {\n\t\t\t\tavatarIndex = 101;\n\t\t\t\t// Gives users the custom avatar\n\t\t\t\tFile file1 = new File(\"artworkImages/\" + username);\n\t\t\t\tfile1.mkdir();\n\t\t\t\tPath path = Paths.get(\"customAvatars/\" + username + \".png\");\n\t\t\t\tString path1 = \"tmpImg.png\";\n\t\t\t\tFile file = new File(path1);\n\n\t\t\t\ttry {\n\t\t\t\t\tFiles.copy(file.toPath(), path, StandardCopyOption.REPLACE_EXISTING);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tUser user = new User(username, firstName, lastName, address, postCode, phoneNumberLong, avatarIndex);\n\t\t\tFileReader.addUser(user); // Creates user\n\n\t\t\ttry {\n\t\t\t\tWriter.writeUserFile(user); // Adds user to memory\n\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\n\t\t\tAlert alert = new Alert(AlertType.INFORMATION); // Success message\n\t\t\talert.setTitle(\"Success\");\n\n\t\t\talert.setHeaderText(\"The user has been created\");\n\t\t\talert.setContentText(\"Close this window to return to login screen\");\n\t\t\talert.showAndWait();\n\n\t\t\tcreateAccountButton.getScene().getWindow().hide();\n\t\t}\n\n\t}", "public void createAccountOnClick(View v){\n\n String email = emailTextView.getText().toString();\n String password = passwordTextView.getText().toString();\n createEmailAndPasswordAccount(email, password);\n\n }", "public void createAccount(String acctId, String pass, String cardNo, String email) {\n accountId = acctId;\n password = pass;\n cardNumber = cardNo;\n customerEmail = email;\n \n try {\n //conect to database\n Class.forName(\"com.mysql.jdbc.Driver\");\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/make_order_request\", \"root\", \"admin\");\n Statement mystmt = con.createStatement();\n\n //write SQL query to update code in database\n String query = \"INSERT INTO customer_account(account_id, password, card_no, customer_email) VALUES (?,?,?,?)\";\n PreparedStatement ps = con.prepareStatement(query);\n ps.setString(1, accountId);\n ps.setString(2, password);\n ps.setInt(3, Integer.parseInt(cardNumber));\n ps.setString(4, customerEmail);\n\n ps.executeUpdate();\n\n return;\n\n } catch (Exception e) {\n e.printStackTrace();\n \n }\n\n }", "public CreateInstanceAccountResponse CreateInstanceAccount(CreateInstanceAccountRequest req) throws TencentCloudSDKException{\n JsonResponseModel<CreateInstanceAccountResponse> rsp = null;\n try {\n Type type = new TypeToken<JsonResponseModel<CreateInstanceAccountResponse>>() {\n }.getType();\n rsp = gson.fromJson(this.internalRequest(req, \"CreateInstanceAccount\"), type);\n } catch (JsonSyntaxException e) {\n throw new TencentCloudSDKException(e.getMessage());\n }\n return rsp.response;\n }", "void createCustomerAccount(String mobileNumber) throws Exception;", "public AccountCreator createAccountCreator(String xmlrpcUrl);", "Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);", "private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"driver@uclive.ac.nz\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }", "public static ATMAccount createAccount() {\r\n\t\tString userName;\r\n\t\tdouble userBalance;\r\n\t\tint digit = -1;\r\n\r\n\t\tSystem.out.println(\"Please enter a name for the account: \");\r\n\t\tuserInput.nextLine();\r\n\t\tuserName = userInput.nextLine();\r\n\r\n\t\t//Requests digits 1 by 1 for the pin number\r\n\t\tString accPin = \"\";\r\n\t\tfor (int i = 1; i < 5; i++) {\r\n\t\t\tdigit = -1;\r\n\t\t\tSystem.out.println(\"Please enter digit #\" + i + \" of\" + \"your pin.\");\r\n\t\t\tdo {\r\n\t\t\t\tdigit = userInput.nextInt();\r\n\t\t\t} while (digit < 0 || digit > 9);\r\n\t\t\taccPin += digit;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Please put the amount of money you would like to \" + \"initially deposit into the account: \");\r\n\t\tuserBalance = userInput.nextDouble();\r\n\t\tRandom accountIDGenerator = new Random();\r\n\t\tint userID = accountIDGenerator.nextInt(2147483647);\r\n\t\tATMAccount account = new ATMAccount(userID, userName, Integer.parseInt(accPin), userBalance);\r\n\t\tSystem.out.println(\"Acount Information: \\n\"+account.toString());\r\n\t\treturn account;\r\n\t}", "public void create() {\n String salt = PasswordUtils.getSalt(30);\n\n // Protect user's password. The generated value can be stored in DB.\n String mySecurePassword = PasswordUtils.generateSecurePassword(password, salt);\n\n // Print out protected password\n System.out.println(\"My secure password = \" + mySecurePassword);\n System.out.println(\"Salt value = \" + salt);\n Operator op = new Operator();\n op.setUsername(username);\n op.setDescription(description);\n op.setSalt(salt);\n op.setPassword(mySecurePassword);\n op.setRol(rol);\n operatorService.create(op);\n message = \"Se creo al usuario \" + username;\n username = \"\";\n description = \"\";\n password = \"\";\n rol = null;\n }", "@Override\n public void onClick(View v) {\n Phone = RegisterPhone.getText().toString();\n Password = RegisterPassword.getText().toString();\n Name = RegisterName.getText().toString();\n\n\n CreateNewAccount(Phone,Password,Name);\n }", "public CoinbaseAccount createCoinbaseAccount(String name) throws IOException {\n\n class Payload {\n @JsonProperty\n String name;\n Payload(String name) {\n this.name = name;\n }\n }\n \n Payload payload = new Payload(name);\n\n String path = \"/v2/accounts\";\n String apiKey = exchange.getExchangeSpecification().getApiKey();\n BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();\n String body = new ObjectMapper().writeValueAsString(payload);\n String signature = getSignature(timestamp, HttpMethod.POST, path, body);\n showCurl(HttpMethod.POST, apiKey, timestamp, signature, path, body);\n \n return coinbase.createAccount(MediaType.APPLICATION_JSON, Coinbase.CB_VERSION_VALUE, apiKey, signature, timestamp, payload).getData();\n }", "private void CreateUserAccount(final String lname, String lemail, String lpassword, final String lphone, final String laddress, final String groupid, final String grouppass ){\n mAuth.createUserWithEmailAndPassword(lemail,lpassword).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //account creation successful\n showMessage(\"Account Created\");\n //after user account created we need to update profile other information\n updateUserInfo(lname, pickedImgUri,lphone, laddress, groupid, grouppass, mAuth.getCurrentUser());\n }\n else{\n //account creation failed\n showMessage(\"Account creation failed\" + task.getException().getMessage());\n regBtn.setVisibility(View.VISIBLE);\n loadingProgress.setVisibility(View.INVISIBLE);\n\n }\n }\n });\n }", "public void create(UserValidator account) {\n Account validated = new Account();\n validated.setUsername(account.getUsername());\n validated.setPassword(passwordEncoder.encode(account.getPassword()));\n validated.setFirstName(account.getFirstName());\n validated.setLastName(account.getLastName());\n validated.getAuthorities().add(\"USER\");\n\n this.accountRepository.save(validated);\n }", "CreateUserResult createUser(CreateUserRequest createUserRequest);", "private String sendCreateAAAAccountCommand(String adminToken,\n\t\t\tString userName, String password, String mail, String name,\n\t\t\tString gender, String birthday, String phone, String postalAddress,\n\t\t\tString employeeNumber, String iplanet_am_user_account_life) {\n\t\tString errorCode = Integer.toString(0);\n\n\t\tHttpURLConnection httpConn = null;\n\n\t\ttry {\n\t\t\thttpConn = this.setHttpConnection(openAMLocation\n\t\t\t\t\t+ \"/json/users/?_action=create\");\n\t\t\tthis.setHttpTokenInCookie(httpConn, adminToken);\n\n\t\t\tOutputStreamWriter owriter = this.setPostHttpConnection(httpConn,\n\t\t\t\t\t\"application/json\");\n\t\t\tJSONObject accountJsonObj = new JSONObject();\n\n\t\t\taccountJsonObj.put(\"username\", userName);\n\t\t\taccountJsonObj.put(\"userpassword\", password);\n\t\t\tif(!mail.equalsIgnoreCase(\"\"))\n\t\t\t\taccountJsonObj.put(\"mail\", mail);\n\t\t\tif(!name.equalsIgnoreCase(\"\"))\n\t\t\t\taccountJsonObj.put(\"givenName\", name);\n\t\t\tif(!gender.equalsIgnoreCase(\"\"))\n\t\t\t\taccountJsonObj.put(\"sunidentityserverpplegalidentitygender\", gender);\n\t\t\tif(!birthday.equalsIgnoreCase(\"\"))\n\t\t\t\taccountJsonObj.put(\"sunidentityserverppdemographicsbirthday\",birthday);\n\t\t\tif(!phone.equalsIgnoreCase(\"\"))\n\t\t\t\taccountJsonObj.put(\"telephonenumber\", phone);\n\t\t\tif(!postalAddress.equalsIgnoreCase(\"\"))\n\t\t\t\taccountJsonObj.put(\"postalAddress\", postalAddress);\n\t\t\tif(!employeeNumber.equalsIgnoreCase(\"\"))\n\t\t\t\taccountJsonObj.put(\"employeeNumber\", employeeNumber);\n\t\t\tif(!iplanet_am_user_account_life.equalsIgnoreCase(\"\"))\n\t\t\t\taccountJsonObj.put(\"iplanet-am-user-account-life\", iplanet_am_user_account_life);\n\n\t\t\tlogger.info(\"JSON: {}\", accountJsonObj.toString());\n\t\t\towriter.write(accountJsonObj.toString());\n\t\t\towriter.flush();\n\t\t\towriter.close();\n\n\t\t\tBufferedReader bufReader = this.getHttpInputReader(httpConn);\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tString str = null;\n\n\t\t\twhile ((str = bufReader.readLine()) != null) {\n\t\t\t\tlogger.info(\"{}\", str);\n\t\t\t\tsb.append(str);\n\t\t\t}\n\n\t\t\tString responseStr = sb.toString();\n\t\t\tString responseContentType = httpConn.getContentType();\n\t\t\tif (responseContentType.contains(\"json\")) {\n\t\t\t\tthis.userUUID = this.getUUIDByUserIdentity(sb.toString());\n\t\t\t}\n\t\t\tif (this.userUUID == null || this.userUUID.equals(\"\")) {\n\t\t\t\terrorCode = Integer.toString(13102);\n\t\t\t}\n\t\t\tif (responseStr.contains(\"ldap exception\")\n\t\t\t\t\t&& responseStr.contains(\"68\")) {\n\t\t\t\terrorCode = Integer\n\t\t\t\t\t\t.toString(13104);\n\t\t\t}\n\t\t\tif (responseStr.contains(\"ldap exception 19\")\n\t\t\t\t\t|| responseStr.contains(\"Minimum password length\")) {\n\t\t\t\terrorCode = Integer\n\t\t\t\t\t\t.toString(13103);\n\t\t\t}\n\n\t\t\tbufReader.close();\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"IOException: \", e);\n\t\t\terrorCode = Integer.toString(11111);\n\t\t} catch (JSONException e) {\n\t\t\tlogger.error(\"JSONException: \", e);\n\t\t\terrorCode = Integer.toString(11111);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Exception: \", e);\n\t\t\terrorCode = Integer.toString(11111);\n\t\t}\n\n\t\treturn errorCode;\n\t}", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "@Override\n\tpublic void createAccount(String username, Bank bank) {\n\t\ttry {\n\t\tAccount newAccount = new Account(username, bank.getBankID(), bank.getNumOfAccounts()+1);\n\t\tbank.setNumOfAccounts(bank.getNumOfAccounts()+1);\n\t\taddAccount(bank, newAccount);\n\t\t}catch(NullPointerException e) {\n\t\t\tSystem.out.println(\"Could not find bank\");\n\t\t}\n\t\t\n\t}", "@Override\r\n\tpublic boolean createAccount(Account account) {\n\t\treturn dao.createAccount(account);\r\n\t}", "public void requestAccountCreation(Secretary sec) {\n \n System.out.println(this.iD + \": Requesting account creation from secretary \" + sec.iD);\n sec.addToWaitingListForApproval(this);\n }", "@Test\n public void testCreateAccountWithPassword() {\n final CreateUserRequest createUserRequest = new CreateUserRequest();\n createUserRequest.setUsername(\"alpha@gamma.net\");\n createUserRequest.setPassword(\"beta\");\n createUserRequest.setFirstname(\"Alpha\");\n createUserRequest.setLastname(\"Gamma\");\n\n // Now, perform the actual test - create the Account, and verify that\n // the response is ok, and that a Notification was sent\n final CreateUserResponse result = administration.createUser(token, createUserRequest);\n assertThat(result.isOk(), is(true));\n assertThat(result.getUser(), is(not(nullValue())));\n assertThat(result.getUser().getUserId(), is(not(nullValue())));\n // Creating a new User should generate an Activate User notification\n final NotificationType type = NotificationType.ACTIVATE_NEW_USER;\n assertThat(spy.size(type), is(1));\n final String activationCode = spy.getNext(type).getFields().get(NotificationField.CODE);\n assertThat(activationCode, is(not(nullValue())));\n }", "Command createCommand() throws ServiceException, AuthException;", "public void createESEAccount(String farmerId, String farmerAcctNo, Date txnTime, int type);", "private void createDriver() {\n account = new Account(\"driver\", \"password\", \"driver@uclive.ac.nz\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L,\n new Licence(\"Full for over 2 years\", \"YXF87231\",\n LocalDate.parse(\"12/12/2015\", formatter),\n LocalDate.parse(\"12/12/2020\", formatter)));\n }", "@Override\n\tpublic void createSavingAccount(Account as) {\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\tString saving = \"insert into savings( owner_id, balance) values (?,?)\";\n\t\t\tCallableStatement chaccount = con.prepareCall(saving);\n\t\t\n\t\t\tchaccount.setInt(1,as.getOwner_id() );\n\t\t\tchaccount.setDouble(2, as.getBalance());\n\t\t\tchaccount.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"In CheckingDaoDB Exception\");\n\t\t\te.printStackTrace();\n\t\t}\n}", "@Override\r\n\tpublic boolean createAccount(Account account) throws Exception {\n\t\tboolean flag = false;\r\n\t\ttry {\r\n\t\t\tflag = this.dao.createAccount(account);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "public void makeNewUser(String name, int age, String address, String password)\n throws SQLException, ConnectionFailedException, DatabaseInsertException {\n if (this.currentUserAuthenticated) {\n // find the role ID that corresponds to customer\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n int roleId = map.roleIds.get(Roles.CUSTOMER);\n int userId = DatabaseInsertHelper.insertNewUser(name, age, address, roleId, password);\n System.out.println(\"User ID - \" + userId);\n System.out.println(\"succesfully made user\");\n } else {\n System.out.println(\"failed making user\");\n throw new ConnectionFailedException();\n }\n }", "public Account createAccount() {\n\t\t\n\t\tAccountBuilder builder = new AccountBuilder();\n\t\tUserRole role = new UserRole();\n\t\trole.setUsername(getUsername());\n\t\trole.setRole(\"ROLE_USER\");\n\t\t\n\t\t//builds the account entity using the front end POJO\n\t\tbuilder\n\t\t\t.withUsername(getUsername())\n\t\t\t.withPassword(getPassword())\n\t\t\t.withLastName(getLastName())\n\t\t\t.withFirstName(getFirstName())\n\t\t\t.withRole(role)\n\t\t\t.withStatus(AccountStatus.ACTIVE)\n\t\t\t.withEmail(getEmail())\n\t\t\t.withStoreCd(getStoreCd());\n\t\t\n return builder.build();\n\t}", "private synchronized String processCreate(String query) {\r\n\t\tString[] valuesCommand = query.split(\" \");\r\n\t\tif ( valuesCommand.length != 3 )\r\n\t\t\treturn \"ERROR Bad syntaxe command CREATE - Usage : CREATE id initial_solde\";\r\n\t\tString id = valuesCommand[1];\r\n\t\tif ( this.bank.existAccount(id) ) {\r\n\t\t\treturn \"ERROR Account alwready exist\";\r\n\t\t}\r\n\t\tdouble number = Double.valueOf(valuesCommand[2]);\r\n\t\tthis.bank.createAccount(id, number);\r\n\t\treturn \"OK \" + this.bank.getLastOperation(id);\r\n\t}", "Account() { }", "@Test\n\tpublic void testAdminCreate() {\n\t\tAccount acc1 = new Account(00000, \"ADMIN\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"ADMIN\", 00000, 0, \"A\"));\n\t\ttransactions.add(1, new Transaction(05, \"new acc\", 00001, 100.00, \"A\"));\n\t\ttransactions.add(2, new Transaction(00, \"ADMIN\", 00000, 0, \"A\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Account Created\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to create account as admin\", testResult);\n\t}", "@PostMapping(\"/account/create\")\n @PreAuthorize(\"hasRole('USER') or hasRole('ADMIN')\")\n\tpublic ResponseEntity createAccount(\n\t \t @AuthenticationPrincipal UserDetailsImpl userDetail\n\t ){\n\t\t\tAccount account = new Account(userDetail.getId());\n\t\t\t// save the account to the database\n\t\t\tAccount createdAccount = accountRepository.save(account);\n\t \t // response\n\t return ResponseEntity.ok(\n\t \t\tcreatedAccount\n\t );\n\t }", "public void creerCompte(final String username, final String password, final String pseudo, final String identification, final CallBack<String> callback);", "@Test\n\tpublic void testCreateAdminAccountSuccessfully() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tString username = \"newUsername\";\n\t\tAdminAccount user = null;\n\t\ttry {\n\t\t\tuser = adminAccountService.createAdminAccount(username, PASSWORD1, NAME1);\n\t\t} catch (InvalidInputException e) {\n\t\t\tfail();\n\t\t}\n\t\tassertNotNull(user);\n\t\tassertEquals(username, user.getUsername());\n\t\tassertEquals(PASSWORD1, user.getPassword());\n\t\tassertEquals(NAME1, user.getName());\n\t}", "@Test\n public void createDuplicateAccount() {\n final String username1 = \"william@shakespeare.com\";\n final String username2 = \"william@shakespeare.net\";\n final String username3 = \"william@shakespeare.org\";\n final String firstname = \"william\";\n final String lastname = \"shakespeare\";\n final String address = \"@iaeste.org\";\n\n final CreateUserRequest request1 = new CreateUserRequest(username1, firstname, lastname);\n final CreateUserResponse response1 = administration.createUser(token, request1);\n assertThat(response1, is(not(nullValue())));\n assertThat(response1.isOk(), is(true));\n assertThat(response1.getUser(), is(not(nullValue())));\n assertThat(response1.getUser().getAlias(), is(firstname + '.' + lastname + address));\n\n final CreateUserRequest request2 = new CreateUserRequest(username2, firstname, lastname);\n final CreateUserResponse response2 = administration.createUser(token, request2);\n assertThat(response2, is(not(nullValue())));\n assertThat(response2.isOk(), is(true));\n assertThat(response2.getUser(), is(not(nullValue())));\n assertThat(response2.getUser().getAlias(), is(firstname + '.' + lastname + 2 + address));\n\n final CreateUserRequest request3 = new CreateUserRequest(username3, firstname, lastname);\n final CreateUserResponse response3 = administration.createUser(token, request3);\n assertThat(response3, is(not(nullValue())));\n assertThat(response3.isOk(), is(true));\n assertThat(response3.getUser(), is(not(nullValue())));\n assertThat(response3.getUser().getAlias(), is(firstname + '.' + lastname + 3 + address));\n }", "int createUser(User data) throws Exception;", "public boolean\tnewAccount(String type, String name, float balance) throws IllegalArgumentException;", "public static void requestNewAccount(String uid){\n accountManager.requestNewAccount(uid);\n }", "@Override\n public void onClick(View v) {\n CreateAccount();\n }", "public LandingPage registerNewAccount(){\n\t\taction.WaitForWebElement(linkRegisterNewAccount)\n\t\t\t .Click(linkRegisterNewAccount);\n\t\treturn this;\n\t}", "@Override\n\tpublic void run(String... args) throws Exception {\n\t\taccountService.saveUser(new User(\"daoudi\", \"ayoub\", \"ayoub012\", \"1234\", \"ayoub@gmail.com\"));\n\t\taccountService.saveUser(new User(\"AHMED\", \"dza\", \"ahm22\", \"1234\", \"ahmed@gmail.com\"));\n\t\taccountService.saveUser(new User(\"Imad\", \"Imad\", \"imad012\", \"4444\", \"Imad@gmail.com\"));\n\t\taccountService.saveRole(new Role(\"AUTEUR\"));\n\t\taccountService.saveRole(new Role(\"COMITE\"));\n\t\taccountService.saveRole(new Role(\"REFEREE\"));\n\t\taccountService.addRoleToUser(\"ahm22\", \"AUTEUR\");\n\t\taccountService.addRoleToUser(\"ayoub012\", \"COMITE\");\n\t\taccountService.addRoleToUser(\"imad012\", \"REFEREE\");\n\t\t\n\t}", "public static void createAccount3() {\n\n\n System.setProperty(\"webdriver.chrome.driver\",\"resources/chromedriver.exe\");\n\n WebDriver driver = new ChromeDriver();\n\n driver.get(\"https://fasttrackit.org/selenium-test/\");\n driver.findElement(By.cssSelector(\"a[href*=\\\"account\\\"] .label\")).click();\n driver.findElement(By.cssSelector(\"a[title=\\\"Register\\\"]\")).click();\n\n driver.findElement(By.cssSelector(\"#middlename\")).sendKeys(\"test\");\n driver.findElement(By.cssSelector(\"#lastname\")).sendKeys(\"chris\");\n driver.findElement(By.cssSelector(\"#email_address\")).sendKeys(\"test12@yahoo.com\");\n driver.findElement(By.cssSelector(\"#password\")).sendKeys(\"test1212\");\n driver.findElement(By.cssSelector(\"#confirmation\")).sendKeys(\"test1212\");\n driver.findElement(By.cssSelector(\"button[title=\\\"Register\\\"]\")).click();\n\n driver.quit();\n\n\n\n }", "private void createAccount(User user) throws IOException {\n File accounts = new File(\"accounts.txt\");\n if (!accounts.exists()) {\n accounts.createNewFile();\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(accounts, true);\n BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream));\n\n bufferedWriter.write(user.getUserName() + \":\" + user.getUserPass());\n bufferedWriter.newLine();\n bufferedWriter.flush();\n }", "@Override\n public void run() {\n try {\n stringOrganizationIds.remove(defaultOrg);\n List<Integer> organizationIds = FluentIterable.from(stringOrganizationIds)\n .transform(Ints.stringConverter()).toList();\n\n newUser.setActive(false);\n UserProfileStruct savedUser = createAccountInternal(conn, newUser, password, resetQuestion,\n resetAnswer, givenName, surname, organizationId);\n for (Integer orgId : organizationIds) {\n Profile profile = new Profile();\n profile.setGivenName(givenName);\n profile.setSurname(surname);\n profile.setOrganizationId(orgId);\n profile.setUserId(savedUser.credentialedUser.getId());\n profile = profilePersister.createProfile(profile, conn);\n\n authService.grantAtLeast(profile.getId(), ROLE_READER, orgId);\n authService.grantAtLeast(orgId, ROLE_ADMIN, profile.getId());\n }\n\n User user = savedUser.credentialedUser.getUser();\n user.setActive(true);\n persistenceService.process(conn, new UserPersister.UpdateUserFunc(user));\n conn.commit();\n } catch (Exception e) {\n closeConnection(conn);\n }\n }", "private void createAccount(String email, String password) {\n if (!validateForm()) {\n return;\n }\n\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Unable to creat Account\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "UserCreateResponse createUser(UserCreateRequest request);", "@Override\n public void createNewAccount(String accountType) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.create_container, new CreateAccount().newInstance(accountType)).commit();\n }", "public String createUserAction()throws Exception{\n\t\tString response=\"\";\n\t\tresponse=getService().getUserMgmtService().createNewUser(\n\t\t\t\tgetAuthBean().getUserName(),\n\t\t\t\tgetAuthBean().getFirstName(),\n\t\t\t\tgetAuthBean().getLastName(),\n\t\t\t\tgetAuthBean().getEmailId(),\n\t\t\t\tgetAuthBean().getRole()\n\t\t);\n\t\tgetAuthBean().setResponse(response);\n\t\tinputStream = new StringBufferInputStream(response);\n\t\tinputStream.close();\n\t\treturn SUCCESS;\n\t}", "BankAccount(String accountType){\n\t\tSystem.out.println(\"NEW ACCOUNT: \" + accountType);\n\t\tthis.accountType = accountType; \n\t}", "String signUp(String userName, String password) throws RemoteException, InterruptedException;", "private void doCreateNewPartner() {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"***Hors Management System:: System Administration:: Create new partner\");\n Partner partner = new Partner();\n System.out.print(\"Enter partner username:\");\n partner.setName(sc.nextLine().trim());\n System.out.print(\"Enter partner password;\");\n partner.setPassword(sc.nextLine().trim());\n\n Set<ConstraintViolation<Partner>> constraintViolations = validator.validate(partner);\n\n if (constraintViolations.isEmpty()) {\n partner = partnerControllerRemote.createNewPartner(partner);\n System.out.println(\"New partner created successfully\");\n } else {\n showInputDataValidationErrorsForPartner(constraintViolations);\n }\n\n }", "@Override\r\n\tpublic void run(String... args) throws Exception {\n\t\tEmployeeDAO employee = new EmployeeDAO(\"Ram Patil\", \"Software Engineer\");\r\n\t\tint eid = employeeDaoService.insert(employee);\r\n\t\tlog.info(\"New User is Created : \" + employee);\r\n\t\tlog.info(\"Creaated Employee Id : \" + eid);\r\n\t}", "private void addNewUser() throws Exception, UnitException {\n String firstNameInput = firstName.getText();\n String lastNameInput = lastName.getText();\n String unitInput = unitID.getText();\n String accountInput = accountTypeValue;\n String passwordInput = password.getText();\n User newUserInfo;\n\n // Create user type based on the commandbox input\n switch (accountInput) {\n case \"Employee\":\n newUserInfo = new Employee(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Lead\":\n newUserInfo = new Lead(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Admin\":\n newUserInfo = new Admin(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + accountInput);\n }\n\n // Try adding this new user information to the database, if successful will return success prompt\n try {\n Admin.addUserToDatabase(newUserInfo);\n\n // If successful, output message dialog\n String msg = \"New User \" + firstNameInput + \" \" + lastNameInput + \" with UserID \"\n + newUserInfo.returnUserID() + \" successfully created\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset Values\n firstName.setText(\"\");\n lastName.setText(\"\");\n unitID.setText(\"\");\n password.setText(\"\");\n } catch (UserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "public void createAccount(double balance) {\r\n\t\tAccount account = new Account(balance);\r\n\t\tsetPlayerAccount(account);\r\n\t}", "public void createUser(User user);", "@Override\n protected void onPreExecute() {\n progressDialog.setMessage(\"Creating Account...\");\n progressDialog.show();\n super.onPreExecute();\n }", "public static void createAccount()throws IOException{\n\t\ttry{\n\t\t\tFile accountInfo = new File(\"account.txt\");\n\t\t\tFile Information = new File(\"information.txt\");\n\t\t\tArrayList<String> temp = new ArrayList<String>();\n\t\t\tArrayList<String> info = new ArrayList<String>();\n\t\t\tScanner inputFromInformation = new Scanner(Information);\n\t\t\tScanner inputFromAccount = new Scanner(accountInfo);\n\t\t\twhile (inputFromAccount.hasNextLine()){\n\t\t\t\ttemp.add(inputFromAccount.nextLine());\n\t\t\t}\n\t\t\tScanner input = new Scanner(System.in);\n\t\t\t// This is where we will start the new account process\n\t\t\t// first by telling us who you are.\n\t\t\tSystem.out.println(\"Enter your First Name\");\n\t\t\tString firstName = input.next();\n\t\t\t\n\t\t\tSystem.out.println(\"Enter your Last Name\");\n\t\t\tString lastName = input.next();\n\t\t\t// This will give the user recommended\n\t\t\t// user names if they cannot think of one.\n\t\t\tRecommendedUserNames(firstName,lastName);\n\t\t\t// here they will be prompt to enter their preferred user name\n\t\t\tSystem.out.println(\"Enter your preferred username\");\n\t\t\tString UserName = input.next();\n\t\t\t// This will prompt the user for a password\n\t\t\t// The password will have to meet these requirements\n\t\t\tSystem.out.println(\"Your password should meet the following requirements:\");\n\t\t\tSystem.out.println(\"-It must have at least eight characters.\\n-It must consist of only letters and digits.\"\n\t\t\t\t\t\t\t+ \"\\n-It must contain more than two digits and two characters.\");\n\t\t\tSystem.out.println(\"\\nEnter your new Password\");\n\t\t\tString Password = input.next();\n\t\t\t\n\t\t\t// this is what will verify the user password and see if it meets the recommended requirements\n\t\t\t// for security reasons of course.\n\t\t\tString Pass;\n\n\t\t\tboolean check=false;\n\t\t\tif(validigits(Password)&&letter_digit_check(Password))check=true;\n\t\t\twhile(!check){\n\t\t\t\tSystem.out.println(\"Please recheck the password requirement and try again.\");\n\t\t\t\tPassword = input.next();\n\t\t\t\tif(validigits(Password)&&letter_digit_check(Password))check=true;\n\t\t\t}\n\t\t\tdo{\n\t\t\t\tSystem.out.println(\"\\nPlease re-enter the Password\");\n\t\t\t\tPass = input.next();\n\t\t\t\tif(!Pass.equals(Password))System.out.println(\"Passwords do not match!\");\n\t\t\t}while(!Pass.equals(Password));\n\t\t\tboolean CreateAccount = true;\n\t\t\tSystem.out.println(\"You need to fill the information for completion of your account registration\");\n\t\t\teditInfo(UserName,CreateAccount);\n\t\t\tPrintWriter output = new PrintWriter(accountInfo);\n\t\t\ttemp.add(UserName+\" \"+Password);\n\t\t\tfor (int i=0; i<temp.size(); i++){\n\t\t\t\toutput.println(temp.get(i));\n\t\t\t}\n\t\t\toutput.close();\n\t\t\tSystem.out.println(\"Your account has been created and your information has been saved\"\n\t\t\t\t\t+ \"\\nYou have been logged out for this session\\n\");\n\t\t\tstarter();\n\t\t}\n\t\tcatch (java.io.IOException ex){\n\t\t\tSystem.out.println(\"I/O Errors: File is not found\");\n\t\t}\t\n\t}", "@Test\n @Order(4)\n void create_account_2() {\n Account empty = service.createAccount(client.getId());\n Assertions.assertEquals(client.getId(), empty.getClientId());\n Assertions.assertNotEquals(-1, empty.getId());\n Assertions.assertEquals(0, empty.getAmount());\n client.addAccount(empty);\n }", "public static JSONObject createAccount(Context context, String firstName, String lastName, String email, String password) {\n\t\ttry {\n\t\t\tfirstName = URLEncoder.encode(firstName, \"UTF-8\");\n\t\t\tlastName = URLEncoder.encode(lastName, \"UTF-8\");\n\t\t\temail = URLEncoder.encode(email, \"UTF-8\");\n\t\t\tpassword = URLEncoder.encode(password, \"UTF-8\");\n\t\t\tString response = makeAPICall(context, \"createuser.php?first_name=\" + firstName + \"&last_name=\" + lastName + \"&email=\" + email + \"&password=\" + password);\n\t\t\treturn new JSONObject(response);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public void createAccount(String accountType, double balance){\r\n // check what is the type of the account being created\r\n /* update the list each time an account is being created and then put it into the hashtable. Then increase the\r\n counter do this for each of the following accounts each time an account is created*/\r\n switch (accountType){\r\n case \"1\":\r\n credits[creditCounter]= new CreditCardAccount(balance);\r\n allAccounts.replace(\"CreditCard\",credits);\r\n creditCounter++;\r\n break;\r\n case \"2\":\r\n lineOfCredits[lineOfCreditCounter] = new LineOfCreditAccount(balance);\r\n allAccounts.replace(\"LineOfCredit\",lineOfCredits);\r\n lineOfCreditCounter++;\r\n break;\r\n case \"3\":\r\n chequing[chequingCounter] = new ChequingAccount(balance);\r\n allAccounts.replace(\"Chequing\",chequing);\r\n chequingCounter++;\r\n break;\r\n case \"4\":\r\n saving[savingCounter] = new SavingsAccount(balance);\r\n allAccounts.replace(\"Saving\",saving);\r\n savingCounter++;\r\n break;\r\n default:\r\n System.out.println(\"ERROR IN CREATE ACCOUNT\");\r\n break;\r\n }\r\n }", "@Override\n public boolean createAccount(String fullName, String username, String password, String email){\n // will change this if we make some errors.\n if(!usernameToPerson.containsKey(username)) { // check that there is not someone with that username\n Organizer og = new Organizer(fullName, username, password, email);\n updateUsernameToPerson(og.getUsername(), og); // see below\n idToPerson.put(og.getID(), og);\n return true;\n }\n\n return false;\n\n }", "@Test(groups = \"Transactions Tests\", description = \"Create new transaction\")\n\tpublic void createNewTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"Extra income\");\n\t\tTransactionsScreen.typeTransactionAmount(\"300\");\n\t\tTransactionsScreen.clickTransactionType();\n\t\tTransactionsScreen.typeTransactionNote(\"Extra income from this month\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"Sub-account created successfully and the value is correct\");\n\n\t\t//Testing if the transaction was created in the 'Double Entry' account, if the value is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"'Double Entry' account also have the transaction and the value is correct\");\n\n\t}", "private void createUser(final String email, final String password) {\n\n }", "@Override\r\n\tpublic boolean create(Account newAccount) {\n\t\treturn daoref.create(newAccount);\r\n\t}" ]
[ "0.77204347", "0.75323915", "0.7515447", "0.73952204", "0.72966975", "0.72533005", "0.7176281", "0.69681203", "0.6966975", "0.678684", "0.67744255", "0.6757655", "0.67425936", "0.6679243", "0.6632596", "0.66075754", "0.65350044", "0.6493268", "0.6468029", "0.6438684", "0.6437373", "0.64037013", "0.6385129", "0.6372379", "0.6337976", "0.63370126", "0.6330831", "0.6324022", "0.6314856", "0.63146204", "0.6294655", "0.6278189", "0.6255105", "0.6250139", "0.62382686", "0.6236852", "0.6176044", "0.61751056", "0.61719733", "0.61606044", "0.6158336", "0.6154664", "0.6151864", "0.6147267", "0.6143248", "0.61341983", "0.610895", "0.6099504", "0.60725045", "0.6063853", "0.6061334", "0.6047873", "0.6047488", "0.60325503", "0.6029713", "0.60054183", "0.60047215", "0.60037696", "0.59892714", "0.59622943", "0.59475183", "0.59443176", "0.5922328", "0.59198976", "0.59190935", "0.5913984", "0.59132737", "0.59075713", "0.58990335", "0.58688504", "0.5863006", "0.5852747", "0.5835613", "0.58253264", "0.5824543", "0.58179504", "0.58121955", "0.58080167", "0.5807303", "0.5799721", "0.579501", "0.57858276", "0.57838607", "0.57684046", "0.57679784", "0.57651144", "0.57638454", "0.5749295", "0.5742886", "0.57428026", "0.57370716", "0.5734669", "0.5733452", "0.57282865", "0.57223016", "0.5719481", "0.57172036", "0.5714186", "0.5713925", "0.57137686" ]
0.5721315
95
Update balance in account entry at the accounts table and update balance in the cache
public void updateBalance(int account_id, int final_amount){ dbUpdate("update ACCOUNTS set BALANCE = "+ final_amount + " where ACCOUNT_ID = " + account_id); cache.add(new Account(account_id, final_amount)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateDatabaseAccountBalance() {\n\t\tString sql = \"UPDATE account SET balance = \" + this.balance + \" \";\n\t\tsql += \"WHERE accountID = '\" + this.accountID + \"';\";\n\n\t\tDbUtilities db = new MySqlUtilities();\n\t\tdb.executeQuery(sql);\n\t}", "void updateAccount(int id, double accountBalance, String account) {\n // Update only the required keys\n sql = \"UPDATE CashiiDB2 \" + \"SET \" + account + \" ='\" + accountBalance + \"' WHERE AccountNum in ('\" + id + \"')\";\n try {\n st.executeUpdate(sql);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void updateBalance(UUID accountId, double amount) {\n Account account = repository.getAccount(accountId);\n account.updateBalance(amount);\n repository.save(account);\n }", "public boolean updateBalance(int account_id, int final_amount, Connection con){\n try {\n tryDbUpdate(\"update ACCOUNTS set BALANCE = \"+ final_amount + \" where ACCOUNT_ID = \" + account_id, con);\n cache.add(new Account(account_id, final_amount));\n } catch (SQLException e) {\n try {\n con.rollback();\n return false;\n } catch (SQLException e1) {\n e1.printStackTrace();\n return false;\n }\n }\n return true;\n }", "void updateAccount(Account account);", "@Override\npublic void update(Account account) {\n\taccountdao.update(account);\n}", "public void update(Account account) {\n\t\t\n\t}", "@Transactional(isolation = Isolation.SERIALIZABLE)\n public void updateAccountBalance(Long accountId, Double newBalance) {\n Account account =accountRepository.findById(accountId)\n .orElseThrow(() -> new AccountNotFoundException(\"Account not found\"));\n account.setBalance(newBalance);\n accountRepository.save(account);\n }", "void updateAccount();", "private void updateMoney() {\n balance = mysql.getMoney(customerNumber);\n balanceConverted = (float) balance / 100.00;\n }", "void updateBalance(int amount){ \n\t\tbalance = amount;\n\t}", "@Override\n\tpublic int accountUpdate(String id, String balance) {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tint executeUpdate = 0;\n\t\tString sqlString=\"update user set balance = '\"+balance+\"' where id ='\"+id+\"'\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString);\n\t\t\texecuteUpdate = query.executeUpdate();\n\t\t\tSystem.out.println(\"executeUpdate:\"+executeUpdate);\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\treturn executeUpdate;\t\n\t}", "public void updateAccount() {\r\n\t\t\r\n\t\t//update all totals\r\n\t\ttotalYouOwe = 0.0;\r\n\t\ttotalOwedToYou = 0.0;\r\n\t\tbalance = 0.0;\r\n\t\tnetBalance = 0.0;\r\n\t\t\r\n\t\t//totalYouOwe and totalOwedToYou\r\n\t\tfor (Event e : events) {\r\n\t\t\tif (e.isParticipantByGID(GID)) {\r\n\t\t\t\tif (e.getParticipantByGID(GID).getBalance() > 0) {\r\n\t\t\t\t\ttotalOwedToYou = totalOwedToYou + e.getParticipantByGID(GID).getBalance(); \r\n\t\t\t\t} else {\r\n\t\t\t\t\ttotalYouOwe = totalYouOwe + (-e.getParticipantByGID(GID).getBalance());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//netBalance/balance - the same in current implementation\r\n\t\tnetBalance = totalOwedToYou - totalYouOwe;\r\n\t\tbalance = totalOwedToYou - totalYouOwe;\r\n\t\t\r\n\t\tupdatePastRelations();\r\n\t}", "@Override\n public void updateBalanceInfo(Long accountId, BigDecimal amountToAdd) {\n repositoryService.updateBalanceInfo(accountId, amountToAdd);\n AccountInfo accountInfo = repositoryService.fetchAccountInfo(accountId).orElseThrow();\n update(\"accounts\", Long.class, AccountInfo.class, accountId, accountInfo);\n }", "public int balup(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "private void updateBalance(int balance) throws SQLException {\n\t\tupdateBalanceStatement.clearParameters();\n\t\tupdateBalanceStatement.setInt(1, balance);\n\t\tupdateBalanceStatement.setString(2, this.username);\n\t\tupdateBalanceStatement.executeUpdate();\n\t}", "@Override\n\tpublic void updateAccountBalance(double newBalance, int id) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString updateQuery = \"update accounts set balance=? where id=?\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(updateQuery);\n\t\t\tprepStmt.setDouble(1, newBalance);\n\t\t\tprepStmt.setInt(2, id);\n\t\t\tprepStmt.executeUpdate();\n\t}", "public int baldown(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "public synchronized double setBalanceForAccId(int AccId, double bal) {\n\t\tConnection dbAccess = DataAccess.getDbAccess();\n\t\tPreparedStatement psttmnt;\n\t\tString querySting;\n\t\tdouble balance = -1.0;\n\t\ttry {\n\t\t\tquerySting = \"UPDATE accounts SET acc_balance = \" + bal + \" WHERE acc_id = \" + AccId;\n\t\t\tpsttmnt = dbAccess.prepareStatement(querySting);\n\t\t\tint result = psttmnt.executeUpdate();\n\t\t\tif (result != 0) {\n\t\t\t\t balance = getBalanceForAccId(AccId);\n\t\t\t}\n\t\t\tdbAccess.close();\n\t\t} catch (SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\treturn balance;\n\t}", "public void deposit(double amount) {\n balance += amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo='\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n }", "@Override\r\n\tpublic void update(Account account) throws ServiceException {\n\r\n\t}", "int updateAccountInfo(Account account);", "public Account update(Account user);", "public void setBalance( Integer account_id, double balance ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n params.put(\"balance\", String.valueOf(balance));\r\n String url = API_DOMAIN + ACCOUNT_EXT + SET_BALANCE;\r\n this.makeVolleyRequest( url, params );\r\n }", "public void Deposit(Integer accountNo,float depositMoney){\n\tSessionFactory sessionFactory = new Configuration().configure(\"hibernate.cfg.xml\").buildSessionFactory();\n\tSession session = sessionFactory.openSession();\n\tTransaction trans = null;\n\ttry{\n\t\ttrans = session.beginTransaction();\n\t\tQuery query=session.createQuery(\"UPDATE Account set balance+=:balance where accountNo=:accountNo\"); \n\t\tquery.setParameter(\"balance\",depositMoney); \n\t\tquery.setParameter(\"accountNo\",accountNo); \n\t}catch(HibernateException hibernateException){\n\t\tif(trans != null){\n\t\t\ttrans.rollback();\n\t\t}\n\t\thibernateException.printStackTrace();\n\t}\n\t}", "int updateBalance(CardVO cv) throws RemoteException;", "public abstract void updateAccount(JSONObject account);", "Account.Update update();", "public abstract void updateBalance(Balance balance, LedgerEntry.Subtype subtype, long amount) throws TransactionException;", "public void testUpdateAccount(){\n\t\tint id = 10 ;\n\t\tAccount acc = this.bean.findAccountById(id ) ;\n\t\tacc.setDatetime(CommUtil.getNowDate()) ;\n\t\tint r = this.bean.updateAccount(acc) ;\n\t\tAssert.assertEquals(r, 1) ;\n\t}", "public void updateAccounts(HashMap<String, Accounts> accounts){\n this.accounts = accounts;\n }", "private void updateBalance(){\n Intent toUpdateBal = new Intent(this, UpdateAccount.class);\n startActivity(toUpdateBal);\n }", "public void updateAccount(Account account)\n\t {\n\t\t if(!accountExists(account)) addAccount(account);\n\t\t \n\t\t ContentValues values = new ContentValues();\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_USERNAME, account.getUsername());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_BALANCE, account.getBalance());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_AUTH_TOKEN, account.getAuthenticationToken());\n\t\t \n\t\t String where = DatabaseContract.AccountContract.COLUMN_NAME_USERNAME + \" = ? \";\n\t\t \n\t\t db.update(DatabaseContract.AccountContract.TABLE_NAME, \n\t\t\t\t values, \n\t\t\t\t where, \n\t\t\t\t new String[] {account.getUsername()});\n\t }", "public void updateBal(int value) {\r\n bal = bal + value;\r\n }", "@Override\r\n\tpublic void updateBalance( Integer userid, double amount) {\n\t\tif ( getBalance( userid) < amount) {\r\n\t\t\tthrow new RuntimeException( \"用户余额不足!\");\r\n\t\t}\r\n\t\tString sql = \"UPDATE buyers SET balance = balance - ? WHERE id = ?;\";\r\n\t\tjdbcTemplate.update( sql, amount, userid);\r\n\t}", "@Override\n\tpublic void calculateAndUpdateBalance() {\n\n\t\tbalance -= fee;\n\n\t}", "private void updateUserAccount() {\n final UserDetails details = new UserDetails(HomeActivity.this);\n //Get Stored User Account\n final Account user_account = details.getUserAccount();\n //Read Updates from Firebase\n final Database database = new Database(HomeActivity.this);\n DatabaseReference user_ref = database.getUserReference().child(user_account.getUser().getUser_id());\n user_ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n //Read Account Balance\n String account_balance = dataSnapshot.child(Database.USER_ACC_BALANCE).getValue().toString();\n //Read Expire date\n String expire_date = dataSnapshot.child(Database.USER_ACC_SUB_EXP_DATE).getValue().toString();\n //Read Bundle Type\n String bundle_type = dataSnapshot.child(Database.USER_BUNDLE_TYPE).getValue().toString();\n //Attach new Values to the Account Object\n user_account.setBalance(Double.parseDouble(account_balance));\n //Attach Expire date\n user_account.setExpire_date(expire_date);\n //Attach Bundle Type\n user_account.setBundle_type(bundle_type);\n //Update Local User Account\n details.updateUserAccount(user_account);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n //No Implementation\n }\n });\n }", "public void updatebal(String cname, String amt1) {\nString countQuery = \"SELECT Balance FROM \" + DATABASE_TABLE1+\" WHERE Name='\"+cname+\"'\";\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t int d=cursor.getColumnIndex(\"Balance\");\n\t\tString cbal=null;\n\t\tfor(cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()){\n\t\t\tcbal=cursor.getString(d);\n\t\t\t\n\t\t}\n\t\tint cur=Integer.parseInt(cbal);\n\t\tcur=cur+Integer.parseInt(amt1);\n\t ContentValues up=new ContentValues();\n\t up.put(Com_Balance, cur);\n\t\tourDatabase.update(DATABASE_TABLE1, up, Com_Name+\" = '\"+cname+\"'\", null);\n\t\t\n\t}", "public void updateBalance(String mobileNo,int balance)\n\t{\n\t\tContext ctx;\n\t\ttry {\n\t\t\tctx = new InitialContext();\n\t\t\n\t\t\n\t\t DataSource ds=(DataSource)ctx.lookup(\"java:OracleDS\");\n\t\t\tConnection con=ds.getConnection();\n\t\t\tStatement stmt=con.createStatement();\n\t\t\t\n\t\t\tstmt.executeUpdate(\"update mobile set balance=\"+balance+\" where mobileno=\"+mobileNo);\n\t\t\tcon.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error in connection with Database :\"+e.getMessage());\n\t\t\t\n\t\t}\n\t\t\n\t}", "public abstract void updateAccount(final GDataAccount account)\n throws ServiceException;", "@Override\r\n\tpublic boolean update(int id, Account account) {\n\t\treturn daoref.update(id, account);\r\n\t}", "@Override\r\n\tpublic void updateAccountHashmap(Account acc) {\n\t\tdataMap.put(acc.getAccountNumber(), acc);\r\n\t}", "@Override\r\n\tpublic int updateAccountByPrimaryKeySelective(Account account) {\n\t\treturn this.accountMapper.updateAccountByPrimaryKeySelective(account);\r\n\t\t\r\n\t}", "@Override\n\tpublic Account update(Account account) {\n\t\taccount=initializeAccountForModification(account);\n\t\treturn accountRepository.save(account);\n\t}", "public void withdraw(double amount) throws InsufficientFundsException {\n if (amount <= balance) {\n balance -= amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo= '\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n } //end if\n else {\n throw new InsufficientFundsException(amount);\n } //end else\n }", "public void changeBalance (int amount){\n balance += amount;\n }", "public void addBalance(long balance) {\r\n this.balance += balance;\r\n }", "public void editBalance() {\n\t\tAccount account = getAccountForEditBalance();\n\n\t\tif (adminDao.editBalance(account))\n\t\t\tSystem.out.println(\"Balance edited!\");\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "void update(Account... accounts);", "@Override\n\tpublic void updateStockAccountInfo(StockAccount account) {\n\t\t\n\t}", "@Override\n public void changeBalance (ChangeBalanceDto changeBalanceDto) {\n new AccountDaoImpl(new StatementsRunnerImpl()).changeBalance(changeBalanceDto);\n }", "public static String payCurrentBill(String account){\n return \"update current_bills set cb_paid = 1 where cb_account = '\"+account+\"'\";\n }", "int updateByPrimaryKey(FinanceAccount record);", "public void setBalance(){\n balance.setBalance();\n }", "int updateByPrimaryKey(Account record);", "int updateByPrimaryKey(Account record);", "public int updateAndGetBalance(int fid, int tid, int money) {\n\t\tint q=0;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tthis.pst = this.con.prepareStatement(\"update customer set balance=balance-'\"+money+\"' where acc_number=?\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthis.pst.setInt(1,fid);\r\n\t\t\t\r\n\t\t\t this.pst.executeUpdate();\r\n\t\t this.pst = this.con.prepareStatement(\"update customer set balance=balance+'\"+money+\"' where acc_number=?\");\r\n\t\t\t\t\tthis.pst.setInt(1,tid);\r\n\t\t\t\t this.pst.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t this.pst=this.con.prepareStatement(\"select * from customer where acc_number=?\");\r\n\t\t this.pst.setInt(1,fid);\r\n\t\t this.rs=this.pst.executeQuery();\r\n\t\t while (rs.next()) {\r\n\t\t\t\t\tq=rs.getInt(\"balance\");\r\n\t\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\r\n\t\treturn q;\r\n\r\n\t}", "public void balance(){\n\t\tnamesTree.balance();\n\t\taccountNumbersTree.balance();\n\t}", "public boolean saveAccount(Account account)\n {\n PreparedStatement preparedStatement = null;\n try\n {\n preparedStatement = connection.prepareStatement(\n String.format(\"UPDATE %s.accounts SET balance=? WHERE id = ?;\",\n simpleEconomy.getConfig().getString(\"db.database\")));\n preparedStatement.setDouble(1, account.getBalance());\n preparedStatement.setInt(2, account.getId());\n preparedStatement.execute();\n return true;\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n return false;\n }", "int updateByPrimaryKey(CusBankAccount record);", "@Test\n\tpublic void testRecalculateAccountBalance() {\n\t\tSmsAccount smsAccount = new SmsAccount();\n\t\tsmsAccount.setSakaiUserId(\"1\");\n\t\tsmsAccount.setSakaiSiteId(\"1\");\n\t\tsmsAccount.setMessageTypeCode(\"1\");\n\t\tsmsAccount.setOverdraftLimit(1000L);\n\t\tsmsAccount.setCredits(10L);\n\t\tsmsAccount.setAccountName(\"accountname\");\n\t\tsmsAccount.setAccountEnabled(true);\n\t\thibernateLogicLocator.getSmsAccountLogic()\n\t\t\t\t.persistSmsAccount(smsAccount);\n\t\tinsertTestTransactionsForAccount(smsAccount);\n\n\t\tAssert.assertTrue(smsAccount.exists());\n\n\t\tList<SmsTransaction> transactions = hibernateLogicLocator\n\t\t\t\t.getSmsTransactionLogic().getSmsTransactionsForAccountId(\n\t\t\t\t\t\tsmsAccount.getId());\n\n\t\tAssert.assertNotNull(transactions);\n\t\tAssert.assertTrue(transactions.size() > 0);\n\n\t\tsmsBillingImpl.recalculateAccountBalance(smsAccount.getId());\n\n\t\tSmsAccount recalculatedAccount = hibernateLogicLocator\n\t\t\t\t.getSmsAccountLogic().getSmsAccount(smsAccount.getId());\n\t\tAssert.assertNotNull(recalculatedAccount);\n\t\tAssert.assertTrue(recalculatedAccount.getCredits() == 6660);\n\t}", "void deposit(int value)//To deposit money from the account\n {\n balance += value;\n }", "private boolean updateMoneyForAccount(int accountNumber, BankAccountType accountType, int currency) {\n\t\tString columnName = (accountType == BankAccountType.Checking ? \"balance\" : \"balance_saving\");\n\n\t\tString sql = \"UPDATE accounts SET \" + columnName + \" = ? WHERE id = ?\";\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\tpstmt.setInt(1, currency);\n\t\t\tpstmt.setInt(2, accountNumber);\n\n\t\t\tint rowsUpdated = pstmt.executeUpdate();\n\t\t\treturn (rowsUpdated == 1);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn false;\n\t}", "public void Deposit(double ammount){\n abal = ammount + abal;\n UpdateDB();\n }", "public void setBalance( long balance ) {\r\n this.balance = balance;\r\n }", "public void increaseBalance(final double balance) {\n this.balance += balance;\n }", "public void update() {\n\t\n\tif(getBalance() > 0) {\n\t\tcanWithdraw = true;\n\t}else {canWithdraw = false;}//end else statement\n}", "public void updateAccounts(String sourceAccountNumber, BigDecimal transferedAmount, String destinationAccount ) throws TransferServiceException {\n\t\t\n\t\tList<Account> accountList = new ArrayList<>();\n\t\t\n\t\taccountList.add(debitAmount(sourceAccountNumber,transferedAmount));\n\t\taccountList.add(creditAmount(destinationAccount, transferedAmount));\n\t\trepository.saveAll(accountList);\n\t\n\t}", "void deposit(double Cash){\r\n\t\tbalance=balance+Cash;\r\n\t}", "@Override\n\t\tpublic boolean update(AccountTransaction t) {\n\t\t\treturn false;\n\t\t}", "public static String updateLate(String account){\n return \"update current_bills set cb_late = 1 where cb_account = '\"+account+\"'\";\n }", "public void InitializeBalance(BigDecimal valor){\n \r\n ChekingAccount chekAc=pRepository.GetChekingAccount();\r\n chekAc.setSaldoInicial(valor);\r\n pRepository.SaveChekingAccount(chekAc);\r\n \r\n }", "Account(int balance) {\n if(balance <0) this.balance=0;\n this.balance = balance;\n }", "public void saveOrUpdate(Account account) {\n accountRepository.save(account);\n }", "public void setBalance(double bal){\n balance = bal;\r\n }", "void setBalance(double value);", "public Account(double balance) {\n\t\tthis.balance = balance;\n\t}", "public String myAfterBalanceAmount() {\r\n\t\tint count=0;\r\n\t\tList<SavingAccount> acc = null;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Before Repeat\");\r\n\t\t\tacc = getSavingAccountList();\r\n\r\n\t\t\tfor (SavingAccount savingAcc : acc) {\r\n\t\t\t\tif (!(\"0\".equals(savingAcc.getState()))) {\r\n\t\t\t\t\tif (savingAcc.getState().equals(\"active\")) {\r\n\t\t\t\t\t\tint maxRepeat = Integer.parseInt(savingAcc\r\n\t\t\t\t\t\t\t\t.getRepeatable());\r\n\r\n\t\t\t\t\t\tDate date = new Date();\r\n\t\t\t\t\t\tDate systemDate = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAccSer\r\n\t\t\t\t\t\t\t\t\t\t.convertDateToStringDDmmYYYY(date));\r\n\r\n\t\t\t\t\t\tDate dateEnd = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t.getDateEnd());\r\n\r\n\t\t\t\t\t\tif (systemDate.getTime() == dateEnd.getTime()) {\r\n\t\t\t\t\t\t\tDate newEndDate = DateUtils.addMonths(systemDate,\r\n\t\t\t\t\t\t\t\t\tsavingAcc.getInterestRateId().getMonth());\r\n\r\n\t\t\t\t\t\t\tfloat balance = savingAcc.getBalanceAmount();\r\n\t\t\t\t\t\t\tfloat interest = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getInterestRate();\r\n\r\n\t\t\t\t\t\t\tint month = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getMonth();\r\n\t\t\t\t\t\t\tint days = Days\r\n\t\t\t\t\t\t\t\t\t.daysBetween(\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateStart())),\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateEnd())))\r\n\t\t\t\t\t\t\t\t\t.getDays();\r\n\t\t\t\t\t\t\tfloat amountAll = balance\r\n\t\t\t\t\t\t\t\t\t+ (balance * ((interest / (100)) / 360) * days);\r\n\t\t\t\t\t\t\tsavingAcc.setDateStart(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(systemDate));\r\n\t\t\t\t\t\t\tsavingAcc.setDateEnd(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(newEndDate));\r\n\t\t\t\t\t\t\tsavingAcc.setBalanceAmount(amountAll);\r\n\t\t\t\t\t\t\tsavingAcc.setRepeatable(\"\" + (maxRepeat + 1));\r\n\t\t\t\t\t\t\tupdateSavingAccount(savingAcc);\r\n\t\t\t\t\t\t\tcount+=1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"Successfully!! \"+ count +\" Saving Account has been updated. Minh Map!!!\");\r\n\t\t\t\r\n\t\t\treturn \"success\";\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Exception\");\r\n\r\n\t\t}\r\n\t\treturn \"Fail\";\r\n\t}", "public void updateBalance(float amount) throws BalanceException{\r\n\t\tif (balance + amount < 0){\r\n\t\t\tthrow new BalanceException();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tbalance += amount;\r\n\t\t}\r\n\t}", "public int updateAccount(Accounts account) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, account.getName());\n values.put(KEY_PASSWORD, account.getPassword());\n values.put(KEY_PH_NO, account.getPhoneNumber());\n values.put(KEY_EMAIL, account.getEmail());\n\n // updating row\n return db.update(TABLE_ACCOUNTS, values, KEY_ID + \" = ?\",\n new String[]{String.valueOf(account.getID())});\n }", "@Override\n\tpublic Integer update(Map<String, Object> params) throws Exception {\n\t\treturn bankService.update(params);\n\t}", "private void setBalance(double balance) {\n this.balance = balance;\n }", "private void updateSingleAccount(double amount, String account_name) {\n if (account_name.equals(\"bankomat\")){\n status_disp.transfer_resources(\"karta konto 1\", \"gotowka\", (float) amount); // TODO: remove hardcoded account names...crashes if names dont match\n }\n else {\n status_disp.reduce_wealth(account_name, (float) amount);\n Log.e(TAG, account_name + \" \" + amount);\n }\n }", "public synchronized void setBalance(double balance) {\n this.balance = balance;\n }", "void setManageTransactionBalance(String balance);", "@Override\r\n\tpublic boolean update(Account account) {\n\t\tint i= iInsert.update(account);\r\n\t\tif(1==i){\r\n\t\t\tflag=true;\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }", "public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }", "public boolean recoverAccount(int account_id, int balance, Connection con){\n try {\n executeNewAccount(account_id, balance, con);\n } catch (SQLException e) {\n try {\n con.rollback();\n return false;\n } catch (SQLException e1) {\n e1.printStackTrace();\n return false;\n }\n }\n\n cache.add(new Account(account_id, balance));\n return true;\n }", "String updateClientAccount(ClientAccount account) throws ServiceException;", "int updateByPrimaryKeySelective(CusBankAccount record);", "private void updateAccountStatus() {\n\r\n }", "Update withProperties(AccountProperties properties);", "public void setBalance(float balance) {\n this.balance = balance;\n }", "private void updateCustomerCredit(BusinessPartner businessPartner, BigDecimal amount, boolean add) {\n OBDal.getInstance().refresh(businessPartner);\n BigDecimal creditUsed = businessPartner.getCreditUsed();\n if (add) {\n creditUsed = creditUsed.add(amount);\n } else {\n creditUsed = creditUsed.subtract(amount);\n }\n businessPartner.setCreditUsed(creditUsed);\n OBDal.getInstance().save(businessPartner);\n OBDal.getInstance().flush();\n }", "@Override\r\n\tpublic void saveCurrentBalance(Double btcprice, Double balance, Long userId) {\r\n\t\taccountDataDao.saveCurrentBalance(btcprice, balance, userId);\t\t\r\n\t}", "@Override\r\n\tpublic int updatepassword(Account account) {\n\t\taccountMapper.updatepassword(account);\r\n\t\treturn 0;\r\n\t}", "int updateByPrimaryKeySelective(FinanceAccount record);", "@PreAuthorize(\"hasRole('ROLE_USER')\")\r\n\tpublic void updateUserAccount(UserAccount account);", "public void setBalance(double balance){\n\t\tthis.balance = balance;\n\t}" ]
[ "0.79129755", "0.7326039", "0.71784496", "0.7154468", "0.7139727", "0.70357543", "0.6917053", "0.6904657", "0.68198335", "0.67895275", "0.6646242", "0.6639902", "0.65534633", "0.65251744", "0.64910066", "0.6461951", "0.6459984", "0.64522123", "0.6446925", "0.6441392", "0.64045197", "0.63828415", "0.6377983", "0.6360866", "0.63127005", "0.62749034", "0.6263155", "0.6262445", "0.6254904", "0.6254606", "0.62303555", "0.62264514", "0.62003446", "0.6172122", "0.614805", "0.61444426", "0.6140843", "0.61400014", "0.61200297", "0.6119109", "0.60859", "0.60704505", "0.6048768", "0.60415", "0.60346526", "0.6026136", "0.5970266", "0.59545434", "0.5915564", "0.5883214", "0.58683336", "0.5865394", "0.5856106", "0.58516014", "0.5847372", "0.5847372", "0.5814719", "0.5792074", "0.57844496", "0.5781179", "0.5779401", "0.5778319", "0.57744277", "0.5761829", "0.5760383", "0.5752631", "0.57211816", "0.57190675", "0.5696297", "0.56859165", "0.5675021", "0.5673809", "0.56508964", "0.5645621", "0.5639504", "0.5608999", "0.5598563", "0.55871856", "0.55669415", "0.5563869", "0.5563073", "0.55531275", "0.5548706", "0.5545919", "0.5539974", "0.5529025", "0.55279154", "0.55279154", "0.5527103", "0.5516508", "0.5511397", "0.5506551", "0.5499707", "0.54978716", "0.54950696", "0.5480788", "0.54800385", "0.54716223", "0.5470238", "0.5462718" ]
0.7683071
1
Update balance in account entry at the accounts table and update balance in the cache (recovery mode)
public boolean updateBalance(int account_id, int final_amount, Connection con){ try { tryDbUpdate("update ACCOUNTS set BALANCE = "+ final_amount + " where ACCOUNT_ID = " + account_id, con); cache.add(new Account(account_id, final_amount)); } catch (SQLException e) { try { con.rollback(); return false; } catch (SQLException e1) { e1.printStackTrace(); return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateDatabaseAccountBalance() {\n\t\tString sql = \"UPDATE account SET balance = \" + this.balance + \" \";\n\t\tsql += \"WHERE accountID = '\" + this.accountID + \"';\";\n\n\t\tDbUtilities db = new MySqlUtilities();\n\t\tdb.executeQuery(sql);\n\t}", "public void updateBalance(int account_id, int final_amount){\n dbUpdate(\"update ACCOUNTS set BALANCE = \"+ final_amount + \" where ACCOUNT_ID = \" + account_id);\n cache.add(new Account(account_id, final_amount));\n }", "void updateAccount(int id, double accountBalance, String account) {\n // Update only the required keys\n sql = \"UPDATE CashiiDB2 \" + \"SET \" + account + \" ='\" + accountBalance + \"' WHERE AccountNum in ('\" + id + \"')\";\n try {\n st.executeUpdate(sql);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "void updateAccount(Account account);", "public void updateBalance(UUID accountId, double amount) {\n Account account = repository.getAccount(accountId);\n account.updateBalance(amount);\n repository.save(account);\n }", "@Transactional(isolation = Isolation.SERIALIZABLE)\n public void updateAccountBalance(Long accountId, Double newBalance) {\n Account account =accountRepository.findById(accountId)\n .orElseThrow(() -> new AccountNotFoundException(\"Account not found\"));\n account.setBalance(newBalance);\n accountRepository.save(account);\n }", "void updateAccount();", "public int baldown(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "@Override\npublic void update(Account account) {\n\taccountdao.update(account);\n}", "public int balup(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "@Override\n\tpublic int accountUpdate(String id, String balance) {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tint executeUpdate = 0;\n\t\tString sqlString=\"update user set balance = '\"+balance+\"' where id ='\"+id+\"'\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString);\n\t\t\texecuteUpdate = query.executeUpdate();\n\t\t\tSystem.out.println(\"executeUpdate:\"+executeUpdate);\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\treturn executeUpdate;\t\n\t}", "public void update(Account account) {\n\t\t\n\t}", "private void updateMoney() {\n balance = mysql.getMoney(customerNumber);\n balanceConverted = (float) balance / 100.00;\n }", "void updateBalance(int amount){ \n\t\tbalance = amount;\n\t}", "public void deposit(double amount) {\n balance += amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo='\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n }", "private void updateBalance(int balance) throws SQLException {\n\t\tupdateBalanceStatement.clearParameters();\n\t\tupdateBalanceStatement.setInt(1, balance);\n\t\tupdateBalanceStatement.setString(2, this.username);\n\t\tupdateBalanceStatement.executeUpdate();\n\t}", "public abstract void updateBalance(Balance balance, LedgerEntry.Subtype subtype, long amount) throws TransactionException;", "int updateAccountInfo(Account account);", "public synchronized double setBalanceForAccId(int AccId, double bal) {\n\t\tConnection dbAccess = DataAccess.getDbAccess();\n\t\tPreparedStatement psttmnt;\n\t\tString querySting;\n\t\tdouble balance = -1.0;\n\t\ttry {\n\t\t\tquerySting = \"UPDATE accounts SET acc_balance = \" + bal + \" WHERE acc_id = \" + AccId;\n\t\t\tpsttmnt = dbAccess.prepareStatement(querySting);\n\t\t\tint result = psttmnt.executeUpdate();\n\t\t\tif (result != 0) {\n\t\t\t\t balance = getBalanceForAccId(AccId);\n\t\t\t}\n\t\t\tdbAccess.close();\n\t\t} catch (SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\treturn balance;\n\t}", "public void updateAccount() {\r\n\t\t\r\n\t\t//update all totals\r\n\t\ttotalYouOwe = 0.0;\r\n\t\ttotalOwedToYou = 0.0;\r\n\t\tbalance = 0.0;\r\n\t\tnetBalance = 0.0;\r\n\t\t\r\n\t\t//totalYouOwe and totalOwedToYou\r\n\t\tfor (Event e : events) {\r\n\t\t\tif (e.isParticipantByGID(GID)) {\r\n\t\t\t\tif (e.getParticipantByGID(GID).getBalance() > 0) {\r\n\t\t\t\t\ttotalOwedToYou = totalOwedToYou + e.getParticipantByGID(GID).getBalance(); \r\n\t\t\t\t} else {\r\n\t\t\t\t\ttotalYouOwe = totalYouOwe + (-e.getParticipantByGID(GID).getBalance());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//netBalance/balance - the same in current implementation\r\n\t\tnetBalance = totalOwedToYou - totalYouOwe;\r\n\t\tbalance = totalOwedToYou - totalYouOwe;\r\n\t\t\r\n\t\tupdatePastRelations();\r\n\t}", "public void withdraw(double amount) throws InsufficientFundsException {\n if (amount <= balance) {\n balance -= amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo= '\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n } //end if\n else {\n throw new InsufficientFundsException(amount);\n } //end else\n }", "private void updateBalance(){\n Intent toUpdateBal = new Intent(this, UpdateAccount.class);\n startActivity(toUpdateBal);\n }", "int updateBalance(CardVO cv) throws RemoteException;", "@Override\n public void updateBalanceInfo(Long accountId, BigDecimal amountToAdd) {\n repositoryService.updateBalanceInfo(accountId, amountToAdd);\n AccountInfo accountInfo = repositoryService.fetchAccountInfo(accountId).orElseThrow();\n update(\"accounts\", Long.class, AccountInfo.class, accountId, accountInfo);\n }", "public void updateBalance(String mobileNo,int balance)\n\t{\n\t\tContext ctx;\n\t\ttry {\n\t\t\tctx = new InitialContext();\n\t\t\n\t\t\n\t\t DataSource ds=(DataSource)ctx.lookup(\"java:OracleDS\");\n\t\t\tConnection con=ds.getConnection();\n\t\t\tStatement stmt=con.createStatement();\n\t\t\t\n\t\t\tstmt.executeUpdate(\"update mobile set balance=\"+balance+\" where mobileno=\"+mobileNo);\n\t\t\tcon.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error in connection with Database :\"+e.getMessage());\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void testUpdateAccount(){\n\t\tint id = 10 ;\n\t\tAccount acc = this.bean.findAccountById(id ) ;\n\t\tacc.setDatetime(CommUtil.getNowDate()) ;\n\t\tint r = this.bean.updateAccount(acc) ;\n\t\tAssert.assertEquals(r, 1) ;\n\t}", "@Override\n\tpublic void calculateAndUpdateBalance() {\n\n\t\tbalance -= fee;\n\n\t}", "public void Deposit(Integer accountNo,float depositMoney){\n\tSessionFactory sessionFactory = new Configuration().configure(\"hibernate.cfg.xml\").buildSessionFactory();\n\tSession session = sessionFactory.openSession();\n\tTransaction trans = null;\n\ttry{\n\t\ttrans = session.beginTransaction();\n\t\tQuery query=session.createQuery(\"UPDATE Account set balance+=:balance where accountNo=:accountNo\"); \n\t\tquery.setParameter(\"balance\",depositMoney); \n\t\tquery.setParameter(\"accountNo\",accountNo); \n\t}catch(HibernateException hibernateException){\n\t\tif(trans != null){\n\t\t\ttrans.rollback();\n\t\t}\n\t\thibernateException.printStackTrace();\n\t}\n\t}", "private void updateUserAccount() {\n final UserDetails details = new UserDetails(HomeActivity.this);\n //Get Stored User Account\n final Account user_account = details.getUserAccount();\n //Read Updates from Firebase\n final Database database = new Database(HomeActivity.this);\n DatabaseReference user_ref = database.getUserReference().child(user_account.getUser().getUser_id());\n user_ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n //Read Account Balance\n String account_balance = dataSnapshot.child(Database.USER_ACC_BALANCE).getValue().toString();\n //Read Expire date\n String expire_date = dataSnapshot.child(Database.USER_ACC_SUB_EXP_DATE).getValue().toString();\n //Read Bundle Type\n String bundle_type = dataSnapshot.child(Database.USER_BUNDLE_TYPE).getValue().toString();\n //Attach new Values to the Account Object\n user_account.setBalance(Double.parseDouble(account_balance));\n //Attach Expire date\n user_account.setExpire_date(expire_date);\n //Attach Bundle Type\n user_account.setBundle_type(bundle_type);\n //Update Local User Account\n details.updateUserAccount(user_account);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n //No Implementation\n }\n });\n }", "@Override\r\n\tpublic void update(Account account) throws ServiceException {\n\r\n\t}", "@Override\n\tpublic void updateAccountBalance(double newBalance, int id) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString updateQuery = \"update accounts set balance=? where id=?\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(updateQuery);\n\t\t\tprepStmt.setDouble(1, newBalance);\n\t\t\tprepStmt.setInt(2, id);\n\t\t\tprepStmt.executeUpdate();\n\t}", "Account.Update update();", "public Account update(Account user);", "@Override\r\n\tpublic void updateBalance( Integer userid, double amount) {\n\t\tif ( getBalance( userid) < amount) {\r\n\t\t\tthrow new RuntimeException( \"用户余额不足!\");\r\n\t\t}\r\n\t\tString sql = \"UPDATE buyers SET balance = balance - ? WHERE id = ?;\";\r\n\t\tjdbcTemplate.update( sql, amount, userid);\r\n\t}", "public void editBalance() {\n\t\tAccount account = getAccountForEditBalance();\n\n\t\tif (adminDao.editBalance(account))\n\t\t\tSystem.out.println(\"Balance edited!\");\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "@Test\n\tpublic void testRecalculateAccountBalance() {\n\t\tSmsAccount smsAccount = new SmsAccount();\n\t\tsmsAccount.setSakaiUserId(\"1\");\n\t\tsmsAccount.setSakaiSiteId(\"1\");\n\t\tsmsAccount.setMessageTypeCode(\"1\");\n\t\tsmsAccount.setOverdraftLimit(1000L);\n\t\tsmsAccount.setCredits(10L);\n\t\tsmsAccount.setAccountName(\"accountname\");\n\t\tsmsAccount.setAccountEnabled(true);\n\t\thibernateLogicLocator.getSmsAccountLogic()\n\t\t\t\t.persistSmsAccount(smsAccount);\n\t\tinsertTestTransactionsForAccount(smsAccount);\n\n\t\tAssert.assertTrue(smsAccount.exists());\n\n\t\tList<SmsTransaction> transactions = hibernateLogicLocator\n\t\t\t\t.getSmsTransactionLogic().getSmsTransactionsForAccountId(\n\t\t\t\t\t\tsmsAccount.getId());\n\n\t\tAssert.assertNotNull(transactions);\n\t\tAssert.assertTrue(transactions.size() > 0);\n\n\t\tsmsBillingImpl.recalculateAccountBalance(smsAccount.getId());\n\n\t\tSmsAccount recalculatedAccount = hibernateLogicLocator\n\t\t\t\t.getSmsAccountLogic().getSmsAccount(smsAccount.getId());\n\t\tAssert.assertNotNull(recalculatedAccount);\n\t\tAssert.assertTrue(recalculatedAccount.getCredits() == 6660);\n\t}", "public void setBalance( Integer account_id, double balance ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n params.put(\"balance\", String.valueOf(balance));\r\n String url = API_DOMAIN + ACCOUNT_EXT + SET_BALANCE;\r\n this.makeVolleyRequest( url, params );\r\n }", "@Override\r\n\tpublic int updateAccountByPrimaryKeySelective(Account account) {\n\t\treturn this.accountMapper.updateAccountByPrimaryKeySelective(account);\r\n\t\t\r\n\t}", "public static String updateLate(String account){\n return \"update current_bills set cb_late = 1 where cb_account = '\"+account+\"'\";\n }", "public abstract void updateAccount(JSONObject account);", "public abstract void updateAccount(final GDataAccount account)\n throws ServiceException;", "public boolean recoverAccount(int account_id, int balance, Connection con){\n try {\n executeNewAccount(account_id, balance, con);\n } catch (SQLException e) {\n try {\n con.rollback();\n return false;\n } catch (SQLException e1) {\n e1.printStackTrace();\n return false;\n }\n }\n\n cache.add(new Account(account_id, balance));\n return true;\n }", "public void changeBalance (int amount){\n balance += amount;\n }", "public void setBalance(){\n balance.setBalance();\n }", "public void updateAccount(Account account)\n\t {\n\t\t if(!accountExists(account)) addAccount(account);\n\t\t \n\t\t ContentValues values = new ContentValues();\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_USERNAME, account.getUsername());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_BALANCE, account.getBalance());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_AUTH_TOKEN, account.getAuthenticationToken());\n\t\t \n\t\t String where = DatabaseContract.AccountContract.COLUMN_NAME_USERNAME + \" = ? \";\n\t\t \n\t\t db.update(DatabaseContract.AccountContract.TABLE_NAME, \n\t\t\t\t values, \n\t\t\t\t where, \n\t\t\t\t new String[] {account.getUsername()});\n\t }", "public void updatebal(String cname, String amt1) {\nString countQuery = \"SELECT Balance FROM \" + DATABASE_TABLE1+\" WHERE Name='\"+cname+\"'\";\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t int d=cursor.getColumnIndex(\"Balance\");\n\t\tString cbal=null;\n\t\tfor(cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()){\n\t\t\tcbal=cursor.getString(d);\n\t\t\t\n\t\t}\n\t\tint cur=Integer.parseInt(cbal);\n\t\tcur=cur+Integer.parseInt(amt1);\n\t ContentValues up=new ContentValues();\n\t up.put(Com_Balance, cur);\n\t\tourDatabase.update(DATABASE_TABLE1, up, Com_Name+\" = '\"+cname+\"'\", null);\n\t\t\n\t}", "@Override\n public void changeBalance (ChangeBalanceDto changeBalanceDto) {\n new AccountDaoImpl(new StatementsRunnerImpl()).changeBalance(changeBalanceDto);\n }", "@Override\r\n\tpublic int updatepassword(Account account) {\n\t\taccountMapper.updatepassword(account);\r\n\t\treturn 0;\r\n\t}", "public void balance(){\n\t\tnamesTree.balance();\n\t\taccountNumbersTree.balance();\n\t}", "public void setBalance( long balance ) {\r\n this.balance = balance;\r\n }", "@Override\n\t\tpublic boolean update(AccountTransaction t) {\n\t\t\treturn false;\n\t\t}", "void setManageTransactionBalance(String balance);", "public void addBalance(long balance) {\r\n this.balance += balance;\r\n }", "public void updateAccounts(HashMap<String, Accounts> accounts){\n this.accounts = accounts;\n }", "@Override\n\tpublic void updateStockAccountInfo(StockAccount account) {\n\t\t\n\t}", "public String myAfterBalanceAmount() {\r\n\t\tint count=0;\r\n\t\tList<SavingAccount> acc = null;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Before Repeat\");\r\n\t\t\tacc = getSavingAccountList();\r\n\r\n\t\t\tfor (SavingAccount savingAcc : acc) {\r\n\t\t\t\tif (!(\"0\".equals(savingAcc.getState()))) {\r\n\t\t\t\t\tif (savingAcc.getState().equals(\"active\")) {\r\n\t\t\t\t\t\tint maxRepeat = Integer.parseInt(savingAcc\r\n\t\t\t\t\t\t\t\t.getRepeatable());\r\n\r\n\t\t\t\t\t\tDate date = new Date();\r\n\t\t\t\t\t\tDate systemDate = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAccSer\r\n\t\t\t\t\t\t\t\t\t\t.convertDateToStringDDmmYYYY(date));\r\n\r\n\t\t\t\t\t\tDate dateEnd = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t.getDateEnd());\r\n\r\n\t\t\t\t\t\tif (systemDate.getTime() == dateEnd.getTime()) {\r\n\t\t\t\t\t\t\tDate newEndDate = DateUtils.addMonths(systemDate,\r\n\t\t\t\t\t\t\t\t\tsavingAcc.getInterestRateId().getMonth());\r\n\r\n\t\t\t\t\t\t\tfloat balance = savingAcc.getBalanceAmount();\r\n\t\t\t\t\t\t\tfloat interest = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getInterestRate();\r\n\r\n\t\t\t\t\t\t\tint month = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getMonth();\r\n\t\t\t\t\t\t\tint days = Days\r\n\t\t\t\t\t\t\t\t\t.daysBetween(\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateStart())),\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateEnd())))\r\n\t\t\t\t\t\t\t\t\t.getDays();\r\n\t\t\t\t\t\t\tfloat amountAll = balance\r\n\t\t\t\t\t\t\t\t\t+ (balance * ((interest / (100)) / 360) * days);\r\n\t\t\t\t\t\t\tsavingAcc.setDateStart(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(systemDate));\r\n\t\t\t\t\t\t\tsavingAcc.setDateEnd(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(newEndDate));\r\n\t\t\t\t\t\t\tsavingAcc.setBalanceAmount(amountAll);\r\n\t\t\t\t\t\t\tsavingAcc.setRepeatable(\"\" + (maxRepeat + 1));\r\n\t\t\t\t\t\t\tupdateSavingAccount(savingAcc);\r\n\t\t\t\t\t\t\tcount+=1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"Successfully!! \"+ count +\" Saving Account has been updated. Minh Map!!!\");\r\n\t\t\t\r\n\t\t\treturn \"success\";\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Exception\");\r\n\r\n\t\t}\r\n\t\treturn \"Fail\";\r\n\t}", "public void update() {\n\t\n\tif(getBalance() > 0) {\n\t\tcanWithdraw = true;\n\t}else {canWithdraw = false;}//end else statement\n}", "@Override\r\n\tpublic boolean update(int id, Account account) {\n\t\treturn daoref.update(id, account);\r\n\t}", "public boolean saveAccount(Account account)\n {\n PreparedStatement preparedStatement = null;\n try\n {\n preparedStatement = connection.prepareStatement(\n String.format(\"UPDATE %s.accounts SET balance=? WHERE id = ?;\",\n simpleEconomy.getConfig().getString(\"db.database\")));\n preparedStatement.setDouble(1, account.getBalance());\n preparedStatement.setInt(2, account.getId());\n preparedStatement.execute();\n return true;\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n return false;\n }", "void deposit(int value)//To deposit money from the account\n {\n balance += value;\n }", "int updateByPrimaryKey(FinanceAccount record);", "@Override\n\tpublic Account update(Account account) {\n\t\taccount=initializeAccountForModification(account);\n\t\treturn accountRepository.save(account);\n\t}", "@Override\r\n\tpublic void updateAccountHashmap(Account acc) {\n\t\tdataMap.put(acc.getAccountNumber(), acc);\r\n\t}", "public int updateAndGetBalance(int fid, int tid, int money) {\n\t\tint q=0;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tthis.pst = this.con.prepareStatement(\"update customer set balance=balance-'\"+money+\"' where acc_number=?\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthis.pst.setInt(1,fid);\r\n\t\t\t\r\n\t\t\t this.pst.executeUpdate();\r\n\t\t this.pst = this.con.prepareStatement(\"update customer set balance=balance+'\"+money+\"' where acc_number=?\");\r\n\t\t\t\t\tthis.pst.setInt(1,tid);\r\n\t\t\t\t this.pst.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t this.pst=this.con.prepareStatement(\"select * from customer where acc_number=?\");\r\n\t\t this.pst.setInt(1,fid);\r\n\t\t this.rs=this.pst.executeQuery();\r\n\t\t while (rs.next()) {\r\n\t\t\t\t\tq=rs.getInt(\"balance\");\r\n\t\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\r\n\t\treturn q;\r\n\r\n\t}", "public void updateBal(int value) {\r\n bal = bal + value;\r\n }", "public bankacc() {\n\t\tbalance = 0;\n\t\tlockBalance = new ReentrantLock();\n\t\tcorrectBalanceCond = lockBalance.newCondition();\n\t}", "public abstract void rebalance();", "void deposit(double Cash){\r\n\t\tbalance=balance+Cash;\r\n\t}", "public static String payCurrentBill(String account){\n return \"update current_bills set cb_paid = 1 where cb_account = '\"+account+\"'\";\n }", "int updateByPrimaryKey(Account record);", "int updateByPrimaryKey(Account record);", "private boolean updateMoneyForAccount(int accountNumber, BankAccountType accountType, int currency) {\n\t\tString columnName = (accountType == BankAccountType.Checking ? \"balance\" : \"balance_saving\");\n\n\t\tString sql = \"UPDATE accounts SET \" + columnName + \" = ? WHERE id = ?\";\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\tpstmt.setInt(1, currency);\n\t\t\tpstmt.setInt(2, accountNumber);\n\n\t\t\tint rowsUpdated = pstmt.executeUpdate();\n\t\t\treturn (rowsUpdated == 1);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn false;\n\t}", "public void updateBalance(float amount) throws BalanceException{\r\n\t\tif (balance + amount < 0){\r\n\t\t\tthrow new BalanceException();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tbalance += amount;\r\n\t\t}\r\n\t}", "public void InitializeBalance(BigDecimal valor){\n \r\n ChekingAccount chekAc=pRepository.GetChekingAccount();\r\n chekAc.setSaldoInicial(valor);\r\n pRepository.SaveChekingAccount(chekAc);\r\n \r\n }", "public void Deposit(double ammount){\n abal = ammount + abal;\n UpdateDB();\n }", "private void updateAccountStatus() {\n\r\n }", "Account(int balance) {\n if(balance <0) this.balance=0;\n this.balance = balance;\n }", "int updateByPrimaryKey(CusBankAccount record);", "public void withdraw(String accountNumber, int amount) {\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tif (nowBalance<amount) {\n\t\t\tSystem.out.println(\"No Balance\");\n\t\t\treturn;\n\t\t}\n\t\tlastBalance = nowBalance - amount;\n\t\t//System.out.println(lastBalance);\n\t\t\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tpp = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tpp.setInt(1, lastBalance);\n\t\tpp.setString(2, accountNumber.toString());\n\t\tpp.executeUpdate();\n\t\t\n\t\tString logs = \"withdraw : \"+ amount+\" / balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tll = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tll.setString(1, logs);\n\t\tll.executeUpdate();\n\t\tSystem.out.println(\"Ypu got $\"+String.valueOf(amount));\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t\t\n\t}", "@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.READ_COMMITTED)\r\n\tpublic boolean modifyAccount(Account account) {\n\t\treturn userDao.updateAccount(account);\r\n\t}", "@Override\n public void updateBalance(Integer amount) throws EmployeeException {\n if (this.balance.longValue() + amount.longValue() < Integer.MIN_VALUE\n || this.balance.longValue() + amount.longValue() > Integer.MAX_VALUE) {\n throw new EmployeeException();\n }\n this.balance += amount;\n }", "public void increaseBalance(final double balance) {\n this.balance += balance;\n }", "public void setBalance(double bal){\n balance = bal;\r\n }", "Account refresh();", "void setBalance(double value);", "public void deposit(String accountNumber, int amount) {\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tlastBalance = nowBalance + amount;\n\t\t//System.out.println(lastBalance);\n\t\t\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tpp = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tpp.setInt(1, lastBalance);\n\t\tpp.setString(2, accountNumber.toString());\n\t\tpp.executeUpdate();\n\t\t\n\t\tString logs = \"deposit : \"+ amount+\" / balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tll = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tll.setString(1, logs);\n\t\tll.executeUpdate();\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t}", "private void setBalance(double balance) {\n this.balance = balance;\n }", "private void updateSingleAccount(double amount, String account_name) {\n if (account_name.equals(\"bankomat\")){\n status_disp.transfer_resources(\"karta konto 1\", \"gotowka\", (float) amount); // TODO: remove hardcoded account names...crashes if names dont match\n }\n else {\n status_disp.reduce_wealth(account_name, (float) amount);\n Log.e(TAG, account_name + \" \" + amount);\n }\n }", "@Override\n\tpublic void updateAccount(int idUsuario, int idCarteira) {\n\t}", "public void updateAccounts(String sourceAccountNumber, BigDecimal transferedAmount, String destinationAccount ) throws TransferServiceException {\n\t\t\n\t\tList<Account> accountList = new ArrayList<>();\n\t\t\n\t\taccountList.add(debitAmount(sourceAccountNumber,transferedAmount));\n\t\taccountList.add(creditAmount(destinationAccount, transferedAmount));\n\t\trepository.saveAll(accountList);\n\t\n\t}", "int updateByPrimaryKeySelective(CusBankAccount record);", "int updateByPrimaryKeySelective(FinanceAccount record);", "Transfer updateChargeBack(Transfer transfer, Transfer chargeback);", "public synchronized void setBalance(double balance) {\n this.balance = balance;\n }", "public Account getAccountForEditBalance() {\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(\"Account: \" + account.getAccountNumber() + \" Balance: \" + account.getBalance());\n\n\t\tdouble balance = Inputs.getUserDoubleInput(\"Enter new balance:\");\n\t\taccount.setBalance(balance);\n\t\treturn account;\n\t}", "@Override\n\tpublic Integer update(Map<String, Object> params) throws Exception {\n\t\treturn bankService.update(params);\n\t}", "public void setBalance(float balance) {\n this.balance = balance;\n }", "private void updateCurrentBalance(final String earnedOrSpent, String clientId, final String amountGiven) {\n final DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"Clients/\" + clientId);\n\n try{\n final String[] currentValue = new String[1];\n ref.child(\"currentBalance\").get().addOnCompleteListener(new OnCompleteListener<DataSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DataSnapshot> task) {\n if(task.isSuccessful()){\n currentValue[0] = String.valueOf(task.getResult().getValue());\n Double newValue = 0.0;\n if(earnedOrSpent.equalsIgnoreCase(\"spent\")){\n newValue = Double.parseDouble(currentValue[0]) - Double.parseDouble(amountGiven);\n }else{\n newValue = Double.parseDouble(currentValue[0]) + Double.parseDouble(amountGiven);\n }\n\n updateBalanceInDatabase(ref, String.valueOf(newValue));\n Log.d(\"Firebase\", currentValue[0]);\n }\n }\n });\n }catch(Exception e){\n Log.d(\"NewTransactionActivity\", e.toString());\n }\n\n }", "public void setBalance(double balance){\n\t\tthis.balance = balance;\n\t}", "public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}" ]
[ "0.7995225", "0.74662846", "0.7201882", "0.69652104", "0.69501585", "0.68623966", "0.6822075", "0.68149364", "0.67970467", "0.67381036", "0.6705084", "0.6677904", "0.6657206", "0.6639469", "0.66302687", "0.6562214", "0.6471153", "0.6434174", "0.6402276", "0.6401755", "0.6398882", "0.6392221", "0.6387156", "0.63705015", "0.63534236", "0.63430864", "0.632821", "0.63086665", "0.63065654", "0.630213", "0.6265141", "0.6256565", "0.6249682", "0.6236337", "0.62323046", "0.6212329", "0.61534816", "0.60773224", "0.6064851", "0.6062644", "0.6058945", "0.60553163", "0.60291755", "0.6007762", "0.6000758", "0.594722", "0.59454924", "0.5944195", "0.59361356", "0.5935761", "0.59309", "0.5926145", "0.5917182", "0.59100384", "0.5895807", "0.58860666", "0.5875483", "0.5865323", "0.5859249", "0.5851696", "0.58489895", "0.58472604", "0.58404076", "0.5836828", "0.5835785", "0.583534", "0.583385", "0.5825526", "0.5820941", "0.58143604", "0.58143604", "0.5800826", "0.5800272", "0.5785459", "0.5777369", "0.5767067", "0.5742452", "0.5740324", "0.5732407", "0.5707507", "0.5707454", "0.5662207", "0.56558657", "0.56376547", "0.56264544", "0.56150764", "0.56087923", "0.5593315", "0.55915666", "0.55911696", "0.55888873", "0.55858725", "0.5578972", "0.55674213", "0.5567348", "0.55540776", "0.5550525", "0.5542776", "0.55410635", "0.55399567" ]
0.71540594
3
Returns account balance in case the account exists
public Integer getAccountBalance(int account_id){ Account a = cache.get(account_id); if(a != null) return a.getBalance(); try ( Statement s = rawDataSource.getConnection().createStatement(); ResultSet res = s.executeQuery( "SELECT BALANCE FROM ACCOUNTS WHERE ACCOUNT_ID = " + account_id)) { if (res.next()) return res.getInt("BALANCE"); } catch (SQLException ex) { return null; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}", "public Money getTotalBalance();", "@Override\n public BigDecimal getCurrentBalance(Account account) {\n return null;\n }", "public String balance() {\n\t\treturn this.apiCall(\"balance\", \"\", \"\", true);\n\t}", "public double getBankAccountBalance() {\r\n\t\t\r\n\t\tdouble balance = 0.0;\r\n\t\t\r\n\t\t\t\tif( customerBankAccountList.contains(this.getCustomer() ) ) \r\n\t\t\t\t{\t\r\n\t\t\t\t\tbalance = this.getCustomer().getBalance();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\treturn balance;\r\n\t\t}", "public static BigDecimal getBalance(int accountId) throws SQLException {\n boolean cdt1 = Checker.checkValidUserAccountAccountId(accountId);\n // if it is a valid account id, establish a connection\n if (cdt1) {\n Connection connection = DatabaseDriverHelper.connectOrCreateDataBase();\n BigDecimal balance = DatabaseSelector.getBalance(accountId, connection);\n connection.close();\n return balance;\n }\n return null;\n }", "abstract int checkBalance(String accountno) throws RemoteException;", "double getBalance();", "double getBalance();", "public Integer getAccountBalance(String address) throws LedgerException {\n // Convenience variable for throwing exceptions\n String action = \"get account balance\";\n\n Account account;\n Block lastBlock;\n\n try {\n // Retrieve most recent completed block\n lastBlock = getBlock(blockMap.size());\n } catch (LedgerException e) {\n // Catch 'Block does not exist' and throw more specific exception\n throw new LedgerException(action, \"No blocks have been commited yet.\");\n }\n\n // If the account does not exist, throw an Exception\n if ( (account = lastBlock.getAccount(address)) == null ) {\n throw new LedgerException(action, \"Account does not exist.\");\n }\n\n return account.getBalance();\n }", "public float getBalance()\r\n\t{\n\t\ttry\r\n\t\t{\r\n\t\t\tDBConnection ToDB = new DBConnection(); //Have a connection to the DB\r\n\t\t\tConnection DBConn = ToDB.openConn();\r\n\t\t\tStatement Stmt = DBConn.createStatement();\r\n\t\t\tString SQL_Command = \"SELECT Balance FROM SavingsAccount WHERE SavingsAccountNumber ='\"+SavingsAccountNumber+\"'\"; //SQL query command for Balance\r\n\t\t\tResultSet Rslt = Stmt.executeQuery(SQL_Command);\r\n\t\t\twhile (Rslt.next())\r\n\t\t\t{\r\n\t\t\t\tBalance = Rslt.getFloat(1);\r\n\t\t\t}\r\n\t\t\tStmt.close();\r\n\t\t\tToDB.closeConn();\r\n\t\t}\r\n\t\tcatch(SQLException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"SQLException: \" + e);\r\n\t\t\twhile (e != null)\r\n\t\t\t{ System.out.println(\"SQLState: \" + e.getSQLState());\r\n\t\t\t\tSystem.out.println(\"Message: \" + e.getMessage());\r\n\t\t\t\tSystem.out.println(\"Vendor: \" + e.getErrorCode());\r\n\t\t\t\te = e.getNextException();\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Exception: \" + e);\r\n\t\t\te.printStackTrace ();\r\n\t\t}\r\n\t\treturn Balance;\r\n\t}", "public void getBalance( Integer account_id ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n String url = API_DOMAIN + ACCOUNT_EXT + GET_BALANCE;\r\n this.makeVolleyRequest( url, params );\r\n }", "public int getBalance() {\n return total_bal;\n }", "void checkBalance() {\n\t\tSystem.out.println(\"Account balance: \" + balance);\n\t}", "public void getBalance() {\n\t\tSystem.out.println(\"Balance in Savings account is\" + balance);\n\t\t//return balance;\n\t}", "double getBalance(UUID name);", "public BankAccount getBalance (IDRecord idRecord) {\n\n BankAccount currentBankAccount;\n // extract the bank account number\n int theAcctNum = idRecord.getNumericalID();\n\n // find BankAccount from account -> BankAccount HashMap\n currentBankAccount = hashMapOfAllAccts.get(theAcctNum);\n\n if ( currentBankAccount == null) {\n // if no account was found, generate a generic empty account\n currentBankAccount = new BankAccount();\n\n }\n\n return currentBankAccount;\n }", "@Override\n\tpublic Account getBalance(String username) {\n\t\treturn account.findByUsername(username);\n\t}", "public Integer getBalance() {\n return balance;\n }", "public Integer getBalance() {\n return balance;\n }", "public long balanceForAccount(int acctnum) {\n if (acctnum != -1) {\n return mAccounts.get(acctnum).balance();\n } else {\n long sum = 0;\n for (HDAccount hda : mAccounts)\n sum += hda.balance();\n return sum;\n }\n }", "public int getBalance()\n {\n return balance;\n }", "public double getCurrentBalance(){\n if(!checkAccountOpen()){\n System.out.println(\"This transaction could not be processed. Please check your account status.\");\n }\n System.out.println(\"Your current balance is: $\"+currentBalance);\n return currentBalance;\n }", "@Override\n\tpublic double getAccountBalance(final int bankAccountId, final String vcDate, final Connection connection)\n\t{\n\t\tdouble opeAvailable = 0, totalAvailable = 0;\n\t\ttry {\n\n\t\t\tfinal StringBuilder str = new StringBuilder(\"SELECT case when sum(openingDebitBalance) = null then 0\")\n\t\t\t\t\t.append(\" ELSE sum(openingDebitBalance) end - case when sum(openingCreditBalance) = null then 0\")\n\t\t\t\t\t.append(\" else sum(openingCreditBalance) end AS \\\"openingBalance\\\" \")\n\t\t\t\t\t.append(\"FROM transactionSummary WHERE financialYearId=( SELECT id FROM financialYear WHERE startingDate <= ?\")\n\t\t\t\t\t.append(\"AND endingDate >= ?) AND glCodeId =(select glcodeid from bankaccount where id= ?)\");\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(str);\n\t\t\tQuery pst = persistenceService.getSession().createSQLQuery(str.toString());\n\t\t\tpst.setString(0, vcDate);\n\t\t\tpst.setString(1, vcDate);\n\t\t\tpst.setInteger(2, bankAccountId);\n\t\t\tList<Object[]> rset = pst.list();\n\t\t\tfor (final Object[] element : rset)\n\t\t\t\topeAvailable = Double.parseDouble(element[0].toString());\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(\"opening balance \" + opeAvailable);\n\n\t\t\tfinal StringBuilder str1 = new StringBuilder(\"SELECT (case when sum(gl.debitAmount) = null then 0\")\n\t\t\t\t\t.append(\" else sum(gl.debitAmount) end - case when sum(gl.creditAmount) = null then 0\")\n\t\t\t\t\t.append(\" else sum(gl.creditAmount) end) + \").append(opeAvailable).append(\"\")\n\t\t\t\t\t.append(\" as \\\"totalAmount\\\" FROM generalLedger gl, voucherHeader vh WHERE vh.id = gl.voucherHeaderId\")\n\t\t\t\t\t.append(\" AND gl.glCodeid = (select glcodeid from bankaccount where id= ?) AND \")\n\t\t\t\t\t.append(\" vh.voucherDate >=( SELECT TO_CHAR(startingDate, 'dd-Mon-yyyy')\")\n\t\t\t\t\t.append(\" FROM financialYear WHERE startingDate <= ? AND endingDate >= ?) AND vh.voucherDate <= ?\");\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(str1);\n\t\t\tpst = persistenceService.getSession().createSQLQuery(str1.toString());\n\t\t\tpst.setInteger(0, bankAccountId);\n\t\t\tpst.setString(1, vcDate);\n\t\t\tpst.setString(2, vcDate);\n\t\t\tpst.setString(3, vcDate);\n\t\t\trset = pst.list();\n\t\t\tfor (final Object[] element : rset) {\n\t\t\t\ttotalAvailable = Double.parseDouble(element[0].toString());\n\t\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\t\tLOGGER.info(\"total balance \" + totalAvailable);\n\t\t\t}\n\n\t\t} catch (final HibernateException e) {\n\t\t\tLOGGER.error(\" could not get Bankbalance \" + e.toString(), e);\n\t\t\tthrow new HibernateException(e.toString());\n\t\t}\n\t\treturn totalAvailable;\n\t}", "BigDecimal getClosingDebitBalance();", "private int getBalance() throws SQLException {\n\t\tgetBalanceStatement.clearParameters();\n\t\tgetBalanceStatement.setString(1, this.username);\n\t\tResultSet result = getBalanceStatement.executeQuery();\n\t\tresult.next();\n\t\tint out = result.getInt(1);\n\t\tresult.close();\n\t\treturn out;\n\t}", "public AccountDto getBalanceFor(UUID accountId) {\n Account account = repository.getAccount(accountId);\n return getAccountDtoFor(account);\n }", "public int getBalance() {\n return balance;\n }", "public int getBalance() {\n return balance;\n }", "public BigDecimal getBalance() {\n return balance;\n }", "public BigDecimal getBalance() {\n return balance;\n }", "public String myAfterBalanceAmount() {\r\n\t\tint count=0;\r\n\t\tList<SavingAccount> acc = null;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Before Repeat\");\r\n\t\t\tacc = getSavingAccountList();\r\n\r\n\t\t\tfor (SavingAccount savingAcc : acc) {\r\n\t\t\t\tif (!(\"0\".equals(savingAcc.getState()))) {\r\n\t\t\t\t\tif (savingAcc.getState().equals(\"active\")) {\r\n\t\t\t\t\t\tint maxRepeat = Integer.parseInt(savingAcc\r\n\t\t\t\t\t\t\t\t.getRepeatable());\r\n\r\n\t\t\t\t\t\tDate date = new Date();\r\n\t\t\t\t\t\tDate systemDate = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAccSer\r\n\t\t\t\t\t\t\t\t\t\t.convertDateToStringDDmmYYYY(date));\r\n\r\n\t\t\t\t\t\tDate dateEnd = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t.getDateEnd());\r\n\r\n\t\t\t\t\t\tif (systemDate.getTime() == dateEnd.getTime()) {\r\n\t\t\t\t\t\t\tDate newEndDate = DateUtils.addMonths(systemDate,\r\n\t\t\t\t\t\t\t\t\tsavingAcc.getInterestRateId().getMonth());\r\n\r\n\t\t\t\t\t\t\tfloat balance = savingAcc.getBalanceAmount();\r\n\t\t\t\t\t\t\tfloat interest = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getInterestRate();\r\n\r\n\t\t\t\t\t\t\tint month = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getMonth();\r\n\t\t\t\t\t\t\tint days = Days\r\n\t\t\t\t\t\t\t\t\t.daysBetween(\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateStart())),\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateEnd())))\r\n\t\t\t\t\t\t\t\t\t.getDays();\r\n\t\t\t\t\t\t\tfloat amountAll = balance\r\n\t\t\t\t\t\t\t\t\t+ (balance * ((interest / (100)) / 360) * days);\r\n\t\t\t\t\t\t\tsavingAcc.setDateStart(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(systemDate));\r\n\t\t\t\t\t\t\tsavingAcc.setDateEnd(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(newEndDate));\r\n\t\t\t\t\t\t\tsavingAcc.setBalanceAmount(amountAll);\r\n\t\t\t\t\t\t\tsavingAcc.setRepeatable(\"\" + (maxRepeat + 1));\r\n\t\t\t\t\t\t\tupdateSavingAccount(savingAcc);\r\n\t\t\t\t\t\t\tcount+=1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"Successfully!! \"+ count +\" Saving Account has been updated. Minh Map!!!\");\r\n\t\t\t\r\n\t\t\treturn \"success\";\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Exception\");\r\n\r\n\t\t}\r\n\t\treturn \"Fail\";\r\n\t}", "BigDecimal getOpeningDebitBalance();", "BigDecimal getOpeningDebitBalance();", "public double getBalance()\n \n {\n \n return balance;\n \n }", "public Double getBalance(){\n Double sum = 0.0;\n // Mencari balance dompet dari transaksi dengan cara menghitung total transaksi\n for (Transaction transaction : transactions) {\n sum += transaction.getAmount().doubleValue();\n }\n return sum;\n }", "public RemoteCall<BigInteger> balanceOf(String account) {\n final Function function = new Function(FUNC_BALANCEOF,\n Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(account)),\n Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}));\n return executeRemoteCallSingleValueReturn(function, BigInteger.class);\n }", "public String getBalance() {\n return this.balance;\n }", "public long getBalance() {\n\t\n\treturn balance;\n}", "@Override\n public ResponseEntity<ResponseAccountBalance> getAccountBalanceById(String accountId) {\n\n final String url = \"https://sandbox.platfr.io/api/gbs/banking/v2/accounts/\"+accountId+\"/balance\";\n //=======================================================================\n //============================= HEADER ==================================\n //=======================================================================\n HttpHeaders requestHeaders = new HttpHeaders();\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n requestHeaders.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));\n requestHeaders.set(\"Auth-Schema\",\"S2S\");\n\n HttpEntity<AccountBalance> entity = new HttpEntity<>(requestHeaders);\n // Send request with GET method, and Headers.\n return restTemplate.exchange(url,HttpMethod.GET, entity, ResponseAccountBalance.class);\n\n }", "public String getBalance() {\n return balance;\n }", "public java.math.BigDecimal getBalance() {\n return balance;\n }", "public long getBalance() {\n return this.balance;\n }", "public final float getBalance() {\n return balance;\n }", "public AmountOfMoney getCashRegisterBalance(){\n return cashRegister.getBalance();\n }", "public double getBalance(){\n return balance.getBalance();\n }", "public int getBalance() {\n\t\treturn balance;\n\t}", "public float getAccountBalance(PublicKey _publicKey) {\n\t\tfor(AccountBase account: this.node.blockchain.getTopStableBlock().internBlock.accounts){\n\t\t\tif(account.getAddress().equals(_publicKey))\n\t\t\t\treturn account.getNonce();\n\t\t}\n\t\t// account not found -> log, or error \n\t\treturn -1;\n\t}", "public double getBal() {\n\t\t return balance;\r\n\t }", "public double getBalance() {\n return balance;\n }", "public float getBalance() {\n return balance;\n }", "public float showBalance() {\n\t\treturn dao.showBalance();\r\n\t}", "public void showAccountBalance(){\n balance();\n\n }", "public double getBalance()\n {\n return balance;\n }", "public double getBalance(){\r\n\t\treturn balance;\r\n\t}", "public BigDecimal getBalance()\n\t{\n\t\tBigDecimal retValue = Env.ZERO;\n\t//\tlog.config( toString() + \" Balance=\" + retValue);\n\t\treturn retValue;\n\t}", "@GetMapping(\"/accountBalance/{accountId}\")\n public ResponseEntity<String> getAccountBalanceAndTransactions(@PathVariable int accountId) {\n try {\n return new ResponseEntity<>(bankingService.getAccountBalanceAndTransactions(accountId), HttpStatus.OK);\n } catch (AccountNonExistentException e) {\n return new ResponseEntity<>(e.getLocalizedMessage(), HttpStatus.BAD_REQUEST);\n } catch (Exception e) {\n return new ResponseEntity<>(\"Error! \" + e.getLocalizedMessage(), HttpStatus.INTERNAL_SERVER_ERROR);\n }\n\n }", "public double getBalance()\r\n\t{\r\n\t\treturn balance;\t\t\r\n\t}", "public Map<String, Integer> getAccountBalances() throws LedgerException {\n Block lastBlock;\n\n try {\n // Retrieve most recent completed block\n lastBlock = getBlock(blockMap.size());\n } catch (LedgerException e) {\n // Catch exception that 'Block does not exist' and throw a more specific error\n throw new LedgerException(\"get account balances\", \"No blocks have been committed yet.\");\n }\n\n // Get accountBalanceMap from the last committed block\n Map<String, Account> accountMap = lastBlock.getBalanceMap();\n\n // Create new map to store values\n Map<String, Integer> accountBalancesMap = new HashMap<String, Integer>();\n\n // Iterate through accounts to retrieve their current balances.\n for (Map.Entry<String, Account> entry : accountMap.entrySet() ) {\n accountBalancesMap.put(entry.getKey(), entry.getValue().getBalance());\n }\n\n return accountBalancesMap;\n }", "public int getBalance() {\n return this.balance;\n\n }", "@Override\n public long getTotalBalances() {\n return accounts.values().stream().map(Account::getBalance).mapToLong(Long::longValue).sum();\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\r\n\t\t\r\n\t\treturn balance;\r\n\t\t\r\n\t}", "public double getBalance() \n\t{\n\t\treturn balance;\n\t\t\n\t}", "public Double getBalance() {\r\n return balance;\r\n }", "public BaseJson<BigDecimal> wallet_balance() throws Exception {\n String s = main(\"wallet_balance\",\"[]\");\n return JsonHelper.jsonStr2Obj(s, BaseJson.class);\n }", "public double getBalance() {\n\n double balance = 0;\n balance = overDraftLimit;\n return balance;\n\n }", "BigDecimal getClosingCreditBalance();", "@Override\r\n\tpublic double checkBalance(String mobileNo) {\n\t\tCustomer custCheckBalance = custMap.get(mobileNo);\r\n\t\tdouble amount = custCheckBalance.getInitialBalance();\r\n\t\treturn amount;\r\n\t}", "public float getBalance(String SavngsAcct) {\n\t\ttry\r\n\t\t{\r\n\t\t\tDBConnection ToDB = new DBConnection(); //Have a connection to the DB\r\n\t\t\tConnection DBConn = ToDB.openConn();\r\n\t\t\tStatement Stmt = DBConn.createStatement();\r\n\t\t\tString SQL_Command = \"SELECT Balance FROM SavingsAccount WHERE SavingsAccountNumber ='\"+SavingsAccountNumber+\"'\"; //SQL query command for Balance\r\n\t\t\tResultSet Rslt = Stmt.executeQuery(SQL_Command);\r\n\t\t\twhile (Rslt.next()) {\r\n\t\t\t\tBalance = Rslt.getFloat(1);\r\n\t\t\t}\r\n\t\t\tStmt.close();\r\n\t\t\tToDB.closeConn();\r\n\t\t}\r\n\t\tcatch(SQLException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"SQLException: \" + e);\r\n\t\t\twhile (e != null)\r\n\t\t\t{ System.out.println(\"SQLState: \" + e.getSQLState());\r\n\t\t\t\tSystem.out.println(\"Message: \" + e.getMessage());\r\n\t\t\t\tSystem.out.println(\"Vendor: \" + e.getErrorCode());\r\n\t\t\t\te = e.getNextException();\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Exception: \" + e);\r\n\t\t\te.printStackTrace ();\r\n\t\t}\r\n\t\treturn Balance;\r\n\t}", "@Override\n public long totalBalances() {\n long total = 0;\n for(Account account : accounts.values()){\n total += account.balance();\n }\n return total;\n }", "public int balance(String accountNumber, String userId) {\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\ttry{\n\t\t\t//connect to database\n\t\t\tconn=DriverManager.getConnection(url, username, password);\n\t\t\tString sql = \"select balance from \"+this.name+\" where accountNumber=?\";\n\t\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\t\tps.setString(1, accountNumber.toString());\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tint nowBalance = 0;\n\t\t\twhile(rs.next()) { \n\t\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\t}\n\t\t\t\n\t\t\tString logs = \"Checked balance: \"+String.valueOf(nowBalance);\n\t\t\tString sql1 = \"insert into \"+userId+\" (log) values (?)\";\n\t\t\tpp = (PreparedStatement) conn.prepareStatement(sql1);\n\t\t\tpp.setString(1, logs);\n\t\t\tpp.executeUpdate();\n\t\t\t\n\t\t\treturn nowBalance;\n\t\t} catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t\t\n\t}", "public double getBalance(){\n\t\treturn balance;\n\t}", "protected double getTotalBalance()\r\n {\r\n return totalBalance;\r\n }", "public Double getBalance() {\n return null;\n }", "public double getBalance() {\n\t\treturn balance;\n\t}", "public double getBalance() {\n\t\treturn balance;\n\t}", "public double getBalance() {\n\t\treturn balance;\n\t}", "public double getBalance() {\n\t\treturn balance;\n\t}", "public double getBalance() {\n\t\treturn balance;\n\t}", "@Override\n\tpublic double queryBalance(int accNo) {\n\t\treturn 0;\n\t}", "public boolean recoverAccount(int account_id, int balance, Connection con){\n try {\n executeNewAccount(account_id, balance, con);\n } catch (SQLException e) {\n try {\n con.rollback();\n return false;\n } catch (SQLException e1) {\n e1.printStackTrace();\n return false;\n }\n }\n\n cache.add(new Account(account_id, balance));\n return true;\n }", "double getBalance() {\n\t\treturn balance;\n\t}", "@Override\r\n\tpublic double getBalance() {\n\t\treturn (super.getBalance()+cashcredit);\r\n\t}", "public double getBalance() {\n return this.balance;\n }", "public float getAmount() {\n System.out.println(\"Account Balance:\" + amount);\n return amount;\n }", "public java.lang.String getTotalbalance() {\n return totalbalance;\n }", "public static double totalBalance() {\n return totalBalance;\n }", "public static void getAcountsBalance(int value) {\n\t\t\t\n\t\t\taccounts.clear();\n\n\t\t\tString query = \"select account.accID, accType, balance, dateCreated, fName, lName \" + \n\t\t \"from ser322.account,ser322.customer \" + \n\t\t \"WHERE customer.accID = account.accID AND balance =\" + value;\n\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tStatement stmt = con.getConnection().createStatement();\n\t\t\t ResultSet rs = stmt.executeQuery(query);\n\t\t while (rs.next()) {\n\t\t \taccounts.addElement(new Account(rs.getInt(\"accID\"),rs.getString(\"accType\"),\n\t\t \t\t\t rs.getFloat(\"balance\"),rs.getDate(\"dateCreated\"), rs.getString(\"fName\"), rs.getString(\"lName\")));\n\t\t \n\t\t }\n\t\t \n\t\t } catch (SQLException e ) {\n\t\t \tSystem.out.println(\"QUERY WRONG - getAcountsBalance\");\n\t\t }\n\t\n\t\t}", "BigDecimal getOpeningCreditBalance();", "BigDecimal getOpeningCreditBalance();", "@Override\npublic Money getBalance(Enterprise enterprise, Clerk clerk)\n\t\tthrows PermissionsException {\n\treturn balance;\n}", "public static Double getCurrentBalance() {\n\t\treturn BankAccount.currentBalance;\n\t}", "public BankAccount getAccountBalanceRepo(String accountNr){\n String sql = \"SELECT * FROM bankaccount WHERE accountnr = :accountnr\";\n Map paramMap = new HashMap();\n paramMap.put(\"accountnr\", accountNr);\n BankAccount result = jdbcTemplate.queryForObject(sql, paramMap, new AccountRowMapper());\n return result;\n }", "public double getBalance()\t{\n\t\treturn balance;\n\t}", "private double getBalance() { return balance; }", "public int getPropertyBalance();" ]
[ "0.7264874", "0.72205156", "0.71101546", "0.7088106", "0.70389694", "0.69621897", "0.6885955", "0.6862041", "0.6862041", "0.6829406", "0.678649", "0.6742857", "0.67151546", "0.66672885", "0.66525877", "0.66491205", "0.66479206", "0.6647032", "0.66326874", "0.66326874", "0.66269845", "0.65929407", "0.65891135", "0.6582551", "0.658181", "0.6567582", "0.6565939", "0.6559904", "0.6559904", "0.65530986", "0.65530986", "0.65344965", "0.6518467", "0.6518467", "0.6513145", "0.6510019", "0.6502947", "0.64947987", "0.64922714", "0.6470642", "0.6469319", "0.64555997", "0.6452108", "0.64506054", "0.6427508", "0.640788", "0.6395688", "0.637993", "0.6374256", "0.63736135", "0.6365015", "0.63573813", "0.63475984", "0.63387066", "0.6336226", "0.6333954", "0.63214785", "0.6318512", "0.6314626", "0.63101125", "0.6306697", "0.6298505", "0.6298505", "0.6298505", "0.6298505", "0.62968504", "0.62941015", "0.6288792", "0.6284884", "0.6283513", "0.6282797", "0.627185", "0.62687546", "0.62515414", "0.6248359", "0.62449867", "0.6231595", "0.6231496", "0.6231248", "0.6231248", "0.6231248", "0.6231248", "0.6231248", "0.62284225", "0.62216336", "0.62158644", "0.62092465", "0.6204716", "0.6203343", "0.6200303", "0.6195555", "0.6188523", "0.61806047", "0.61806047", "0.61773854", "0.616829", "0.6166922", "0.61643225", "0.61617076", "0.61509675" ]
0.7554988
0
Returns textual information about the last n operations on the given account id
public String getLastAccountOperations(int account_id, int n) { StringBuilder a = new StringBuilder(); try ( Statement s = rawDataSource.getConnection().createStatement(); ResultSet res = s.executeQuery( "SELECT * FROM OPERATIONS where FROM_ACCOUNT_ID = "+account_id+" OR TO_ACCOUNT_ID = "+account_id+" ORDER BY TIMESTAMP " + "DESC FETCH FIRST "+n+" ROWS ONLY")) { while (res.next()) { int type = res.getInt("OP_TYPE"); switch(type){ case 1: getMovementLog(a, res); break; case 2: getTransferLog(a, res); break; case 3: getCreateAccountLog(a, res); break; } } } catch (SQLException e) { e.printStackTrace(); } if(a.length() == 0) a.append("No operations for account "+account_id); return a.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getLastCommands(int numberOfCommands, Resource r) {\n String finalResult = \"\";\n ArrayList<String> inputLog = r.getInputLog();\n\n int upperLimit = inputLog.size();\n int begin = inputLog.size() - numberOfCommands;\n if (begin < 0) {\n begin = 0;\n }\n for (int i = begin; i < upperLimit; i++) {\n finalResult += ((i + 1) + \" \" + inputLog.get(i)) + \"\\n\";\n }\n\n return finalResult;\n }", "public List<BankOperation> getOperationsAfter(int n_id){\n List<BankOperation> op_list = new ArrayList<>();\n\n try (\n Statement s = rawDataSource.getConnection().createStatement();\n ResultSet res = s.executeQuery(\n \"SELECT * FROM APP.OPERATIONS where OP_ID >= \"+n_id+\" ORDER BY OP_ID DESC\")) {\n\n while (res.next()) {\n switch(res.getInt(\"OP_TYPE\")){\n //MOVEMENT\n case 1:\n op_list.add(new BankOperation.Movement(res.getInt(\"OP_ID\"), res.getInt(\"MV_AMOUNT\"), res.getInt(\"FROM_CURRENT_BALANCE\"), res.getString(\"FROM_ACCOUNT_ID\")));\n break;\n //TRANSFER\n case 2:\n op_list.add(new BankOperation.Transfer(res.getInt(\"OP_ID\"), res.getInt(\"MV_AMOUNT\"),\n res.getString(\"FROM_ACCOUNT_ID\"), res.getString(\"TO_ACCOUNT_ID\"), res.getInt(\"FROM_CURRENT_BALANCE\"),\n res.getInt(\"TO_CURRENT_BALANCE\")));\n break;\n //CREATE\n case 3:\n op_list.add(new BankOperation.Create(res.getInt(\"OP_ID\"), res.getString(\"FROM_ACCOUNT_ID\")));\n break;\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return op_list;\n }", "public String getLastOperation()\n {\n if (!getCvpOperation().isNull())\n {\n com.sybase.afx.json.JsonObject cvpOperation = (com.sybase.afx.json.JsonObject)(com.sybase.afx.json.JsonReader.parse(__cvpOperation.getValue()));\n return (String)cvpOperation.get(\"cvp_name\");\n }\n if (getPendingChange() == 'C')\n {\n }\n else if (getPendingChange() == 'D')\n {\n }\n else if (getPendingChange() == 'U')\n {\n }\n return null;\n }", "private int findLastIndex(int id) {\n\n NmpReportPoint point = DataSupport.where(\"remark <> 1 AND nmpreportdata_id = \" + id).findLast(NmpReportPoint.class);\n if (point != null) {\n int pointIndex = point.getPointIndex();\n return Math.abs(pointIndex % 10000);\n }\n\n return 0;\n }", "public String myAfterBalanceAmount() {\r\n\t\tint count=0;\r\n\t\tList<SavingAccount> acc = null;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Before Repeat\");\r\n\t\t\tacc = getSavingAccountList();\r\n\r\n\t\t\tfor (SavingAccount savingAcc : acc) {\r\n\t\t\t\tif (!(\"0\".equals(savingAcc.getState()))) {\r\n\t\t\t\t\tif (savingAcc.getState().equals(\"active\")) {\r\n\t\t\t\t\t\tint maxRepeat = Integer.parseInt(savingAcc\r\n\t\t\t\t\t\t\t\t.getRepeatable());\r\n\r\n\t\t\t\t\t\tDate date = new Date();\r\n\t\t\t\t\t\tDate systemDate = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAccSer\r\n\t\t\t\t\t\t\t\t\t\t.convertDateToStringDDmmYYYY(date));\r\n\r\n\t\t\t\t\t\tDate dateEnd = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t.getDateEnd());\r\n\r\n\t\t\t\t\t\tif (systemDate.getTime() == dateEnd.getTime()) {\r\n\t\t\t\t\t\t\tDate newEndDate = DateUtils.addMonths(systemDate,\r\n\t\t\t\t\t\t\t\t\tsavingAcc.getInterestRateId().getMonth());\r\n\r\n\t\t\t\t\t\t\tfloat balance = savingAcc.getBalanceAmount();\r\n\t\t\t\t\t\t\tfloat interest = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getInterestRate();\r\n\r\n\t\t\t\t\t\t\tint month = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getMonth();\r\n\t\t\t\t\t\t\tint days = Days\r\n\t\t\t\t\t\t\t\t\t.daysBetween(\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateStart())),\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateEnd())))\r\n\t\t\t\t\t\t\t\t\t.getDays();\r\n\t\t\t\t\t\t\tfloat amountAll = balance\r\n\t\t\t\t\t\t\t\t\t+ (balance * ((interest / (100)) / 360) * days);\r\n\t\t\t\t\t\t\tsavingAcc.setDateStart(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(systemDate));\r\n\t\t\t\t\t\t\tsavingAcc.setDateEnd(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(newEndDate));\r\n\t\t\t\t\t\t\tsavingAcc.setBalanceAmount(amountAll);\r\n\t\t\t\t\t\t\tsavingAcc.setRepeatable(\"\" + (maxRepeat + 1));\r\n\t\t\t\t\t\t\tupdateSavingAccount(savingAcc);\r\n\t\t\t\t\t\t\tcount+=1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"Successfully!! \"+ count +\" Saving Account has been updated. Minh Map!!!\");\r\n\t\t\t\r\n\t\t\treturn \"success\";\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Exception\");\r\n\r\n\t\t}\r\n\t\treturn \"Fail\";\r\n\t}", "public static String getPastBills(String account){\n return \"select * from account_history where ah_accountnum = '\"+account+\"'\";\n }", "String getLastInt();", "public String toString(){\n String finalString = bankName;\n finalString += \"\\n\";\n finalString += \"-----\\n\";\n finalString += \"This bank has a maximum account storage of: \";\n finalString += maxAccounts;\n finalString += \"\\n\";\n if(currAccounts != 0){\n finalString += \"This bank currently has \";\n finalString += currAccounts;\n finalString += \" opened accounts.\\n\";\n finalString += \"This is the list of currently opened accounts:\\n\";\n }\n\n //won't start this forloop if i == 0\n for(int i = 0; i < currAccounts; i++){\n finalString += (i + 1);\n finalString += \": \";\n finalString += bankAccounts[i].toString();\n finalString += \"\\n\";\n }\n if(currAccounts == 0){\n finalString += \"This bank hasn't had any accounts opened yet!\\n\";\n }\n\n return finalString;\n }", "public void printHistory(int n) {\n EquationList p_eqn = eqn;\n while (n > 0) {\n System.out.println(p_eqn.equation + \" + \" + Integer.toString(p_eqn.result));\n p_eqn = p_eqn.next;\n n = n -1;\n }\n }", "public GeobatchRunInfo getLastRunInfo(String... compositeId) {\n return getLastRunInfoCache(generateDecription(compositeId));\n }", "private String endStats(){\n String outputString = \"End of 30 days Stats\";\n\n\n outputString = outputString + \"\\n\" + salesPerRoll();\n outputString = outputString + \"\\n\" + \"Total Money Made: $\" + (float)Math.round(totalMoneyMade * 100.0) / 100.0;\n outputString = outputString + \"\\n\" + \"Total Number of Orders Impacted by Outtages: \" + totalDisruptions;\n return outputString;\n }", "public String retrieveLastTaskIdOfProject(Long projectId);", "public String toString()\n {\n /**\n * Set the format as [timestamp] account number : command\n */\n String transaction = \"[\" + timestamp + \"] \" + accountInfo.getAccountNumber() + \" : \" + command.name(); \n \n /**\n * Return the string.\n */\n return transaction;\n }", "public String displayAccount() {\r\n\t return id+\",\"+name+\",\"+balance+\",\"+email+\",\"+dateOfOpening;\r\n }", "private String fetchLogEntry(int i) {\n\t\tif (log.size() >= i) {\n\t\t\tLog logEntry = log.get(log.size()-i);\n\t\t\tif (logEntry.getStatus() == Status.ALARM) {\n\t\t\t\treturn logEntry.getTimeStamp()+\"* \"+logEntry.getMessage();\n\t\t\t} else {\n\t\t\t\treturn logEntry.getTimeStamp()+\" \"+logEntry.getMessage();\n\t\t\t}\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}", "public String showlastIn() {\n\n return lastIn.info;\n }", "static String getLastCheckpointAsString() {\n HashMap<String, String> checkpoint = getLastCheckpoint();\n if (checkpoint == null) {\n return \"0 \";\n } else {\n StringBuilder sb = new StringBuilder();\n sb.append(checkpoint.size()).append(\" \");\n for (String name : checkpoint.keySet()) {\n sb.append(name).append(\"#####\");\n sb.append(checkpoint.get(name)).append(\"#####\");\n }\n return sb.toString();\n }\n }", "@Override\r\n\t public String toString()\r\n\t {\r\n\t\t return (\"Account ID: \"+ getId() + \" Balance: \"+ getBalance() +\" Date Created: \"+getDateCreated() + \"\\n\");\r\n\t }", "public String getAccountNo();", "public String getAccountInfo(){\n NumberFormat currencyFormat = NumberFormat.getCurrencyInstance();\n return \"Account No : \" + accountNo +\n \"\\nName : \" + name +\n \"\\nBalance : \" + currencyFormat.format(balance);\n }", "public String toString(){\r\n //your code here\r\n return(\"Withdrawal of: $\" + amount + \"Date: \" + date + \"from account: \" + account);\r\n }", "long getLastLogIndex();", "public String toString() {\n\t\treturn accNum + \" $\" + balance + \" \" + rate + \" \" + numWithdraws;\n\t}", "public StringBuilder printAccountInformation(){\n StringBuilder accountInformation = new StringBuilder();\n accountInformation.append(\"Account information:\\n\")\n .append(\"\\tAccount id: \").append(this.getId()).append(\"\\n\")\n .append(\"\\tAccount balance: \").append(this.getBalance()).append(\"\\n\")\n .append(\"\\tAccount annual interest rate: \").append(this.getAnnualInterestRate()).append(\"\\n\")\n .append(\"\\tAccount create date: \").append(this.getDateCreated()).append(\"\\n\");\n\n return accountInformation;\n }", "public int lastRemaining(int n) {\n if(n==1){\n return 1;\n }\n if(n%2==0){\n return n-1-2*(lastRemaining(n/2)-1)+1;\n } else{\n return n-2-2*(lastRemaining(n/2)-1)+1;\n }\n }", "@Override\r\n\tpublic long getNombreOperation(String numCpte) {\n\t\treturn dao.getNombreOperation(numCpte);\r\n\t}", "public static synchronized long getPathfindingOperations() {\r\n\t\treturn Long.parseLong(lastID.toString());\r\n\t}", "private static String[ ] getOrderedFieldsNamesForOperation(int operationId) {\n\n\t\tString[ ] result = null;\n\n\t\tswitch (operationId) {\n\t\t\t// Si es una operación de servicio...\n\t\t\tcase IEventsCollectorConstants.OPERATION_SERVICE_OPEN_TRACE:\n\t\t\tcase IEventsCollectorConstants.OPERATION_SERVICE_CLOSE_TRACE:\n\t\t\tcase IEventsCollectorConstants.OPERATION_SERVICE_START_RS:\n\t\t\tcase IEventsCollectorConstants.OPERATION_SERVICE_END_RS:\n\t\t\tcase IEventsCollectorConstants.OPERATION_SERVICE_DCITIV_PARAMS:\n\t\t\t\tresult = CommonsServicesAuditTraces.getOperationFieldsNames(operationId);\n\t\t\t\tbreak;\n\n\t\t\t// Si es una operación de certificado...\n\t\t\tcase IEventsCollectorConstants.OPERATION_CERT_INFO:\n\t\t\tcase IEventsCollectorConstants.OPERATION_CERT_ISTSA:\n\t\t\tcase IEventsCollectorConstants.OPERATION_CERT_BASICOCSPRESP_INFO:\n\t\t\tcase IEventsCollectorConstants.OPERATION_CERT_CRL_INFO:\n\t\t\tcase IEventsCollectorConstants.OPERATION_CERT_MAPPING_FIELDS:\n\t\t\t\tresult = CommonsCertificatesAuditTraces.getOperationFieldsNames(operationId);\n\t\t\t\tbreak;\n\n\t\t\t// Si es una operación de TSL...\n\t\t\tcase IEventsCollectorConstants.OPERATION_TSL_TSLLOCATION:\n\t\t\tcase IEventsCollectorConstants.OPERATION_TSL_COUNTRY_REGION:\n\t\t\tcase IEventsCollectorConstants.OPERATION_TSL_FINDED:\n\t\t\tcase IEventsCollectorConstants.OPERATION_TSL_CERT_DETECTED:\n\t\t\tcase IEventsCollectorConstants.OPERATION_TSL_CERT_VALIDATED:\n\t\t\t\tresult = CommonsTslAuditTraces.getOperationFieldsNames(operationId);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn result;\n\n\t}", "public String getSummary() {\n/* 121 */ StringBuilder sb = new StringBuilder();\n/* 122 */ sb.append(\"FindIds exeMicros[\").append(this.executionTimeMicros).append(\"] rows[\").append(this.rowCount).append(\"] type[\").append(this.desc.getName()).append(\"] predicates[\").append(this.predicates.getLogWhereSql()).append(\"] bind[\").append(this.bindLog).append(\"]\");\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 128 */ return sb.toString();\n/* */ }", "@Override\n\tpublic List<PositionData> getLatest10PostionInfo(String terminalId) {\n\t\ttry {\n\t\t\tList<PositionData> returnData = new ArrayList<PositionData>();\n\t\t\tList<PositionData> tempData = new ArrayList<PositionData>();\n\t\t\tList<PositionData> position_list = positionDataDao.findByHQL(\"from PositionData where tid = '\" + terminalId + \"' order by date desc\");\n\t\t\tfor(int i=0;i<(position_list.size()>10?10:position_list.size());i++){\n\t\t\t\ttempData.add(position_list.get(i));\n\t\t\t}\n\t\t\tfor(int i=tempData.size()-1;i>=0;i--)\n\t\t\t\treturnData.add(tempData.get(i));\n\t\t\treturn returnData;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "private void lastN(int n) {\n int len = this.getlength();\n if (n > len) {\n System.out.printf(\"too short to have last %d's\\n\", n);\n } else {\n Node slow = this;\n Node fast = this;\n for (int i = n; i > 0; i--) {\n fast = fast.nextNode;\n }\n while (fast != null) {\n slow = slow.nextNode;\n fast = fast.nextNode;\n }\n System.out.printf(\"last %d element is: %d\\n\", n, slow.value);\n }\n }", "@Override\n\tpublic int getNextOperacionDetalle() {\n\t\treturn 0;\n\t}", "void updateLastAccessed(int id);", "public String getResult(int total){\n\tString resultTxt=\"\";\n\tfor(InactivityResult result : config.getInactivityResults()){\n\n\t if(result.getRangeInit()<=total && result.getRangeEnd()>=total){\n\t\tresultTxt = result.getText();\n\t\tbreak;\n\t }\n\t}\n\n\treturn resultTxt;\n\t\n }", "public String printAllAccountInformation(Account account) {\n\t\tString stringOne = \"|| \" + account.getBusinessName() + \" || \" + account.getAssets() + \n\t\t\t\t \" || \" + account.getLiabilities() + \" || \" + account.getRevenue() +\n\t\t\t\t \" || \" + account.getExpenses() + \" || \" + account.getBeginningInventory() +\n\t\t\t\t \" || \" + account.getPurchases() + \" || \" + account.getCostOfSales();\n\t\tString stringTwo = \" || \" + cal.calculateEquity(account) \n\t\t+ \" || \" + cal.calculateIncome(account) \n\t\t+ \" || \" + cal.calculateInvertory(account) + \" ||\";\n\t\treturn stringOne + stringTwo;\n\t}", "long getLastUpdate(long inId);", "@Override\n public String getDescription() {\n return \"Account information\";\n }", "public String getLatestDateOnActions(String rpiId) throws SQLException, IOException;", "public java.lang.String billing_GetLastPrintedBill(java.lang.String accessToken, java.lang.String accountNumber) throws java.rmi.RemoteException;", "@Override\n public String shortDesc() {\n return String.format(\"ID:%s $%,.2f\", id, getTotalCommission());\n }", "@Override\n public String toString()\n {\n return getClass().getSimpleName() + \"(\" + getAccountID() + \")\";\n }", "private String createLabelForLastClockLog(ClockLog cl) {\r\n\t\t// return sdf.format(dt);\r\n\t\tif (cl == null) {\r\n\t\t\treturn \"No previous clock information\";\r\n\t\t}\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"MM/dd/yyyy hh:mm a\");\r\n\t\tString dateTime = sdf.format(cl.getClockTimestamp());\r\n\t\tif (StringUtils.equals(cl.getClockAction(), TkConstants.CLOCK_IN)) {\r\n\t\t\treturn \"Clocked in since: \" + dateTime;\r\n\t\t} else if (StringUtils.equals(cl.getClockAction(),\r\n\t\t\t\tTkConstants.LUNCH_OUT)) {\r\n\t\t\treturn \"At Lunch since: \" + dateTime;\r\n\t\t} else if (StringUtils\r\n\t\t\t\t.equals(cl.getClockAction(), TkConstants.LUNCH_IN)) {\r\n\t\t\treturn \"Returned from Lunch : \" + dateTime;\r\n\t\t} else if (StringUtils.equals(cl.getClockAction(),\r\n\t\t\t\tTkConstants.CLOCK_OUT)) {\r\n\t\t\treturn \"Clocked out since: \" + dateTime;\r\n\t\t} else {\r\n\t\t\treturn \"No previous clock information\";\r\n\t\t}\r\n\r\n\t}", "private String statementForAccount(Account account) {\n\tStringBuilder statement = new StringBuilder(\"\");\n\n //Translate to pretty account type\n switch(account.getAccountType()){\n case CHECKING:\n statement.append(\"Checking Account\\n\");\n break;\n case SAVINGS:\n statement.append(\"Savings Account\\n\");\n break;\n case MAXI_SAVINGS:\n statement.append(\"Maxi Savings Account\\n\");\n break;\n }\n\n //Now total up all the transactions\n double total = 0.0;\n for (Transaction transaction : account.getTransactions()) {\n statement.append(\" \" + (transaction.getAmount() < 0 ? \"withdrawal\" : \"deposit\") + \" \" + toDollars(transaction.getAmount()) + \"\\n\");\n total += transaction.getAmount();\n }\n statement.append(\"Total \" + toDollars(total));\n return statement.toString();\n }", "public void AccountEnd(int arg1)\n {\n int sum=0;\n int s;\n int i=0;\n response=RestAssured.get(\"http://18.222.188.206:3333/accounts\");\n Accno=response.jsonPath().getList(\"AccountNo\");\n while(i<=Accno.size())\n {\n try\n {\n if(Accno.get(i)!=null)\n {\n s=Integer.parseInt(Accno.get(i));\n if(s%100==arg1)\n {\n sum++;\n }\n }\n }\n catch(Exception e)\n {\n \n }\n i++;\n \n }\n System.out.println(\"The number of accounts number ending with 02 = \"+sum);\n }", "public String printCalculationInformation(Account account) {\t\t\n\t\treturn \"|| \" + cal.calculateEquity(account) \n\t\t\t\t+ \" || \" + cal.calculateIncome(account) \n\t\t\t\t+ \" || \" + cal.calculateInvertory(account) + \" ||\";\n\t}", "String getAccountDescription();", "String getAccountDescription();", "public String toString() {\n return \"Account \" + name + \" has $\" + balance + \"and is \" + getState()\n + \"\\n\";\n }", "public static String toString(int idNumber) \n{\n\tswitch (idNumber) {\n\t\tcase 0: return \"Other\"; \n\t\tcase 1: return \"Entity State\"; \n\t\tcase 10: return \"Repair Response\"; \n\t\tcase 11: return \"Create Entity\"; \n\t\tcase 12: return \"Remove Entity\"; \n\t\tcase 129: return \"Announce Object\"; \n\t\tcase 13: return \"Start/Resume\"; \n\t\tcase 130: return \"Delete Object\"; \n\t\tcase 131: return \"Describe Application\"; \n\t\tcase 132: return \"Describe Event\"; \n\t\tcase 133: return \"Describe Object\"; \n\t\tcase 134: return \"Request Event\"; \n\t\tcase 135: return \"Request Object\"; \n\t\tcase 14: return \"Stop/Freeze\"; \n\t\tcase 140: return \"Time Space Position Indicator - FI\"; \n\t\tcase 141: return \"Appearance-FI\"; \n\t\tcase 142: return \"Articulated Parts - FI\"; \n\t\tcase 143: return \"Fire - FI\"; \n\t\tcase 144: return \"Detonation - FI\"; \n\t\tcase 15: return \"Acknowledge\"; \n\t\tcase 150: return \"Point Object State\"; \n\t\tcase 151: return \"Linear Object State\"; \n\t\tcase 152: return \"Areal Object State\"; \n\t\tcase 153: return \"Environment\"; \n\t\tcase 155: return \"Transfer Control Request\"; \n\t\tcase 156: return \"Transfer Control\"; \n\t\tcase 157: return \"Transfer Control Acknowledge\"; \n\t\tcase 16: return \"Action Request\"; \n\t\tcase 160: return \"Intercom Control\"; \n\t\tcase 161: return \"Intercom Signal\"; \n\t\tcase 17: return \"Action Response\"; \n\t\tcase 170: return \"Aggregate\"; \n\t\tcase 18: return \"Data Query\"; \n\t\tcase 19: return \"Set Data\"; \n\t\tcase 2: return \"Fire\"; \n\t\tcase 20: return \"Data\"; \n\t\tcase 21: return \"Event Report\"; \n\t\tcase 22: return \"Message\"; \n\t\tcase 23: return \"Electromagnetic Emission\"; \n\t\tcase 24: return \"Designator\"; \n\t\tcase 25: return \"Transmitter\"; \n\t\tcase 26: return \"Signal\"; \n\t\tcase 27: return \"Receiver\"; \n\t\tcase 3: return \"Detonation\"; \n\t\tcase 4: return \"Collision\"; \n\t\tcase 5: return \"Service Request\"; \n\t\tcase 6: return \"Resupply Offer\"; \n\t\tcase 7: return \"Resupply Received\"; \n\t\tcase 8: return \"Resupply Cancel\"; \n\t\tcase 9: return \"Repair Complete\"; \n\t\tdefault : return \"\";\n\t}\n}", "public String getLastItem();", "public void printChanges(int i, String name, int council, String returnString);", "long getLastAccessed( );", "public List<Info> getLastInfo() {\n\t\treturn dao.getLastInfo();\n\t}", "public static String generaSerieDescendente(int n){\n\t\t\tStringBuilder sb;\n\t\t\tsb=new StringBuilder();\n\t\t\t\n\t\t\tfor(int i=n; i>=1; i--)\n\t\t\t\tsb.append(i+\" \" );\n\t\t\t\t\n\t\t\treturn sb.toString();\t\n\t\t\t}", "public static String getDescription(int id) {\n return ACTION_DETAILS[id][DESC_DETAIL_INDEX];\n }", "public String getTheLastModificationDate(final String id) throws Exception {\r\n\r\n Document resource = EscidocAbstractTest.getDocument(retrieve(id));\r\n return getTheLastModificationDate(resource);\r\n }", "public String getLastDateHistory( String code) {\n String query = \"SELECT * FROM \"+ code +\"R where time > '2015-06-01T00:00:00Z'\";\n QueryResult list = InfluxDaoConnector.getPoints(query,dbName);\n\n if (!checker(list))\n return null;\n\n int size = list.getResults().get(0).getSeries().get(0).getValues().size();\n\n\n return (String) list.getResults().get(0).getSeries().get(0).getValues().get(size-1).get(0);\n\n }", "@Override\n\tpublic String toString() {\n\t\treturn accountID;\n\t}", "java.lang.String getAccountNumber();", "private String printLeagueOfLegendsAccountDetails(LeagueOfLegendsAccount account) {\r\n return \"[ region = \" + account.getRegion() + \",\\n name = \" + account.getInGameName() + \", \\n\"\r\n + \"blueEssenceBalance = \" + account.getBlueEssenceBalance() + \"BE\" + \", \\n\"\r\n + \"riotPointsBalance = \" + account.getRiotPointsBalance() + \"RP\" + \", \\n\"\r\n + account.getCollectionSize() + \" Champions owned\" + \", \\n\"\r\n + \"Champions owned = \"\r\n + account.myCollection.getListOfChampionName(account.myCollection) + \", \\n\"\r\n + account.getRecommendedSize() + \" Recommended Champions\" + \",\\n\"\r\n + \"Recommended Champions = \"\r\n + account.myRecommended.getListOfChampionName(account.myRecommended) + \", \\n\"\r\n + account.getFavouritesSize() + \" Favourite Champions\" + \", \\n\"\r\n + \"Favourite Champions = \"\r\n + account.myFavourites.getListOfChampionName(account.myFavourites) + \"\\n]\";\r\n }", "public String toString() {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[34]++;\r\n DateTimeFormatter printer = ISODateTimeFormat.dateHourMinuteSecondFraction();\r\n printer = printer.withChronology(getChronology());\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[35]++;\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[36]++;\r\n StringBuffer buf = new StringBuffer(48);\r\n printer.printTo(buf, getStartMillis());\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[37]++;\r\n buf.append('/');\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[38]++;\r\n printer.printTo(buf, getEndMillis());\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[39]++;\r\n return buf.toString();\r\n }", "static String reverseEndRekursiv_Help(String text, int size, String result) {\n\n\t\tif (text.length() == 0) {\n\t\t\treturn result;\n\t\t}\n\t\tchar lastChar = text.charAt(text.length() - 1);\n\t\tString lastCharString = Character.toString(lastChar);\n\t\tString subText = text.substring(0, text.length() - 1);\n\t\t// System.out.println(\n\t\t// \"Result: \" + result + \"\\tLastChar: \" + lastCharString + \"\\tText: \" + text +\n\t\t// \"\\tSubtext: \" + subText);\n\t\treturn reverseEndRekursiv_Help(subText, size, result + lastCharString);\n\n\t}", "@Test\r\n\tpublic void withdraw() {\n\t\tResult<String> loanWithdraw = qddPaymentService.loanWithdraw(141227113319030002L);\r\n\t\tSystem.out.println(loanWithdraw);\r\n\t}", "public Operacion obtenerOperacion(int id){\n return historialOperaciones.get(id);\n }", "public String toString(){\n return \"This Pass ID number is \"+ id +\n \", number of moves so far today is \"+number_of_moves+\n \", number of hours left is \"+hours_left +\n \", the protection rating is \"+ protection_rating+\n \", the project team name is \"+ name_of_project_team+\n \", the Code of the project team is \"+ code_of_project_team+\n \"\\n*******\\n\";\n }", "private void viewTransferHistory() {\n\t\tTransfer[] allTransfers = transferService.getTransferHistory(currentUser.getToken(),\n\t\t\t\tcurrentUser.getUser().getId());\n\n\t\tSystem.out.println(\"----------------------------------------------\");\n\t\tSystem.out.println(\"Transfers\");\n\t\tSystem.out.println(\"ID From/To Amount\");\n\t\tSystem.out.println(\"----------------------------------------------\");\n\n\t\t//loop through each transfer and print them out if they are associated with the current user\n\t\tfor (int i = 0; i < allTransfers.length; i++) {\n\n\n\t\t\tif (allTransfers[i].getToUserId() == currentUser.getUser().getId()) {\n\t\t\t\t\n\n\t\t\t\tSystem.out.println(allTransfers[i].getTransferId() + \" From: \"\n\t\t\t\t\t\t+ allTransfers[i].getFromUsername() + \" $ \" + allTransfers[i].getTransferAmount());\n\n\t\t\t} else if (allTransfers[i].getFromUserId() == currentUser.getUser().getId()) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(allTransfers[i].getTransferId() + \" To: \" + allTransfers[i].getToUserName()\n\t\t\t\t\t\t+ \" $ \" + allTransfers[i].getTransferAmount());\n\t\t\t}\n\n\t\t}\n\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter the 'Transfer ID' to retreive details of the transfer or (0) to exit>>>>\");\n\t\tString stringTransferId = input.nextLine();\n\t\tboolean flagFoundId = false;\n\t\tlong transfersId = 0;\n\t\tBigDecimal transferAmount = new BigDecimal(0);\n\t\tString fromUserName = \"\";\n\t\tString toUserName = \"\";\n\t\tString typeOfTransfer = \"\";\n\t\tString statusOfTransfer = \"\";\n\t\t\n\n\t\t//display transfer details for selected transfer if a valid response\n\t\twhile (true && !String.valueOf(stringTransferId).equals(String.valueOf(0))) {\n\n\t\t\tfor (int i = 0; i < allTransfers.length; i++) {\n\t\t\t\tif (String.valueOf(stringTransferId).equals(String.valueOf(allTransfers[i].getTransferId()))) {\n\n\t\t\t\t\n\t\t\t\t\ttransfersId = allTransfers[i].getTransferId();\n\t\t\t\t\tfromUserName = allTransfers[i].getFromUsername();\n\t\t\t\t\ttoUserName = allTransfers[i].getToUserName();\n\t\t\t\t\ttypeOfTransfer = allTransfers[i].getTypeOfTransfer();\n\t\t\t\t\tstatusOfTransfer = allTransfers[i].getStatusOfTransfer();\n\t\t\t\t\ttransferAmount = allTransfers[i].getTransferAmount();\n\n\t\t\t\t\tflagFoundId = true;\n\t\t\t\t\tstringTransferId = \"0\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (flagFoundId == false) {\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"Please enter the valid 'Transfer ID' to retreive details of the transfer or (0) to exit>>>>\");\n\t\t\t\tstringTransferId = input.nextLine();\n\n\t\t\t}\n\n\t\t}\n\n\t\tif (flagFoundId == true) {\n\t\t\tSystem.out.println(\"----------------------------------------------\");\n\t\t\tSystem.out.println(\"Transfer Details\");\n\t\t\tSystem.out.println(\"----------------------------------------------\");\n\t\t\tSystem.out.println(\"Id: \" + transfersId);\n\t\t\tSystem.out.println(\"From: \" + fromUserName);\n\t\t\tSystem.out.println(\"To: \" + toUserName);\n\t\t\tSystem.out.println(\"Type: \" + typeOfTransfer);\n\t\t\tSystem.out.println(\"Status: \" + statusOfTransfer);\n\t\t\tSystem.out.println(\"Amount: \" + transferAmount);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t// }\n\n\t}", "public String toString(){\n\t\t return id+\" \"+name+\" \"+balance;\r\n\t}", "public static String operationFailed() {\n return holder.format(\"operationFailed\");\n }", "public String generateAccountNumber() {\n // Set First part of AccountNumber\n String accountNumberFirst = \"1398\";\n\n // To Make Second, Third part Get each date and time\n String currentTime = getCurrentTime();\n\n // Get year, month, day\n String date = currentTime.split(\" \")[0];\n int year, month, day;\n year = Integer.parseInt(date.split(\"-\")[0]);\n month = Integer.parseInt(date.split(\"-\")[1]);\n day = Integer.parseInt(date.split(\"-\")[2]);\n\n // Get hour, minute, second\n String time = currentTime.split(\" \")[1];\n int hour, minute, second;\n hour = Integer.parseInt(time.split(\":\")[0]);\n minute = Integer.parseInt(time.split(\":\")[1]);\n second = Integer.parseInt(time.split(\":\")[2]);\n\n // Set Second part of AccountNumber\n String accountNumberSecond;\n accountNumberSecond = Integer.toString((year % 10)) + Integer.toString((month * second) % 10) + Integer.toString((day * minute + hour) % 10);\n\n // Set Third part of AccountNumber\n String accountNumberThird;\n accountNumberThird = Integer.toString((second * hour + minute) % 10) + Integer.toString((second * day + hour) % 10) + Integer.toString((day * month + second) % 10) + Integer.toString((second * minute + day) % 10);\n\n // Set Forth part of AccountNumber\n String accountNumberForth;\n int count = (int)accountDataRepository.count();\n if(count % 100 < 10) {\n accountNumberForth = \"0\" + Integer.toString(count % 100);\n }\n else {\n accountNumberForth = Integer.toString(count % 100);\n }\n\n // Generate AccountNumber\n String accountNumber = accountNumberFirst + \"-\" + accountNumberSecond + \"-\" + accountNumberThird + \"-\" + accountNumberForth;\n\n return accountNumber;\n }", "public void printAllHistory() {\n EquationList p_eqn = eqn;\n while (p_eqn != null) {\n System.out.println(p_eqn.equation + \" + \" + Integer.toString(p_eqn.result));\n p_eqn = p_eqn.next;\n }\n }", "public void Display(){\n System.out.println(\"************************************************************\");\n System.out.println(\"Customer Account Number: \"+getAccountNo());\n System.out.println(\"Customer Account Id: \"+getAccountId());\n System.out.println(\"Customer Type: \"+getAccountType());\n System.out.println(\"Customer Balance: $\"+getAccountBal());\n System.out.println(\"Thank you for banking with us!\");\n System.out.println(\"************************************************************\");\n }", "@Override\n\tpublic StudyTaskInfo getLastInfoByLogId(Integer studyLogId)\n\t\t\tthrows WEBException {\n\t\ttry {\n\t\t\tstDao = (StudyTaskDao) DaoFactory.instance(null).getDao(Constants.DAO_STUDY_TASK_INFO);\n\t\t\tSession sess = HibernateUtil.currentSession();\n\t\t\treturn stDao.getLastInfoByLogId(sess, studyLogId);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tthrow new WEBException(\"获取最后一次的任务记录列表时出现异常!\");\n\t\t} finally{\n\t\t\tHibernateUtil.closeSession();\n\t\t}\n\t}", "private static void displayAccount(Account account) {\n\t\tSystem.out.println(account.toString());\n\t\tSystem.out.println();\n\t}", "private String interestOpsToString(SelectionKey key){\n\t\tif (!key.isValid()) {\n\t\t\treturn \"CANCELLED\";\n\t\t}\n\t\tint interestOps = key.interestOps();\n\t\tArrayList<String> list = new ArrayList<>();\n\t\tif ((interestOps&SelectionKey.OP_ACCEPT)!=0) list.add(\"OP_ACCEPT\");\n\t\tif ((interestOps&SelectionKey.OP_READ)!=0) list.add(\"OP_READ\");\n\t\tif ((interestOps&SelectionKey.OP_WRITE)!=0) list.add(\"OP_WRITE\");\n\t\treturn String.join(\"|\",list);\n\t}", "RESPONSE tally();", "public int getLastOrderId() {\r\n ArrayList<OrderRecord> result = new ArrayList<>();\r\n String sqlQuery = \"SELECT * FROM `orders`\";\r\n try {\r\n PreparedStatement p = myConn.prepareStatement(sqlQuery);\r\n ResultSet rs = p.executeQuery(sqlQuery);\r\n rs.last();\r\n return rs.getInt(\"id\");\r\n } catch (Exception e) {\r\n System.out.println(\"Could not get orders \" + e.toString());\r\n System.out.println(myStmt);\r\n }\r\n return 0;\r\n }", "public String getName() {\n return \"last\";\n }", "private void cmdInfoOpStack() throws NoSystemException {\n MSystem system = system(); \n Deque<MOperationCall> callStack = system.getCallStack();\n int index = callStack.size();\n\t\tfor (MOperationCall call : callStack) {\n\t\t\tLog.print(index-- + \". \");\n\t\t\tLog.println(call.toString() + \" \" + call.getCallerString());\n\t\t}\n\t\tif (callStack.isEmpty()) {\n\t\t\tLog.println(\"no active operations.\");\n\t\t}\n }", "public static /*synchronized*/ void addNNResultLog(String queryId, long start, long end, String resultId){\n\t\tQUERY_COUNT++;\n\t\tLOG.appendln(\"Query \" + queryId + \": returned \" + resultId + \" in \" + (end-start) + \" ms.\");\n\t\tLOG.appendln(\"Query ends at: \" + end + \" ms.\");\n\t}", "public String accountsReceivingLoans(){\n int total = 0;\n double sum = 0;\n for(MicroLoan record : bank.getAccount2MicroloansReceived().values()){\n total++;\n sum += record.getAmount();\n }\n return \"Number of accounts receiving micro loans: \" +total +\" worth a value of \"+sum;\n }", "@Test(priority = 7)\n\tpublic void viewLastTripDetail() throws Exception {\n\t\t\n\t\tdriver = DashboardPage.LastTripDetail(driver);\n\t\t\n\t\t//ExcelUtils.setCellData(\"PASS\", 7, 1);\n\t}", "public String tally()\r\n {\r\n String output = \r\n \" _-Final Tally-_\\n\\n\" +\r\n \"Total Rounds Played: \" + round + \"\\n\\n\" +\r\n \"Total Ties: \" + ties + \"\\n\\n\" +\r\n \"User Wins: \" + uWins + \"\\n\" +\r\n \" Rock win ratio: \" + uRockW + \" of \" + uRock + \"\\n\" +\r\n \" Paper win ratio: \" + uPapW + \" of \" + uPap + \"\\n\" +\r\n \" Scissors win ratio: \" + uSciW + \" of \" + uSci + \"\\n\\n\" +\r\n \"Computer Wins: \" + cWins + \"\\n\" +\r\n \" Rock win ratio: \" + cRockW + \" of \" + cRock + \"\\n\" +\r\n \" Paper win ratio: \" + cPapW + \" of \" + cPap + \"\\n\" +\r\n \" Scissors win ratio: \" + cSciW + \" of \" + cSci + \"\\n\";\r\n \r\n return output;\r\n }", "protected String currentElapsedTimeExp(RomanticTransaction tx) {\n return tx.currentElapsedTimeExp();\n }", "public void logNewAccount(int op_id, int account_id, int current_balance){\n try {\n PreparedStatement stmt = rawDataSource.getConnection().prepareStatement(\n \"insert into OPERATIONS (OP_ID, OP_TYPE, FROM_ACCOUNT_ID, FROM_CURRENT_BALANCE, TIMESTAMP) \" +\n \"values (?,?,?,?,?)\");\n stmt.setInt(1, op_id);\n stmt.setInt(2, OP_TYPES.valueOf(\"CREATE\").ordinal()+1);\n stmt.setInt(3, account_id);\n stmt.setInt(4, current_balance);\n stmt.setTimestamp(5, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public String getAccountDescription(String elementId) {\n String sqlQuery = \"\", name = \"\";\n PreparedStatement st = null;\n ResultSet rs = null;\n try {\n sqlQuery = \" SELECT C_ELEMENTVALUE.name as name FROM C_ELEMENTVALUE WHERE C_ELEMENTVALUE_ID = ? AND C_ELEMENTVALUE.ISACTIVE = 'Y'\";\n st = conn.prepareStatement(sqlQuery);\n st.setString(1, elementId);\n rs = st.executeQuery();\n if (rs.next()) {\n name = rs.getString(\"name\");\n\n }\n } catch (Exception e) {\n log4j.error(\"Exception in getOrgs()\", e);\n }\n return name;\n }", "public String getOtherInfo(int i)\r\n { return this.history.get(i).otherInfo;\r\n }", "protected abstract int getLastTokenId();", "public final static String toString(final int id) {\n\t\tfinal StringBuffer result = new StringBuffer(4);\n\n\t\treturn toString(id, result);\n\t}", "public String toString() {\n final StringBuffer sb = new StringBuffer();\n sb.append(\"\\n [ Id: \" + id + \" ]\");\n sb.append(\"\\n [ ClassName: \" + className + \" ]\");\n sb.append(\"\\n [ MethodName : \" + methodName + \" ]\");\n if (bextraInfo) {\n for (int i = 0; i < extraInfo.length; i++) {\n sb.append(\n \"\\n [ Parameter \" + i + \" : \" + extraInfo[i]\n + \" ]\");\n }\n }\n sb.append(\"\\n [ Calendar: \" + cal + \" ]\");\n sb.append(\"\\n [ TimeMillis: \" + timeMillis + \" ] \");\n sb.append(\"\\n \");\n return sb.toString();\n }", "public static String getLastUpdateString(Date time) {\r\n if (time == null) {\r\n return \"\";\r\n }\r\n return getAmountOfTime(time) + \" ago\";\r\n }", "@Override\n public String toString() {\n return \"Task no \"+id ;\n }", "public String balancelc(int iterations, long id) throws RemoteException {\r\n\t\tthis.checklistlc();\r\n\t\tint se = getlc();\r\n\t\tthis.lc.set(se, this.lc.get(se) + 1);\r\n\t\tthis.clientserver.put(id, se);\r\n\t\tString name = this.server.list()[se];\r\n\t\tCalculator c = null;\r\n\t\ttry {\r\n\t\t\tc = (Calculator) server.lookup(name);\r\n\t\t} catch (NotBoundException e) {\r\n\t\t\tSystem.err.println(\"Nicht in registry Vorhanden\");\r\n\t\t}\r\n\t\tString re = \"Error konnte pi nicht abrufen\";\r\n\t\tif (c != null)\r\n\t\t\tre = c.pi(iterations, id);\r\n\t\t//this.lc.set(se, this.lc.get(se) - 1);\r\n\t\treturn re;\r\n\t}", "public String countAndSay(int n) {\n\n \tif (n <= 0)\n \t\treturn null;\n \t\n \tString[] retString = new String[n];\n \tfor (int i = 0; i < n; i++){\n \t\tif (i < 1)\n \t\t\tretString[i] = \"1\";\n \t\telse{\n \t\t\tString prev = retString[i-1];\n \t\t\tchar[] prevArray = prev.toCharArray();\n \t\t\tStringBuffer buffer = new StringBuffer();\n \t\t\tchar current = prevArray[0];\n \t\t\tint count = 0;\n \t\t\tfor (int j = 0; j < prevArray.length; j++){\n \t\t\t\tif (prevArray[j] == current){\n \t\t\t\t\tcount ++; \t\t\t\t\t\n \t\t\t\t}\n \t\t\t\telse{\n \t\t\t\t\tbuffer.append(count);\n \t\t\t\t\tbuffer.append(current);\n \t\t\t\t\tcurrent = prevArray[j];\n \t\t\t\t\tcount = 1;\n \t\t\t\t}\n \t\t\t}\n \t\t\tbuffer.trimToSize();\n \t\t\tif (buffer.length() == 0 || buffer.charAt(buffer.length()-1) != current){\n \t\t\t\tbuffer.append(count);\n \t\t\t\tbuffer.append(current);\n \t\t\t}\n \t\t\tretString[i] = buffer.toString();\n \t\t}\n \t}\n \treturn retString[n-1];\n \t\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getOperations() != null)\n sb.append(\"Operations: \").append(getOperations()).append(\",\");\n if (getNextPageMarker() != null)\n sb.append(\"NextPageMarker: \").append(getNextPageMarker());\n sb.append(\"}\");\n return sb.toString();\n }", "public void printAccountInfo(){\n System.out.printf(\"%5d %-20s %8.2f\\n\",accountNum,customerName,balance);\n }", "public int getAccOpId() {\n return accOpId_;\n }", "@Override\n public void actionPerformed(ActionEvent e){\n String nam = JOptionPane.showInputDialog(\"Account Name?\");\n \n String accn = bankSystem.getAccount(nam).name;\n \n String baln = Integer.toString(bankSystem.getAccount(nam).balance);\n \n textSpace.setText(\"\");\n \n textSpace.append(accn + \"\\n\" + baln + \"\\n\" );\n \n current = bankSystem.getAccount(nam);\n \n }", "public String toString() {\n \tString ret;\n \tint sumWait = 0;\n \tfor(Teller t : employees)\n \t{\n \t\tsumWait += t.getSumWaitTime();\n \t}\n \t\n \tret = \"Total elapsed time: \" + clock;\n \tret = ret + \"\\nTotal customers helped: \"+ numCust;\n \tret = ret + \"\\nAvg. wait time: \"+String.format(\"%.3f\",(float)sumWait/numCust);\n \tfor(Teller t : employees)\n \t{\n \t\tret = ret + \"\\nTeller \"+t.getID()+\": % time idle: \"+String.format(\"%.3f\",(float)(100*t.getIdleTime())/clock)+\" Number of customers helped: \"+t.getNumHelped();\n \t}\n \treturn ret;\n }", "public static String message(String count) {\n return \"SELECT * FROM \" + TableList.TABLE_MESSAGE + \" ORDER BY \" + Constants.LAST_UPDATED +\n \" DESC LIMIT \" + count;\n }", "private void ViewAccounts() {\n for (int k = 0; k < accountList.size(); k++) {\n\n System.out.print(k + \": \" + accountList.get(k) + \" || \");\n\n }\n }" ]
[ "0.61071247", "0.5860098", "0.5495024", "0.54137707", "0.53707576", "0.5165381", "0.5139203", "0.50825936", "0.5077591", "0.49909815", "0.49623942", "0.49197865", "0.49087894", "0.48442045", "0.4828904", "0.47960436", "0.4792124", "0.47891092", "0.47879586", "0.47747692", "0.47688398", "0.47447443", "0.47277087", "0.47174063", "0.47107685", "0.46724644", "0.46681362", "0.46660376", "0.46624848", "0.46550265", "0.46520215", "0.46513492", "0.4646074", "0.4633195", "0.46295953", "0.46258295", "0.46223295", "0.46221805", "0.4618659", "0.46031785", "0.45994535", "0.4597047", "0.45961004", "0.45801228", "0.4557159", "0.4556411", "0.4556411", "0.45508605", "0.4535517", "0.45211405", "0.4508178", "0.45003217", "0.4498375", "0.4496774", "0.44912916", "0.44905758", "0.44832128", "0.4482089", "0.44807693", "0.44743305", "0.44739276", "0.4469605", "0.4468662", "0.44532192", "0.44529548", "0.44468337", "0.4444188", "0.4442699", "0.44391844", "0.44349647", "0.44341654", "0.44329482", "0.4432413", "0.4431069", "0.4415582", "0.44038615", "0.44015688", "0.43919036", "0.43805867", "0.43793082", "0.4376742", "0.4376261", "0.4375671", "0.4368927", "0.4364787", "0.4358952", "0.43552524", "0.43533868", "0.43414328", "0.43411797", "0.4341044", "0.43409902", "0.43380708", "0.43376336", "0.43363243", "0.43324882", "0.4332442", "0.43270057", "0.4326171", "0.4324668" ]
0.804521
0
Get last account id used
private int getCurrentAccountId() { accountLock.lock(); int nmr = 1; try ( Statement s = rawDataSource.getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); ResultSet res = s.executeQuery( "SELECT ACCOUNT_ID FROM APP.ACCOUNTS ORDER BY ACCOUNT_ID ASC")) { if (res.last()) { nmr = Integer.parseInt(res.getString("ACCOUNT_ID")) + 1; } } catch (SQLException ex) { return nmr; } accountLock.unlock(); return nmr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getLastUserId();", "String getAccountID();", "String getAccountID();", "@Override\r\n\tpublic int getLastId() {\n\t\treturn adminDAO.getLastId();\r\n\t}", "private String getCurrentUserId() {\n\t\tUser currentUser = UserDirectoryService.getCurrentUser();\n \tString currentUserId = currentUser.getId();\n\t\treturn currentUserId;\n\t}", "protected long getLastUID() throws Exception {\n\t\tif(psmt != null) {\n\t\t\tResultSet rs = psmt.getGeneratedKeys();\n\t\t\tif(rs.next())\n\t\t\t\treturn rs.getLong(1);\n\t\t}\n\t\treturn -1L;\n\t}", "Long getAccountId();", "protected String getID(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"ID\", sharedPref.getString(\"id\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_ID, null);\n }", "public long getLastTweetId() {\n return tweetAdapter.getItem(tweetAdapter.getCount()-1).getTweetId();\n }", "public Integer getLastUpdatorId() {\n return lastUpdatorId;\n }", "public Integer getLastUpdUserId() {\n return (Integer) get(6);\n }", "private int getLastID() {\n\t\t\n\t\tArrayList<Integer> domandeIdList = new ArrayList<>();\n\t\tdomandeIdList.add(0);\n\t\tDB db = getDB();\n\t\tMap<Long, Domanda> domande = db.getTreeMap(\"domande\");\n\t\t\n\t\tfor(Map.Entry<Long, Domanda> domanda : domande.entrySet())\n\t\t\tif(domanda.getValue() instanceof Domanda)\n\t\t\t\tdomandeIdList.add(domanda.getValue().getId());\n\t\t\n\t\tInteger id = Collections.max(domandeIdList);\n\t\treturn id;\n\t}", "@Override\r\n\tpublic int generateAccountId() {\n\t\tint AccountId = (int) (Math.random()*10000);\r\n\t\treturn 0;\r\n\t}", "public int getLastScrnSetId()\n\t{\n\t\treturn lastScrnSetId;\n\t}", "protected abstract int getLastTokenId();", "public static long getIdConnected(Context ctx) {\n\t\tSharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(ctx);\n\t\treturn preferences.getLong(PreferenceConstants.ACCOUNT_ID, 0L);\n\t}", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "protected Integer getCurrentUtilityId() {\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\n AuthenticatedUser user = null;\n\n if (auth.getPrincipal() instanceof AuthenticatedUser) {\n user = (AuthenticatedUser) auth.getPrincipal();\n }\n\n if (user != null) {\n return user.getUtilityId();\n }\n\n return null;\n }", "public long getAccountId()\r\n/* 115: */ {\r\n/* 116:121 */ return this.accountId;\r\n/* 117: */ }", "public String getAccountID() {\n return (tozAdAccountID);\n }", "private static synchronized String getNextID() {\r\n\t\tlastID = lastID.add(BigInteger.valueOf(1));\r\n\t\t\r\n\t\treturn lastID.toString();\r\n\t}", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "public long getAccountId() {\n return accountId;\n }", "long getAccountLinkId();", "public long getUserID() {\n //userID++;\n return userID++;\n }", "java.lang.String getAccountNumber();", "public java.lang.String getAccount_Id() {\n return account_Id;\n }", "public int getLastLogin() {\n\t \t return lastLogin; \n\t}", "public String getCurrentUserAccount();", "public int getAccountID() {\n return accountID;\n }", "public int getMaxAccountsIdValue () throws Exception {\r\n String sql = \"SELECT MAX(ID) AS MAX FROM `accounts`;\";\r\n ResultSet result = stmt.executeQuery(sql);\r\n result.next();\r\n return result.getInt(\"MAX\");\r\n }", "public long getAccountId() {\n\t\treturn accountId;\n\t}", "public static int getCurrentId() {\n return currentId;\n }", "public int getLastLoginAppid() {\n\t\t\treturn lastLoginAppid;\n\t\t}", "private String generateUID()\n {\n String uid;\n int nbAccounts = this.getNumberOfAccounts();\n String host = this.registration.getHost();\n int nbAccountsForHost = this.getNbAccountForHost(host);\n \n if (nbAccounts == 0 || (this.isModification() && nbAccounts == 1) ||\n nbAccountsForHost == 0 || (this.isModification() && nbAccountsForHost == 1))\n {\n // We create the first account or we edit the onlyone\n // Or we create the first account for this server or edit the onlyone\n uid = host;\n }\n else\n {\n uid = host + \":\" + this.registration.getPort();\n }\n \n return uid;\n }", "private int getUniqueAccountNumber () {\n\n int minInt = 100000;\n int maxInt = 999999;\n int candidateNumber = -1;\n Set<Integer> listOfCurrentAccountNumbers =\n hashMapOfAllAccts.keySet();\n boolean numberIsUnique = false;\n while ( !numberIsUnique ) {\n\n candidateNumber = rng.nextInt(maxInt+1);\n // assume unique for a moment\n numberIsUnique = true;\n // verify uniqueness assumption\n for ( int acctNum : listOfCurrentAccountNumbers) {\n if (candidateNumber == acctNum) {\n numberIsUnique = false;\n break;\n }\n } // end for() loop\n\n } // end while() loop\n\n return candidateNumber;\n }", "public int getLastSavedId() {\n\t\tNativeQuery query = session.createNativeQuery(\"SELECT Id FROM terms ORDER BY Id DESC LIMIT 1\");\n\t\t// int lastUpdatedValue=(int)query;\n\t\tint lastUpdatedValue = ((Number) query.getSingleResult()).intValue();\n\t\tSystem.out.println(\"the result is\" + lastUpdatedValue);\n\t\treturn lastUpdatedValue;\n\t}", "java.lang.String getAccountId();", "java.lang.String getAccountId();", "java.lang.String getAccountId();", "private int generateNewId() {\n int size = userListCtrl.getUsers().size();\n \n if (size == 0) {\n return 1;\n } else {\n return userListCtrl.getUsers().get(size-1).getUserID()+1;\n }\n }", "public java.lang.String getLastUpdUserId() {\n return lastUpdUserId;\n }", "@Override\n public Long getLastInsertId() {\n Long lastId = 0L;\n Map<String, Object> paramMap = new HashMap<>();\n paramMap.put(\"lastID\", lastId);\n jdbc.query(SELECT_LAST_INSERT_ID, paramMap, rowMapper);\n return lastId;\n }", "public Long getUserAccountId() {\r\n return userAccountId;\r\n }", "public int getCurrentUserId() {\n int i;\n synchronized (this.mLock) {\n i = this.mCurrentUserId;\n }\n return i;\n }", "public int getAccountNo()\r\n\t{\r\n\t\t\r\n\t\treturn accountNo;\r\n\t\t\r\n\t}", "public String getAccountNo();", "private static long getRandAccount() {\n int bid = rand.nextInt(noOfBranches);\n return getRandAccountFromBranch(bid);\n }", "public static Account getCurrentAccount() {\r\n\t\treturn currentAccount;\r\n\t}", "public int getAccountId() {\n return accountId;\n }", "public int getAccountNumber() {\n\t\treturn accNum;\n\t}", "public static long getAccountsLastModified() {\r\n return (accountsLastModified);\r\n }", "public int getAccountID(Account account)\n\t {\n\t\t int id = -1;\n\t\t String columns[] = new String[] {DatabaseContract.AccountContract._ID};\n\t\t \n\t\t String where = DatabaseContract.AccountContract.COLUMN_NAME_USERNAME + \" = ? \";\n\t\t \n\t\t Cursor cursor = db.query(DatabaseContract.AccountContract.TABLE_NAME,\n\t\t\t\t columns,\n\t\t\t\t where,\n\t\t\t\t new String[] {account.getUsername()},\n\t\t\t\t null, null, null);\n\t\t\n\t\t if(cursor.getCount() > 0)\n\t\t {\n\t\t\t cursor.moveToFirst();\n\t\t\t \n\t\t\t int idCol = cursor.getColumnIndex(DatabaseContract.AccountContract._ID);\n\t\t\t id = cursor.getInt(idCol);\n\t\t }\n\t\t \n\t\t cursor.close();\n\t\t return id;\n\t }", "private int getNextUnique() {\r\n\t\ttry {\r\n\t\t\tint nextUnique = 0;\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tResultSet rs = statement.executeQuery(\"SELECT MAX(userID) userID FROM users\");\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tnextUnique = rs.getInt(\"userID\") + 1;\r\n\t\t\t}\r\n\t\t\treturn nextUnique;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public String getMyAccountId()\n\t{\n\t\treturn (String) session.getAttribute(\"accountId\");\n\t}", "public String getNextID() {\n String id = \"am\" + Integer.toString(nextID);\n nextID++;\n return id;\n }", "private String getCurrentUserId()\n {\n FirebaseUser currentUser = FirebaseAuth.getInstance().getCurrentUser();\n if (currentUser != null)\n {\n return currentUser.getUid();\n }\n return null;\n }", "@Query(value = \"select last_insert_id() from orden limit 1;\",nativeQuery = true)\n\tpublic Integer getLastId();", "long getLoginId();", "long getLoginId();", "long getLoginId();", "java.lang.String getAccount();", "public java.lang.Object getAccountID() {\n return accountID;\n }", "public static Number getCurrentUserID() {\n User currentUser = getCurrentUser();\n if (currentUser != null)\n return currentUser.id;\n return null;\n }", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "public String getLastUsername() {\n\t\treturn lastUsername;\n\t}", "public Long getAccountId() {\n return accountId;\n }", "public Long getUserID() {\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n return getByUsername(authentication.getName()).getId();\n }", "private long getLastUpdateId() throws SQLException {\n\t\tlong result = 0;\n\t\tResultSet resultset = null;\n\t\tStatement statement = this.connection.createStatement();\n\t\tresultset = statement.executeQuery(\"SELECT LAST_INSERT_ID()\");\n\t\twhile (resultset.next()) {\n\t\t\tresult = resultset.getInt(1);\n\t\t}\n\t\tresultset.close();\n\t\tstatement.close();\n\t\treturn result;\n\t}", "public Long getAccountId() {\n\t\treturn accountId;\n\t}", "java.lang.String getUserID();", "java.lang.String getUserID();", "java.lang.String getUserID();", "public String getAccountLogId() {\n return accountLogId;\n }", "public int getCurrentOrTargetUserId() {\n int i;\n synchronized (this.mLock) {\n i = this.mTargetUserId != -10000 ? this.mTargetUserId : this.mCurrentUserId;\n }\n return i;\n }", "public int getLastAliveId() {\n\t\treturn this.aliveId;\n\t}", "public void getCurrentUid() {\n\t\tSharedPreferences pref = getSharedPreferences(\"user_login\", 0);\n\t\tuid = pref.getString(\"uid\", \"\");\n\t}", "public String getUserID(){\n return mSharedPreferences.getString(SharedPrefContract.PREF_USER_ID, null);\n }", "private void getLastId() {\n for (int i = 0; i < remindersTable.getRowCount(); i++) {\n if (parseInt(remindersTable.getValueAt(i, 7).toString()) > maxId) {\n maxId = parseInt(remindersTable.getValueAt(i, 7).toString());\n }\n }\n }", "public static String getUserId() {\n\t\tJSONObject user = TUser_CACHE.get();\n\n\t\tif (user != null) {\n\t\t\treturn user.getString(\"userId\");\n\t\t}\n\n\t\treturn null;\n\t}", "public String getAccountNumber() {\n\t\tthis.setAccountNumber(this.account);\n\t\treturn this.account;\n\t}", "public static String getAccountNumber() {\n\t\treturn accountNumber;\n\t}" ]
[ "0.7305665", "0.69907594", "0.69907594", "0.6790585", "0.6661691", "0.66488516", "0.6646174", "0.6604962", "0.66000324", "0.6591616", "0.6540156", "0.6520632", "0.6512976", "0.65123475", "0.6498142", "0.64867103", "0.6473789", "0.6473789", "0.6449618", "0.6447187", "0.6445996", "0.64450026", "0.64420384", "0.64420384", "0.64364654", "0.6414995", "0.6413834", "0.64116585", "0.64098924", "0.6398287", "0.6394435", "0.6390477", "0.6349826", "0.63442266", "0.63277906", "0.6303811", "0.6257374", "0.6251397", "0.6240642", "0.62315154", "0.62315154", "0.62315154", "0.6230472", "0.6190934", "0.6183163", "0.61753595", "0.61690605", "0.6163282", "0.61598796", "0.61546", "0.61394686", "0.6134498", "0.6131459", "0.6122496", "0.6118225", "0.61140513", "0.61138743", "0.61137307", "0.6105089", "0.60945535", "0.6090351", "0.6090351", "0.6090351", "0.60893136", "0.6081598", "0.6076274", "0.60534525", "0.60534525", "0.60534525", "0.60534525", "0.60534525", "0.60534525", "0.60534525", "0.60534525", "0.60534525", "0.60534525", "0.60534525", "0.60534525", "0.60534525", "0.60534525", "0.60534525", "0.60534525", "0.60534525", "0.60518265", "0.6051285", "0.6050085", "0.6041088", "0.6038727", "0.6032588", "0.6032588", "0.6032588", "0.60290295", "0.6020295", "0.601455", "0.6007417", "0.60072124", "0.60017467", "0.6001322", "0.59968", "0.5991464" ]
0.7515725
0
Get last operation id used
public int getCurrentOperationId(){ int nmr = 1; operationLock.lock(); try ( Statement s = rawDataSource.getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); ResultSet res = s.executeQuery( "SELECT OP_ID FROM APP.OPERATIONS ORDER BY OP_ID ASC")) { if (res.last()) { nmr = Integer.parseInt(res.getString("OP_ID")) + 1; } } catch (SQLException ex) { return nmr; } operationLock.unlock(); return nmr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "OperationIdT getOperationId();", "java.lang.String getOperationId();", "com.google.protobuf.ByteString getOperationIdBytes();", "public Operation getLastOp() {\n\t\treturn ops.get(ops.size() - 1);\n\t}", "public Integer getOperationId() {\n return operationId;\n }", "String getForOperationId();", "public String getOperationId() {\n return this.operationId;\n }", "public Long getOpId() {\n return opId;\n }", "public Long getOpId() {\n return opId;\n }", "public Long getOpId() {\n return opId;\n }", "public Long getOpId() {\n return opId;\n }", "public static synchronized long getPathfindingOperations() {\r\n\t\treturn Long.parseLong(lastID.toString());\r\n\t}", "protected abstract int getLastTokenId();", "public String getOperationID() {\n\t\treturn operationId;\n\t}", "@Override\r\n\tpublic int getLastId() {\n\t\treturn adminDAO.getLastId();\r\n\t}", "public String getLastOperation()\n {\n if (!getCvpOperation().isNull())\n {\n com.sybase.afx.json.JsonObject cvpOperation = (com.sybase.afx.json.JsonObject)(com.sybase.afx.json.JsonReader.parse(__cvpOperation.getValue()));\n return (String)cvpOperation.get(\"cvp_name\");\n }\n if (getPendingChange() == 'C')\n {\n }\n else if (getPendingChange() == 'D')\n {\n }\n else if (getPendingChange() == 'U')\n {\n }\n return null;\n }", "public int getLastSavedId() {\n\t\tNativeQuery query = session.createNativeQuery(\"SELECT Id FROM terms ORDER BY Id DESC LIMIT 1\");\n\t\t// int lastUpdatedValue=(int)query;\n\t\tint lastUpdatedValue = ((Number) query.getSingleResult()).intValue();\n\t\tSystem.out.println(\"the result is\" + lastUpdatedValue);\n\t\treturn lastUpdatedValue;\n\t}", "@Override\r\n\tpublic Integer getCurrentInsertID() throws Exception {\n\t\treturn sqlSession.selectOne(namespaceOrder+\".getLastInsertID\");\r\n\t}", "int getHjOpId();", "public Optional<String> getOperationId() {\n return operationId;\n }", "public String getLastProcessedDocId() {\n return producer.getLastDocId();\n }", "long getApikeyOpId();", "@Override\n public Long getLastInsertId() {\n Long lastId = 0L;\n Map<String, Object> paramMap = new HashMap<>();\n paramMap.put(\"lastID\", lastId);\n jdbc.query(SELECT_LAST_INSERT_ID, paramMap, rowMapper);\n return lastId;\n }", "public int getAccOpId() {\n return accOpId_;\n }", "static public Operation getLastCancelableOperation() {\n long lastScheduleTime = Long.MIN_VALUE;\n Operation op = null;\n\n synchronized (sWorkQueue) {\n // Unknown order even for a PriorityQueue\n Iterator<OperationInfo> it = sWorkQueue.iterator();\n while (it.hasNext()) {\n OperationInfo info = it.next();\n if (info.delayMillis > 0 && lastScheduleTime < info.mScheduledTimeMillis) {\n if (op == null) {\n op = new Operation();\n }\n\n op.token = info.token;\n op.op = info.op;\n op.scheduledExecutionTime = info.mScheduledTimeMillis;\n\n lastScheduleTime = info.mScheduledTimeMillis;\n }\n }\n }\n\n if (AsyncQueryService.localLOGV) {\n Log.d(TAG, \"getLastCancelableOperation -> Operation:\" + Operation.opToChar(op.op)\n + \" token:\" + op.token);\n }\n return op;\n }", "public static int getCurrentId() {\n return currentId;\n }", "public int getAccOpId() {\n return accOpId_;\n }", "private long getLastUpdateId() throws SQLException {\n\t\tlong result = 0;\n\t\tResultSet resultset = null;\n\t\tStatement statement = this.connection.createStatement();\n\t\tresultset = statement.executeQuery(\"SELECT LAST_INSERT_ID()\");\n\t\twhile (resultset.next()) {\n\t\t\tresult = resultset.getInt(1);\n\t\t}\n\t\tresultset.close();\n\t\tstatement.close();\n\t\treturn result;\n\t}", "long getLastUpdate(long inId);", "protected long getLastUID() throws Exception {\n\t\tif(psmt != null) {\n\t\t\tResultSet rs = psmt.getGeneratedKeys();\n\t\t\tif(rs.next())\n\t\t\t\treturn rs.getLong(1);\n\t\t}\n\t\treturn -1L;\n\t}", "public static int getLatestTaskId() {\n\n int id = 0;\n try {\n List<Task> list = Task.listAll(Task.class);\n int size = list.size();\n Task task = list.get(size - 1);\n id = task.getTaskId();\n\n } catch (Exception e) {\n id=0;\n }\n return id;\n\n }", "public Integer getLastUpdatorId() {\n return lastUpdatorId;\n }", "private int getLastID() {\n\t\t\n\t\tArrayList<Integer> domandeIdList = new ArrayList<>();\n\t\tdomandeIdList.add(0);\n\t\tDB db = getDB();\n\t\tMap<Long, Domanda> domande = db.getTreeMap(\"domande\");\n\t\t\n\t\tfor(Map.Entry<Long, Domanda> domanda : domande.entrySet())\n\t\t\tif(domanda.getValue() instanceof Domanda)\n\t\t\t\tdomandeIdList.add(domanda.getValue().getId());\n\t\t\n\t\tInteger id = Collections.max(domandeIdList);\n\t\treturn id;\n\t}", "@Override\n\tpublic long getLastSavedId() throws SQLException {\n\t\treturn 0;\n\t}", "@Query(value = \"select last_insert_id() from orden limit 1;\",nativeQuery = true)\n\tpublic Integer getLastId();", "String getExecRefId();", "String getExecId();", "public long getBaseTransId() {\n return commitList.getBaseTransId();\n }", "public java.lang.String getOperID() {\n return operID;\n }", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "public UUID executionId();", "private int getLastIDRisposte() {\n\n\t\tArrayList<Integer> risposteIdList = new ArrayList<>();\n\t\trisposteIdList.add(0);\n\t\tDB db = getDB();\t\t\n\t\tMap<Long, Risposta> risposte = db.getTreeMap(\"risposte\");\n\t\t\n\t\tfor(Map.Entry<Long, Risposta> risposta : risposte.entrySet())\n\t\t\tif(risposta.getValue() instanceof Risposta)\n\t\t\t\trisposteIdList.add(risposta.getValue().getId());\n\t\t\n\t\tInteger id = Collections.max(risposteIdList);\n\t\treturn id;\n\t}", "public synchronized long getNextTransactionID(){\n\t\treturn this.id++;\n\t}", "public int getLastOrderId() {\r\n ArrayList<OrderRecord> result = new ArrayList<>();\r\n String sqlQuery = \"SELECT * FROM `orders`\";\r\n try {\r\n PreparedStatement p = myConn.prepareStatement(sqlQuery);\r\n ResultSet rs = p.executeQuery(sqlQuery);\r\n rs.last();\r\n return rs.getInt(\"id\");\r\n } catch (Exception e) {\r\n System.out.println(\"Could not get orders \" + e.toString());\r\n System.out.println(myStmt);\r\n }\r\n return 0;\r\n }", "private Integer getNewId(){\n List<Integer> allIds = new ArrayList<>();\n for (T entity : allEntities) {\n allIds.add(entity.getId());\n }\n return allIds.size() > 0 ? Collections.max(allIds) + 1 : 1;\n }", "public long getApikeyOpId() {\n return apikeyOpId_;\n }", "public int obtId() {\r\n\t\treturn id;\r\n\t}", "public long getLastTweetId() {\n return tweetAdapter.getItem(tweetAdapter.getCount()-1).getTweetId();\n }", "public long getOperatorId() {\r\n return operatorId;\r\n }", "Integer getOperationTypeId();", "private long generateID() {\n\t\treturn ++lastID;\n\t}", "public long getApikeyOpId() {\n return apikeyOpId_;\n }", "public Long getCreateOpId() {\n return createOpId;\n }", "public Long getCreateOpId() {\n return createOpId;\n }", "public Long getCreateOpId() {\n return createOpId;\n }", "void applyOperationId(Operation operation, Method method);", "public int getUpdatedTaskID(){\r\n int resultID;\r\n synchronized (lock) {\r\n ++baseTaskID;\r\n resultID = baseTaskID;\r\n //insert new parameters to paraList\r\n }\r\n return resultID;\r\n }", "private static long getGlobalId() {\n return globalId++;\n }", "public int getImportedMaxId();", "Operation getOperation();", "public int generateId(){\n return repository.getCount()+1;\n }", "public interface Operation {\n\n /**\n * Obtain the operation id.\n * \n * @return The operation id <code>String</code>.\n */\n public String getId();\n}", "public int getLastScrnSetId()\n\t{\n\t\treturn lastScrnSetId;\n\t}", "public static int getMaxId() {\r\n\t\treturn maxId++;\r\n\t}", "public String generateReferenceId(){\n String lastSequenceNumber = databaseAccessResource.getLastRequestSequenceNumber();\n //ToDo : write the logic to generate the next sequence number.\n return null;\n }", "public int getLastAliveId() {\n\t\treturn this.aliveId;\n\t}", "String getOperation();", "String getOperation();", "String getExistingId();", "@Override\n\tpublic Integer getLastMenuId() {\n\t\treturn this.menuDao.getLastMenuId();\n\t}", "public long getId();", "public long getId();", "public long getId();", "public long getId();", "public long getId();", "public long getId();", "private Long createId() {\n return System.currentTimeMillis() % 1000;\n }", "public int getLastUserId();", "long getRpcId();", "private static synchronized String getNextID() {\r\n\t\tlastID = lastID.add(BigInteger.valueOf(1));\r\n\t\t\r\n\t\treturn lastID.toString();\r\n\t}", "public String getOperation();", "int getOperationValue();" ]
[ "0.76487964", "0.7454115", "0.7379093", "0.6991537", "0.6954131", "0.677861", "0.6769626", "0.6746495", "0.6746495", "0.6746495", "0.6746495", "0.6705796", "0.6686604", "0.6676806", "0.66531104", "0.66174823", "0.649186", "0.64902675", "0.64802736", "0.6420746", "0.63717014", "0.6334402", "0.628725", "0.6280675", "0.62753356", "0.62696797", "0.6265829", "0.62595236", "0.62577856", "0.62231725", "0.62161666", "0.6167949", "0.61470205", "0.6128225", "0.61021984", "0.6088842", "0.6061297", "0.6060208", "0.60458297", "0.5997745", "0.5997745", "0.5997745", "0.5997745", "0.5997745", "0.5997745", "0.5997745", "0.5997745", "0.5997745", "0.5997745", "0.5997745", "0.5997745", "0.5997745", "0.5997745", "0.5997745", "0.5997745", "0.5997745", "0.5997745", "0.5997745", "0.59975195", "0.5988738", "0.5977174", "0.59666", "0.5961022", "0.59501594", "0.5948594", "0.594825", "0.59350836", "0.59215194", "0.5918251", "0.5918242", "0.59014094", "0.59014094", "0.59014094", "0.5896061", "0.58882743", "0.587398", "0.58655065", "0.58540386", "0.5848012", "0.584345", "0.58434063", "0.58401567", "0.58287597", "0.5827239", "0.58094877", "0.58094877", "0.5805488", "0.57899934", "0.5789364", "0.5789364", "0.5789364", "0.5789364", "0.5789364", "0.5789364", "0.5786871", "0.57785505", "0.57781714", "0.57780486", "0.5759727", "0.5749273" ]
0.7982648
0
Checks if database has the given account (normal mode)
public boolean hasAccount(int account){ boolean result; if(cache.get(account) != null) return true; try { Statement s = rawDataSource.getConnection().createStatement(); ResultSet res = s.executeQuery( "SELECT ACCOUNT_ID FROM APP.ACCOUNTS WHERE ACCOUNT_ID = "+account); result = res.next(); } catch (SQLException ex) { return false; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasAccount();", "boolean hasAccount();", "boolean hasAccount();", "public boolean hasAccount(int account, Connection con){\n boolean result;\n if(cache.get(account) != null) return true;\n try {\n Statement s = con.createStatement();\n ResultSet res = s.executeQuery(\n \"SELECT ACCOUNT_ID FROM APP.ACCOUNTS WHERE ACCOUNT_ID = \"+account);\n result = res.next();\n } catch (SQLException ex) {\n return false;\n }\n\n return result;\n }", "boolean hasHasAccount();", "@Override\r\n\tpublic boolean isAccountExist(Account account) {\n\t\treturn false;\r\n\t}", "boolean getHasAccount();", "public boolean checkDb() {\n\t\t\n\t\tint userId = Auth.getCurrentUser().getId();\n\t\tString sql = \"select id from PersonalDetails where id='\"+userId+\"'\";\n\t\tint gotId;\n\t\t//connectToDb();\n\t\t\n\t\ttry(Connection conn = myDb;\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(sql)){\n\t\t\tgotId = rs.getInt(\"id\");\n\t\t}catch(SQLException e){\n\t\t\t\n\t\t\tmyDb = null;\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(gotId == userId) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\t//return false;\n\t\t\treturn false;\n\t\t}\n\n\t}", "public Boolean existCheckingAccountId(long accountId) throws Exception {\r\n try {\r\n CheckingAccountDAO checkingAccountDAO = new CheckingAccountDAO();\r\n checkingAccountDAO.selectById(accountId);\r\n checkingAccountDAO.close();\r\n return true;\r\n } catch (Exception e) {\r\n return false;\r\n }\r\n }", "private boolean accountExists(String codigoCuenta, Connection con )\n {\n ClassConnection cc = new ClassConnection();\n boolean presente = (Boolean)cc.execute( \"SELECT codigocuenta FROM cuenta WHERE codigocuenta = \" + Long.parseLong( codigoCuenta ), 2, con);\n \n return presente;\n }", "public boolean hasAccount(String user);", "public\n boolean\n hasAccount()\n {\n return getAccount() != null;\n }", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "public static String accountValid(String account){\n return \"select u_accountnum from users having u_accountnum = '\" + account + \"'\";\n }", "public Boolean existDepositAccountId(long accountId) throws Exception {\r\n try {\r\n DepositAccountDAO depositAccountDAO = new DepositAccountDAO();\r\n depositAccountDAO.selectByAccountId(accountId);\r\n depositAccountDAO.close();\r\n return true;\r\n } catch (Exception e) {\r\n return false;\r\n }\r\n }", "public boolean isUserAllowedDatabaseAccess(String dbname,String username) {\n return manager.getAccount(manager.getSystemSubject(), username)!=null;\n }", "@Override\n\tpublic boolean mayILogin(Account account) {\n\t\tSession session = sf.openSession();\n\t\tQuery query = session.createQuery(\"from cn.edu.shou.staff.model.Account acc\" +\n\t\t\t\t\" where acc.uname=:u and acc.passwd=:v\");\n\t\tquery.setString(\"u\", account.getUname());\n\t\tquery.setString(\"v\", account.getPasswd());\n\t\tList list = query.list();\n\t\treturn list.size()>0;\n\t}", "public boolean accountExists(Account account)\n\t {\n\t\t if(this.getAccount(account.getUsername())!= null)\n\t\t\t return true;\n\t\t else\n\t\t\t return false;\n\t }", "private boolean accountChecks(Account account){\n // ie. if the account has to be personal for the round-up service to apply\n account.getName(); // check personal\n return true;\n }", "@Override\r\n\tpublic boolean checkingAccount(Long accountNumber) throws QGSException {\n\t\treturn dao.checkingAccount(accountNumber);\r\n\t}", "boolean hasDatabase();", "boolean isAccountNonLocked();", "boolean isAccountNonLocked();", "private boolean inDatabase() {\r\n \t\treturn inDatabase(0, null);\r\n \t}", "public boolean hasAccount(){\r\n\t\treturn (associatedAccount != null);\r\n\t}", "public boolean checkAccount(String username) {\n\n\t\tString sql = \"SELECT count(*) FROM account WHERE username = '\" + username + \"'\";\n\t\ttry {\n\n\t\t\trs = stm.executeQuery(sql);\n\n\t\t\tif (rs.next() && rs.getInt(1) == 0) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn true;\n\t}", "private void checkAdminInDB(DB db) {\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tlong hashCode = (long) \"admin\".hashCode();\n\t\tif(!users.containsKey(hashCode))\n\t\t\tusers.put(hashCode, new Admin(\"admin\", \"admin\"));\n\t}", "@Override\r\n\tpublic boolean findLogin(Account account) throws Exception {\n\t\tboolean flag = false;\r\n\t\ttry {\r\n\t\t\tflag = this.dao.findLogin(account);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "private boolean checkDatabase(CommandPreferences preferences) {\n\n //checking class type of Preferences\n Logger.log(LogType.DEBUG, \"Class name of Preferences: \" + preferences.getClass().getName());\n prefClass = preferences.getClass();\n\n\n Logger.log(LogType.INFO, \"Checking Database connection...\");\n try (Connection connection = DriverManager.getConnection(purl, puser, ppassword)) {\n Logger.log(LogType.INFO, \"Database connected!\");\n isInit = true;\n con = connection;\n\n url = purl;\n user = puser;\n password = ppassword;\n\n } catch (SQLException e) {\n Logger.log(LogType.ERROR, \"Could not connect to Databse! \" + e);\n return false;\n }\n Logger.log(LogType.INFO, \"Database connection established.\");\n Logger.log(LogType.INFO, \"Checking Database setup: Tables...\");\n\n if (!checkTableExists(tablename)) return false;\n Logger.log(LogType.INFO, \"Checking Database setup: Columns...\");\n Logger.log(LogType.DEBUG, preferences.getClass().getFields().length + \"\");\n for (Field f : preferences.getClass().getFields()) {\n Logger.log(LogType.DEBUG, \"Field[\" + f.getName() + \"] \" + f.getType());\n if (!checkColumnExists(f.getName(), f)) return false;\n }\n Logger.log(LogType.INFO, \"Database check complete! starting...\");\n prefStructure = preferences;\n return true;\n }", "boolean hasTradingAccount();", "boolean existsById(String accountNumber) throws AccountException;", "@Override\r\n\tpublic boolean isDatabaseAvailable(UserDatabase userDatabase) {\n\t\t\r\n\t\treturn false;\r\n\t}", "public static boolean hasAccountSavedOnDevice() {\n if (!isLogged()) {\n SharedPreferences preferences = App.getContext()\n\t\t .getSharedPreferences(LOGIN, Context.MODE_PRIVATE);\n if (preferences.contains(EMAIL)) {\n try {\n File file = new File(App.getContext()\n\t\t .getDir(\"data\", App.MODE_PRIVATE), PERMISSIONS);\n ObjectInputStream outputStream = new ObjectInputStream(new FileInputStream(file));\n currentUser = Structure.User(new User(preferences.getString(NAME, \"\"),\n\t\t preferences.getString(EMAIL, \"\"),\n\t\t preferences.getString(PASSWORD, \"\"),\n\t\t preferences.getString(ADM, \"\"),\n\t\t (HashMap<String, Boolean>) outputStream.readObject()));\n CRUD.updateDatabase();\n updateUser();\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n }\n }\n return isLogged();\n }", "public boolean checkAccountPermission() {\n return EasyPermissions.hasPermissions(context, Manifest.permission.GET_ACCOUNTS);\n }", "public static boolean isAccountActive(String email){\n Connection connect = null;\n ResultSet set = null;\n String isAccountActiveSQL = \"SELECT active FROM users WHERE email = ?\";\n\n // Check If Account is Active Try Block:\n try {\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare Statement:\n PreparedStatement statement = connect.prepareStatement(isAccountActiveSQL);\n // Set Parameters:\n statement.setString(1, email);\n // Execute Statement:\n set = statement.executeQuery();\n // Check For Result Set:\n while (set.next()){\n // Check Value:\n if(set.getInt(\"active\") == 1) {\n return true;\n }\n // End Of Check Value.\n }\n // End Of Check For Result Set.\n\n }catch(SQLException e){\n e.printStackTrace();\n }\n // End Of Check If Account is Active Try Block:\n\n return false;\n }", "public boolean isSetAccount() {\n return this.account != null;\n }", "public boolean isSetAccount() {\n return this.account != null;\n }", "public boolean isSetAccount() {\n return this.account != null;\n }", "public boolean checkIfDatabaseExists() {\r\n return database.exists();\r\n }", "@Override\n\tpublic boolean isExists(Account entity) {\n\t\treturn mongoTemplate.findOne(\n\t\t\t\tQuery.query(Criteria.where(\"accountName\").is(\n\t\t\t\t\t\tentity.getAccountName())), Account.class) != null ? true\n\t\t\t\t: false;\n\t}", "public boolean getHasAccount() {\n return hasAccount_;\n }", "public static boolean accountExists(Context context, String accountType) {\n return true;\n }", "private static boolean doesUserExist () {\n String sqlRetrieveAisId = \"SELECT ais_id FROM users WHERE user_id=?\";\n \n boolean valid = false;\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveAisId)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n valid = rs.next() != false;\n } catch (SQLException se) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return valid;\n }", "public boolean hasAccount() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "boolean hasAuthAccountFlags();", "public boolean getHasAccount() {\n return hasAccount_;\n }", "public boolean hasAccount() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean hasAccount() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "boolean isSetAccountNumber();", "public boolean hasAccount() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasAccount() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean hasAccount() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "private boolean checkPass(String enterPass) {\n JdbcConnection connection = JdbcConnection.getInstance();\n DaoFactory daoFactory = new RealDaoFactory(connection);\n List<User> users = daoFactory.createUserDao().findAll();\n for (User user : users) {\n if (user.getPasswordHash() == enterPass.hashCode()) {\n return true;\n }\n }\n return false;\n }", "private boolean existsUser(Connection con) throws SQLException {\n\t\tlog.entry();\n\t\tboolean userExists = false;\n\t\tPreparedStatement ps = con.prepareStatement(\"SELECT COUNT(*) FROM Users \"\n\t\t + \"WHERE `id`=?;\");\n\t\ttry {\n\t\t\tps.setInt(1, id);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.first() && rs.getInt(1) > 0) {\n\t\t\t\tuserExists = true;\n\t\t\t}\n\t\t} finally {\n\t\t\tcloseStatement(ps);\n\t\t}\n\t\tthrowSqlException();\n\t\tlog.exit();\n\t\treturn userExists;\n\t}", "public boolean checkIfThisGAZRecordIsInTheDB()\n\t{\n\t\treturn checkIfThisRecordIsInTheDB(getWhereConditionBaseOnIdRecord());\n\t}", "public boolean hasAccountName() {\n return genClient.cacheHasKey(CacheKey.accountName);\n }", "public boolean isDbEncrypted();", "private boolean userIDExists( String idCedulaNit, Connection con ) \n {\n ClassConnection cc = new ClassConnection();\n \n //System.out.println( idCedulaNit );\n //System.out.print( idCedulaNit );\n Boolean presente = (Boolean) cc.execute( \"SELECT idcedulanit FROM usuario WHERE idcedulanit = \" + Long.parseLong( idCedulaNit ) , 2, con);\n \n return presente;\n }", "public boolean hasHasAccount() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "private void checkUserExist() {\n\n final DatabaseReference mUseRef;\n\n\n if (mAuth.getCurrentUser() != null) {\n final String valid_user_id = mAuth.getCurrentUser().getUid();\n mDatabase.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.hasChild(valid_user_id)) {\n Intent singinIntent = new Intent(JoinActivity.this, MainActivity.class);\n singinIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(singinIntent);\n finish();\n } else {\n Toast.makeText(JoinActivity.this, \"You have to first setup your account!\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }\n }", "void check(Permission permission, DBObject dBObject) throws T2DBException;", "public boolean addAccount() {\r\n String update = \"INSERT INTO LOGIN VALUES('\" + this.username + \"', '\" + new MD5().md5(this.password) + \"', '\" + this.codeID + \"', N'\" + this.fullname + \"')\";\r\n return model.ConnectToSql.update(update);\r\n }", "private boolean checkUser(String user_name, String passwordd) throws SQLException {\n boolean sucss = false;\n DBConnection db = new DBConnection();\n Connection connection = db.getConnection();\n String sql = \"SELECT * FROM USER WHERE NAME = ? AND PASSWORD = ?\";\n try (PreparedStatement preparedStatement = connection.prepareStatement(sql);) {\n preparedStatement.setString(1, user_name);\n preparedStatement.setString(2, passwordd);\n ResultSet rs = preparedStatement.executeQuery();\n if (rs.next()) {\n System.out.println(rs.getString(\"name\"));\n System.out.println(rs.getString(\"password\"));\n sucss = true;\n }\n } catch (SQLException e) {\n System.out.println(\"User Is Not Insert\" + e);\n } finally {\n connection.close();\n return sucss;\n }\n }", "public boolean bankExists() {\n\t\tResultSet r = super.query(\"SELECT * FROM \" + C.TABLE_BANK + \" WHERE \"\n\t\t\t\t+ C.COLUMN_ID + \"=\" + this.getID() + \" AND \"\n\t\t\t\t+ C.COLUMN_BSB_NUMBER + \"=\" + this.getBSB()+ \" AND \"\n\t\t\t\t+ C.COLUMN_ACCOUNT_NUMBER + \"=\" + this.getAccountNumber()+ \" LIMIT 1\");\n\t\tif (r == null)\n\t\t\treturn false;\n\t\ttry {\n\t\t\tsuper.setRecentError(null);\n\t\t\treturn r.first();\n\t\t} catch (SQLException e) {\n\t\t\tsuper.setRecentError(e);\n\t\t\treturn false;\n\t\t}\n\t}", "boolean hasAccountLink();", "public boolean getAccountAdmin(String username, String password) throws SQLException {\r\n rs = this.connectionAdmin(\"SELECT * from USER\");\r\n if (rs != null) {\r\n while (rs.next()) {\r\n if (rs.getString(\"username\").equals(username) && rs.getString(\"password\").equals(password)) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }", "public boolean testDatabaseExists()\r\n {\r\n try {\r\n myStmt = myConn.createStatement();\r\n myRs = myStmt.executeQuery(\"show databases like '\" + dbname + \"'\");\r\n if (myRs.next())\r\n return true;\r\n return false;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(SQLConnector.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return false;\r\n }", "public boolean checkIfThisHBRecordIsInTheDB()\n\t{\n\t\treturn checkIfThisRecordIsInTheDB(getWhereConditionBaseOnIdRecord());\n\t}", "public boolean hasHasAccount() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "boolean isAccountNonExpired();", "boolean isAccountNonExpired();", "private boolean checkUserame(String name) throws SQLException {\n\t\tcheckUserameStatement.clearParameters();\n\t\tcheckUserameStatement.setString(1, name);\n\t\tResultSet result = checkUserameStatement.executeQuery();\n\t\tresult.next();\n\t\tboolean out = result.getInt(1) == 1;\n\t\tif (DEBUG) {\n\t\t\tSystem.out.println(\"checkUserame: \"+result.getInt(1)+\"\\n\");\n\t\t}\n\t\tresult.close();\n\t\treturn out;\n\t}", "@Test\n\tpublic void testLoginAdminAccExist() {\n\t\tAccount acc1 = new Account(00000, \"ADMIN\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"ADMIN\", 00000, 0, \"A\"));\n\t\ttransactions.add(1, new Transaction(00, \"ADMIN\", 00000, 0, \"A\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Session Started Admin\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to find that admin account\", testResult);\n\t}", "@Override\r\n\tpublic boolean checkLogin(int accNo) throws EwalletException {\n\t\ttemp =dao.loginuser(accNo);\r\n\t\tif(temp!=null)\r\n\t\treturn true;\r\n\t\telse \r\n\t\t\treturn false;\r\n\t}", "public boolean getAccountNguoiNhap(String username, String password) throws SQLException {\r\n rs = this.connectionAdmin(\"SELECT * from user\");\r\n if (rs != null) {\r\n while (rs.next()) {\r\n if (rs.getString(\"username\").equals(username) && rs.getString(\"password\").equals(password)) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }", "public boolean databaseExists() {\n return defaultDatabaseExists();\n }", "public boolean hasAccountId() {\n return accountId_ != null;\n }", "boolean dbExists(String dbName);", "public boolean databaseExists() {\n\t\treturn defaultDatabaseExists();\n\t}", "public boolean hasAccountID() {\n return fieldSetFlags()[2];\n }", "public static boolean isConnected(Context ctx) {\n\t\tSharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(ctx);\n\t\treturn preferences.getLong(PreferenceConstants.ACCOUNT_ID, 0L) != 0;\n\t}", "boolean isSetCompanyBaseData();", "Boolean isAccountLocked(String username);", "boolean hasAccountBudget();", "public boolean databaseExists(String dbName) throws Exception;", "private void checkDB() {\n\t\tif (couchDB_ip == null) {\n\t\t\tsetCouchDB_ip();\n\t\t}\n\n\t\tif (!databaseExist) {\n\n\t\t\tsynchronized (databaseExist) {\n\n\t\t\t\tif (!databaseExist) {\n\n\t\t\t\t\tif (couchDB_USERNAME != null\n\t\t\t\t\t\t\t&& !couchDB_USERNAME.trim().isEmpty()\n\t\t\t\t\t\t\t&& couchDB_PASSWORD != null\n\t\t\t\t\t\t\t&& !couchDB_PASSWORD.trim().isEmpty()) {\n\t\t\t\t\t\tUsernamePasswordCredentials creds = new UsernamePasswordCredentials(\n\t\t\t\t\t\t\t\tcouchDB_USERNAME, couchDB_PASSWORD);\n\t\t\t\t\t\tauthentication = BasicScheme.authenticate(creds,\n\t\t\t\t\t\t\t\t\"US-ASCII\", false).toString();\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (CouchDBUtil.checkDB(getCouchDB_ip(), couchDB_NAME,\n\t\t\t\t\t\t\t\tauthentication)) {\n\n\t\t\t\t\t\t\tdatabaseExist = true;\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tCouchDBUtil.createDb(getCouchDB_ip(), couchDB_NAME,\n\t\t\t\t\t\t\t\t\tauthentication);\n\t\t\t\t\t\t\tdatabaseExist = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t\tlogger.info(\"Impossible to access CouchDB\", e);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "boolean validateAccount(String Account) {\n\t\treturn true;\n\n\t}", "private boolean exists() {\n try {\n DatabaseMetaData md = conn.getMetaData();\n ResultSet rs = md.getTables(null, null, \"settings\", null);\n return rs.next();\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return false;\n }\n }", "public boolean hasDatabase() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "private static boolean verificaUser(String username) {\n String user = null;\r\n try {\r\n PreparedStatement stmt = c.prepareStatement(\"SELECT * FROM utilizador where nome=?;\");\r\n stmt.setString(1, username);\r\n ResultSet rs = stmt.executeQuery();\r\n rs.next();\r\n user = rs.getString(\"nome\");\r\n if (user.equals(username)) {\r\n return true;\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n return false;\r\n }", "public boolean isExist(int conId) throws AppException;", "private boolean checkUserData() {\n UserAccount userAccount = new UserAccount(this);\n customer = userAccount.getCustomer();\n return customer != null;\n }", "public boolean hasDatabase() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "public boolean Exist(int usertype,long id,String password);" ]
[ "0.7298314", "0.7298314", "0.7298314", "0.7173072", "0.6975783", "0.68261003", "0.6752026", "0.670854", "0.6640224", "0.66365045", "0.6582861", "0.64653355", "0.6460393", "0.6460393", "0.6460393", "0.6460393", "0.6460393", "0.6460393", "0.6460393", "0.64300627", "0.6417349", "0.6406821", "0.64002997", "0.63572896", "0.63468826", "0.6295231", "0.62906545", "0.6245946", "0.6245946", "0.62420595", "0.62238944", "0.6173986", "0.6161116", "0.614362", "0.6109545", "0.61026", "0.6084871", "0.60771084", "0.6073561", "0.6066049", "0.6045894", "0.60457027", "0.60457027", "0.60457027", "0.6030665", "0.5993744", "0.5988377", "0.5983124", "0.59706527", "0.59673053", "0.5959378", "0.5947382", "0.59462875", "0.59462875", "0.5939675", "0.5939561", "0.59147453", "0.59147453", "0.5904298", "0.58990973", "0.58968025", "0.58654547", "0.58576137", "0.5828577", "0.5826788", "0.58218235", "0.5810666", "0.5800354", "0.57979786", "0.57881755", "0.5784536", "0.5780308", "0.57726866", "0.57392466", "0.5733083", "0.5731252", "0.5731252", "0.57294744", "0.5728289", "0.572489", "0.5712185", "0.56936085", "0.5692991", "0.56812793", "0.5679126", "0.5676022", "0.56725913", "0.5672099", "0.5657806", "0.56544936", "0.56508523", "0.56485575", "0.56482977", "0.564443", "0.563994", "0.56398153", "0.5639642", "0.56200165", "0.5618133", "0.56072867" ]
0.7219725
3
Checks if database has the given account (recovery mode)
public boolean hasAccount(int account, Connection con){ boolean result; if(cache.get(account) != null) return true; try { Statement s = con.createStatement(); ResultSet res = s.executeQuery( "SELECT ACCOUNT_ID FROM APP.ACCOUNTS WHERE ACCOUNT_ID = "+account); result = res.next(); } catch (SQLException ex) { return false; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasAccount();", "boolean hasAccount();", "boolean hasAccount();", "public boolean hasAccount(int account){\n boolean result;\n if(cache.get(account) != null) return true;\n try {\n Statement s = rawDataSource.getConnection().createStatement();\n ResultSet res = s.executeQuery(\n \"SELECT ACCOUNT_ID FROM APP.ACCOUNTS WHERE ACCOUNT_ID = \"+account);\n result = res.next();\n } catch (SQLException ex) {\n return false;\n }\n\n return result;\n }", "@Override\r\n\tpublic boolean isAccountExist(Account account) {\n\t\treturn false;\r\n\t}", "public Boolean existCheckingAccountId(long accountId) throws Exception {\r\n try {\r\n CheckingAccountDAO checkingAccountDAO = new CheckingAccountDAO();\r\n checkingAccountDAO.selectById(accountId);\r\n checkingAccountDAO.close();\r\n return true;\r\n } catch (Exception e) {\r\n return false;\r\n }\r\n }", "boolean hasDatabase();", "boolean hasHasAccount();", "public boolean checkDb() {\n\t\t\n\t\tint userId = Auth.getCurrentUser().getId();\n\t\tString sql = \"select id from PersonalDetails where id='\"+userId+\"'\";\n\t\tint gotId;\n\t\t//connectToDb();\n\t\t\n\t\ttry(Connection conn = myDb;\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(sql)){\n\t\t\tgotId = rs.getInt(\"id\");\n\t\t}catch(SQLException e){\n\t\t\t\n\t\t\tmyDb = null;\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(gotId == userId) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\t//return false;\n\t\t\treturn false;\n\t\t}\n\n\t}", "@Override\r\n\tpublic boolean isDatabaseAvailable(UserDatabase userDatabase) {\n\t\t\r\n\t\treturn false;\r\n\t}", "public boolean checkIfDatabaseExists() {\r\n return database.exists();\r\n }", "public boolean isUserAllowedDatabaseAccess(String dbname,String username) {\n return manager.getAccount(manager.getSystemSubject(), username)!=null;\n }", "boolean getHasAccount();", "@Override\r\n\tpublic boolean checkingAccount(Long accountNumber) throws QGSException {\n\t\treturn dao.checkingAccount(accountNumber);\r\n\t}", "private boolean accountChecks(Account account){\n // ie. if the account has to be personal for the round-up service to apply\n account.getName(); // check personal\n return true;\n }", "public boolean hasAccount(String user);", "public Boolean existDepositAccountId(long accountId) throws Exception {\r\n try {\r\n DepositAccountDAO depositAccountDAO = new DepositAccountDAO();\r\n depositAccountDAO.selectByAccountId(accountId);\r\n depositAccountDAO.close();\r\n return true;\r\n } catch (Exception e) {\r\n return false;\r\n }\r\n }", "boolean isAccountNonLocked();", "boolean isAccountNonLocked();", "@Override\r\n\tpublic boolean findLogin(Account account) throws Exception {\n\t\tboolean flag = false;\r\n\t\ttry {\r\n\t\t\tflag = this.dao.findLogin(account);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "private boolean checkDataBase() {\n// boolean checkDB = false;\n File dbfile = null;\n try {\n String myPath = DBLOCATION + DBNAME;\n dbfile = new File(myPath);\n// checkDB = dbfile.exists();\n } catch (SQLiteException e) {\n }\n// return checkDB;\n return dbfile.exists();\n }", "private void checkAdminInDB(DB db) {\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tlong hashCode = (long) \"admin\".hashCode();\n\t\tif(!users.containsKey(hashCode))\n\t\t\tusers.put(hashCode, new Admin(\"admin\", \"admin\"));\n\t}", "private boolean checkPass(String enterPass) {\n JdbcConnection connection = JdbcConnection.getInstance();\n DaoFactory daoFactory = new RealDaoFactory(connection);\n List<User> users = daoFactory.createUserDao().findAll();\n for (User user : users) {\n if (user.getPasswordHash() == enterPass.hashCode()) {\n return true;\n }\n }\n return false;\n }", "@Override\n\tpublic boolean checkdbconfig() {\n\t\t// get path\n\t\tString path = context.getRealPath(\"/\");\n\t\tString dbpath = path + Utility.DB_PATH;\n\t\tString dbconfig = \"\";\n\t\tFileInputStream fileInputStreamSystemSettings = null;\n\t\tProperties prop = new Properties();\n\t\ttry {\n\t\t\tfileInputStreamSystemSettings = new FileInputStream(dbpath);\n\t\t\ttry {\n\t\t\t\tprop.load(fileInputStreamSystemSettings);\n\t\t\t\tdbconfig = prop.getProperty(\"jdbc.dbconfig\");\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tfileInputStreamSystemSettings.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tif (dbconfig.equalsIgnoreCase(\"Y\")) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isDbEncrypted();", "public static String accountValid(String account){\n return \"select u_accountnum from users having u_accountnum = '\" + account + \"'\";\n }", "private boolean checkDatabase(CommandPreferences preferences) {\n\n //checking class type of Preferences\n Logger.log(LogType.DEBUG, \"Class name of Preferences: \" + preferences.getClass().getName());\n prefClass = preferences.getClass();\n\n\n Logger.log(LogType.INFO, \"Checking Database connection...\");\n try (Connection connection = DriverManager.getConnection(purl, puser, ppassword)) {\n Logger.log(LogType.INFO, \"Database connected!\");\n isInit = true;\n con = connection;\n\n url = purl;\n user = puser;\n password = ppassword;\n\n } catch (SQLException e) {\n Logger.log(LogType.ERROR, \"Could not connect to Databse! \" + e);\n return false;\n }\n Logger.log(LogType.INFO, \"Database connection established.\");\n Logger.log(LogType.INFO, \"Checking Database setup: Tables...\");\n\n if (!checkTableExists(tablename)) return false;\n Logger.log(LogType.INFO, \"Checking Database setup: Columns...\");\n Logger.log(LogType.DEBUG, preferences.getClass().getFields().length + \"\");\n for (Field f : preferences.getClass().getFields()) {\n Logger.log(LogType.DEBUG, \"Field[\" + f.getName() + \"] \" + f.getType());\n if (!checkColumnExists(f.getName(), f)) return false;\n }\n Logger.log(LogType.INFO, \"Database check complete! starting...\");\n prefStructure = preferences;\n return true;\n }", "public void check() {\r\n logger.info(\"ADIT monitor - Checking database and application.\");\r\n\r\n checkApplication();\r\n\r\n checkDBConnection();\r\n checkDBRead(this.getMonitorConfiguration().getTestDocumentId());\r\n }", "@Override\n\tpublic boolean mayILogin(Account account) {\n\t\tSession session = sf.openSession();\n\t\tQuery query = session.createQuery(\"from cn.edu.shou.staff.model.Account acc\" +\n\t\t\t\t\" where acc.uname=:u and acc.passwd=:v\");\n\t\tquery.setString(\"u\", account.getUname());\n\t\tquery.setString(\"v\", account.getPasswd());\n\t\tList list = query.list();\n\t\treturn list.size()>0;\n\t}", "private boolean accountExists(String codigoCuenta, Connection con )\n {\n ClassConnection cc = new ClassConnection();\n boolean presente = (Boolean)cc.execute( \"SELECT codigocuenta FROM cuenta WHERE codigocuenta = \" + Long.parseLong( codigoCuenta ), 2, con);\n \n return presente;\n }", "private boolean inDatabase() {\r\n \t\treturn inDatabase(0, null);\r\n \t}", "private boolean databaseExists() {\n File dbFile = mContext.getDatabasePath(DBNAME);\n return dbFile.exists();\n }", "public boolean databaseExists() {\n return defaultDatabaseExists();\n }", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "boolean hasAccountId();", "public boolean accountExists(Account account)\n\t {\n\t\t if(this.getAccount(account.getUsername())!= null)\n\t\t\t return true;\n\t\t else\n\t\t\t return false;\n\t }", "public static boolean hasAccountSavedOnDevice() {\n if (!isLogged()) {\n SharedPreferences preferences = App.getContext()\n\t\t .getSharedPreferences(LOGIN, Context.MODE_PRIVATE);\n if (preferences.contains(EMAIL)) {\n try {\n File file = new File(App.getContext()\n\t\t .getDir(\"data\", App.MODE_PRIVATE), PERMISSIONS);\n ObjectInputStream outputStream = new ObjectInputStream(new FileInputStream(file));\n currentUser = Structure.User(new User(preferences.getString(NAME, \"\"),\n\t\t preferences.getString(EMAIL, \"\"),\n\t\t preferences.getString(PASSWORD, \"\"),\n\t\t preferences.getString(ADM, \"\"),\n\t\t (HashMap<String, Boolean>) outputStream.readObject()));\n CRUD.updateDatabase();\n updateUser();\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n }\n }\n return isLogged();\n }", "public boolean databaseExists() {\n\t\treturn defaultDatabaseExists();\n\t}", "public boolean databaseExists(String dbName) throws Exception;", "boolean existsById(String accountNumber) throws AccountException;", "public boolean checkAccount(String username) {\n\n\t\tString sql = \"SELECT count(*) FROM account WHERE username = '\" + username + \"'\";\n\t\ttry {\n\n\t\t\trs = stm.executeQuery(sql);\n\n\t\t\tif (rs.next() && rs.getInt(1) == 0) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn true;\n\t}", "public static void checkDBAvailable(Configuration conf)\n throws MasterNotRunningException {\n Configuration copyOfConf = ConfigurationFactory.create(conf);\n copyOfConf.setInt(\"bigdb.client.retries.number\", 1);\n new DBAdmin(copyOfConf);\n }", "public boolean testDatabaseExists()\r\n {\r\n try {\r\n myStmt = myConn.createStatement();\r\n myRs = myStmt.executeQuery(\"show databases like '\" + dbname + \"'\");\r\n if (myRs.next())\r\n return true;\r\n return false;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(SQLConnector.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return false;\r\n }", "public\n boolean\n hasAccount()\n {\n return getAccount() != null;\n }", "boolean hasTradingAccount();", "private boolean exists() {\n try {\n DatabaseMetaData md = conn.getMetaData();\n ResultSet rs = md.getTables(null, null, \"settings\", null);\n return rs.next();\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return false;\n }\n }", "boolean dbExists(String dbName);", "private boolean checkDataBase() {\n\n\t\tFile dbFile = null;\n\t\ttry {\n\t\t\t// String myPath = DATABASE_PATH + DATABASE_NAME;\n\t\t\t// checkDB = SQLiteDatabase.openDatabase(myPath, null,\n\t\t\t// SQLiteDatabase.OPEN_READONLY);\n\t\t\tdbFile = new File(DATABASE_PATH + DATABASE_NAME);\n\t\t\treturn dbFile.exists();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/*if(checkDB != null){\n\t\t checkDB.close();}\n\t\t return checkDB != null ? true : false;*/\n\t\treturn dbFile != null ? true : false;\n\t}", "boolean hasAuthAccountFlags();", "@Override\r\n\tpublic boolean checkLogin(int accNo) throws EwalletException {\n\t\ttemp =dao.loginuser(accNo);\r\n\t\tif(temp!=null)\r\n\t\treturn true;\r\n\t\telse \r\n\t\t\treturn false;\r\n\t}", "private void checkDB() {\n\t\tif (couchDB_ip == null) {\n\t\t\tsetCouchDB_ip();\n\t\t}\n\n\t\tif (!databaseExist) {\n\n\t\t\tsynchronized (databaseExist) {\n\n\t\t\t\tif (!databaseExist) {\n\n\t\t\t\t\tif (couchDB_USERNAME != null\n\t\t\t\t\t\t\t&& !couchDB_USERNAME.trim().isEmpty()\n\t\t\t\t\t\t\t&& couchDB_PASSWORD != null\n\t\t\t\t\t\t\t&& !couchDB_PASSWORD.trim().isEmpty()) {\n\t\t\t\t\t\tUsernamePasswordCredentials creds = new UsernamePasswordCredentials(\n\t\t\t\t\t\t\t\tcouchDB_USERNAME, couchDB_PASSWORD);\n\t\t\t\t\t\tauthentication = BasicScheme.authenticate(creds,\n\t\t\t\t\t\t\t\t\"US-ASCII\", false).toString();\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (CouchDBUtil.checkDB(getCouchDB_ip(), couchDB_NAME,\n\t\t\t\t\t\t\t\tauthentication)) {\n\n\t\t\t\t\t\t\tdatabaseExist = true;\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tCouchDBUtil.createDb(getCouchDB_ip(), couchDB_NAME,\n\t\t\t\t\t\t\t\t\tauthentication);\n\t\t\t\t\t\t\tdatabaseExist = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t\tlogger.info(\"Impossible to access CouchDB\", e);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private boolean checkDataBase(){\n\n SQLiteDatabase checkDB = null;\n\n try{\n String myPath = DB_PATH + DB_NAME;\n checkDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY);\n\n }catch(SQLiteException e){\n\n //database does't exist yet.\n\n }\n\n if(checkDB != null){\n\n checkDB.close();\n\n }\n\n return checkDB != null ? true : false;\n }", "private boolean checkDataBase(){\n\n SQLiteDatabase checkDB = null;\n\n try{\n String myPath = DB_PATH + DB_NAME;\n checkDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY);\n\n }catch(SQLiteException e){\n\n //database does't exist yet.\n\n }\n\n if(checkDB != null){\n\n checkDB.close();\n\n }\n\n return checkDB != null ? true : false;\n }", "private boolean checkUser(String user_name, String passwordd) throws SQLException {\n boolean sucss = false;\n DBConnection db = new DBConnection();\n Connection connection = db.getConnection();\n String sql = \"SELECT * FROM USER WHERE NAME = ? AND PASSWORD = ?\";\n try (PreparedStatement preparedStatement = connection.prepareStatement(sql);) {\n preparedStatement.setString(1, user_name);\n preparedStatement.setString(2, passwordd);\n ResultSet rs = preparedStatement.executeQuery();\n if (rs.next()) {\n System.out.println(rs.getString(\"name\"));\n System.out.println(rs.getString(\"password\"));\n sucss = true;\n }\n } catch (SQLException e) {\n System.out.println(\"User Is Not Insert\" + e);\n } finally {\n connection.close();\n return sucss;\n }\n }", "public void setCheckDatabaseExistence(boolean checkDatabaseExistence) {\n this.checkDatabaseExistence = checkDatabaseExistence;\n }", "private boolean checkDataBase() {\n\n SQLiteDatabase checkDB = null;\n\n try {\n String myPath = DB_PATH + DATABASE_NAME;\n checkDB = SQLiteDatabase.openDatabase(myPath, null,\n SQLiteDatabase.OPEN_READONLY);\n\n } catch (SQLiteException e) {\n\n // database doesn't exist yet.\n Log.d(\"DATABASE\",\"Database doesn't exist yet.\");\n }\n\n if (checkDB != null) {\n checkDB.close();\n }\n return checkDB != null;\n }", "public boolean hasAccount(){\r\n\t\treturn (associatedAccount != null);\r\n\t}", "private boolean checkDataBase() {\r\n SQLiteDatabase checkDB = null;\r\n try {\r\n checkDB = SQLiteDatabase.openDatabase(\"/data/data/me.shubhamgoswami.adharshilasurvey/adharShila.db\", null,\r\n SQLiteDatabase.OPEN_READONLY);\r\n checkDB.close();\r\n } catch (SQLiteException e) {\r\n // database doesn't exist yet.\r\n }\r\n return checkDB != null;\r\n }", "private void checkDataBase() {\n final Config dbConfig = config.getConfig(\"db\");\n\n checkArgument(!isNullOrEmpty(dbConfig.getString(\"driver\")), \"db.driver is not set!\");\n checkArgument(!isNullOrEmpty(dbConfig.getString(\"url\")), \"db.url is not set!\");\n\n dbConfig.getString(\"user\");\n dbConfig.getString(\"password\");\n dbConfig.getObject(\"additional\");\n }", "public boolean Exist(int usertype,long id,String password);", "public abstract boolean isDatabaseSet();", "private boolean checkDataBase()\r\n {\r\n SQLiteDatabase checkDB = null;\r\n try {\r\n String myPath = DB_PATH;\r\n checkDB\r\n = SQLiteDatabase\r\n .openDatabase(\r\n myPath, null,\r\n SQLiteDatabase.OPEN_READONLY);\r\n }\r\n catch (SQLiteException e) {\r\n\r\n // database doesn't exist yet.\r\n Log.e(\"message\", \"\" + e);\r\n }\r\n if (checkDB != null) {\r\n checkDB.close();\r\n }\r\n return checkDB != null;\r\n }", "public boolean hasAccountPassword() {\n return fieldSetFlags()[4];\n }", "public synchronized boolean existsDatabase() throws IOException {\n return existsDatabase(database.get(), null);\n }", "public boolean checkAccountPermission() {\n return EasyPermissions.hasPermissions(context, Manifest.permission.GET_ACCOUNTS);\n }", "private boolean checkDataBase() {\n SQLiteDatabase tempDB = null;\n try {\n String myPath = DB_PATH + DB_NAME;\n tempDB = SQLiteDatabase.openDatabase(myPath, null,\n SQLiteDatabase.OPEN_READWRITE);\n } catch (SQLiteException e) {\n Log.e(\"tle99 - check\", e.getMessage());\n }\n if (tempDB != null)\n tempDB.close();\n return tempDB != null ? true : false;\n }", "private static boolean doesUserExist () {\n String sqlRetrieveAisId = \"SELECT ais_id FROM users WHERE user_id=?\";\n \n boolean valid = false;\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveAisId)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n valid = rs.next() != false;\n } catch (SQLException se) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return valid;\n }", "@Test\n\tpublic void testLoginAdminAccExist() {\n\t\tAccount acc1 = new Account(00000, \"ADMIN\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"ADMIN\", 00000, 0, \"A\"));\n\t\ttransactions.add(1, new Transaction(00, \"ADMIN\", 00000, 0, \"A\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Session Started Admin\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to find that admin account\", testResult);\n\t}", "private boolean existsUser(Connection con) throws SQLException {\n\t\tlog.entry();\n\t\tboolean userExists = false;\n\t\tPreparedStatement ps = con.prepareStatement(\"SELECT COUNT(*) FROM Users \"\n\t\t + \"WHERE `id`=?;\");\n\t\ttry {\n\t\t\tps.setInt(1, id);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.first() && rs.getInt(1) > 0) {\n\t\t\t\tuserExists = true;\n\t\t\t}\n\t\t} finally {\n\t\t\tcloseStatement(ps);\n\t\t}\n\t\tthrowSqlException();\n\t\tlog.exit();\n\t\treturn userExists;\n\t}", "public boolean hasDatabase() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "public boolean exists() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry { return myData.record.exists(background.getClient()); }\n\t\tcatch (LDBException e) { setStatus(e); }\n\t\treturn false;\n\t}", "boolean isAccountNonExpired();", "boolean isAccountNonExpired();", "public boolean checkDataBase(){\n \n \tSQLiteDatabase checkDB = null;\n \tLog.d(\"We're Here\", \"DatabaseHelper.checkDataBase()\");\n \ttry{\n \t\tString myPath = DB_PATH + DB_NAME;\n \t\tcheckDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY);\n \n \t}catch(SQLiteException e){\n \n \t\tLog.d(\"We're Here\", \"Database doesn't exist\");\n \t\tLog.d(\"Database Error\", e.toString());\n \n \t}\n \tcatch (Exception e) { \n \t\tLog.d(\"Exception in checkDatabase\", e.toString());\n \t\t\n \t}\n \n \tif(checkDB != null){\n \n \t\tcheckDB.close();\n \n \t}\n \n \treturn checkDB != null;\n }", "public static boolean accountExists(Context context, String accountType) {\n return true;\n }", "public boolean getAccountAdmin(String username, String password) throws SQLException {\r\n rs = this.connectionAdmin(\"SELECT * from USER\");\r\n if (rs != null) {\r\n while (rs.next()) {\r\n if (rs.getString(\"username\").equals(username) && rs.getString(\"password\").equals(password)) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }", "public boolean bankExists() {\n\t\tResultSet r = super.query(\"SELECT * FROM \" + C.TABLE_BANK + \" WHERE \"\n\t\t\t\t+ C.COLUMN_ID + \"=\" + this.getID() + \" AND \"\n\t\t\t\t+ C.COLUMN_BSB_NUMBER + \"=\" + this.getBSB()+ \" AND \"\n\t\t\t\t+ C.COLUMN_ACCOUNT_NUMBER + \"=\" + this.getAccountNumber()+ \" LIMIT 1\");\n\t\tif (r == null)\n\t\t\treturn false;\n\t\ttry {\n\t\t\tsuper.setRecentError(null);\n\t\t\treturn r.first();\n\t\t} catch (SQLException e) {\n\t\t\tsuper.setRecentError(e);\n\t\t\treturn false;\n\t\t}\n\t}", "void check(Permission permission, DBObject dBObject) throws T2DBException;", "private boolean checkDatabase() {\n SQLiteDatabase checkDB = null;\n\n try {\n String dbPath = DB_PATH + DB_NAME;\n checkDB = SQLiteDatabase.openDatabase(\n dbPath, \n null,\n SQLiteDatabase.NO_LOCALIZED_COLLATORS // Open without support for localized collators. setLocate() will do nothing.\n );\n } catch (SQLiteException e) {\n // Do nothing - database doesn't exist yet\n }\n\n if (checkDB != null) {\n checkDB.close();\n }\n\n return checkDB != null ? true : false;\n }", "public int existLogin(Usuario login){\r\n\t \t\r\n\t int result=0;\r\n\t \ttry\r\n\t \t{\r\n\t \t\tConnection connection=DBConnectionManager.getConnection();\r\n\t\t\t\tLoginBD LoginBD= new LoginBD(connection);\r\n\t\t\t\tresult= LoginBD.existLogin(login);\r\n\t\t\t\tconnection.close();\r\n\t \t}\r\n\t \tcatch (SQLException e)\r\n\t \t{\r\n\t \t\te.printStackTrace();\r\n\t \t}\r\n\t \treturn result;\r\n\t}", "public boolean hasDatabase() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "boolean databaseExists(String databaseName) throws CatalogException;", "boolean isSetAccountNumber();", "public static boolean DBExists() {\n File edb = new File(path + \"/turtlenet.db.aes\");\n File db = new File(path + \"/turtlenet.db\");\n return db.exists() || edb.exists();\n }", "public boolean checkDataBase() {\n SQLiteDatabase sQLiteDatabase;\n try {\n SQLiteDatabase sQLiteDatabase2;\n sQLiteDatabase = sQLiteDatabase2 = SQLiteDatabase.openDatabase((String)(DB_PATH + DB_NAME), (SQLiteDatabase.CursorFactory)null, (int)0);\n }\n catch (SQLiteException var1_4) {\n return false;\n }\n if (sQLiteDatabase != null) {\n sQLiteDatabase.close();\n }\n boolean bl = false;\n if (sQLiteDatabase == null) return bl;\n return true;\n }", "public boolean isAdminExists(String pIdentifiant, String pMotDePasse);", "public boolean isExist(int conId) throws AppException;", "private void checkUserExist() {\n\n final DatabaseReference mUseRef;\n\n\n if (mAuth.getCurrentUser() != null) {\n final String valid_user_id = mAuth.getCurrentUser().getUid();\n mDatabase.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.hasChild(valid_user_id)) {\n Intent singinIntent = new Intent(JoinActivity.this, MainActivity.class);\n singinIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(singinIntent);\n finish();\n } else {\n Toast.makeText(JoinActivity.this, \"You have to first setup your account!\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }\n }", "public boolean checkIfThisGAZRecordIsInTheDB()\n\t{\n\t\treturn checkIfThisRecordIsInTheDB(getWhereConditionBaseOnIdRecord());\n\t}", "public static boolean isAccountActive(String email){\n Connection connect = null;\n ResultSet set = null;\n String isAccountActiveSQL = \"SELECT active FROM users WHERE email = ?\";\n\n // Check If Account is Active Try Block:\n try {\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare Statement:\n PreparedStatement statement = connect.prepareStatement(isAccountActiveSQL);\n // Set Parameters:\n statement.setString(1, email);\n // Execute Statement:\n set = statement.executeQuery();\n // Check For Result Set:\n while (set.next()){\n // Check Value:\n if(set.getInt(\"active\") == 1) {\n return true;\n }\n // End Of Check Value.\n }\n // End Of Check For Result Set.\n\n }catch(SQLException e){\n e.printStackTrace();\n }\n // End Of Check If Account is Active Try Block:\n\n return false;\n }", "private boolean checkDataBase() {\n SQLiteDatabase checkDb = null;\n try {\n String path = DB_PATH + DB_NAME;\n checkDb = SQLiteDatabase.openDatabase(path, null,\n SQLiteDatabase.OPEN_READONLY);\n } catch (SQLException e) {\n Log.e(this.getClass().toString(), \"Error while checking db\");\n }\n //Android doesn’t like resource leaks, everything should \n // be closed\n if (checkDb != null) {\n checkDb.close();\n }\n return checkDb != null;\n }", "public boolean existRunway(Runway runway, String spaceport) throws SQLException {\r\n connection();\r\n String select = \"select * from runway where number='\" + runway.getNumber() + \"' and spaceport = '\"+spaceport+\"'\";\r\n Statement st = conexion.createStatement();\r\n ResultSet rs = st.executeQuery(select);\r\n boolean existe = false;\r\n if (rs.next()) {\r\n existe = true;\r\n }\r\n rs.close();\r\n st.close();\r\n disconnect();\r\n return existe;\r\n }", "Boolean isAccountLocked(String username);", "public synchronized boolean existsDatabase(final String storageType) throws IOException {\n checkConnected();\n return existsDatabase(getStorageName(), storageType);\n }", "boolean hasLedger();" ]
[ "0.6509106", "0.6509106", "0.6509106", "0.64130276", "0.62611765", "0.6188653", "0.6186981", "0.6186526", "0.6167221", "0.612622", "0.6090774", "0.6031201", "0.60295635", "0.59671414", "0.5936415", "0.5909805", "0.5906986", "0.5902564", "0.5902564", "0.5869993", "0.5851346", "0.5843924", "0.58137053", "0.5796338", "0.5787009", "0.57577837", "0.5751605", "0.5748155", "0.57442725", "0.5733115", "0.5729054", "0.57224256", "0.5717627", "0.57098556", "0.57098556", "0.57098556", "0.57098556", "0.57098556", "0.57098556", "0.57098556", "0.5701705", "0.5701536", "0.5695114", "0.56842804", "0.56609225", "0.5656217", "0.5649482", "0.5648227", "0.5638335", "0.56248754", "0.5622785", "0.55933577", "0.5592592", "0.5588009", "0.5585413", "0.55662566", "0.55615586", "0.55615586", "0.5539891", "0.5531287", "0.55163944", "0.5514349", "0.5498549", "0.5494015", "0.5493488", "0.5487845", "0.5487724", "0.54769754", "0.5474885", "0.54692376", "0.54678893", "0.54655176", "0.5464377", "0.5452421", "0.5441835", "0.54415166", "0.54414564", "0.54414564", "0.5440507", "0.54391235", "0.54384845", "0.54357487", "0.5428732", "0.54223675", "0.54182976", "0.5414037", "0.5389675", "0.5386299", "0.5367172", "0.5356017", "0.5354911", "0.5350157", "0.53498554", "0.534895", "0.5348439", "0.5340601", "0.5333546", "0.5332114", "0.5331099", "0.5329813" ]
0.62596834
5
Returns operations executed after a given id
public List<BankOperation> getOperationsAfter(int n_id){ List<BankOperation> op_list = new ArrayList<>(); try ( Statement s = rawDataSource.getConnection().createStatement(); ResultSet res = s.executeQuery( "SELECT * FROM APP.OPERATIONS where OP_ID >= "+n_id+" ORDER BY OP_ID DESC")) { while (res.next()) { switch(res.getInt("OP_TYPE")){ //MOVEMENT case 1: op_list.add(new BankOperation.Movement(res.getInt("OP_ID"), res.getInt("MV_AMOUNT"), res.getInt("FROM_CURRENT_BALANCE"), res.getString("FROM_ACCOUNT_ID"))); break; //TRANSFER case 2: op_list.add(new BankOperation.Transfer(res.getInt("OP_ID"), res.getInt("MV_AMOUNT"), res.getString("FROM_ACCOUNT_ID"), res.getString("TO_ACCOUNT_ID"), res.getInt("FROM_CURRENT_BALANCE"), res.getInt("TO_CURRENT_BALANCE"))); break; //CREATE case 3: op_list.add(new BankOperation.Create(res.getInt("OP_ID"), res.getString("FROM_ACCOUNT_ID"))); break; } } } catch (SQLException e) { e.printStackTrace(); } return op_list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void applyOperationId(Operation operation, Method method);", "public Operacion obtenerOperacion(int id){\n return historialOperaciones.get(id);\n }", "Boolean removeOperation(Long id);", "public Integer getAfterId() {\r\n return afterId;\r\n }", "public void postDoRetrieve(ID id)\n {\n }", "public void commissionRunway(String id);", "public Future<Void> wait(Integer id) throws DynamicCallException, ExecutionException{\n return call(\"wait\", id);\n }", "protected static void saveLastEntityIdProcessed(long id)\n\t{\n\t}", "public interface Operation {\n\n /**\n * Obtain the operation id.\n * \n * @return The operation id <code>String</code>.\n */\n public String getId();\n}", "public void after(int seqId) {\n totalRunningRPCCounter.decrementAndGet();\n }", "@Override\r\n\tpublic ExecuteTask getById(int id) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_id = ?\";\r\n\t\treturn get(sql,id);\r\n\t}", "public void wait(Integer id) throws DynamicCallException, ExecutionException{\n call(\"wait\", id).get();\n }", "public static Action action(String id) {\n/* 205 */ return actions.get(id);\n/* */ }", "public UUID executionId();", "public void addAfterOperation(Operation op){\n if (op == null){\n throw new IllegalArgumentException(\"op is null\");\n }\n if (after == null){\n after = new ArrayList<>();\n }\n\n this.after.add(op);\n }", "void updateLastAccessed(int id);", "Operations operations();", "public void fetchOwnEvent(long id) {\n throwable.setValue(null);\n pending.add(\n eventRepository.getOwnEvent(id)\n .subscribe(\n event::postValue, //If the task is a completable then the form is () -> {}\n throwable::postValue\n )\n );\n }", "String getCommandId();", "public interface Command {\r\n public void execute(Long id);\r\n}", "interface WithId {\n /**\n * Specifies id.\n * @param id Resource ID\n * @return the next update stage\n */\n Update withId(String id);\n }", "public ExecutedOrder getExecutedOrder(int iID){\n\t\treturn hmExecutedOrder.get(iID);\n\t}", "String getForOperationId();", "public void setAfterId(Integer afterId) {\r\n this.afterId = afterId;\r\n }", "public interface OperationService {\n\n //在每次插座开断的时候插入状态的变化\n public int insertOperation(OperationPO operationPO);\n //根据时段查看所有的变换\n public List<OperationPO> selectOperation(TimeSpanBO timeSpanBO);\n}", "public void afterExecution(final Object bapiObject) {\n }", "Operation getOperation();", "private void runLater(String table, String id, Operation r) {\n\t\tif (captureHitRatio)\n\t\t\trequestsIn.increment();\n\t\tRowInTable element = new RowInTable(table, id);\n\t\twhile(true) {\n\t\t\tStoreRequest req = new StoreRequest(element);\n\t\t\tStoreRequest tmp = writesByRows.putIfAbsent(element, req);\n\t\t\ttry {\n\t\t\t\tif (tmp == null) {\n\t\t\t\t\t// req was added ; should also be put in the delay queue\n\t\t\t\t\treq.plan();\n\t\t\t\t\tlogger.fine(\"Request planned for \" + table + ':' + id + \" on \" + System.currentTimeMillis() + \" by \" + req);\n\t\t\t\t} else {\n\t\t\t\t\t// Another thread added request for this element before us\n\t\t\t\t\treq = tmp;\n\t\t\t\t}\n\t\t\t\tr.run(req);\n\t\t\t\t// Request is planned and merged ; leaving the infinite loop\n\t\t\t\tbreak;\n\t\t\t} catch (RequestIsOutException x) {\n\t\t\t\t// We've tried to update a request that went out meanwhile\n\t\t\t}\n\t\t\t// retrying eventually\n\t\t\tThread.yield();\n\t\t}\n\t}", "void id() {}", "public interface ExecutorListener {\n\n void invokeMethod(int id, ExecutorObject object, ExecuteRunType type, User user, String uniqueMethodId, Method method);\n\n}", "String getOperation();", "String getOperation();", "public interface Operation {\n String description();\n void command();\n}", "String getExecId();", "List<Operation> findAllById(Long id);", "public String getOperation();", "public void setAfterOperations(List<Operation> after){\n\n if (after == null){\n this.after = null;\n }\n else{\n if (this.after != null){\n this.after.clear();\n }\n for (Operation op : after){\n addAfterOperation(op);\n }\n }\n }", "java.lang.String getOperationId();", "long getLastUpdate(long inId);", "static ElementMatcher.Junction<? super MethodDescription> createAfterExecuteMethodMatcher() {\n return named(\"afterExecute\")\n .and(isOverriddenFrom(ThreadPoolExecutor.class))\n .and(not(isAbstract()));\n }", "public interface ICommandTracker {\n \n /**\n * Executes the provided command and if it completes adds it to the collection\n * of executed commands being tracked\n * @param _command - Interface to the command object to execute\n * @return boolean True if command completed and was added to the \n * collection of executed commands, False otherwise.\n * @throws Exception Something went wrong.\n */\n boolean executeCommand(ICommand _command) throws Exception;\n /**\n * This method reverses the last command added to the collection of executed commands.\n * Repeated calls to this method will provide an in order reversal of executed commands.\n * Undone commands will be added to their own collection\n * @return boolean True if a command was reversed, False otherwise.\n * @throws Exception Something went wrong.\n */\n boolean undoLastCommand() throws Exception;\n /**\n * This method executes the last command added to the collection of undone commands.\n * @return boolean True if a previously undone command was re-executed, False otherwise\n * @throws Exception Something went wrong.\n */\n boolean redoLastCommand() throws Exception;\n}", "public Operation getLastOp() {\n\t\treturn ops.get(ops.size() - 1);\n\t}", "Expression getExpression(long id);", "OperationDTO findOperation(Long id);", "private OperationHolder getOperationById(final String operationId, final String urlPath,\r\n\t\t\tfinal Map<HttpMethod, Operation> operations) {\r\n\t\tOperationHolder operation = null;\r\n\t\tif (operations != null && StringUtils.isNotEmpty(operationId)) {\r\n\t\t\toperation = operations.entrySet().stream()\r\n\t\t\t\t.filter(o -> o.getValue() != null && StringUtils.equals(o.getValue().getOperationId(), operationId))\r\n\t\t\t\t.map(e -> {\r\n\t\t\t\t\tfinal OperationHolder operationHol = new OperationHolder();\r\n\t\t\t\t\toperationHol.setOperation(e.getValue());\r\n\t\t\t\t\toperationHol.setUrlPath(urlPath);\r\n\t\t\t\t\toperationHol.setHttpMethod(e.getKey().name());\r\n\t\t\t\t\treturn operationHol;\r\n\t\t\t\t}).findFirst().orElse(null);\r\n\t\t}\r\n\t\treturn operation;\r\n\t}", "AfterServiceSheet selectByPrimaryKey(Long id);", "public interface PerformOperation {\n\n\tpublic String performOperation(int i);\n}", "protected abstract void after();", "public boolean performIdentifierAction(int id, int flags);", "@Override\n\t\t\tpublic void call(int id, String result) {\n\t\t\t\tafterUpload(id, result);\n\t\t\t}", "public Operation getOperation();", "public interface ICommandIds\n{\n public static final String CMD_COPY_SPECIAL = \"org.jkiss.dbeaver.core.edit.copy.special\"; //$NON-NLS-1$\n\n public static final String CMD_OBJECT_OPEN = \"org.jkiss.dbeaver.core.object.open\"; //$NON-NLS-1$\n public static final String CMD_OBJECT_CREATE = \"org.jkiss.dbeaver.core.object.create\"; //$NON-NLS-1$\n public static final String CMD_OBJECT_DELETE = \"org.jkiss.dbeaver.core.object.delete\"; //$NON-NLS-1$\n\n public static final String CMD_EXECUTE_STATEMENT = \"org.jkiss.dbeaver.ui.editors.sql.run.statement\"; //$NON-NLS-1$\n public static final String CMD_EXECUTE_STATEMENT_NEW = \"org.jkiss.dbeaver.ui.editors.sql.run.statementNew\"; //$NON-NLS-1$\n public static final String CMD_EXECUTE_SCRIPT = \"org.jkiss.dbeaver.ui.editors.sql.run.script\"; //$NON-NLS-1$\n public static final String CMD_EXECUTE_SCRIPT_NEW = \"org.jkiss.dbeaver.ui.editors.sql.run.scriptNew\"; //$NON-NLS-1$\n\n public static final String CMD_EXPLAIN_PLAN = \"org.jkiss.dbeaver.ui.editors.sql.run.explain\"; //$NON-NLS-1$\n public static final String CMD_ANALYSE_STATEMENT = \"org.jkiss.dbeaver.ui.editors.sql.run.analyse\"; //$NON-NLS-1$\n public static final String CMD_VALIDATE_STATEMENT = \"org.jkiss.dbeaver.ui.editors.sql.run.validate\"; //$NON-NLS-1$\n public static final String CMD_OPEN_FILE = \"org.jkiss.dbeaver.ui.editors.sql.open.file\"; //$NON-NLS-1$\n public static final String CMD_SAVE_FILE = \"org.jkiss.dbeaver.ui.editors.sql.save.file\"; //$NON-NLS-1$\n public static final String CMD_TOGGLE_AUTOCOMMIT = \"org.jkiss.dbeaver.core.txn.autocommit\"; //$NON-NLS-1$\n\n public static final String CMD_CONTENT_FORMAT = \"org.jkiss.dbeaver.ui.editors.text.content.format\"; //$NON-NLS-1$\n\n public static final String GROUP_TOOLS = \"tools\";\n\n public static final String CMD_COMMIT = \"org.jkiss.dbeaver.core.commit\";\n public static final String CMD_ROLLBACK = \"org.jkiss.dbeaver.core.rollback\";\n}", "public static Collection<Action> actions(String... ids) {\n/* 216 */ List<Action> result = new ArrayList<>();\n/* 217 */ for (String id : ids) {\n/* 218 */ if (id.startsWith(\"---\")) result.add(ActionUtils.ACTION_SEPARATOR); \n/* 219 */ Action action = action(id);\n/* 220 */ if (action != null) result.add(action); \n/* */ } \n/* 222 */ return result;\n/* */ }", "protected void StoreTPS(int id)\n\t{\n\t\t/*\n\t\t * called every second to store transactions count in that second and is fed to the \n\t\t * plotting framework later\n\t\t */\n\t\tTPSmethod1.put(id,Method1.invocationCounter);\n\t\tTPSmethod2.put(id,Method2.invocationCounter);\n\t\tTPSmethod3.put(id,Method3.invocationCounter);\n\t\tTPSmethod4.put(id,Method4.invocationCounter);\n\t\tTPSmethod5.put(id,Method5.invocationCounter);\n\t\tTPSmethod6.put(id,Method6.invocationCounter);\n\t}", "public void End(int id);", "OperationIdT getOperationId();", "void id(int id) {}", "public void addAfterLastOperation(Operation op){\n if (op == null){\n throw new IllegalArgumentException(\"op is null\");\n }\n if (afterLast == null){\n afterLast = new ArrayList<>();\n }\n\n this.afterLast.add(op);\n }", "void queryDone(String queryId);", "@Override\n\tpublic JSONObject findZzblPlantTeethOperationById(String id) throws Exception {\n\t\treturn opertaionDao.findZzblPlantTeethOperationById(id);\n\t}", "public Integer getAfterResult() {\r\n return afterResult;\r\n }", "MissionExecuteHistoryAwardPO selectByPrimaryKey(Long id);", "public Result all(String id);", "public interface IOperation {\n /*\n * OperationTypeId:\n * 1 - DEPOSIT\n * 2 - WITHDRAW\n * 3 - TRANSFER\n * 4 - CREATE_TERM_DEPOSIT\n * 5 - END_TERM_DEPOSIT\n * 6 - CREATE_CREDIT\n * 7 - REPAY_CREDIT\n * 8 - INTEREST_CAPITALISATION\n * 9 - INTEREST_MECHANISM_CHANGE\n * 10 - CREATE_DEBIT\n */\n Integer getOperationTypeId();\n LocalDate getExecutionDate();\n String getDescription();\n boolean getWasExecuted();\n\n boolean executeOperation();\n\n void accept(IOperationVisitor visitor);\n}", "void finishOrder(int orderId);", "public void addDoneTarget(int id, Integer myTarget)\n\t\t{\n\t\t\ttargetsDone.add(myTarget);\n\t\t}", "Optional<EtatOperation> findOne(Long id);", "public static void done(String id)\n {\n if(measurements.containsKey(id))\n {\n String timeDifference = \"\";\n\n for(int i = 0; i < logPatterns.get(0).getLength() + logPatterns.get(1).getLength() + 1; i++)\n {\n timeDifference = timeDifference.concat(\" \");\n }\n\n timeDifference = timeDifference + logPointer + \" Done '\" + measurements.get(id).getMessage() + \"' in '\" + (System.currentTimeMillis() - measurements.get(id).getTimestamp()) + \"ms'\";\n\n System.out.println(timeDifference);\n\n measurements.remove(id);\n }\n }", "public State execute(int command, State state);", "public void run(int autoId)\r\n\t{\r\n\t\tswitch(autoId)\r\n\t\t{\r\n\t\t\tcase Config.Auto.idDoNothing:\r\n\t\t\t{\r\n\t\t\t\tdoNothing();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase Config.Auto.idDriveForwardEnc:\r\n\t\t\t{\r\n\t\t\t\t//drive.setTalonMode(true);\r\n\t\t\t\tdriveForwardEnc();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase Config.Auto.idDriveForwardTimer:\r\n\t\t\t{\r\n\t\t\t\tdriveForwardTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase Config.Auto.idGetAllTotesLeftEnc:\r\n\t\t\t{\r\n\t\t\t\t//drive.setTalonMode(true);\r\n\t\t\t\tgetAllTotesLeftEnc();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase Config.Auto.idGetAllTotesCenterEnc:\r\n\t\t\t{\r\n\t\t\t\t//drive.setTalonMode(true);\r\n\t\t\t\tgetAllTotesCenterEnc();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase Config.Auto.idGetAllTotesRightEnc:\r\n\t\t\t{\r\n\t\t\t\t//drive.setTalonMode(true);\r\n\t\t\t\tgetAllTotesRightEnc();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase Config.Auto.idGetAllTotesLeftTimer:\r\n\t\t\t{\r\n\t\t\t\tgetAllTotesLeftTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase Config.Auto.idGetAllTotesCenterTimer:\r\n\t\t\t{\r\n\t\t\t\tgetAllTotesCenterTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase Config.Auto.idGetAllTotesRightTimer:\r\n\t\t\t{\r\n\t\t\t\tgetAllTotesRightTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase Config.Auto.idGetOneToteTimer:\r\n\t\t\t{\r\n\t\t\t\tgetOneToteTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static native Element insertAfter(String id, DomConfig config)/*-{\r\n\t\tvar configJS = config.@com.ait.toolkit.sencha.shared.client.dom.DomConfig::getJsObject()();\r\n\t\treturn $wnd.Ext.DomHelper.insertAfter(id, configJS);\r\n\t}-*/;", "public Object execute( ObjectReference target, Object param1, Object param2, Object param3, Object param4, Object param5 ) {\n // list afterMethod( Object targetObject, Class introducingClass, String methodName, List ParameterList, ResultHolder returnValue )\n //\n target.parentInvoke( BeforeAfterWithPMC.classObject, BeforeAfter.classObject, \"afterMethod\", param1, param2, param3, param4, param5 );;\n return null;\n }", "private void completeAbandonedJob(Integer id) {\r\n\t\tabandonedJobs++;\r\n\t\tBatchJobInstance batchJobInstance = batchJobInstanceManager.findById(id);\r\n\t\tif (batchJobInstance != null) {\r\n\t\t\tDate rightNow = new Date();\r\n\t\t\tbatchJobInstance.setStatus(BatchJobService.STATUS_ABANDONED);\r\n\t\t\tBatchJobEvent batchJobEvent = new BatchJobEvent();\r\n\t\t\tbatchJobEvent.setEvent(BatchJobService.STATUS_ABANDONED);\r\n\t\t\tbatchJobEvent.setDescription(\"Job marked as abandoned by PeriodicBatchJobReview\");\r\n\t\t\tbatchJobEvent.setCreationDate(rightNow);\r\n\t\t\tbatchJobEvent.setCreatedBy(\"PeriodicBatchJobReview\");\r\n\t\t\tbatchJobEvent.setLastUpdate(rightNow);\r\n\t\t\tbatchJobEvent.setLastUpdateBy(\"PeriodicBatchJobReview\");\r\n\t\t\tbatchJobInstance.addEvent(batchJobEvent);\r\n\t\t\tbatchJobInstance.setLastUpdate(rightNow);\r\n\t\t\tbatchJobInstance.setLastUpdateBy(\"PeriodicBatchJobReview\");\r\n\t\t\tbatchJobInstanceManager.save(batchJobInstance);\r\n\t\t\tupdatedJobs++;\r\n\t\t} else {\r\n\t\t\tlog.error(\"Unable to retrieve instance \" + id + \"; job will not be updated.\");\r\n\t\t\tfailedUpdates++;\r\n\t\t}\r\n\t}", "public Future<Void> stop(Integer id) throws DynamicCallException, ExecutionException{\n return call(\"stop\", id);\n }", "protected abstract void doAfter(T result);", "@Override\n\tpublic void writeCommand(final IPrologTermOutput pto) {\n\t\tpto.openTerm(\"execute_custom_operations\").printAtomOrNumber(stateId)\n\t\t\t\t.printAtom(name);\n\t\tfinal ASTProlog prolog = new ASTProlog(pto, null);\n\t\tevalElement.getAst().apply(prolog);\n\t\tpto.printNumber(nrOfSolutions);\n\t\tpto.printVariable(NEW_STATE_ID_VARIABLE);\n\t\tpto.printVariable(\"Errors\").closeTerm();\n\t}", "public void setOperationID(String operaionId) {\n\t\tthis.operationId = operaionId;\n\t}", "@GetMapping(\"/operations/{id}\")\n @Timed\n public ResponseEntity<OperationDTO> getOperation(@PathVariable Long id) {\n log.debug(\"REST request to get Operation : {}\", id);\n OperationDTO operationDTO = operationService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(operationDTO));\n }", "@Override\n public void afterBulk(long executionId,\n BulkRequest request,\n BulkResponse response) {\n }", "public Long getOpId() {\n return opId;\n }", "public Long getOpId() {\n return opId;\n }", "public Long getOpId() {\n return opId;\n }", "public Long getOpId() {\n return opId;\n }", "WrappedAnswer execute(WrappedCommand aWrappedCommand);", "public Integer getOperationId() {\n return operationId;\n }", "@GetMapping(\"/data-set-operations/{id}\")\n @Timed\n public ResponseEntity<DataSetOperationDTO> getDataSetOperation(@PathVariable Long id) {\n log.debug(\"REST request to get DataSetOperation : {}\", id);\n DataSetOperation dataSetOperation = dataSetOperationRepository.findOne(id);\n DataSetOperationDTO dataSetOperationDTO = dataSetOperationMapper.toDto(dataSetOperation);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(dataSetOperationDTO));\n }", "public interface Command {\n \n /**\n * Méthode utilisée pour réaliser l'action voulue.\n */\n public void execute();\n \n /**\n * Méthode utilisée pour annuler la dernière action.\n */\n public void undo();\n}", "void applyDescription(Operation operation, Method method);", "@Override\n\t\t\tpublic void commandOutput(int id, String line) {\n\t\t\t\tRootTools.log(\"Command\", \"ID: \" + id + \", \" + line);\n\t\t\t\tMessage message = callback\n\t\t\t\t\t\t.obtainMessage(Constants.OUTPUT_UPDATED);\n\t\t\t\tmessage.obj = line;\n\t\t\t\tcallback.sendMessage(message);\n\n\t\t\t}", "CommandResult execute();", "public static Command getToolActivator(int id, JSONObject obj, Player player, GameData gameData, String cmd) {\n try {\n String path = Parameters.TOOL_ACTIVATOR_PATH;\n String content = new String(Files.readAllBytes(Paths.get(path)));\n JSONObject basicObj = (JSONObject) new JSONParser().parse(content);\n String regExp = basicObj.get(JSONTag.REGEXP).toString() + id;\n boolean undoable = parseBoolean(obj.get(JSONTag.UNDOABLE).toString());\n ConcreteCommand activator = new ConcreteCommand(regExp, undoable, player, gameData, cmd);\n JSONArray conditionsSER = (JSONArray) basicObj.get(JSONTag.CONDITIONS);\n for (Object o : conditionsSER)\n activator.addCondition(ConditionFactory.getCondition((JSONObject) o));\n conditionsSER = (JSONArray) obj.get(JSONTag.CONDITIONS);\n for (Object o : conditionsSER)\n activator.addCondition(ConditionFactory.getCondition((JSONObject) o));\n JSONArray instructionSER = (JSONArray) basicObj.get(JSONTag.INSTRUCTIONS);\n for (Object o : instructionSER)\n activator.addInstruction(InstructionFactory.getInstruction((JSONObject) o));\n instructionSER = (JSONArray) obj.get(JSONTag.INSTRUCTIONS);\n for (Object o : instructionSER)\n activator.addInstruction(InstructionFactory.getInstruction((JSONObject) o));\n return activator;\n } catch (IOException e) {\n throw new IllegalArgumentException(BROKEN_PATH);\n } catch (ParseException e) {\n throw new IllegalArgumentException(BAD_JSON);\n }\n }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "default void afterInvocation() {\n afterInvocation(false);\n }", "@Override\n\tpublic void afterExecuteTask(Task t,Map context) {\n\t\tlog.info(\"Task Id:\"+t.getTaskId()+\"--Task Name:\"+t.getTaskName()+\"--Running result:\"+context);\n\t}", "public interface IdInvoker<K, T> {\r\n \r\n /**\r\n * to get id/generate hash code from object\r\n * \r\n * @param idProperty\r\n * @param methods\r\n * @param object\r\n * @return\r\n */\r\n K invoke(Map<String, Method> methods, T object);\r\n}" ]
[ "0.5825039", "0.54449785", "0.5279727", "0.5272659", "0.52337617", "0.52146333", "0.519479", "0.5189377", "0.51658946", "0.5144063", "0.512868", "0.5085504", "0.50074124", "0.4999805", "0.49687144", "0.4943134", "0.49257", "0.49031237", "0.48956892", "0.487569", "0.485336", "0.48492238", "0.48310962", "0.4823809", "0.48230636", "0.4805462", "0.47978488", "0.47971353", "0.4776891", "0.47557986", "0.47455794", "0.47455794", "0.4735838", "0.47053832", "0.46957108", "0.4691477", "0.469127", "0.468806", "0.46870202", "0.46678546", "0.46661225", "0.4664109", "0.46631867", "0.465544", "0.46528596", "0.46449912", "0.46434635", "0.4641569", "0.4639692", "0.463866", "0.46381766", "0.46331733", "0.46245304", "0.46199933", "0.46124977", "0.4607878", "0.45880204", "0.45765582", "0.457257", "0.4569072", "0.45668", "0.45654237", "0.4551837", "0.45326737", "0.45319936", "0.45281118", "0.45271054", "0.45269328", "0.45268217", "0.4522887", "0.45199013", "0.4519305", "0.45179886", "0.45168155", "0.45132732", "0.4512968", "0.4512339", "0.45042312", "0.4497698", "0.44889516", "0.44889516", "0.44889516", "0.44889516", "0.44865042", "0.4480026", "0.44762138", "0.44693184", "0.44632927", "0.44623846", "0.44589496", "0.44562677", "0.44529477", "0.44529477", "0.44529477", "0.44529477", "0.44529477", "0.44529477", "0.44521737", "0.4450954", "0.44496357" ]
0.55090576
1
This is one black box test that corresponds to scenario outline in the Server test file. This executes the API and the protocol code is run against the Server test stub An application layer would replace this and place similar calls
public static void main(String[] args) { String host; String menuSelection; InputStreamReader input = new InputStreamReader(System.in) ; BufferedReader inputBuff = new BufferedReader(input) ; //check for host and throw error if not provided if(args.length!=1) { System.out.println("Application error: command line arguement missing\n Usage: \n " + "java client <IPAddress> or \n java client <hostname>"); return; } //System.out.println("arg[0] "+args[0]); host = args[0]; System.out.println("client starting"); ctp = new CTP(host); while(true) { DisplayMainMenu(); try { menuSelection = inputBuff.readLine(); if(menuSelection.equals("1")) SendMessage(); else if(menuSelection.equals("2")) ReadMessage(); else if(menuSelection.equals("3")) RegressionTest(); System.out.println("Press return key to continue"); menuSelection = inputBuff.readLine(); //roll screen for(int i=0;i<6;i++) System.out.print("\n"); } catch (IOException err) { System.out.println("Error reading line"); } }//end while loop }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IMember getServerStub();", "@Test\n public void placeShipsTest()throws GameException, StatusException, IOException,InterruptedException{\n SVToReadTester aliceGameEngineTester = new SVToReadTester();\n //real protocol engine on alice´s side\n SVProtocolEngine aliceSVProtocolEngine = new SVProtocolEngine(aliceGameEngineTester);\n\n //protocol engine\n ProtocolEngine aliceProtocolEngine = aliceSVProtocolEngine;\n SchiffeVersenken aliceGameEngineSide = aliceSVProtocolEngine;\n\n //bobs game engine Tester\n SVToReadTester bobGameEngineTester = new SVToReadTester();\n ProtocolEngine bobProtocolEngine = new SVProtocolEngine(bobGameEngineTester);\n\n // Setup\n int port = this.getPortNumber();\n // this stream plays TCP server role during connection establishment\n TCPStream aliceSide = new TCPStream(port, true, \"aliceSide\");\n // this stream plays TCP client role during connection establishment\n TCPStream bobSide = new TCPStream(port, false, \"bobSide\");\n // start both stream\n aliceSide.start(); bobSide.start();\n // wait until TCP connection is established\n aliceSide.waitForConnection(); bobSide.waitForConnection();\n\n // launch\n aliceProtocolEngine.handleConnection(aliceSide.getInputStream(), aliceSide.getOutputStream());\n bobProtocolEngine.handleConnection(bobSide.getInputStream(), bobSide.getOutputStream());\n\n Thread.sleep(1000);\n\n // run test scenario // todo\n ArrayList<BattleshipsBoardPosition> positions = aliceSVProtocolEngine.placeShips(ALICE, buildPositions(SHIPPOS1));\n ArrayList<BattleshipsBoardPosition> positions1 = aliceSVProtocolEngine.placeShips(BOB, buildPositions(SHIPPOS1));\n BattleshipsBoardPosition testPos = new BattleshipsBoardPosition(\"A\", 0);\n Assert.assertEquals(\"F\", aliceGameEngineSide.attackPos(BOB, testPos));\n\n}", "public void run() throws Exception {\n ServerEndpoint se = getServerEndpoint();\n TestService service = new TestServiceImpl();\n int redirectPort = getPort() + 1;\n Redirector rd = new Redirector(getHost(),getPort(),redirectPort);\n ((TestServerEndpoint) se).redirect(redirectPort);\n Thread t = new Thread(rd);\n t.start();\n BasicJeriExporter exporter = new BasicJeriExporter(se,\n new BasicILFactory());\n TestService stub = (TestService) exporter.export(service);\n //Connect to the mux server\n Socket s = new Socket(getHost(),getPort());\n InputStream is = s.getInputStream();\n OutputStream os = s.getOutputStream();\n //Send client connection header\n ClientConnectionHeader cHeader = new ClientConnectionHeader();\n cHeader.send(os);\n //Receive ServerConnection header and verify format\n ServerConnectionHeader sHeader = new ServerConnectionHeader();\n try {\n sHeader.receive(is,getTimeout());\n } catch (ProtocolException e) {\n e.printStackTrace();\n throw new TestException(e.getMessage(),e);\n }\n //Make a remote call that returns something\n stub.doSomething();\n exporter.unexport(true);\n rd.stop();\n //Extract and analyze the messages sent by the mux server\n try {\n analyzeServerDataBytes(rd.getServerConversation());\n } catch (ProtocolException e) {\n e.printStackTrace();\n throw new TestException(e.getMessage(),e);\n }\n //Ping the server\n PingMessage pm = new PingMessage().setCookie((short)0x5544);\n pm.send(os);\n //Receive a ping ack from server and verify that the correct cookie\n //is included\n se = getServerEndpoint();\n service = new TestServiceImpl();\n exporter = new BasicJeriExporter(se,\n new BasicILFactory());\n stub = (TestService) exporter.export(service);\n //Connect to the mux server\n s = new Socket(getHost(),getPort());\n is = s.getInputStream();\n os = s.getOutputStream();\n PingAckMessage pam = new PingAckMessage().setCookie((short)0x5544);\n try {\n pam.receive(is,getTimeout());\n } catch (ProtocolException e) {\n e.printStackTrace();\n throw new TestException(e.getMessage(),e);\n }\n }", "@Test\n public void serverStarts() {\n }", "public TestServerApi()\r\n\t{\r\n\t\t\r\n\t}", "@Test\n public void testClient() {\n try {\n MockWebServer server = new MockWebServer();\n server.enqueue(new MockResponse().setBody(\"hello, world!\"));\n server.start();\n HttpUrl baseUrl = server.url(\"\");\n ConnectionOptions opt = new ConnectionOptions(\"apikey\");\n opt.setHost(baseUrl.toString());\n ApiClientWrapper clientWrapper = new ApiClientWrapper(opt);\n TestApiService testService = clientWrapper.createService(TestApiService.class);\n assertTrue(testService.getEndpointValue().execute().isSuccessful());\n RecordedRequest request = server.takeRequest();\n assertEquals(\"/\" + AN_ENDPOINT_PATH, request.getPath());\n assertNotNull(request.getHeader(\"Authorization\"));\n assertTrue(request.getHeader(\"Authorization\").contains(\"Bearer\"));\n assertNotNull(request.getHeader(\"User-Agent\"));\n assertTrue(request.getHeader(\"User-Agent\").contains(ApiClientWrapper.UserAgent.MBED_CLOUD_SDK_IDENTIFIER));\n server.shutdown();\n } catch (IOException | InterruptedException e) {\n fail(e.getMessage());\n }\n }", "@Test\n\tpublic void test_001() {\n\t\tfinal String EXPECTED_RESPONSE = \"{\\\"hello\\\": \\\"world\\\"}\";\n\t\tJdProgramRequestParms.put(\"U$FUNZ\", new StringValue(\"URL\"));\n\t\tJdProgramRequestParms.put(\"U$METO\", new StringValue(\"HTTP\"));\n\t\tJdProgramRequestParms.put(\"U$SVARSK\", new StringValue(\"http://www.mocky.io/v2/5185415ba171ea3a00704eed\"));\n\n\t\tList<Value> responseParms = JdProgram.execute(javaSystemInterface, JdProgramRequestParms);\n\t\tassertTrue(responseParms.get(2).asString().getValue().equals(EXPECTED_RESPONSE));\n\t}", "netty.framework.messages.TestMessage.TestRequest getRequest();", "@Test\r\n\tpublic void client() {\n\t}", "@Test\r\n\tpublic void testB() {\r\n\t\t\r\n\t\tObjectHandshake h = new ObjectHandshake();\r\n\t\th.setUuid( UuidTool.getOne() );\r\n\t\t\r\n\t\tRunProtocol run = new RunProtocol(h, IHandshake.PARTNER_A, 100, 200, false, true);\r\n\t\t\r\n\t\tassertTrue(run.beginA());\r\n\t\tassertTrue(run.commitA());\r\n\t\t\r\n\t\tassertTrue(run.beginB());\r\n\t\tassertTrue(run.commitB());\r\n\t}", "@Test\n public void testLifeCycle() {\n NewServerResponse serverResponse = connection.createServer(\n \"test.ivan.api.com\", \"lenny\", \"MIRO1B\");\n Server server = serverResponse.getServer();\n // Now we have the server, lets restart it\n assertNotNull(server.getId());\n ServerInfo serverInfo = connection.restartServer(server.getId());\n\n // Should be running now.\n assertEquals(serverInfo.getState(), RunningState.RUNNING);\n assertEquals(server.getName(), \"test.ivan.api.com\");\n assertEquals(server.getImageId(), \"lenny\");\n connection.destroyServer(server.getId());\n }", "@Test\n public void testServer() throws Exception{\n ServerMain s=new ServerMain(1,3,2,\"test\",InetAddress.getLocalHost(),null);\n uut=new ChatMessageRequest(\"test\",\"test2\",\"test\",MessageTypes.PM);\n uut.serverVisit(new Client(\"test\",s).getServerVisitor());\n\n uut=new ChatMessageRequest(\"test\",\"test2\",\"test\",MessageTypes.MATCH);\n uut.serverVisit(new Client(\"test\",s).getServerVisitor());\n\n uut=new ChatMessageRequest(\"test\",\"test2\",\"test\",MessageTypes.MATCH);\n uut.serverVisit(new Client(\"testInvalid\",s).getServerVisitor());\n }", "public interface RequestServer {\n\n @GET(\"caseplatform/mobile/system-eventapp!register.action\")\n Call<StringResult> register(@Query(\"account\") String account, @Query(\"password\") String password, @Query(\"name\") String name,\n @Query(\"mobilephone\") String mobilephone, @Query(\"identityNum\") String identityNum);\n\n @GET(\"caseplatform/mobile/login-app!login.action\")\n Call<String> login(@Query(\"name\") String username, @Query(\"password\") String password);\n\n @GET(\"caseplatform/mobile/system-eventapp!setUserPassword.action\")\n Call<StringResult> setPassword(@Query(\"account\") String account,\n @Query(\"newPassword\") String newPassword,\n @Query(\"oldPassword\") String oldPassword);\n\n @GET(\"caseplatform/mobile/system-eventapp!getEventInfo.action\")\n Call<Event> getEvents(@Query(\"account\") String account, @Query(\"eventType\") String eventType);\n\n @GET(\"caseplatform/mobile/system-eventapp!reportEventInfo.action \")\n Call<EventUpload> reportEvent(\n @Query(\"account\") String account,\n @Query(\"eventType\") String eventType,\n @Query(\"address\") String address,\n @Query(\"eventX\") String eventX,\n @Query(\"eventY\") String eventY,\n @Query(\"eventMs\") String eventMs,\n @Query(\"eventMc\") String eventMc,\n @Query(\"eventId\") String eventId,\n @Query(\"eventClyj\") String eventClyj,\n @Query(\"eventImg\") String eventImg,\n @Query(\"eventVideo\") String eventVideo,\n @Query(\"eventVoice\") String eventVoice\n );\n\n @GET(\"caseplatform/mobile/system-eventapp!getUserInfo.action\")\n Call<UserInfo> getUserInfo(@Query(\"orgNo\") String orgNo, @Query(\"account\") String account);\n\n @GET(\"caseplatform/mobile/system-eventapp!getOrgDataInfo.action\")\n Call<OrgDataInfo> getOrgData(@Query(\"orgNo\") String orgNo, @Query(\"account\") String account);\n\n @Multipart\n @POST(\"caseplatform/mobile/video-upload!uplodVideo.action\")\n Call<FileUpload> uploadVideo(@Part(\"video\") File video, @Part(\"videoFileName\") String videoFileName);\n\n @POST(\"caseplatform/mobile/video-upload!uplodVideo.action\")\n Call<FileUpload> uploadVideo(@Body RequestBody requestBody);\n\n @GET(\"caseplatform/mobile/video-upload!uplodAudio.action\")\n Call<FileUpload> uploadAudio(@Query(\"audio\") File audio, @Query(\"audioFileName\") String audioFileName);\n\n @POST(\"caseplatform/mobile/video-upload!uplodAudio.action\")\n Call<FileUpload> uploadAudio(@Body RequestBody requestBody);\n\n @GET(\"caseplatform/mobile/file-upload!uplodFile.action\")\n Call<FileUpload> uploadImage(@Query(\"img\") File img, @Query(\"imgFileName\") String imgFileName);\n\n @POST(\"caseplatform/mobile/file-upload!uplodFile.action\")\n Call<FileUpload> uploadImage(@Body RequestBody requestBody);\n\n @GET(\"caseplatform/mobile/system-eventapp!jobgps.action\")\n Call<StringResult> setCoordinate(@Query(\"account\") String account,\n @Query(\"address\") String address,\n @Query(\"x\") String x,\n @Query(\"y\") String y,\n @Query(\"coordsType\") String coordsType,\n @Query(\"device_id\") String device_id\n );\n\n @GET(\"caseplatform/mobile/system-eventapp!Mbtrajectory.action\")\n Call<Task> getTask(@Query(\"account\") String account);\n\n}", "@Test\n public void testHttpApiV11() throws Exception {\n Configuration config = new Configuration(\"pri\", \"http://127.0.0.1:7001\", \"cYjKmvthKqVuFI29l5Xo+LHtkfJlIs0YnwEwXawW4NY=\");\n\n HttpApi api = new HttpApi(config);\n\n // request a withdrawal\n Result<Order> withdrawal = api.requestWithdrawal(0, \"BTC\", \"0.01\", \"mg2bfYdfii2GG13HK94jXBYPPCSWRmSiAS\", null);\n assertEquals(0, withdrawal.getCode().longValue());\n assertEquals(\"OK\", withdrawal.getMessage());\n assertEquals(Order.class, withdrawal.getObject().getClass());\n\n Result<Order> invalidWithdrawal = api.requestWithdrawal(0, \"ABC\", \"0.01\", \"mg2bfYdfii2GG13HK94jXBYPPCSWRmSiAS\", null);\n assertNotEquals(0, invalidWithdrawal.getCode().longValue());\n assertEquals(20000, invalidWithdrawal.getCode().longValue());\n assertNotEquals(\"OK\", invalidWithdrawal.getMessage());\n assertEquals(\"不支持该币种类型\", invalidWithdrawal.getMessage());\n assertNull(invalidWithdrawal.getObject());\n\n //get a new address\n Result<Address> newAddr = api.newAddress(\"TRX\");\n assertEquals(0, newAddr.getCode().longValue());\n assertEquals(\"OK\", newAddr.getMessage());\n assertEquals(Address.class, newAddr.getObject().getClass());\n\n Result<Address> invalidAddr = api.newAddress(\"ABC\");\n assertNotEquals(0, invalidAddr.getCode().longValue());\n assertEquals(20000, invalidAddr.getCode().longValue());\n assertNotEquals(\"OK\", invalidAddr.getMessage());\n assertEquals(\"不支持该币种类型\", invalidAddr.getMessage());\n assertNull(invalidAddr.getObject());\n\n // verify if an address is valid\n Result<Boolean> valid = api.verifyAddress(\"BTC\", newAddr.getObject().getAddress());\n assertEquals(0, valid.getCode().longValue());\n assertEquals(\"OK\", valid.getMessage());\n assertEquals(true, valid.getObject().booleanValue());\n\n Result<Boolean> invalidVerify = api.verifyAddress(\"BTC\", \"hdsdjasdlk\");\n assertNotEquals(0, invalidVerify.getCode().longValue());\n assertEquals(20003, invalidVerify.getCode().longValue());\n assertNotEquals(\"OK\", invalidVerify.getMessage());\n assertEquals(\"地址与类型不匹配\", invalidVerify.getMessage());\n assertNull(invalidVerify.getObject());\n\n // request an audit\n Result<String> auditId = api.requestAudit(\"BTC\", Utils.getTimestamp());\n assertEquals(0, auditId.getCode().longValue());\n assertEquals(\"OK\", auditId.getMessage());\n assertEquals(String.class, auditId.getObject().getClass());\n\n Result<String> invalidAuditId = api.requestAudit(\"ABC\", Utils.getTimestamp());\n assertNotEquals(0, invalidAuditId.getCode().longValue());\n assertEquals(20000, invalidAuditId.getCode().longValue());\n assertNotEquals(\"OK\", invalidAuditId.getMessage());\n assertEquals(\"不支持该币种类型\", invalidAuditId.getMessage());\n assertNull(invalidAuditId.getObject());\n\n // query a order\n Result<Order> order = api.queryOrder(withdrawal.getObject().getId());\n assertEquals(0, order.getCode().longValue());\n assertEquals(\"OK\", order.getMessage());\n assertEquals(Order.class, order.getObject().getClass());\n\n Result<Order> invalidOrder = api.queryOrder(\"-1\");\n assertNotEquals(0, invalidOrder.getCode().longValue());\n assertEquals(40400, invalidOrder.getCode().longValue());\n assertNotEquals(\"OK\", invalidOrder.getMessage());\n assertEquals(\"未找到指定订单号\", invalidOrder.getMessage());\n assertNull(invalidOrder.getObject());\n\n // query an audit order\n Result<Audit> audit = api.queryAudit(auditId.getObject());\n assertEquals(0, audit.getCode().longValue());\n assertEquals(\"OK\", audit.getMessage());\n assertEquals(Audit.class, audit.getObject().getClass());\n\n Result<Audit> invalidAudit = api.queryAudit(\"-fje2je2\");\n assertNotEquals(0, invalidAudit.getCode().longValue());\n assertEquals(500, invalidAudit.getCode().longValue());\n assertNotEquals(\"OK\", invalidAudit.getMessage());\n assertNull(invalidAudit.getObject());\n\n Result<Audit> invalidAudit2 = api.queryAudit(\"5c387ae65a669ac159ba7bcc\");\n assertNotEquals(0, invalidAudit2.getCode().longValue());\n assertEquals(40401, invalidAudit2.getCode().longValue());\n assertNotEquals(\"OK\", invalidAudit2.getMessage());\n assertEquals(\"未找到指定审计信息\", invalidAudit2.getMessage());\n assertNull(invalidAudit2.getObject());\n\n // query wallet balance\n Result<WalletBalance> balance = api.getBalance(\"BTC\");\n assertEquals(0, balance.getCode().longValue());\n assertEquals(\"OK\", balance.getMessage());\n assertEquals(WalletBalance.class, balance.getObject().getClass());\n\n Result<WalletBalance> invalidBalance = api.getBalance(\"ABC\");\n assertNotEquals(0, invalidBalance.getCode().longValue());\n assertEquals(20000, invalidBalance.getCode().longValue());\n assertNotEquals(\"OK\", invalidBalance.getMessage());\n assertEquals(\"不支持该币种类型\", invalidBalance.getMessage());\n assertNull(invalidBalance.getObject());\n }", "@Test\n\tpublic void TCAPIAR_02(){\n\t\taudioControl.addLog(\"ID : TCAPIAR_02 : Verify that Partner user is unable to get list of audio route\");\n\t\t/*\n\t\t\tSend a sample GET request using JssionID and CSRF token of partner user as following:\n\t\t\tGET http://devportal.dts.com/saap/api/route HTTP/1.1\n\t\t */\n\t\t// Log into DTS portal as Partner user\n\t\tloginControl.login(SUPER_PARTNER_USER, SUPER_PARTNER_PASSWORD);\n\t\t// Get user CSRF token and cookie\n\t\tcsrfToken = audioControl.getCSRFToken();\n\t\tcookie = audioControl.getCookie();\n\t\t\n\t\t// Send a sample GET request using JssionID and CSRF token of partner user as following: GET http://devportal.dts.com/saap/api/route HTTP/1.1\n\t\tJSONObject requestResult = APIUtil.sendGet(APIData.GET_AUDIO_ROUTES_LIST_URL, csrfToken, cookie);\n\t\t/*\n\t\t * {\"apiErrorCode\":\"PEMISSION_DENY\",\"message\":\"You don't have permission.\"}\n\t\t */\n\t\tAssert.assertEquals(requestResult.get(\"message\").toString(), APIData.ERROR_MESSAGE);\n\t}", "@Test\r\n\tpublic void testF() {\r\n\t\t\r\n\t\tObjectHandshake h = new ObjectHandshake();\r\n\t\th.setUuid( UuidTool.getOne() );\r\n\t\t\r\n\t\tRunProtocol run = null;\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_A, 100, 200, true, false);\r\n\t\tassertTrue(run.beginA());\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_B, 100, 200, true, false);\r\n\t\tassertTrue(run.commitA());\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_B, 100, 200, true, false);\r\n\t\tassertTrue(run.beginB());\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_A, 100, 200, true, false);\r\n\t\tassertTrue(run.commitB());\r\n\t\t\r\n\t\tassertEquals(h.getLog(), \"1-8-100-2-8-101-2-2-200-1-2-201-\");\r\n\t}", "public interface DubboTestApi {\n public String echoTest(String msg);\n}", "@Test\n public void serverPingsClient() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.sendFrame().ping(false, 2, 0);\n peer.acceptFrame();// PING\n\n peer.play();\n // play it back\n connect(peer);\n // verify the peer received what was expected\n MockHttp2Peer.InFrame ping = peer.takeFrame();\n Assert.assertEquals(0, ping.streamId);\n Assert.assertEquals(2, ping.payload1);\n Assert.assertEquals(0, ping.payload2);\n Assert.assertTrue(ping.ack);\n }", "@Test\n\tpublic void runSend(){\n\t\tstandard();\n\t}", "protected void setUp() {\n\t\tif (!Message.configure(\"wordsweeper.xsd\")) {\r\n\t\t\tfail (\"unable to configure protocol\");\r\n\t\t}\r\n\t\t\r\n\t\t// prepare client and connect to server.\r\n\t\tmodel = new Model();\r\n\t\t\r\n\t\t\r\n\t\tclient = new Application (model);\r\n\t\tclient.setVisible(true);\r\n\t\t\r\n\t\t// Create mockServer to simulate server, and install 'obvious' handler\r\n\t\t// that simply dumps to the screen the responses.\r\n\t\tmockServer = new MockServerAccess(\"localhost\");\r\n\t\t\r\n\t\t// as far as the client is concerned, it gets a real object with which\r\n\t\t// to communicate.\r\n\t\tclient.setServerAccess(mockServer);\r\n\t}", "@Override\n public void setUp() throws Exception {\n transport = new TFramedTransport(new TSocket(\"123.56.206.195\", 1982));\n\n\n\n TProtocol protocol = new TBinaryProtocol(transport);\n client = new SubjectServ.Client(protocol);\n transport.open();\n }", "@Test\n public void testControlResponses() throws Exception {\n createTethering(\"xyz\", NAMESPACES, REQUEST_TIME, DESCRIPTION);\n acceptTethering();\n TetheringControlResponseV2 expectedResponse =\n new TetheringControlResponseV2(Collections.emptyList(), TetheringStatus.ACCEPTED);\n\n expectTetheringControlResponse(\"xyz\", HttpResponseStatus.OK, GSON.toJson(expectedResponse));\n\n // Queue up a couple of messages for the peer\n MessagePublisher publisher =\n new MultiThreadMessagingContext(messagingService).getMessagePublisher();\n String topicPrefix = cConf.get(Constants.Tethering.CLIENT_TOPIC_PREFIX);\n String topic = topicPrefix + \"xyz\";\n TetheringLaunchMessage launchMessage =\n new TetheringLaunchMessage.Builder()\n .addFileNames(DistributedProgramRunner.LOGBACK_FILE_NAME)\n .addFileNames(DistributedProgramRunner.PROGRAM_OPTIONS_FILE_NAME)\n .addFileNames(DistributedProgramRunner.APP_SPEC_FILE_NAME)\n .addRuntimeNamespace(\"default\")\n .build();\n TetheringControlMessage message1 =\n new TetheringControlMessage(\n TetheringControlMessage.Type.START_PROGRAM, Bytes.toBytes(GSON.toJson(launchMessage)));\n publisher.publish(NamespaceId.SYSTEM.getNamespace(), topic, GSON.toJson(message1));\n ProgramRunInfo programRunInfo =\n new ProgramRunInfo.Builder()\n .setNamespace(\"ns\")\n .setApplication(\"app\")\n .setVersion(\"1.0\")\n .setProgramType(\"workflow\")\n .setProgram(\"program\")\n .setRun(\"runId\")\n .build();\n TetheringControlMessage message2 =\n new TetheringControlMessage(\n TetheringControlMessage.Type.STOP_PROGRAM, Bytes.toBytes(GSON.toJson(programRunInfo)));\n publisher.publish(NamespaceId.SYSTEM.getNamespace(), topic, GSON.toJson(message2));\n\n // Poll the server\n HttpRequest.Builder builder =\n HttpRequest.builder(HttpMethod.POST, config.resolveURL(\"tethering/channels/xyz\"))\n .withBody(GSON.toJson(new TetheringControlChannelRequest(null, null)));\n\n // Response should contain 2 messages\n HttpResponse response = HttpRequests.execute(builder.build());\n TetheringControlResponseV2 controlResponse =\n GSON.fromJson(response.getResponseBodyAsString(), TetheringControlResponseV2.class);\n List<TetheringControlMessageWithId> controlMessages = controlResponse.getControlMessages();\n\n Assert.assertEquals(HttpResponseStatus.OK.code(), response.getResponseCode());\n Assert.assertEquals(2, controlMessages.size());\n Assert.assertEquals(message1, controlMessages.get(0).getControlMessage());\n Assert.assertEquals(message2, controlMessages.get(1).getControlMessage());\n\n // Poll again with lastMessageId set to id of last message received from the server\n String lastMessageId = controlMessages.get(1).getMessageId();\n builder =\n HttpRequest.builder(HttpMethod.POST, config.resolveURL(\"tethering/channels/xyz\"))\n .withBody(GSON.toJson(new TetheringControlChannelRequest(lastMessageId, null)));\n\n // There should be no more messages queued up for this client\n response = HttpRequests.execute(builder.build());\n controlResponse =\n GSON.fromJson(response.getResponseBodyAsString(), TetheringControlResponseV2.class);\n Assert.assertEquals(HttpResponseStatus.OK.code(), response.getResponseCode());\n Assert.assertEquals(0, controlResponse.getControlMessages().size());\n }", "@Override\n public void createTestScenario() throws Exception {\n\n// testEndpoint Server\n// | |\n// |---- GET OBS(0) ---------->|\n// | |\n// |<----------- ACK OBS:1 ----|\n// | |\n// | new status (2) after ~ 5 sec.\n// | |\n// |<----------- CON OBS:2 ----|\n// | |\n// |<----------- CON OBS:2 ----| (retransmission 1) (after ~ 7-8 sec.)\n// | |\n// |<----------- CON OBS:2 ----| (retransmission 2) (after ~ 11-14 sec.)\n// | |\n// | new status (3) after ~ 16 sec.\n// | |\n// |<----------- CON OBS:3 ----| (retransmission 3) (after ~ 19-26 sec.)\n// | |\n// |<----------- CON OBS:3 ----| (retransmission 4) (after ~ 35-50 sec.)\n// | |\n// | server shutdown\n// | |\n// |<------- NON NOT_FOUND ----| (shutdown notification) (after ~51 sec.)\n\n clientEndpoint.writeMessage(coapRequest, new InetSocketAddress(\"localhost\", 5683));\n\n //Wait 5 sec. then update status to \"2\"\n Thread.sleep(5000);\n service.setResourceStatus(2, 120);\n\n //Wait 11 sec. (i.e. 16 sec. in total) then update status to \"3\"\n Thread.sleep(11000);\n service.setResourceStatus(3, 120);\n\n //Wait 35 sec. (i.e. 51 sec. in total) then shut server down\n Thread.sleep(35000);\n\n receivedMessages = clientEndpoint.getReceivedCoapMessages();\n }", "@Test\n public void testGetIt() {\n String responseMsg = target.path(\"service/servertest\").request().get(String.class);\n assertEquals(\"Got it!\", responseMsg);\n }", "@BeforeClass\n public static void setUp() throws Exception {\n int port = 10001;\n System.out.println(port);\n int reconnectPeriod = 200;\n client = Exchangers.connect(URL.valueOf(\"telnet://127.0.0.1:\" + port + \"?client=netty&serialization=protobuf&check=false&\"+Constants.RECONNECT_KEY+\"=\"+reconnectPeriod ), new TelnetClientHandler());\n server = Exchangers.bind(URL.valueOf(\"telnet://127.0.0.1:\" + port + \"?server=netty&serialization=protobuf\"), new TelnetServerHandler());\n System.out.println(client.isConnected());\n while(!client.isConnected()){\n TimeUnit.SECONDS.sleep(1);\n }\n System.out.println(client.isConnected());\n }", "@Test\n public void LeaderBoardServer()\n {\n PlayFabServerModels.GetLeaderboardRequest serverRequest = new PlayFabServerModels.GetLeaderboardRequest();\n serverRequest.MaxResultsCount = 3;\n serverRequest.StatisticName = TEST_STAT_NAME;\n PlayFabResult<PlayFabServerModels.GetLeaderboardResult> serverResult = PlayFabServerAPI.GetLeaderboard(serverRequest);\n VerifyResult(serverResult, true);\n assertTrue(GetSvLbCount(serverResult.Result.Leaderboard) > 0);\n }", "@Test\n public void testServerApp() throws InterruptedException {\n\n }", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n SServer.main(args);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private void setupEndpoints() {\n post(API_CONTEXT, \"application/json\", (request, response) -> {\n try {\n response.status(201);\n return gameService.startGame(request.body());\n } catch (Exception e) {\n logger.error(\"Failed to create a new game\");\n response.status(400);\n }\n return Collections.EMPTY_MAP;\n }, new JsonTransformer());\n\n // Join a game\n put(API_CONTEXT + \"/:id\", \"application/json\", (request, response) -> {\n try {\n response.status(200);\n return gameService.joinGame(request.params(\":id\"));\n } catch (GameService.GameServiceIdException ex) {\n response.status(404);\n return new ErrorMessage(ex.getMessage());\n } catch (GameService.GameServiceJoinException ex) {\n response.status(410);\n return new ErrorMessage(ex.getMessage());\n }\n }, new JsonTransformer());\n\n // Play a game\n post(API_CONTEXT + \"/:id/turns\",\"application/json\", (request, response) -> {\n try {\n response.status(200);\n gameService.play(request.params(\":id\"), request.body());\n } catch (GameService.GameServiceIdException ex){\n response.status(404);\n return new ErrorMessage(ex.getMessage());\n } catch (GameService.GameServiceMoveException ex) {\n response.status(422);\n return new ErrorMessage(ex.getMessage());\n }\n return Collections.EMPTY_MAP;\n }, new JsonTransformer());\n\n // Describe the game board\n get(API_CONTEXT + \"/:id/board\", \"application/json\", (request, response) -> {\n try {\n response.status(200);\n return gameService.describeBoard(request.params(\":id\"));\n } catch (GameService.GameServiceIdException ex) {\n response.status(404);\n return new ErrorMessage(ex.getMessage());\n }\n //return Collections.EMPTY_MAP;\n }, new JsonTransformer());\n\n // fetch state\n get(API_CONTEXT + \"/:id/state\",\"application/json\", (request, response) -> {\n try {\n response.status(200);\n return gameService.describeState(request.params(\":id\"));\n } catch (GameService.GameServiceIdException ex) {\n response.status(404);\n return new ErrorMessage(ex.getMessage());\n }\n //return Collections.EMPTY_MAP;\n }, new JsonTransformer());\n\n// get(API_CONTEXT + \"/todos/:id\", \"application/json\", (request, response) -> {\n// try {\n// return todoService.find(request.params(\":id\"));\n// } catch (TodoService.TodoServiceException ex) {\n// logger.error(String.format(\"Failed to find object with id: %s\", request.params(\":id\")));\n// response.status(500);\n// return Collections.EMPTY_MAP;\n// }\n// }, new JsonTransformer());\n//\n// get(API_CONTEXT + \"/todos\", \"application/json\", (request, response)-> {\n// try {\n// return todoService.findAll() ;\n// } catch (TodoService.TodoServiceException ex) {\n// logger.error(\"Failed to fetch the list of todos\");\n// response.status(500);\n// return Collections.EMPTY_MAP;\n// }\n// }, new JsonTransformer());\n//\n// put(API_CONTEXT + \"/todos/:id\", \"application/json\", (request, response) -> {\n// try {\n// return todoService.update(request.params(\":id\"), request.body());\n// } catch (TodoService.TodoServiceException ex) {\n// logger.error(String.format(\"Failed to update todo with id: %s\", request.params(\":id\")));\n// response.status(500);\n// return Collections.EMPTY_MAP;\n// }\n// }, new JsonTransformer());\n//\n// delete(API_CONTEXT + \"/todos/:id\", \"application/json\", (request, response) -> {\n// try {\n// todoService.delete(request.params(\":id\"));\n// response.status(200);\n// } catch (TodoService.TodoServiceException ex) {\n// logger.error(String.format(\"Failed to delete todo with id: %s\", request.params(\":id\")));\n// response.status(500);\n// }\n// return Collections.EMPTY_MAP;\n// }, new JsonTransformer());\n\n }", "public void testStartgetMatch() throws java.lang.Exception{\n org.seadva.matchmaker.webservice.MatchMakerServiceStub stub = new org.seadva.matchmaker.webservice.MatchMakerServiceStub();\n org.seadva.matchmaker.webservice.GetMatchRequest getMatchRequest18=\n (org.seadva.matchmaker.webservice.GetMatchRequest)getTestObject(org.seadva.matchmaker.webservice.GetMatchRequest.class);\n // TODO : Fill in the getMatchRequest18 here\n \n\n stub.startgetMatch(\n getMatchRequest18,\n new tempCallbackN65548()\n );\n \n\n\n }", "public interface Protocol\n{\n\t// ProductiveCelestialBody == !Vortex\n\t/**\n\t * Celestial body types.\n\t */\n\tpublic static enum eCelestialBodyType/* implements RelationshipType*/ {Vortex, Planet, AsteroidField, Nebula};\n\t\n\t/**\n\t * Building types.\n\t */\n\tpublic static enum eBuildingType/* implements RelationshipType*/ {PulsarLaunchingPad, SpaceCounter, GovernmentModule, DefenseModule, StarshipPlant, ExtractionModule};\n\t\n\t/**\n\t * Unit types.\n\t */\n\tpublic static enum eUnitType/* implements RelationshipType*/ {PulsarMissile, Probe, AntiProbeMissile, Fleet, CarbonCarrier, SpaceRoadDeliverer};\n\t\n\t/**\n\t * Special unit types.\n\t */\n\tpublic static enum eSpecialUnitType {Hero};\n\t\n\tpublic static class SEPImplementationError extends Error\n\t{\n\t\tprivate static final long serialVersionUID = 1L;\n\n\t\tpublic SEPImplementationError(String msg)\n\t\t{\n\t\t\tsuper(msg);\n\t\t}\n\n\t\tpublic SEPImplementationError(String msg, Throwable t)\n\t\t{\n\t\t\tsuper(msg, t);\n\t\t}\n\t}\n\t\n\t/**\n\t * Methods that can be called by the client at any game stage.\n\t */\n\tpublic static interface ServerCommon\n\t{\n\t\t/**\n\t\t * Return player list.\n\t\t * @return Set<Player> currently connected players.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tMap<String, IPlayerConfig> getPlayerList() throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Return the current game config.\n\t\t * @return GameConfig current game config.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException.\n\t\t */\n\t\tIGameConfig getGameConfig() throws RpcException, StateMachineNotExpectedEventException;\t\t\t\t\t\t\t\t\n\t}\n\t\n\t/**\n\t * Methods that can be called by the client while the game is pending creation.\n\t */\n\tpublic static interface ServerGameCreation extends ServerCommon\n\t{\n\t\t/**\n\t\t * Update the player config and broadcast it to other players.\n\t\t * @param playerCfg New player config.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tvoid updatePlayerConfig(IPlayerConfig playerCfg) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Send a message to the GameCreation Chat.\n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tvoid sendMessage(String msg) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Updage the game configuration.\n\t\t * @param gameCfg new game config.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws ServerPrivilegeException If player is not authorised (admin).\n\t\t */\n\t\tvoid updateGameConfig(GameConfig gameCfg) throws ServerPrivilegeException, RpcException, StateMachineNotExpectedEventException;\n\t}\n\t\n\t/**\n\t * Methods that can be called by the client while the game is running.\n\t */\n\tpublic static interface ServerRunningGame extends ServerCommon\n\t{\n\t\t/**\n\t\t * Return the entire game log for this player.\n\t\t * This log can be used to recreate a full player local game view.\n\t\t * @return List<IGameEvent> Ordered list of all game event for this player, from the beginning to the current game turn.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tList<IGameEvent> getEntireGameLog() throws RpcException, StateMachineNotExpectedEventException;\n\n\t\t/**\n\t\t * Send a message to the RunningGame Chat.\n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tvoid sendMessage(String msg) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Test if building type can be build on selected celestial body.\n\t\t * @param ceslestialBodyName Name of the celestial body where to build.\n\t\t * @param buildingType Building type.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canBuild(String celestialBodyName, Class<? extends IBuilding> buildingType) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order construction of a new building on the given celestial body.\n\t\t * @param ceslestialBodyName Name of the celestial body where to build.\n\t\t * @param buildingType Building type.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException If command is not expected or arguments are not corrects. \n\t\t */\n\t\t//void build(String ceslestialBodyName, Class<? extends IBuilding> buildingType) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if selected building can be demolished.\n\t\t * @param ceslestialBodyName Name of the celestial body the building is build on. \n\t\t * @param buildingType Building type to demolish.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canDemolish(String celestialBodyName, Class<? extends IBuilding> buildingType) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order demolition of a building on the given celestial body.\n\t\t * @param ceslestialBodyName Name of the celestial body the building is build on.\n\t\t * @param buildingType Building type.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//void demolish(String ceslestialBodyName, Class<? extends IBuilding> buildingType) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if starship can be made on the selected planet\n\t\t * @param starshipToMake\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canMakeStarships(String planetName, Map<StarshipTemplate, Integer> starshipsToMake) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Make given starships on the given planet.\n\t\t * @param planetName Planet where is the starship plant.\n\t\t * @param starshipType Startship type to make.\n\t\t * @param quantity Quantity to make.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException If command is not expected or arguments are not corrects.\n\t\t */\n\t\t//void makeStarships(String planetName, Map<StarshipTemplate, Integer> starshipsToMake) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if probe can be made on the selected planet with given name.\n\t\t * @param planetName\n\t\t * @param probeName\n\t\t * @return\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t * @throws RunningGameCommandException\n\t\t */\n\t\t//CommandCheckResult canMakeProbes(String planetName, String probeName, int quantity) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Make the given quantity of probes on the given planet, named by probeName+unit_number.\n\t\t * @param planetName\n\t\t * @param probeName\n\t\t * @param quantity\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t * @throws RunningGameCommandException\n\t\t */\n\t\t//void makeProbes(String planetName, String probeName, int quantity) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if probe can be made on the selected planet with given name.\n\t\t * @param planetName\n\t\t * @param antiProbeMissileName\n\t\t * @return\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t * @throws RunningGameCommandException\n\t\t */\n\t\t//CommandCheckResult canMakeAntiProbeMissiles(String planetName, String antiProbeMissileName, int quantity) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Make the given quantity of probes on the given planet, named by probeName+unit_number.\n\t\t * @param planetName\n\t\t * @param antiProbeMissileName\n\t\t * @param quantity\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t * @throws RunningGameCommandException\n\t\t */\n\t\t//void makeAntiProbeMissiles(String planetName, String antiProbeMissileName, int quantity) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if fleet can be formed on this planet (starship plant existence).\n\t\t * @param fleetToForm Planet where the fleet is supposed to be formed.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canFormFleet(String planetName, String fleetName, Map<StarshipTemplate, Integer> fleetToFormStarships, Set<String> fleetToFormSpecialUnits) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Form a new fleet from the given starships composition.\n\t\t * @param planetName Planet where is the starship plant.\n\t\t * @param composition Starships composition (number of each starship type).\n\t\t * @param fleetName New fleet name.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException If command is not expected or arguments are not corrects.\n\t\t */\n\t\t//void formFleet(String planetName, String fleetName, Map<StarshipTemplate, Integer> fleetToFormStarships, Set<String> fleetToFormSpeciaUnits) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if the given fleet can be dismantled.\n\t\t * @param fleetName\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canDismantleFleet(String fleetName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Dismantle the given fleet and land the starships in the starship plant.\n\t\t * @param fleetName\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void dismantleFleet(String fleetName) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if the government can be embarked.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canEmbarkGovernment() throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to embark the government (from government module) on a government starship.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void embarkGovernment() throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if the government can be settled according to the government starship current location.\n\t\t * @param planetName Planet where to test if government can settle.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canSettleGovernment(String planetName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to settle the government (from government starship) in the planet the government starship is currently landed.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//void settleGovernment(String planetName) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if pulsar missile can be fired from the given celestial body.\n\t\t * @param celestialBodyName Celestial body to check.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canFirePulsarMissile(String celestialBodyName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to fire a pulsar missile from the given celestial body with the given bonus modifier.\n\t\t * @param celestialBodyName Celestial body where the pulsar launching pad are supposed to be.\n\t\t * @param bonusModifier Bonus modifier.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//void firePulsarMissile(String celestialBodyName, float bonusModifier) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Test if player can build a space road.\n\t\t */\n\t\t//CommandCheckResult canBuildSpaceRoad(String sourceName, String destinationName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to build a space road between the given celestial bodies.\n\t\t * @param celestialBodyNameA\n\t\t * @param celestialBodyNameB\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void buildSpaceRoad(String sourceName, String destinationName) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if player can demolish a space road.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canDemolishSpaceRoad(String sourceName, String destinationName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to demolish a space road.\n\t\t * @param celestialBodyNameA\n\t\t * @param celestialBodyNameB\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void demolishSpaceRoad(String celestialBodyNameA, String celestialBodyNameB) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if player can modify a carbon order.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state. \n\t\t */\n\t\t//CommandCheckResult canModifyCarbonOrder(String originCelestialBodyName, Stack<CarbonOrder> nextCarbonOrders) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Modify/create a carbon order from two celestial bodies.\n\t\t * @param originCelestialBodyName\n\t\t * @param destinationCelestialBodyName\n\t\t * @param amount\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void modifyCarbonOrder(String originCelestialBodyName, Stack<CarbonOrder> nextCarbonOrders) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if fleet can be moved.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canMoveFleet() throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order a fleet to move with optionnal delay and checkpoints list.\n\t\t * @param fleetName\n\t\t * @param delay\n\t\t * @param checkpoints\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void moveFleet(String fleetName, Stack<Fleet.Move> checkpoints) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if he given antiprobe missile can be fired on the given target.\n\t\t * @param antiProbeMissileName\n\t\t * @param targetProbeName\n\t\t * @return\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t */\n\t\t//CommandCheckResult canFireAntiProbeMissile(String antiProbeMissileName, String targetOwnerName, String targetProbeName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to fire the antiprobe missile onto the given probe target.\n\t\t * @param antiProbeMissileName\n\t\t * @param targetProbeName\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void fireAntiProbeMissile(String antiProbeMissileName, String targetOwnerName, String targetProbeName) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if probe can be launched.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canLaunchProbe(String probeName, RealLocation destination) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to launch a probe to the specified destination.\n\t\t * @param probeName\n\t\t * @param destination\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void launchProbe(String probeName, RealLocation destination) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if player can attack enemies fleet.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canAttackEnemiesFleet(String celestialBodyName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order a celestial body to attack enemies fleet.\n\t\t * @param celestialBodyName\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void attackEnemiesFleet(String celestialBodyName) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if player can change its diplomaty.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canChangeDiplomacy(Map<String,PlayerPolicies> newPolicies) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Change the player domestic policy.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void changeDiplomacy(Map<String,PlayerPolicies> newPolicies) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\n\t\t/**\n\t\t * Test if turn can be reseted (not ended yet).\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t */\n\t\t//CommandCheckResult canResetTurn() throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Reset current player turn (erase commands).\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException If command is not expected or arguments are not corrects.\n\t\t */\n\t\t//void resetTurn() throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\n\t\t/**\n\t\t * Test if turn can be ended (not already ended).\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t */\n\t\t//CommandCheckResult canEndTurn() throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Terminate the current turn.\n\t\t * @param commands List of commands generated by the player during this turn.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tvoid endTurn(List<ICommand> commands) throws RpcException, StateMachineNotExpectedEventException, GameCommandException;\n\t}\n\t\n\t/**\n\t * Methods that can be called by the client while the game is paused.\n\t */\n\tpublic static interface ServerPausedGame extends ServerCommon\n\t{\n\t\t/**\n\t\t * Return player list.\n\t\t * @return Set<Player> currently connected players.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tMap<String, Boolean> getPlayerStateList() throws RpcException, StateMachineNotExpectedEventException;\n\n\t\t/**\n\t\t * Send a message to the PausedGame Chat.\n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tvoid sendMessage(String msg) throws RpcException, StateMachineNotExpectedEventException;\t\t\t\t\n\t}\n\t\n\t/**\n\t * Methods that can be called by the server.\n\t */\n\tpublic static interface Client\n\t{\n\n\t\t/**\n\t\t * Server notify the client to refresh the player list.\n\t\t * @param playerList New player list.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid refreshPlayerList(Map<String, IPlayerConfig> playerList) throws RpcException;\n\n\t\t/**\n\t\t * Server notify the client to refresh the game config. Client is expected to display it in GameCreation panel.\n\t\t * @param gameCfg New game config.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid refreshGameConfig(GameConfig gameCfg) throws RpcException;\n\t\t\n\t\t/**\n\t\t * Server broadcast game creation message from another player.\n\t\t * @param fromPlayer Sender player. \n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receiveGameCreationMessage(String fromPlayer, String msg) throws RpcException;\n\n\t\t/**\n\t\t * Server broadcast running game message from another player.\n\t\t * @param fromPlayer Sender player. \n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receiveRunningGameMessage(String fromPlayer, String msg) throws RpcException;\n\t\t\n\t\t/**\n\t\t * Server broadcast paused game message from another player.\n\t\t * @param fromPlayer Sender player. \n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receivePausedGameMessage(String fromPlayer, String msg) throws RpcException;\n\t\t\n\t\t/**\n\t\t * Server broadcast new turn events.\n\t\t * Client should process these events on local gameboard.\n\t\t * If there is an error processins events on local gameboard, then it means local gameboard and server gameboard view for this player are out of sync.\n\t\t * In that case, client should call {@link ServerRunningGame#getEntireGameLog()} methods to recreate a fresh local gameboard.\n\t\t * @param newTurnEvents Events generated on turn resolution.\n\t\t * @throws RpcException On connection error.\n\t\t */\n\t\tvoid receiveNewTurnGameBoard(List<IGameEvent> newTurnEvents) throws RpcException;\n\t}\n}", "public interface ServerDriver {\n void start() throws Exception;\n\n void stop() throws Exception;\n\n void stopAtShutdown();\n\n void assertArrivedRequestMatching(Matcher<RequestSnapshot>... matchers) throws InterruptedException;\n\n String baseUrl();\n\n void respondAs(String content);\n}", "@Test\n public void testSuccessfulServerStart() throws Exception {\n var channel = new EmbeddedServerChannel();\n\n server = getServer(channel.newSucceededFuture(), true);\n\n assertTrue(server.isRunning());\n }", "@Test\n void getTest() {\n URI uri = URI.create(endBody + \"/get\");\n\n // get the response\n HttpResponse<String> response = HttpMethods.get(uri);\n\n // check if it received OK\n assertEquals(200, response.statusCode());\n }", "@Test\n\tpublic void TCAPIAR_04(){\n\t\taudioControl.addLog(\"ID : TCAPIAR_04 : Verify that Partner user is unable to update audio routes\");\n\t\t/*\n\t\t\tSend a sample POST request using JssionID and CSRF token of partner user as following:\n\t\t\tPOST http://devportal.dts.com/saap/api/route HTTP/1.1\n\t\t */\n\t\t// Log into DTS portal as partner user\n\t\tloginControl.login(SUPER_PARTNER_USER, SUPER_PARTNER_PASSWORD);\n\t\t// Get user CSRF token and cookie\n\t\tcsrfToken = audioControl.getCSRFToken();\n\t\tcookie = audioControl.getCookie();\n\t\t// Send a sample POST request using JssionID and CSRF token of partner user as following:\n\t\t// POST http://devportal.dts.com/saap/api/route HTTP/1.1\n\t\tJSONObject requestBody = APIUtil.parseDataToJsonObject(jsonData.get(APIData.AUDIO_ROUTE_DATA).toString());\n\t\tJSONObject requestResult = APIUtil.sendPost(APIData.UPDATE_AUDIO_ROUTES_URL, csrfToken, cookie, requestBody.toJSONString());\n\t\t/*\n\t\t * {\"apiErrorCode\":\"PEMISSION_DENY\",\"message\":\"You don't have permission.\"}\n\t\t */\n\t\tAssert.assertEquals(requestResult.get(\"message\").toString(), APIData.ERROR_MESSAGE);\n\t}", "public static void runAllTests() {\n\t\trunClientCode(SimpleRESTClientUtils.getCToFServiceURL());\n\t\trunClientCode(SimpleRESTClientUtils.getCToFServiceURL(new String [] {\"100\"}));\n\t}", "@Test\n public void testHttp400EmptyProtocolBody() {\n final NioEventLoopGroup bootGroup = new NioEventLoopGroup();\n final NioEventLoopGroup processGroup = new NioEventLoopGroup();\n final ByteBuf content = Unpooled.buffer(0);\n\n final ChannelFuture serverChannel = runServer(bootGroup, processGroup);\n runClient(HttpMethod.POST, content, uri);\n\n serverChannel.awaitUninterruptibly();\n bootGroup.shutdownGracefully();\n processGroup.shutdownGracefully();\n\n final String expected = \"{\\\"action\\\":\\\"error\\\",\\\"content\\\":\\\"Ping Pong server can not parse protocol of the request\\\",\\\"status\\\":\\\"400 Bad Request\\\"}\";\n final String actual = buffer.toString();\n logger.info(\"Expected result: {}\", expected);\n logger.info(\"Actual result: {}\", actual);\n Assert.assertEquals(\"Hadn't processed the request: 400 Bad Request\", expected, actual);\n }", "public static void main(String[] args) throws Exception {\n\t\tTestApi testApi =new TestApi();\n\t\ttestApi.sendMessage();\n\t}", "public void testSapServerConnectSimple() {\n mContext = this.getContext();\n\n try {\n\n SapSequencer sequencer = new SapSequencer();\n if(rilTestModeEnabled) {\n sequencer.testModeEnable(true);\n }\n /* Build a default init sequence */\n buildDefaultInitSeq(sequencer);\n SapMessage disconnectReq = new SapMessage(SapMessage.ID_DISCONNECT_REQ);\n SapMessage disconnectResp = new SapMessage(SapMessage.ID_DISCONNECT_RESP);\n\n SapMessage resetResp = new SapMessage(SapMessage.ID_RESET_SIM_RESP);\n resetResp.setResultCode(SapMessage.RESULT_OK);\n\n int index = sequencer.addStep(disconnectReq, disconnectResp);\n\n assertTrue(sequencer.run());\n } catch (IOException e) {\n Log.e(TAG, \"IOException\", e);\n }\n }", "@Test\n public void test() throws Exception {\n ApplicationManager appManager = deployApplication(HelloWorld.class);\n\n // Start WhoFlow\n FlowManager flowManager = appManager.getFlowManager(\"WhoFlow\").start();\n flowManager.waitForStatus(true);\n\n // Send stream events to the \"who\" Stream\n StreamManager streamManager = getStreamManager(\"who\");\n streamManager.send(\"1\");\n streamManager.send(\"2\");\n streamManager.send(\"3\");\n streamManager.send(\"4\");\n streamManager.send(\"5\");\n\n try {\n // Wait for the last Flowlet processing 5 events, or at most 5 seconds\n RuntimeMetrics metrics = flowManager.getFlowletMetrics(\"saver\");\n metrics.waitForProcessed(5, 5, TimeUnit.SECONDS);\n } finally {\n flowManager.stop();\n Assert.assertFalse(flowManager.isRunning());\n }\n\n // Start Greeting service and use it\n ServiceManager serviceManager = appManager.getServiceManager(HelloWorld.Greeting.SERVICE_NAME).start();\n\n // Wait service startup\n serviceManager.waitForStatus(true);\n\n URL url = new URL(serviceManager.getServiceURL(), \"greet\");\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n Assert.assertEquals(HttpURLConnection.HTTP_OK, connection.getResponseCode());\n String response;\n try {\n response = new String(ByteStreams.toByteArray(connection.getInputStream()), Charsets.UTF_8);\n } finally {\n connection.disconnect();\n }\n Assert.assertEquals(\"Hello 5!\", response);\n }", "@Test\n public void simulateNormalLoad(TestContext context) {\n Async async = context.async();\n try {\n init();\n loadSimulatedNormalData();\n\n put(\"myapi1/v1/test\").then().assertThat().statusCode(200);\n put(\"myapi2/v1/test\").then().assertThat().statusCode(200);\n } catch (Exception failed) {\n failed.printStackTrace();\n context.fail(\"Exception: \" + failed.getMessage());\n }\n\n System.out.println(\"Done\");\n\n async.complete();\n }", "@ArchTypeComponent(\n patterns = {@Pattern(name=\"testLayered\", kind = \"Layered\", role=\"Layer{1}\")}\n )\npublic interface ServerConnector { \n \n /** Send the on-the-wire string to the server side. \n * \n * @param onTheWireFormat the observation in the adopted \n * on-the-wire format. \n * @return a future that will eventually tell the status \n * of the transmission. \n */ \n public FutureResult sendToServer(String onTheWireFormat) throws IOException; \n \n /** Send a query for a set of observations to the server. \n * \n * @param query the query for observations. Use one of \n * those defined in the forwarder.query sub package as \n * these are the ONLY ones the server understands. \n * @param reponseType define the type of the \n * returned observations, either as a list of \n * StandardTeleObserations or as PHMR documents. \n * @return a future with the query result as one big \n * string that needs deserializing before it can \n * by understood. \n * @throws IOException \n * @throws Net4CareException \n * @throws UnknownCPRException \n */ \n\tpublic FutureResultWithAnswer queryToServer(Query query) throws IOException, Net4CareException; \n\t \n }", "@Override\n/**\n * Communication Tester method\n */\npublic String Communicate() throws RemoteException {\n\treturn \"Server Says Hi\";\n}", "@Test\n\tpublic void testBidirectionalCommunicationWithResponses() {\n\n\t\t// due to TIME_WAIT after closing a connection we cannot reuse a fixed\n\t\t// port since this would cause multiple test runs in a row to fail.\n\t\t// therefore, get two free ports we can use.\n\t\tint port0, port1;\n\t\ttry {\n\t\t\tport0 = PortFinder.findOpen();\n\t\t\tport1 = PortFinder.findOpen();\n\t\t} catch (IOException e2) {\n\t\t\tfail(\"could not allocate local ports\");\n\t\t\treturn;\n\t\t}\n\n\t\tfinal Socket sock1 = new Socket();\n\n\t\tThread adminThread = null;\n\n\t\t// sock0 is \"server\", waiting for sock1 to connect\n\t\ttry {\n\t\t\tfinal ServerSocket tempServer = new ServerSocket();\n\t\t\ttempServer.bind(new InetSocketAddress(\"localhost\", port0));\n\n\t\t\tadminThread = new Thread(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tSocket sock0 = null;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsock0 = tempServer.accept();\n\t\t\t\t\t\ttempServer.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tfail(\"connection failed (3)\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ttempServer.close();\n\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t// ignore\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tFullDuplexMPI party0 = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tparty0 = new FullDuplexMPI(sock0, System.out, true) {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic IMessage processIncomingMessage(IMessage message) {\n\t\t\t\t\t\t\t\tassertTrue(message instanceof ConfirmationMessage);\n\t\t\t\t\t\t\t\tassertTrue(((ConfirmationMessage) message).STATUS_CODE == party1Counter);\n\t\t\t\t\t\t\t\treturn new ConfirmationMessage(--party1Counter, null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\tsendRecursiveAsyncMessages(party0, true);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tfail(\"connection failed (0)\");\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// moderate timeout to make sure we eventually get a\n\t\t\t\t\t\t// failure\n\t\t\t\t\t\tlatch.await(20, TimeUnit.SECONDS);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\tfail(\"unexpected interruption\");\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (party0 != null) {\n\t\t\t\t\t\t\tparty0.close();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t\tfail(\"connection failed (2)\");\n\t\t}\n\n\t\tadminThread.start();\n\n\t\tFullDuplexMPI party1 = null;\n\n\t\t// sock1 is \"client\"\n\t\ttry {\n\t\t\tsock1.bind(new InetSocketAddress(\"localhost\", port1));\n\t\t\tsock1.connect(new InetSocketAddress(\"localhost\", port0));\n\t\t\tparty1 = new FullDuplexMPI(sock1, System.out, true) {\n\n\t\t\t\t@Override\n\t\t\t\tpublic IMessage processIncomingMessage(IMessage message) {\n\t\t\t\t\tassertTrue(message instanceof ConfirmationMessage);\n\t\t\t\t\tassertTrue(((ConfirmationMessage) message).STATUS_CODE == party0Counter);\n\t\t\t\t\treturn new ConfirmationMessage(++party0Counter, null);\n\t\t\t\t}\n\t\t\t};\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"connection failed (1)\");\n\t\t}\n\n\t\tassert party1 != null;\n\t\tsendRecursiveAsyncMessages(party1, false);\n\n\t\ttry {\n\t\t\t// moderate timeout to make sure we eventually get a failure\n\t\t\tlatch.await(20, TimeUnit.SECONDS);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"unexpected interruption (1)\");\n\t\t}\n\n\t\t// check if all messages were acknowledged\n\t\tassertEquals(99, party0Counter);\n\t\tassertEquals(1, party1Counter);\n\n\t\ttry {\n\t\t\tsock1.close();\n\t\t} catch (IOException e) {\n\t\t\t// ignore\n\t\t}\n\t\ttry {\n\t\t\tadminThread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"unexpected interruption (2)\");\n\t\t}\n\t}", "@Before\n\tpublic void setUp() throws Exception {\n\t\tserverChannel = ServerSocketChannel.open();\n\t\tserverChannel.socket().bind(null, 0);\n\t\tportNumber = serverChannel.socket().getLocalPort();\n\t\t\n\t\t// Connect the client\n\t\tFuture<Boolean> result = service.submit(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tclient = new Client(\"bob\");\n\t\t\t\ttry {\n\t\t\t\t\tclient.Connect(\"localhost\", portNumber);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tfail(\"Failure during setup...\");\n\t\t\t\t}\n\t\t\t}\n\t\t}, Boolean.TRUE);\n\t\t\n\t\tchannel = serverChannel.accept();\n\t\t\n\t\t// Get the connection request\n\t\tConnectionRequest conRequest = (ConnectionRequest) this.getMessage(channel);\n\t\t\n\t\tthis.sendMessage(new RequestResponse(Status.SUCCESS), channel);\n\t\tresult.get();\n\t}", "@Test\n public void testClientMessageDecode() throws Exception {\n testNettyMessageClientDecoding(false, false, false);\n }", "@Test\n public void serverPingsClientHttp2() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.sendFrame().ping(false, 2, 3);\n peer.acceptFrame();// PING\n\n peer.play();\n // play it back\n connect(peer);\n // verify the peer received what was expected\n MockHttp2Peer.InFrame ping = peer.takeFrame();\n Assert.assertEquals(TYPE_PING, ping.type);\n Assert.assertEquals(0, ping.streamId);\n Assert.assertEquals(2, ping.payload1);\n Assert.assertEquals(3, ping.payload2);\n Assert.assertTrue(ping.ack);\n }", "@Test\n\tpublic void testBasicDevStartup() throws InterruptedException, ClassNotFoundException, ExecutionException, TimeoutException {\n\t\ttestArgSetup(\"test\");\n\t\t\n\t\t//really just making sure we don't throw an exception...which catches quite a few mistakes\n\t\tDevelopmentServer server = new DevelopmentServer(true);\n\t\t//In this case, we bind a port\n\t\tserver.start();\n\t\t//we should depend on http client and send a request in to ensure operation here...\n\t\t\n\t\tserver.stop();\n\t}", "@Test\r\n\tpublic void testC() {\r\n\t\t\r\n\t\tObjectHandshake h = new ObjectHandshake();\r\n\t\th.setUuid( UuidTool.getOne() );\r\n\t\t\r\n\t\tRunProtocol run = null;\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_A, 100, 200, true, true);\r\n\t\tassertTrue(run.beginA());\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_B, 100, 200, true, true);\r\n\t\tassertTrue(run.commitA());\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_B, 100, 200, true, true);\r\n\t\tassertTrue(run.beginB());\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_A, 100, 200, true, true);\r\n\t\tassertTrue(run.commitB());\r\n\t\t\r\n\t\tassertEquals(h.getLog(), \"1-1-100-2-1-101-2-2-200-1-2-201-\");\r\n\t}", "@Test\n void runWithBroadcastMessageTest() throws Exception {\n\n Prattle.startUp();\n\n\n\n Field initialized = client1.getClass().getDeclaredField(\"initialized\");\n Field input = client1.getClass().getDeclaredField(\"input\");\n Field output = client1.getClass().getDeclaredField(\"output\");\n\n initialized.setAccessible(true);\n input.setAccessible(true);\n output.setAccessible(true);\n\n initialized.set(client1, false);\n when(scanNetNB.hasNextMessage()).thenReturn(true);\n Message msg = Message.makeBroadcastMessage(\"Mandy\", \"test\");\n when(scanNetNB.nextMessage()).thenReturn(msg);\n\n input.set(client1, scanNetNB);\n\n\n client1.run();\n assertEquals(true, client1.isInitialized());\n client1.run();\n Message msgLogOff = Message.makeBroadcastMessage(\"Mandy\", \"Prattle says everyone log off\");\n when(scanNetNB.nextMessage()).thenReturn(msgLogOff);\n client1.run();\n\n Message msgWithDiffName = Message.makeBroadcastMessage(\"Noodle\", \"Hello from Noodle\");\n client1.setName(\"Mandy\");\n System.out.print(client1.getName());\n System.out.print(msgWithDiffName.getName());\n client1.run();\n\n assertEquals(true, client1.isInitialized());\n when(scanNetNB.hasNextMessage()).thenReturn(true);\n when(scanNetNB.nextMessage()).thenReturn(msgWithDiffName);\n input.set(client1, scanNetNB);\n output.set(client1, printNetNB);\n\n ClientRunnable clientRunnable = spy(client1);\n Mockito.doNothing().when(clientRunnable).terminateClient();\n clientRunnable.run();\n\n\n\n\n\n }", "abstract protected void RunTest(Socket s);", "public static void main(String[] args) throws IOException, UnexpectedResponseException {\n }", "@Test\n\tpublic void TCAPIAR_01(){\n\t\taudioControl.addLog(\"ID : TCAPIAR_01 : Verify that DTS user is unable to update audio route without having 'Manage audio routes' privilege\");\n\t\t/*\n\t\t \tPrecondition: DTS user does not have \"Manage audio routes\" privilege.\n\t\t\tSend a sample POST request as following:\n\t\t\tPOST http://devportal.dts.com/saap/api/route HTTP/1.1\n\t\t */\n\t\t// Login DTS portal as DTS user\n\t\tloginControl.login(SUPER_USER_NAME, SUPER_USER_PASSWORD);\n\t\t// Navigate to User page\n\t\taudioControl.click(PageHome.LINK_USERS);\n\t\t// Select a Partner User from table\n\t\tuserControl.selectUserInfoByEmail(DTS_USER);\n\t\t// Click Edit link\n\t\taudioControl.click(UserMgmt.EDIT);\n\t\t// Disable \"Manage audio routes\" privileges\n\t\tuserControl.enableAllPrivileges();\n\t\tuserControl.disablePrivilege(AddUser.DTS_PRIVILEGES_TABLE, Privileges.Manage_audio_routes);\n\t\taudioControl.click(AddUser.SAVE);\n\t\t// Logout user\n\t\taudioControl.logout();\n\t\t// Login DTS portal as DTS user above\n\t\tloginControl.login(DTS_USER, DTS_PASSWORD);\n\t\t// Get csrf token and cookie of user\n\t\tcsrfToken = audioControl.getCSRFToken();\n\t\tcookie = audioControl.getCookie();\n\t\t// Send a sample POST request as following:\tPOST http://devportal.dts.com/saap/api/route HTTP/1.1\n\t\tJSONObject requestBody = APIUtil.parseDataToJsonObject(jsonData.get(APIData.AUDIO_ROUTE_DATA).toString());\n\t\tJSONObject requestResult = APIUtil.sendPost(APIData.UPDATE_AUDIO_ROUTES_URL, csrfToken, cookie, requestBody.toJSONString());\n\t\t/*\n\t\t * {\"apiErrorCode\":\"PEMISSION_DENY\",\"message\":\"You don't have permission.\"}\n\t\t */\n\t\tAssert.assertEquals(requestResult.get(\"message\").toString(), APIData.ERROR_MESSAGE);\n\t}", "@Test\n\tpublic void TCAPIAR_03(){\n\t\taudioControl.addLog(\"ID : TCAPIAR_03 : Verify that Partner user is unable to get audio route detail\");\n\t\t/*\n\t\t\tSend a sample GET request using JssionID and CSRF token of partner user as following:\n\t\t\tGET http://devportal.dts.com/saap/api/route/154?revision=0 HTTP/1.1\n\t\t */\n\t\t// Log into DTS portal as partner user\n\t\tloginControl.login(SUPER_PARTNER_USER, SUPER_PARTNER_PASSWORD);\n\t\t// Get user CSRF token and cookie\n\t\tcsrfToken = audioControl.getCSRFToken();\n\t\tcookie = audioControl.getCookie();\n\t\t// Send a sample GET request using JssionID and CSRF token of partner user as following:\n\t\t// GET http://devportal.dts.com/saap/api/route/154?revision=0 HTTP/1.1\n\t\tJSONObject requestResult = APIUtil.sendGet(APIData.AUDIO_ROUTE_DETAIL_URL, csrfToken, cookie);\n\t\t/*\n\t\t * {\"apiErrorCode\":\"PEMISSION_DENY\",\"message\":\"You don't have permission.\"}\n\t\t */\n\t\tAssert.assertEquals(requestResult.get(\"message\").toString(), APIData.ERROR_MESSAGE);\n\t}", "@Test\n public void tests(TestContext context) {\n async = context.async();\n logger.info(\"Codex mock Test starting\");\n\n // Simple GET request to see the module is running and we can talk to it.\n given()\n .get(\"/admin/health\")\n .then()\n .log().all()\n .statusCode(200);\n\n // Simple GET request without a tenant\n given()\n .get(\"/codex-instances\")\n .then()\n .log().ifValidationFails()\n .statusCode(400)\n .body(containsString(\"Tenant\"));\n\n // Simple GET request before the tenant init\n given()\n .header(TEN)\n .get(\"/codex-instances\")\n .then()\n .log().ifValidationFails()\n .statusCode(400)\n .body(containsString(\"supertenant_mod_codex_mock.codex_mock_data\"));\n\n // Call the tenant interface to initialize the database\n String tenants = \"{\\\"module_to\\\":\\\"\" + moduleId + \"\\\"}\";\n logger.info(\"About to call the tenant interface \" + tenants);\n given()\n .header(TEN).header(JSON)\n .body(tenants)\n .post(\"/_/tenant\")\n .then()\n .log().ifValidationFails()\n .statusCode(201);\n\n // get all\n given()\n .header(TEN)\n .get(\"/codex-instances\")\n .then()\n .log().all() // .ifValidationFails()\n .body(containsString(\"\\\"totalRecords\\\" : 4\"))\n .body(containsString(\"resultInfo\"))\n .statusCode(200);\n\n // get one\n given()\n .header(TEN)\n .get(\"/codex-instances/11111111-1111-1111-1111-111111111111\")\n .then()\n .log().ifValidationFails()\n .statusCode(200)\n .body(containsString(\"alt title for 111111111111\"))\n .body(containsString(\"unitTest\"));\n\n // unknown id\n given()\n .header(TEN)\n .get(\"/codex-instances/99999999-9999-9999-9999-987654321111\")\n .then()\n .log().ifValidationFails()\n .statusCode(404);\n\n // query\n given()\n .header(TEN)\n .get(\"/codex-instances?query=title=000000000001\")\n .then()\n .log().ifValidationFails()\n .body(containsString(\"Title of 000000000001\"))\n .statusCode(200);\n given()\n .header(TEN)\n .get(\"/codex-instances?query=publisher=beta\")\n .then()\n .log().ifValidationFails()\n .body(containsString(\"Title of 111111111112\"))\n .body(containsString(\"unitTest\"))\n .statusCode(200);\n given()\n .header(TEN)\n .get(\"/codex-instances?query=contributor=Contributor of 111111111111\")\n .then()\n .log().ifValidationFails()\n .body(containsString(\"Title of 111111111111\"))\n .statusCode(200);\n given()\n .header(TEN)\n .get(\"/codex-instances?query=contributor=*111111111111*\")\n .then()\n .log().ifValidationFails()\n .body(containsString(\"Title of 111111111111\"))\n .statusCode(200);\n\n // ServerChoice\n given()\n .header(TEN)\n .get(\"/codex-instances?query=Title\")\n .then()\n .log().ifValidationFails()\n .statusCode(200);\n\n // bad query - the query validation ought to catch this\n // But it does not. Logs the \"unable to load schema\" message, and accepts all...\n given()\n .header(TEN)\n .get(\"/codex-instances?query=UNKNOWNFIELD=foo\")\n .then()\n .log().ifValidationFails()\n .statusCode(200);\n //.statusCode(422);\n\n // limit\n given()\n .header(TEN)\n .get(\"/codex-instances?offset=1&limit=2\")\n .then()\n .log().ifValidationFails()\n .body(containsString(\"111111111111\"))\n .body(containsString(\"111111111112\"))\n .statusCode(200);\n\n // sort\n given()\n .header(TEN)\n .get(\"/codex-instances?offset=0&limit=1&query=publisher=for sortBy publisher\")\n .then()\n .log().ifValidationFails()\n .body(containsString(\"alpha publisher\"))\n .statusCode(200);\n\n // Query manipulations: resourceType -> type\n given()\n .header(TEN)\n .get(\"/codex-instances?query=resourceType=books\")\n .then()\n .log().ifValidationFails()\n .body(containsString(\"\\\"totalRecords\\\" : 4\"))\n .statusCode(200);\n\n // Query manipulations: isbn\n given()\n .header(TEN)\n .get(\"/codex-instances?query=identifier/type=isbn=1111111111\")\n .then()\n .log().ifValidationFails()\n .body(containsString(\"\\\"totalRecords\\\" : 1\"))\n .body(containsString(\"111111111112\"))\n .statusCode(200);\n\n // Query manipulations: issn\n given()\n .header(TEN)\n .get(\"/codex-instances?query=identifier /type=issn = 1111111111\")\n .then()\n .log().ifValidationFails()\n .body(containsString(\"\\\"totalRecords\\\" : 1\"))\n .body(containsString(\"000000000001\"))\n .statusCode(200);\n\n // All done\n logger.info(\"codex Mock Test done\");\n async.complete();\n }", "@Test\n public void clientPingsServer() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// PING\n\n peer.sendFrame().ping(true, 1, 5);\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n long pingAtNanos = System.nanoTime();\n connection.writePingAndAwaitPong();\n long elapsedNanos = (System.nanoTime()) - pingAtNanos;\n Assert.assertTrue((elapsedNanos > 0));\n Assert.assertTrue((elapsedNanos < (TimeUnit.SECONDS.toNanos(1))));\n // verify the peer received what was expected\n MockHttp2Peer.InFrame pingFrame = peer.takeFrame();\n Assert.assertEquals(TYPE_PING, pingFrame.type);\n Assert.assertEquals(0, pingFrame.streamId);\n Assert.assertEquals(1330343787, pingFrame.payload1);// OkOk\n\n Assert.assertEquals(-257978967, pingFrame.payload2);// donut\n\n Assert.assertFalse(pingFrame.ack);\n }", "@Test\r\n\tpublic void executionTest() throws Exception {\n\t\tOperationalEnvDistributionStatus operEnvDistStatusObj = new OperationalEnvDistributionStatus();\r\n\t\toperEnvDistStatusObj.setServiceModelVersionId(serviceModelVersionId);\r\n\t\toperEnvDistStatusObj.setDistributionId(asdcDistributionId);\r\n\t\toperEnvDistStatusObj.setOperationalEnvId( operationalEnvironmentId);\r\n\t\toperEnvDistStatusObj.setDistributionIdStatus(DistributionStatus.DISTRIBUTION_COMPLETE_OK.toString());\r\n\t\toperEnvDistStatusObj.setRequestId(requestId);\r\n\t\t\r\n\t\t// ServiceModelStatus - getOperationalEnvServiceModelStatus\r\n\t\tOperationalEnvServiceModelStatus operEnvServiceModelStatusObj = new OperationalEnvServiceModelStatus();\r\n\t\toperEnvServiceModelStatusObj.setRequestId(requestId);\r\n\t\toperEnvServiceModelStatusObj.setOperationalEnvId(operationalEnvironmentId);\r\n\t\toperEnvServiceModelStatusObj.setServiceModelVersionDistrStatus(DistributionStatus.DISTRIBUTION_COMPLETE_OK.toString());\r\n\t\toperEnvServiceModelStatusObj.setRecoveryAction(recoveryAction);\r\n\t\toperEnvServiceModelStatusObj.setRetryCount(retryCount);\r\n\t\toperEnvServiceModelStatusObj.setWorkloadContext(workloadContext);\r\n\t\toperEnvServiceModelStatusObj.setServiceModelVersionId(serviceModelVersionId);\r\n\t\tList<OperationalEnvServiceModelStatus> queryServiceModelResponseList = new ArrayList<OperationalEnvServiceModelStatus>();\r\n\t\tqueryServiceModelResponseList.add(operEnvServiceModelStatusObj);\r\n\t\t\r\n\t\t// prepare distribution obj\r\n\t\tDistribution distribution = new Distribution();\r\n\t\tdistribution.setStatus(Status.DISTRIBUTION_COMPLETE_OK);\r\n\t\trequest.setDistribution(distribution);\r\n\t\trequest.setDistributionId(asdcDistributionId);\r\n\t\t\r\n\t\t// prepare asdc return data\r\n\t\tString jsonPayload = asdcClientUtils.buildJsonWorkloadContext(workloadContext);\r\n\t\r\n\t\tJSONObject jsonObject = new JSONObject();\r\n\t\tjsonObject.put(\"statusCode\", \"202\");\r\n\t\tjsonObject.put(\"message\", \"Success\");\r\n\t\tjsonObject.put(\"distributionId\", asdcDistributionId);\r\n\t\t\r\n\t\t// Mockito mock\r\n\t\tOperationalEnvDistributionStatusDb distributionDb = Mockito.mock(OperationalEnvDistributionStatusDb.class);\r\n\t\tOperationalEnvServiceModelStatusDb serviceModelDb = Mockito.mock(OperationalEnvServiceModelStatusDb.class);\r\n\t\tRequestsDBHelper dbUtils = mock(RequestsDBHelper.class);\r\n\t\tAsdcClientHelper asdcClientHelperMock = Mockito.mock(AsdcClientHelper.class);\r\n\t\tRESTConfig configMock = Mockito.mock(RESTConfig.class);\r\n\t\tRESTClient clientMock = Mockito.mock(RESTClient.class);\r\n\t\tAPIResponse apiResponseMock = Mockito.mock(APIResponse.class);\t\t\r\n\t\r\n\t\tMockito.when(asdcClientHelperMock.setRestClient(configMock)).thenReturn(clientMock);\r\n\t\tMockito.when(asdcClientHelperMock.setHttpPostResponse(clientMock, jsonPayload)).thenReturn(apiResponseMock);\r\n\t\tMockito.when(asdcClientHelperMock.enhanceJsonResponse(jsonObject, 202)).thenReturn(jsonObject);\t\t\r\n\t\tMockito.when(asdcClientHelperMock.postActivateOperationalEnvironment(serviceModelVersionId, operationalEnvironmentId, workloadContext)).thenReturn(jsonObject);\t\t\r\n\t\t\r\n\t\tMockito.when(distributionDb.getOperationalEnvDistributionStatus(asdcDistributionId)).thenReturn(operEnvDistStatusObj);\r\n\t\tMockito.when(serviceModelDb.getOperationalEnvServiceModelStatus(operationalEnvironmentId, serviceModelVersionId)).thenReturn(operEnvServiceModelStatusObj);\t\t\r\n\t\tMockito.when(serviceModelDb.getOperationalEnvIdStatus(operationalEnvironmentId, requestId)).thenReturn(queryServiceModelResponseList);\t\t\r\n\t\t\r\n\t\tint row = 1;\r\n\t\tMockito.when(distributionDb.updateOperationalEnvDistributionStatus(distribution.getStatus().toString(), asdcDistributionId, operationalEnvironmentId, serviceModelVersionId)).thenReturn(row);\r\n\t\tMockito.when(serviceModelDb.updateOperationalEnvRetryCountStatus(operationalEnvironmentId, serviceModelVersionId, distribution.getStatus().toString(), 0)).thenReturn(row);\r\n\t\t\r\n\t\tdoNothing().when(dbUtils).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));\r\n\t\t\r\n\t\trequest.setOperationalEnvironmentId(operationalEnvironmentId);\r\n\t\tActivateVnfStatusOperationalEnvironment activateVnfStatus = new ActivateVnfStatusOperationalEnvironment(request, requestId);\r\n\t\tActivateVnfStatusOperationalEnvironment activateVnfStatusMock = spy(activateVnfStatus);\r\n\t\tactivateVnfStatusMock.setOperationalEnvDistributionStatusDb(distributionDb);\r\n\t\tactivateVnfStatusMock.setOperationalEnvServiceModelStatusDb(serviceModelDb);\r\n\t\tactivateVnfStatusMock.setRequestsDBHelper(dbUtils);\t\t\r\n\t\tactivateVnfStatusMock.setAsdcClientHelper(asdcClientHelperMock);\r\n\r\n\t\tactivateVnfStatusMock.execute();\t\t\r\n\t\t\r\n\t\tverify(distributionDb, times(1)).updateOperationalEnvDistributionStatus(distribution.getStatus().toString(), asdcDistributionId, operationalEnvironmentId, serviceModelVersionId);\r\n\t\tverify(serviceModelDb, times(1)).updateOperationalEnvRetryCountStatus(operationalEnvironmentId, serviceModelVersionId, distribution.getStatus().toString(), 0);\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@BeforeClass\n public static void beforeClass() throws Throwable {\n h = new Helper();\n ts = new TestServer();\n ts.getServerExecutableSpecification().setCodeline(h.getServerVersion());\n\n ts.initialize();\n // just use RSH\n //ts.start();\n\n server = h.getServer(ts);\n server.setUserName(ts.getUser());\n server.connect();\n\n user = server.getUser(ts.getUser());\n\n client = h.createClient(server, \"client1\");\n server.setCurrentClient(client);\n\n h.createDepot(server, \"Ace\", STREAM, null, \"ace/...\");\n h.createStream(server, \"//Ace/main\", MAINLINE, null);\n\n client.setStream(\"//Ace/main\");\n client.update();\n client.sync(makeFileSpecList(\"//...\"), null);\n\n testFile = new File(client.getRoot() + FILE_SEP + \"foo.txt\");\n h.addFile(server, user, client, testFile.getAbsolutePath(), \"GetStreamIntegrationStatusTest\", \"text\");\n testFile = new File(client.getRoot() + FILE_SEP + \"bar.txt\");\n h.addFile(server, user, client, testFile.getAbsolutePath(), \"GetStreamIntegrationStatusTest\", \"text\");\n\n h.createStream(server, \"//Ace/dev\", DEVELOPMENT, \"//Ace/main\");\n client.setStream(\"//Ace/dev\");\n client.update();\n client.sync(makeFileSpecList(\"//...\"), null);\n\n h.addBranchspec(server, user, \"branch1\", \"//Ace/main/...\", \"//Ace/dev/...\");\n\n h.createStream(server, \"//Ace/subDev\", DEVELOPMENT, \"//Ace/dev\");\n }", "private void setupStubs() {\n wireMockServer.stubFor(get(urlEqualTo(BRITISH_LONG_HAIR))\n .willReturn(aResponse().withHeader(\"Content-Type\", \"application-json\")\n .withStatus(200)\n .withBodyFile(\"json/british-long-hair.json\")));\n }", "@Test\n\tpublic void test_003() {\n\t\tJdProgramRequestParms.put(\"U$FUNZ\", new StringValue(\"URL\"));\n\t\tJdProgramRequestParms.put(\"U$METO\", new StringValue(\"HTTP\"));\n\t\tJdProgramRequestParms.put(\"U$SVARSK\", new StringValue(\"http://www.mocky.io/v2/5185415ba171ea3a00704eedxxx\"));\n\n\t\tJdProgramResponseParms = JdProgram.execute(javaSystemInterface, JdProgramRequestParms);\n\t\tassertTrue(JdProgramResponseParms.get(2).asString().getValue().startsWith(\"*ERROR\"));\n\t\tassertTrue(JdProgramResponseParms.get(2).asString().getValue().contains(\"HTTP response code: 500\"));\n\t}", "@Test\n public void destiny2InsertSocketPlugTest() {\n InlineResponse20045 response = api.destiny2InsertSocketPlug();\n\n // TODO: test validations\n }", "public static void twoClientSetupProcesses() {\n\n\tList<String> aClientTags=TagsFactory.getAssignmentTags().getTwoClientClientTags();\n\tList<String> aServerTags=TagsFactory.getAssignmentTags().getTwoClientServerTags();\n\n\ttwoClientSetupProcesses(aClientTags, aServerTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcessTeams(Arrays.asList(\"RegistryBasedDistributedProgram\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setTerminatingProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Client_0\", \"Client_1\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Registry\", \"Server\", \"Client_0\", \"Client_1\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Registry\", Arrays.asList(\"Registry\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Server\", aServerTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_0\", aClientTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_1\", aClientTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Registry\", FlexibleStaticArgumentsTestCase.TEST_REGISTRY_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Server\", FlexibleStaticArgumentsTestCase.TEST_SERVER_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_0\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_0_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_1\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_1_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Registry\", 500);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Server\", 2000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Client_0\", 5000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Client_1\", 5000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().getProcessTeams().forEach(team -> System.out.println(\"### \" + team));\n}", "private void runFullScenario(HttpServletRequest request, HttpServletResponse response) throws IOException, ClassNotFoundException, InterruptedException, QueryExecutionException {\n SimApi.runFullScenario();\n }", "@Test\n public void CloudScriptServer()\n {\n PlayFabServerModels.LoginWithServerCustomIdRequest customIdReq = new PlayFabServerModels.LoginWithServerCustomIdRequest();\n customIdReq.CreateAccount = true;\n customIdReq.ServerCustomId = PlayFabSettings.BuildIdentifier;\n PlayFabResult<PlayFabServerModels.ServerLoginResult> loginRes = PlayFabServerAPI.LoginWithServerCustomId(customIdReq);\n assertNotNull(loginRes.Result);\n PlayFabServerModels.ExecuteCloudScriptServerRequest hwRequest = new PlayFabServerModels.ExecuteCloudScriptServerRequest();\n hwRequest.FunctionName = \"helloWorld\";\n hwRequest.PlayFabId = loginRes.Result.PlayFabId;\n PlayFabResult<PlayFabServerModels.ExecuteCloudScriptResult> hwResult = PlayFabServerAPI.ExecuteCloudScript(hwRequest);\n assertNotNull(hwResult.Result.FunctionResult);\n Map<String, String> arbitraryResults = (Map<String, String>)hwResult.Result.FunctionResult;\n assertEquals(arbitraryResults.get(\"messageValue\"), \"Hello \" + loginRes.Result.PlayFabId + \"!\");\n }", "@Test\r\n\tpublic void testG() {\r\n\t\t\r\n\t\tObjectHandshake h = new ObjectHandshake();\r\n\t\th.setUuid( UuidTool.getOne() );\r\n\t\t\r\n\t\tRunProtocol run = null;\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_A);\r\n\t\tassertTrue(run.beginA());\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_A);\r\n\t\tassertTrue(run.commitA());\r\n\t\t\r\n\t\trun.reset();\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_B);\r\n\t\tassertFalse(run.beginB());\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_B);\r\n\t\tassertFalse(run.commitB());\r\n\t\t\r\n\t\t//analyze the reset\r\n\t\tLogAnalyzer aly = run.getCurrentAnalyzer();\r\n\t\t//The value, the reset occurs\r\n\t\tassertEquals( 200, aly.getCurrentPartValue() );\r\n\t\t//The part is not available\r\n\t\tassertEquals( LogAnalyzer.THE_PART_IS_NOT_KNOWN, aly.getPart() );\r\n\t\t\r\n\t\tassertFalse( aly.isAfterPart0() );\r\n\t\tassertFalse( aly.isAfterPart1() );\r\n\t\t//The parts 0 and 1 run properly\r\n\t\tassertTrue( aly.isAfterPart2() );\r\n\t\t//The part 3 is not reached, because of the reset\r\n\t\tassertFalse( aly.isAfterPart3() );\r\n\t\t\r\n\t\t//There is no part\r\n\t\tassertFalse( aly.isPart1() );\r\n\t\tassertFalse( aly.isPart2() );\r\n\t\tassertFalse( aly.isPart3() );\r\n\t\tassertFalse( aly.isPart4() );\r\n\t\t\r\n\t\t//There are 3 entries in the list.\r\n\t\tassertEquals( 3, aly.getList().size() );\r\n\t\t//The last entry has the RST_FLAG set\r\n\t\tassertEquals( IHandshake.RST_FLAG, aly.getCurrentPartType() );\r\n\t\t\r\n\t\tassertEquals(h.getLog(), \"1-1-100-1-1-101-1-4-200-\");\r\n\t}", "public SingleOperationMarshallingTest() {\n }", "@Test\r\n\tpublic void client2() {\n\t}", "public void testGetPort() {\n }", "public final void testCall() throws Exception\n {\n \n Logger.getLogger(this.getClass()).info(\"waiting for Remote message...\");\n \n Logger.getLogger(this.getClass()).info(\"press enter to shutdown server\");\n \n //TODO raffaele.picardi: report this class out of this test and remain only Monitor.onWait for itnegration test\n // Monitor.waitOn(WAIT);\n //Init section to transfer in External system\n UMOMessage result=null;\n MuleClient client;\n while (true) {\n try {\n \n client = new MuleClient();\n RemoteDispatcher rd = client.getRemoteDispatcher(MessagesTest.getString(\"EHelloServiceObjectArrayTest.10\")); //$NON-NLS-1$\n \n/* SoapMethod method = new SoapMethod(new QName(\"\", Messages.getString(\"SOAP_METHOD_NAME\")));\n method.addNamedParameter(new QName( Messages.getString(\"NAMED_PARAMETER\")), new javax.xml.namespace.QName( Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QNAME\")), \"in\");\n method.setReturnType( new javax.xml.namespace.QName(Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QTYPE_NAME\")));\n method.setReturnClass(Class.forName(Messages.getString(\"RETURN_CLASSNAME\")));\n */\n \n Map props = new HashMap();\n props.put(\"style\", \"wrapped\");\n props.put(\"use\", \"literal\"); \n //props.put(MuleProperties.MULE_SOAP_METHOD, method);\n \n props.put(\"resourceKey\", MessagesTest.getString(\"RESOURCE_KEY\"));\n props.put(WSRFParameter.SERVICE_NAMESPACE , MessagesTest.getString(\"SERVICE_NAMESPACE_URI\"));\n props.put(WSRFParameter.RESOURCE_KEY_NAME , MessagesTest.getString(\"RESOURCE_KEY_NAME\"));\n props.put(WSRFParameter.RETURN_QNAME, MessagesTest.getString(\"RETURN_QNAME\"));\n \n /* props.put(WSRFParameter.RETURN_QTYPE, new javax.xml.namespace.QName(Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QTYPE_NAME\")));\n \n props.put(WSRFParameter.RETURN_QTYPE, new javax.xml.namespace.QName(Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QTYPE_NAME\")));\n props.put(WSRFParameter.RETURN_QTYPE, new javax.xml.namespace.QName(Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QTYPE_NAME\")));\n */\n \n props.put(WSRFParameter.RETURN_CLASS, Class.forName(MessagesTest.getString(\"RETURN_CLASSNAME\")));\n props.put(WSRFParameter.SOAP_ACTION_URI, MessagesTest.getString(\"SOAP_ACTION_URI\"));\n result = rd.sendRemote(\"vm://vmQueue\", new Integer(2), props);\n \n //result = rd.sendRemote(Messages.getString(\"EHelloServiceObjectArrayTest.11\"),\"\", null); //$NON-NLS-1$\n //logger.info(this, \"invoke done.\",\"\"); //$NON-NLS-1$\n System.out.println(\"invoke done.\");\n Thread.sleep(5000);\n } \n catch (UMOException e) \n {\n\n e.printStackTrace();\n } \n catch (InterruptedException e) \n {\n\n e.printStackTrace();\n }\n finally \n {\n if (result != null)\n {\n System.out.println(result.getPayload().toString()); //$NON-NLS-1$\n }\n else\n {\n System.out.println(\"result is null\");\n }\n \n }\n //end section to transfer in External system\n }\n \n }", "public void test_execute() throws Throwable {\r\n\t\t\r\n\t\tCLIService service = null;\r\n\t\t\r\n\t\t// Ping\r\n\t\ttry {\r\n\t\t\tservice = CLIServiceWrapper.getService();\r\n\t\t\tString response = service.tender(CLIServiceConstants.COMMAND_PING + \" \" + TEST_PING_ARG0);\r\n\t\t\tif ( CLIServiceTools.isResponseOkAndComplete(response) ) {\r\n\t\t\t\tPASS(TEST_PING);\r\n\t\t\t} else {\r\n\t\t\t\tFAIL(TEST_PING, \"Response not ok. response=\" + response);\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tABORT(TEST_PING,\"ping failed to exception:\" + e.getMessage());\r\n\t\t}\r\n\r\n\t\t// Process list - log and cli\r\n\t\ttry {\r\n\t\t\tString response = service.tender(CLIServiceConstants.COMMAND_PROCESSLIST);\r\n\t\t\tif ( (CLIServiceTools.isResponseOkAndComplete(response)) && (response.indexOf(TEST_PROCESSLIST_VALIDATION1) >= 0) &&\r\n\t\t\t\t (response.indexOf(TEST_PROCESSLIST_VALIDATION2) >= 0) && (response.indexOf(TEST_PROCESSLIST_VALIDATION3) >= 0) ) {\r\n\t\t\t\tPASS(TEST_PROCESSLIST);\r\n\t\t\t} else {\r\n\t\t\t\tFAIL(TEST_PROCESSLIST, \"Response not ok. See log for response.\");\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tABORT(TEST_PROCESSLIST,\"process list failed to exception:\" + e.getMessage());\r\n\t\t}\t\r\n\t\t\r\n\t\t// Process list - log only - the CLI output should not contain any validations, just the OK.\r\n\t\ttry {\r\n\t\t\tString response = service.tender(CLIServiceConstants.COMMAND_PROCESSLIST + \" =\" + CLIServiceConstants.COMMAND_PROCESSLIST_LOG_VALUE);\r\n\t\t\tif ( (CLIServiceTools.isResponseOkAndComplete(response)) && (response.indexOf(TEST_PROCESSLIST_VALIDATION1) < 0) &&\r\n\t\t\t (response.indexOf(TEST_PROCESSLIST_VALIDATION2) < 0) && (response.indexOf(TEST_PROCESSLIST_VALIDATION3) < 0) ) {\r\n\t\t\t\tPASS(TEST_PROCESSLIST_LOG);\r\n\t\t\t} else {\r\n\t\t\t\tFAIL(TEST_PROCESSLIST_LOG, \"Response not ok. See log for response.\");\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tABORT(TEST_PROCESSLIST_LOG,\"process list (log only) failed to exception:\" + e.getMessage());\r\n\t\t}\t\r\n\r\n\t}", "@Test\n public void testClient(){\n received=false;\n uut=new ChatMessageRequest(\"test\",\"test2\",\"test\",MessageTypes.MATCH);\n uut.clientHandle(null,new TestUtilizer());\n assertTrue(received);\n }", "@Test\r\n\tpublic void testD() {\r\n\t\t\r\n\t\tObjectHandshake h = new ObjectHandshake();\r\n\t\th.setUuid( UuidTool.getOne() );\r\n\t\t\r\n\t\tRunProtocol run = null;\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_A);\r\n\t\tassertTrue(run.beginA());\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_A);\r\n\t\tassertTrue(run.commitA());\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_B);\r\n\t\tassertTrue(run.beginB());\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_B);\r\n\t\tassertTrue(run.commitB());\r\n\t\t\r\n\t\tassertEquals(h.getLog(), \"1-1-100-1-1-101-2-2-200-2-2-201-\");\r\n\t}", "public Server() {\n\t\tthis.currentMode = Mode.TEST; // TODO: implement\n\t}", "@Test\n public void testNoHandlers(TestContext context) {\n NetClient client = vertx.createNetClient();\n final Async async = context.async();\n\n client.connect(7000, \"localhost\").onComplete(context.asyncAssertSuccess(socket -> {\n\n final FrameParser parser = new FrameParser(parse -> {\n context.assertTrue(parse.succeeded());\n JsonObject frame = parse.result();\n\n context.assertEquals(\"err\", frame.getString(\"type\"));\n context.assertEquals(\"#backtrack\", frame.getString(\"address\"));\n\n client.close();\n async.complete();\n });\n\n socket.handler(parser);\n\n FrameHelper.sendFrame(\"send\", \"test\", \"#backtrack\", new JsonObject().put(\"value\", \"vert.x\"), socket);\n }));\n }", "@Test(groups = {\"rest-commands\"})\n public void createStandaloneInstanceTest() {\n GlassFishServer server = glassFishServer();\n Command command = new CommandCreateInstance(STANDALONE_INSTANCE, null,\n TestDomainV4Constants.NODE_NAME);\n try {\n Future<ResultString> future =\n ServerAdmin.<ResultString>exec(server, command);\n try {\n ResultString result = future.get();\n //assertNotNull(result.getValue());\n assertEquals(result.state, TaskState.COMPLETED);\n } catch ( InterruptedException | ExecutionException ie) {\n fail(\"CommandCreateInstance command execution failed: \" + ie.getMessage());\n }\n } catch (GlassFishIdeException gfie) {\n fail(\"CommandCreateInstance command execution failed: \" + gfie.getMessage());\n }\n }", "@Test\n public void testProcessWebhook() {\n // TODO: test ProcessWebhook\n }", "public static void main(String[] args) {\n // Set MessageDispatcher.\n // /////////////////////////////////////\n MessageDispatcher dispatcher = new MessageDispatcher(\n SYSTEM_MGR_ID,\n DISPATCHER_IP,\n Integer.parseInt(DISPATCHER_PORT));\n dispatcher.start();\n\n // /////////////////////////////////////\n // // Set SystemManager Interface\n // /////////////////////////////////////\n SystemManagerInterface systemMngInterface =\n new SystemManagerInterface(dispatcher);\n \n // /////////////////////////////////////\n // Set NetworkIntece\n // /////////////////////////////////////\n NetworkInterface originalNwInterface =\n new NetworkInterface(dispatcher, ORIGINAL_NW_ID);\n NetworkInterface aggregatedNwInterface =\n new NetworkInterface(dispatcher, AGGREGATED_NW_ID);\n\n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (1) Delete All Flows.\");\n outMsg(\"//////////////////////////////////////////////////\");\n List<Response> rsps = originalNwInterface.deleteAllFlow(); \n for (Response rsp : rsps) {\n outMsg(\" -DELETE FLow. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n }\n wait(WAIT_TIME);\n\n rsps = aggregatedNwInterface.deleteAllFlow(); \n for (Response rsp : rsps) {\n outMsg(\" -DELETE FLow. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n }\n wait(WAIT_TIME);\n \n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (2) Delete Topology.\");\n outMsg(\"//////////////////////////////////////////////////\");\n rsps = originalNwInterface.deleteTopology();\n for (Response rsp : rsps) {\n outMsg(\" -PUT (empty)Topology (Delete Topology). \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n }\n wait(WAIT_TIME * 2);\n \n rsps = aggregatedNwInterface.deleteTopology();\n for (Response rsp : rsps) {\n outMsg(\" -PUT (empty)Topology (Delete Topology). \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n } \n wait(WAIT_TIME * 2);\n \n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (3) Delete Connections.\");\n outMsg(\"//////////////////////////////////////////////////\");\n Response rsp = systemMngInterface.delConnection(\"conn1\");\n outMsg(\" -DELETE Connection. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n rsp = systemMngInterface.delConnection(\"conn2\");\n outMsg(\" -DELETE Connection. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n\n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (4) Delete Components.\");\n outMsg(\"//////////////////////////////////////////////////\");\n rsp = systemMngInterface.delComponent(ORIGINAL_NW_ID);\n outMsg(\" -DELETE Component. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n rsp = systemMngInterface.delComponent(AGGREGATED_NW_ID);\n outMsg(\" -DELETE Component. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n \n rsp = systemMngInterface.delComponent(AGGREGATOR_ID);\n outMsg(\" -DELETE Component. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n dispatcher.close();\n System.exit(0);\n\n }", "HttpApiResponse run(HttpApiRequest request, ThingifierApiConfig config);", "@Test\n public void updateAccept() throws Exception {\n\n }", "public static void main(String[] args){\n Api api = Factory.createApi(1);\n api.operation(\"using factory now\");\n\n System.out.println(\"--------------using configuration file to get api--------------\");\n Api api2 = Factory.configToCreateApi();\n api2.operation(\"just a test!\");\n }", "@Test\n\tpublic void trial01() {\n\t\tspec1.pathParam(\"id\", 3);\n\t\tResponse response =given().spec(spec1).get(\"/{id}\");\n\t\tresponse.prettyPrint();\n\t\t\n\t\tresponse.then().assertThat().statusCode(200).contentType(ContentType.JSON).statusLine(\"HTTP/1.1 200 OK\");\n\t}", "@Before\n public void setUp() throws Exception {\n StoreDefinition.createAllTables(injector.getInstance(StructuredTableAdmin.class));\n cConf.setBoolean(Constants.Tethering.TETHERING_SERVER_ENABLED, true);\n cConf.setInt(Constants.Tethering.CONNECTION_TIMEOUT_SECONDS, 1);\n\n List<Permission> tetheringPermissions = Arrays.asList(InstancePermission.TETHER);\n InMemoryAccessController inMemoryAccessController = new InMemoryAccessController();\n inMemoryAccessController.grant(\n Authorizable.fromEntityId(InstanceId.SELF),\n MASTER_PRINCIPAL,\n Collections.unmodifiableSet(new HashSet<>(tetheringPermissions)));\n ContextAccessEnforcer contextAccessEnforcer =\n new DefaultContextAccessEnforcer(new AuthenticationTestContext(), inMemoryAccessController);\n AuthenticationTestContext.actAsPrincipal(MASTER_PRINCIPAL);\n\n service =\n new CommonNettyHttpServiceBuilder(\n CConfiguration.create(),\n getClass().getSimpleName(),\n new NoOpMetricsCollectionService())\n .setHttpHandlers(\n new TetheringServerHandler(\n cConf,\n tetheringStore,\n messagingService,\n contextAccessEnforcer,\n messagingProgramStatePublisher),\n new TetheringHandler(cConf, tetheringStore, messagingService, profileService))\n .build();\n service.start();\n config =\n ClientConfig.builder()\n .setConnectionConfig(\n ConnectionConfig.builder()\n .setHostname(service.getBindAddress().getHostName())\n .setPort(service.getBindAddress().getPort())\n .setSSLEnabled(false)\n .build())\n .build();\n }", "@Test\n public void testWithRightPathRightApiKey() throws Exception {\n final Http2Client client = Http2Client.getInstance();\n final CountDownLatch latch = new CountDownLatch(1);\n final ClientConnection connection;\n try {\n connection = client.connect(new URI(\"http://localhost:17352\"), Http2Client.WORKER, Http2Client.SSL, Http2Client.BUFFER_POOL, OptionMap.EMPTY).get();\n } catch (Exception e) {\n throw new ClientException(e);\n }\n final AtomicReference<ClientResponse> reference = new AtomicReference<>();\n try {\n ClientRequest request = new ClientRequest().setPath(\"/test1\").setMethod(Methods.GET);\n request.getRequestHeaders().put(Headers.HOST, \"localhost\");\n request.getRequestHeaders().put(new HttpString(\"x-gateway-apikey\"), \"abcdefg\");\n connection.sendRequest(request, client.createClientCallback(reference, latch));\n latch.await();\n } catch (Exception e) {\n logger.error(\"Exception: \", e);\n throw new ClientException(e);\n } finally {\n IoUtils.safeClose(connection);\n }\n int statusCode = reference.get().getResponseCode();\n String responseBody = reference.get().getAttachment(Http2Client.RESPONSE_BODY);\n Assert.assertEquals(200, statusCode);\n Assert.assertEquals(\"OK\", responseBody);\n }", "@Test\n public void testStart() {\n System.out.println(\"start\");\n int port = 0;\n SServer instance = new SServer();\n instance.start(port);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Before\r\n public void setUp() { \r\n ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment());\r\n //ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(\".\")){});\r\n \t\r\n //helper.setUp();\r\n }", "@Before\n public void setup() {\n mServerContext = mock(ServerContext.class);\n mServerRouter = mock(IServerRouter.class);\n mChannelHandlerContext = mock(ChannelHandlerContext.class);\n mBatchProcessor = mock(BatchProcessor.class);\n mStreamLog = mock(StreamLog.class);\n mCache = mock(LogUnitServerCache.class);\n\n // Initialize with newDirectExecutorService to execute the server RPC\n // handler methods on the calling thread.\n when(mServerContext.getExecutorService(anyInt(), anyString()))\n .thenReturn(MoreExecutors.newDirectExecutorService());\n\n // Initialize basic LogUnit server parameters.\n when(mServerContext.getServerConfig())\n .thenReturn(ImmutableMap.of(\n \"--cache-heap-ratio\", \"0.5\",\n \"--memory\", false,\n \"--no-sync\", false));\n\n // Prepare the LogUnitServerInitializer.\n LogUnitServer.LogUnitServerInitializer mLUSI = mock(LogUnitServer.LogUnitServerInitializer.class);\n when(mLUSI.buildStreamLog(\n any(LogUnitServerConfig.class),\n eq(mServerContext),\n any(BatchProcessorContext.class)\n )).thenReturn(mStreamLog);\n\n when(mLUSI.buildLogUnitServerCache(any(LogUnitServerConfig.class), eq(mStreamLog))).thenReturn(mCache);\n when(mLUSI.buildStreamLogCompaction(mStreamLog)).thenReturn(mock(StreamLogCompaction.class));\n when(mLUSI.buildBatchProcessor(\n any(LogUnitServerConfig.class),\n eq(mStreamLog),\n eq(mServerContext),\n any(BatchProcessorContext.class)\n )).thenReturn(mBatchProcessor);\n\n logUnitServer = new LogUnitServer(mServerContext, mLUSI);\n }", "public ServerTest() {\n\t\tsuper();\n\t}", "public void testGetConnection() {\r\n \r\n }", "public void testGetHost() {\n }", "@Test(groups = {\"rest-commands\"}, dependsOnMethods = {\"createStandaloneInstanceTest\"})\n public void startInstanceTest() {\n GlassFishServer server = glassFishServer();\n Command command = new CommandStartInstance(STANDALONE_INSTANCE);\n try {\n Future<ResultString> future =\n ServerAdmin.<ResultString>exec(server, command);\n try {\n ResultString result = future.get();\n //assertNotNull(result.getValue());\n assertEquals(result.state, TaskState.COMPLETED);\n } catch ( InterruptedException | ExecutionException ie) {\n fail(\"CommandStartInstance command execution failed: \" + ie.getMessage());\n }\n } catch (GlassFishIdeException gfie) {\n fail(\"CommandStartInstance command execution failed: \" + gfie.getMessage());\n }\n }", "public interface TestApi {\n}", "public static void main(String[] args) {\n Server server = new Server(1234);\n server.listen();\n \n // YOUR CODE HERE\n // It is not required (or recommended) to implement the server in\n // this runner class.\n }", "@Test\n public void clientCreatesStreamAndServerReplies() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// SYN_STREAM\n\n peer.acceptFrame();// DATA\n\n peer.sendFrame().headers(false, 3, TestUtil.headerEntries(\"a\", \"android\"));\n peer.sendFrame().data(true, 3, new Buffer().writeUtf8(\"robot\"), 5);\n peer.acceptFrame();// PING\n\n peer.sendFrame().ping(true, 1, 0);// PING\n\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n Http2Stream stream = connection.newStream(TestUtil.headerEntries(\"b\", \"banana\"), true);\n BufferedSink out = Okio.buffer(stream.getSink());\n out.writeUtf8(\"c3po\");\n out.close();\n Assert.assertEquals(Headers.of(\"a\", \"android\"), stream.takeHeaders());\n assertStreamData(\"robot\", stream.getSource());\n connection.writePingAndAwaitPong();\n Assert.assertEquals(0, connection.openStreamCount());\n // verify the peer received what was expected\n MockHttp2Peer.InFrame synStream = peer.takeFrame();\n Assert.assertEquals(TYPE_HEADERS, synStream.type);\n Assert.assertFalse(synStream.outFinished);\n Assert.assertEquals(3, synStream.streamId);\n Assert.assertEquals((-1), synStream.associatedStreamId);\n Assert.assertEquals(TestUtil.headerEntries(\"b\", \"banana\"), synStream.headerBlock);\n MockHttp2Peer.InFrame requestData = peer.takeFrame();\n Assert.assertArrayEquals(\"c3po\".getBytes(StandardCharsets.UTF_8), requestData.data);\n }", "@Test\n public void testSynchronousScoresWithNoAbuseTypes() throws Exception {\n String expectedRequestBody = \"{\\n\" +\n \" \\\"$type\\\" : \\\"$create_order\\\",\\n\" +\n \" \\\"$api_key\\\" : \\\"YOUR_API_KEY\\\",\\n\" +\n \" \\\"$user_id\\\" : \\\"billy_jones_301\\\"\\n\" +\n \"}\";\n\n // Start a new mock server and enqueue a mock response.\n MockWebServer server = new MockWebServer();\n MockResponse response = new MockResponse();\n response.setResponseCode(HTTP_OK);\n String bodyStr = \"{\\n\" +\n \" \\\"status\\\" : 0,\\n\" +\n \" \\\"error_message\\\" : \\\"OK\\\",\\n\" +\n \" \\\"time\\\" : 1327604222,\\n\" +\n \" \\\"request\\\" : \\\"\" + TestUtils.unescapeJson(expectedRequestBody) + \"\\\",\\n\" +\n \" \\\"score_response\\\": {\\n\" +\n \" \\\"status\\\": 0, \\n\" +\n \" \\\"error_message\\\": \\\"OK\\\", \\n\" +\n \" \\\"user_id\\\": \\\"billy_jones_301\\\",\\n\" +\n \" \\\"scores\\\": {\\n\" +\n \" \\\"payment_abuse\\\": {\\n\" +\n \" \\\"score\\\": 0.898391231245,\\n\" +\n \" \\\"reasons\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"name\\\": \\\"UsersPerDevice\\\",\\n\" +\n \" \\\"value\\\": 4,\\n\" +\n \" \\\"details\\\": {\\n\" +\n \" \\\"users\\\": \\\"a, b, c, d\\\"\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \" },\\n\" +\n \" \\\"promotion_abuse\\\": {\\n\" +\n \" \\\"score\\\": 0.472838192111,\\n\" +\n \" \\\"reasons\\\": []\\n\" +\n \" }\\n\" +\n \" },\\n\" +\n \" \\\"latest_labels\\\": {\\n\" +\n \" \\\"payment_abuse\\\": {\\n\" +\n \" \\\"is_bad\\\": true,\\n\" +\n \" \\\"time\\\": 1352201880,\\n\" +\n \" \\\"description\\\": \\\"received a chargeback\\\"\\n\" +\n \" },\\n\" +\n \" \\\"promotion_abuse\\\": {\\n\" +\n \" \\\"is_bad\\\": false,\\n\" +\n \" \\\"time\\\": 1362205000\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \"}\";\n response.setBody(bodyStr);\n server.enqueue(response);\n server.start();\n\n // Create a new client and link it to the mock server.\n SiftClient client = new SiftClient(\"YOUR_API_KEY\", \"YOUR_ACCOUNT_ID\",\n new OkHttpClient.Builder()\n .addInterceptor(OkHttpUtils.urlRewritingInterceptor(server))\n .build());\n\n // Build and execute the request against the mock server.\n EventRequest request = client.buildRequest(\n new CreateOrderFieldSet().setUserId(\"billy_jones_301\")).withScores();\n EventResponse siftResponse = request.send();\n\n // Verify the request.\n RecordedRequest request1 = server.takeRequest();\n Assert.assertEquals(\"POST\", request1.getMethod());\n Assert.assertEquals(\"/v205/events?return_score=true\", request1.getPath());\n JSONAssert.assertEquals(expectedRequestBody, request.getFieldSet().toJson(), true);\n\n // Verify the response.\n Assert.assertEquals(HTTP_OK, siftResponse.getHttpStatusCode());\n Assert.assertEquals(0, (int) siftResponse.getBody().getStatus());\n JSONAssert.assertEquals(response.getBody().readUtf8(),\n siftResponse.getBody().toJson(), false);\n Assert.assertEquals(siftResponse.getAbuseScore(\"payment_abuse\").getScore(),\n (Double) 0.898391231245);\n\n server.shutdown();\n }", "@BeforeMethod\n private void setUp() throws ServerError {\n sessionMock.returns(updatePrxMock.getMock()).getUpdateService();\n\n // mock the session on the Blitz service mock\n updateService = new UpdateBlitzService(sessionMock.getMock());\n }", "@Test\n public void testFailFromClient(TestContext context) {\n NetClient client = vertx.createNetClient();\n final Async async = context.async();\n final String address = \"test\";\n client.connect(7000, \"localhost\").onComplete(context.asyncAssertSuccess(socket -> {\n\n final FrameParser parser = new FrameParser(parse -> {\n context.assertTrue(parse.succeeded());\n JsonObject frame = parse.result();\n if (\"message\".equals(frame.getString(\"type\"))) {\n context.assertEquals(true, frame.getBoolean(\"send\"));\n context.assertEquals(\"Vert.x\", frame.getJsonObject(\"body\").getString(\"value\"));\n FrameHelper.writeFrame(new JsonObject().put(\"type\",\"send\").put(\"address\",frame.getString(\"replyAddress\")).put(\"failureCode\", 1234).put(\"message\", \"ooops!\"), socket);\n }\n });\n\n socket.handler(parser);\n\n FrameHelper.sendFrame(\"register\", address, null, socket);\n\n // There is now way to know that the register actually happened, wait a bit before sending.\n vertx.setTimer( 500L, timerId -> {\n vertx.eventBus().request(address, new JsonObject().put(\"value\", \"Vert.x\")).onComplete(respMessage -> {\n context.assertTrue(respMessage.failed());\n context.assertEquals(\"ooops!\", respMessage.cause().getMessage());\n client.close();\n async.complete();\n });\n });\n\n }));\n\n }", "@Test\n public void testReplyFromClient(TestContext context) {\n NetClient client = vertx.createNetClient();\n final Async async = context.async();\n final String address = \"test\";\n client.connect(7000, \"localhost\").onComplete(context.asyncAssertSuccess(socket -> {\n\n final FrameParser parser = new FrameParser(parse -> {\n context.assertTrue(parse.succeeded());\n JsonObject frame = parse.result();\n if (\"message\".equals(frame.getString(\"type\"))) {\n context.assertEquals(true, frame.getBoolean(\"send\"));\n context.assertEquals(\"Vert.x\", frame.getJsonObject(\"body\").getString(\"value\"));\n FrameHelper.sendFrame(\"send\", frame.getString(\"replyAddress\"), new JsonObject().put(\"value\", \"You got it\"), socket);\n }\n });\n\n socket.handler(parser);\n\n FrameHelper.sendFrame(\"register\", address, null, socket);\n\n // There is now way to know that the register actually happened, wait a bit before sending.\n vertx.setTimer( 500L, timerId -> {\n vertx.eventBus().<JsonObject>request(address, new JsonObject().put(\"value\", \"Vert.x\")).onComplete(respMessage -> {\n context.assertTrue(respMessage.succeeded());\n context.assertEquals(\"You got it\", respMessage.result().body().getString(\"value\"));\n client.close();\n async.complete();\n });\n });\n\n }));\n\n }", "public void test0() {\r\n\t\t// step 1. create a dialog with empty leaderDrawStatus\r\n\t\tString urlString = \"http://localhost:8082/Slot/createdialog?userId=dialogpostest\";\r\n\t\tString dialogId = null;\r\n\t\ttry {\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) \r\n\t\t\t\t\t(new URL(urlString)).openConnection();\r\n\t\t\tconn.setRequestMethod(\"POST\");\r\n\t\t\tconn.setDoOutput(true);\r\n\t\t\tconn.setDoInput(true);\r\n\t\t\tJsonObject obj = Json.createObjectBuilder()\r\n\t\t\t\t\t.add(\"weekdayLine\", \"0101010\")\r\n\t\t\t\t\t.add(\"startTime\", 8)\r\n\t\t\t\t\t.add(\"endTime\", 20)\r\n\t\t\t\t\t.add(\"numOfMembers\", 2)\r\n\t\t\t\t\t.add(\"leaderDrawStatus\", \"000\").build();\r\n\t\t\tPrintWriter writer = new PrintWriter(conn.getOutputStream());\r\n\t\t\twriter.write(obj.toString()); writer.flush();\r\n\t\t\tdialogId = Networks.getResponseFromHttpConnection(conn);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail();\r\n\t\t}\r\n\t\tif (dialogId == null) fail(\"fail to get dialogId\");\r\n\t\t\r\n\t\t// step 2. publish your availability as memeber1 (your userId)\r\n\t\tStringBuffer postUrl = new StringBuffer();\r\n\t\tpostUrl.append(\"http://localhost:8082/Slot/dialog?id=\");\r\n\t\tpostUrl.append(dialogId);\r\n\t\tString myAvailability = \"011\";\r\n\t\tpostUrl.append(\"&userId=member1&drawStatus=\");\r\n\t\tpostUrl.append(myAvailability);\r\n\t\ttry {\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) \r\n\t\t\t\t\t(new URL(postUrl.toString())).openConnection();\r\n\t\t\tconn.setDoInput(true);\r\n\t\t\tString response = Networks.getResponseFromHttpConnection(conn);\r\n\t\t\tSystem.out.println(\"Response from /dialog post request is: \" + response);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail();\r\n\t\t}\r\n\t\t\r\n\t\t// step 3. refresh the page, assert that drawStatus is your availability\r\n\t\tStringBuffer getUrl = new StringBuffer();\r\n\t\tgetUrl.append(\"http://localhost:8082/Slot/dialog?id=\");\r\n\t\tgetUrl.append(dialogId);\r\n\t\tgetUrl.append(\"&userId=member1\");\r\n\t\ttry {\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) \r\n\t\t\t\t\t(new URL(getUrl.toString())).openConnection();\r\n\t\t\tconn.setDoInput(true);\r\n\t\t\tString jsonString = Networks.getResponseFromHttpConnection(conn);\r\n\t\t\tJSONObject jsonObj = (JSONObject) (new JSONParser()).parse(jsonString);\r\n\t\t\tassertTrue(((String) jsonObj.get(\"drawStatus\")).startsWith(myAvailability));\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "@Test\n public void testLocalClient()\n {\n generateEvents(\"local-client\");\n checkEvents(true, false);\n }", "public interface NettyProxyService {\n /**\n * 心跳\n *\n * @param msg\n * @throws Exception\n */\n void processHeartbeatMsg(HeartbeatMsg msg) throws Exception;\n\n /**\n * 上传位置\n *\n * @param msg\n * @throws Exception\n */\n void processLocationMsg(LocationMsg msg) throws Exception;\n\n /**\n * 离线\n *\n * @param deviceNumber\n */\n void processInactive(String deviceNumber);\n}", "public static void main(String[] args) {\n\t\tRestApiClient apiClient = new RestApiClient();\n\t\t\n\t\t// do get request\n\t\tInvocation getMessage = apiClient.prepareRequestForGetMessage(\"2\");\n\t\tResponse response = getMessage.invoke();\n\t\tMessage message = response.readEntity(Message.class);\n\t\tSystem.out.println(message.getMessage());\n\t\t\n\t\t// do get request by year receiving a generic type of list\n\t\tgetMessage = apiClient.prepareRequestForGetMessageByYear(2018);\n\t\tresponse = getMessage.invoke();\n\t\tList<Message> list = response.readEntity(new GenericType<List<Message>>() { });\n\t\tlist.forEach((msg) -> System.out.println(msg.getMessage()));\n\t\t\n\t\t// do post request\n\t\tInvocation postMessage = apiClient.prepareRequestForPostMessage(\n\t\t\t\tnew Message(\"msg created in client\", \"whoknows2\"));\n\t\tResponse postResponse = postMessage.invoke();\t\t\n\t\tif (postResponse.getStatus() != Status.CREATED.getStatusCode()) {\n\t\t\tSystem.out.println(\"Error!\");\n\t\t}\n\t\tMessage createdMessage = postResponse.readEntity(Message.class);\n\t\tSystem.out.println(createdMessage.getMessage());\n\t}" ]
[ "0.6596357", "0.6460463", "0.6432295", "0.64005774", "0.6357643", "0.6350701", "0.63380176", "0.6314763", "0.6104256", "0.6033218", "0.60328287", "0.60161644", "0.5997644", "0.5985154", "0.59850925", "0.5970884", "0.5933364", "0.59325695", "0.59263355", "0.59244627", "0.59213346", "0.59181947", "0.59111935", "0.59028375", "0.58973014", "0.58699787", "0.58696413", "0.58687496", "0.58636624", "0.5860067", "0.58487004", "0.58333826", "0.5828781", "0.5817349", "0.5816245", "0.58134407", "0.5806042", "0.580573", "0.5804772", "0.57921", "0.5788288", "0.5784603", "0.57737815", "0.576669", "0.5759101", "0.57491904", "0.5746059", "0.572423", "0.57236105", "0.57212555", "0.56998855", "0.5694816", "0.5693512", "0.5692121", "0.5675416", "0.5658324", "0.56548846", "0.5651505", "0.5650355", "0.56498677", "0.56395376", "0.56390357", "0.56354594", "0.5630624", "0.5624179", "0.5622897", "0.5618576", "0.5613195", "0.56052125", "0.56002635", "0.55993474", "0.55988336", "0.557925", "0.55758876", "0.5574304", "0.5568962", "0.55670017", "0.55669785", "0.5563937", "0.5562333", "0.55578727", "0.5549787", "0.554778", "0.55462486", "0.554364", "0.5543435", "0.55407524", "0.55379754", "0.5536659", "0.5536152", "0.55321324", "0.5530646", "0.55262756", "0.5523455", "0.55047387", "0.55003035", "0.5495411", "0.54928493", "0.5490717", "0.54897994", "0.5485499" ]
0.0
-1
/ This method displays main menu of options to user
static void DisplayMainMenu() { System.out.println("******"); System.out.println("Menu"); System.out.println("******"); System.out.println("Enter Selection"); System.out.println("1) Send Message"); System.out.println("2) Receive Message"); System.out.println("3) Run regression test"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayMenu() {\n\t\tSystem.out.println(\"********Loan Approval System***********\");\n\t\tSystem.out.println(\"\\n\");\n\t\tSystem.out.println(\n\t\t\t\t\"Choose the following options:\\n(l)Load Applicaitons\\n(s)Set the Budget\\n(m)Make a decision\\n(p)Print\\n(u)Update the application\");\n\n\t}", "private void displayOptions() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Main System Menu\");\n\t\tSystem.out.println(\"----------------\");\n\t\tSystem.out.println(\"A)dd polling place\");\n\t\tSystem.out.println(\"C)lose the polls\");\n\t\tSystem.out.println(\"R)esults\");\n\t\tSystem.out.println(\"P)er-polling-place results\");\n\t\tSystem.out.println(\"E)liminate lowest candidate\");\n\t\tSystem.out.println(\"?) display this menu of choices again\");\n\t\tSystem.out.println(\"Q)uit\");\n\t\tSystem.out.println();\n\t}", "private void displayMenuOptions()\n {\n // display user options menu\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n System.out.println(\"COMMAND OPTIONS:\");\n System.out.println(\"\");\n System.out.println(\" 'on' to force power controller to ON state\");\n System.out.println(\" 'off' to force power controller to OFF state\");\n System.out.println(\" 'status' to see current power controller state\");\n System.out.println(\" 'sunrise' to display sunrise time.\");\n System.out.println(\" 'sunset' to display sunset time.\");\n System.out.println(\" 'next' to display next scheduled event.\");\n System.out.println(\" 'time' to display current time.\");\n System.out.println(\" 'coord' to display longitude and latitude.\");\n System.out.println(\" 'help' to display this menu.\");\n System.out.println(\"\");\n System.out.println(\"PRESS 'CTRL-C' TO TERMINATE\");\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n }", "private void displayMenu() {\r\n System.out.println(\"\\nSelect an option from below:\");\r\n System.out.println(\"\\t1. View current listings\");\r\n System.out.println(\"\\t2. List your vehicle\");\r\n System.out.println(\"\\t3. Remove your listing\");\r\n System.out.println(\"\\t4. Check if you won bid\");\r\n System.out.println(\"\\t5. Save listings file\");\r\n System.out.println(\"\\t6. Exit application\");\r\n\r\n }", "private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }", "public static void listMainMenuOptions(){\n\t\tSystem.out.println(\"\\nWelcome to Vet Clinic Program. Please choose an option from the list below.\\n\");\n\t\tSystem.out.println(\"1: List all staff.\");\n\t\tSystem.out.println(\"2: List staff by category.\");\n\t\tSystem.out.println(\"3: List admin Staff performing a task.\");\n\t\tSystem.out.println(\"4: Search for a specific member of staff by name.\");\n\t\tSystem.out.println(\"5: List all animals.\");\n\t\tSystem.out.println(\"6: List animals by type.\");\n\t\tSystem.out.println(\"7: Search for a specific animal by name.\");\n\t\tSystem.out.println(\"8: See the Queue to the Veterinary\");\n\t\tSystem.out.println(\"9: Exit\");\n\t}", "private void displayMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Main Menu -------------\");\r\n System.out.println(\"(1) Search Cars\");\r\n System.out.println(\"(2) Add Car\");\r\n System.out.println(\"(3) Delete Car\");\r\n System.out.println(\"(4) Exit System\");\r\n System.out.println(\"(5) Edit Cars\");\r\n }", "public void showMenu() {\n\t\tSystem.out.println(\"Please, choose one option!\");\n\t\tSystem.out.println(\"[ 1 ] - Highest Company Capital\");\n\t\tSystem.out.println(\"[ 2 ] - Lowest Company Capital\");\n\t\tSystem.out.println(\"[ 3 ] - Best Investor of the Day\");\n\t\tSystem.out.println(\"[ 4 ] - Worst Investor of the Day\");\n\t\tSystem.out.println(\"[ 0 ] - Exit\");\n\t}", "private int mainMenu(){\n System.out.println(\" \");\n System.out.println(\"Select an option:\");\n System.out.println(\"1 - See all transactions\");\n System.out.println(\"2 - See all transactions for a particular company\");\n System.out.println(\"3 - Detailed information about a company\");\n System.out.println(\"0 - Exit.\");\n\n return getUserOption();\n }", "private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }", "public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}", "private void displayMenu()\r\n {\r\n System.out.println(\"\\nWelcome to Car Park System\");\r\n System.out.println(\"=============================\");\r\n System.out.println(\"(1)Add a Slot \");\r\n System.out.println(\"(2)Delete a Slot\");\r\n System.out.println(\"(3)List all Slots\");\r\n System.out.println(\"(4)Park a Car\");\r\n System.out.println(\"(5)Find a Car \");\r\n System.out.println(\"(6)Remove a Car\");\r\n System.out.println(\"(7)Exit \");\r\n System.out.println(\"\\nSelect an Option: \");\r\n }", "private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }", "public void mainMenu() {\n\t\t// main menu\n\t\tdisplayOptions();\n\t\twhile (true) {\n\t\t\tString choice = ValidInputReader.getValidString(\n\t\t\t\t\t\"Main menu, enter your choice:\",\n\t\t\t\t\t\"^[aAcCrRpPeEqQ?]$\").toUpperCase();\n\t\t\tif (choice.equals(\"A\")) {\n\t\t\t\taddPollingPlace();\n\t\t\t} else if (choice.equals(\"C\")) {\n\t\t\t\tcloseElection();\n\t\t\t} else if (choice.equals(\"R\")) {\n\t\t\t\tresults();\n\t\t\t} else if (choice.equals(\"P\")) {\n\t\t\t\tperPollingPlaceResults();\n\t\t\t} else if (choice.equals(\"E\")) {\n\t\t\t\teliminate();\n\t\t\t} else if (choice.equals(\"?\")) {\n\t\t\t\tdisplayOptions();\n\t\t\t} else if (choice.equals(\"Q\")) {\n\t\t\t\tSystem.out.println(\"Goodbye.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "static void displayMenu(){\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Select operation:\");\n\t\tSystem.out.println(\"1-List movies\");\n\t\tSystem.out.println(\"2-Show movie details\");\n\t\tSystem.out.println(\"3-Add a movie\");\n\t\tSystem.out.println(\"4-Add an example set of 5 movies\");\n\t\tSystem.out.println(\"5-Exit\");\n\t}", "public static void mainMenu() \n\t{\n\t\t// display menu\n\t\tSystem.out.print(\"\\nWhat would you like to do?\" +\n\t\t\t\t\"\\n1. Enter a new pizza order (password required)\" +\n\t\t\t\t\"\\n2. Change information of a specific order (password required)\" +\n\t\t\t\t\"\\n3. Display details for all pizzas of a specific size (s/m/l)\" +\n\t\t\t\t\"\\n4. Statistics of today's pizzas\" +\n\t\t\t\t\"\\n5. Quit\" +\n\t\t\t\t\"\\nPlease enter your choice: \");\t\n\t}", "public void menu()\n {\n System.out.println(\"\\n\\t\\t============================================\");\n System.out.println(\"\\t\\t|| Welcome to the Movie Database ||\");\n System.out.println(\"\\t\\t============================================\");\n System.out.println(\"\\t\\t|| (1) Search Movie ||\");\n System.out.println(\"\\t\\t|| (2) Add Movie ||\");\n System.out.println(\"\\t\\t|| (3) Delete Movie ||\");\n System.out.println(\"\\t\\t|| (4) Display Favourite Movies ||\");\n System.out.println(\"\\t\\t|| (5) Display All Movies ||\");\n System.out.println(\"\\t\\t|| (6) Edit movies' detail ||\");\n System.out.println(\"\\t\\t|| (7) Exit System ||\");\n System.out.println(\"\\t\\t=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.print( \"\\t\\tPlease insert your option: \");\n }", "private static void displayMainMenu() {\n\t\tSystem.out.println(\"\\t Main Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"au <username> : Registers as a new user \\n\"\n\t\t\t\t+ \"du <username> : De-registers a existing user \\n\"\n\t\t\t\t+ \"li <username> : To login \\n\"\n\t\t\t\t+ \"qu : To exit \\n\"\n\t\t\t\t+\"====================================\\n\");\n\t}", "protected void printMenu() {\n System.out.println(\"\\nChoose an option:\");\n }", "private void printMenu() {\n\t\tSystem.out.println(\"Select an option :\\n----------------\");\n\t\tfor (int i = 0, size = OPTIONS.size(); i < size; i++) {\n\t\t\tSystem.out.println(OPTIONS.get(i));\n\t\t}\n\t}", "public static void structEngineerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Structural Engineer's Information\");\n System.out.println(\"2 - Would you like to search for a Structural Engineer's Information\");\n System.out.println(\"3 - Adding a new Structural Engineer's Information\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "private void mainMenu() {\r\n System.out.println(\"Please choose an option: \");\r\n System.out.println(\"1. New Player\");\r\n System.out.println(\"2. New VIP Player\");\r\n System.out.println(\"3. Quit\");\r\n }", "public void mainMenu() {\n\n System.out.println(\"\\n HOTEL RESERVATION SYSTEM\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.println(\" COMMANDS:\");\n System.out.println(\" - View Tables\\t\\t(1)\");\n System.out.println(\" - Add Records\\t\\t(2)\");\n System.out.println(\" - Update Records\\t(3)\");\n System.out.println(\" - Delete Records\\t(4)\");\n System.out.println(\" - Search Records\\t(5)\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.print(\" > \");\n }", "private void displayMenu() {\n\t\tint option = MenuView.getMenuOption(\n\t\t\t\"Welcome \" + movieGoer.getName() + \"!\",\n\t\t\t\"View movie showtimes\",\n\t\t\t\"Book a ticket\",\n\t\t\t\"View movie details\",\n\t\t\t\"List top 5 movies\",\n\t\t\t\"View booking history\",\n\t\t\t\"Exit\"\n\t\t);\n\t\t\n\t\tswitch (option) {\n\t\t\tcase 1:\n\t\t\t\tNavigationController.load(new ShowTimeController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\tNavigationController.load(new BookingController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\tNavigationController.load(new MovieController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\tNavigationController.load(new TopMoviesController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 5:\n\t\t\t\tNavigationController.load(new BookingHistoryController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 6:\n\t\t\t\tNavigationController.goBack();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void main_menu()\n\t{\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.println(\"Please Select an option\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.print(\"1.Add 2.Update 3.Delete 4.Exit\\n\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tchoice=me.nextInt();\n\t\tthis.check_choice(choice);\n\t}", "static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}", "public void menuDisplay() {\n\t\t\n\t\tjava.lang.System.out.println(\"\");\n\t\tjava.lang.System.out.println(\"~~~~~~~~~~~~Display System Menu~~~~~~~~~~~~\");\n\t\tjava.lang.System.out.println(\"**** Enter a Number from the Options Below ****\");\n\t\tjava.lang.System.out.println(\"Choice 1 – Print System Details\\n\" + \n\t\t\t\t\t\t \"Choice 2 - Display System Properties\\n\" +\n\t\t\t\t\t\t \"Choice 3 – Diagnose System\\n\" + \n\t\t\t\t\t\t \"Choice 4 – Set Details\\n\" + \n\t\t\t\t\t\t \"Choice 5 – Quit the program\");\n\t\t\n\t}", "public void menuOptions(String type) {\n System.out.println(\"\\n\" + \"To select an option, type what's inside the parenthesis.\");\n System.out.println(\"While in a sub-menu -> (0) Back out of a sub-menu. \\n\");\n System.out.println(\"Main Menu\");\n if (type.equals(\"Attendee\") || type.equals(\"VIP\")) {\n System.out.println(\"(1a) Message, (2a) Contacts, (3a) Signup, (4a) See Attendee Schedule\");\n System.out.println(\"(5a) Get Event Details, (6a) View Conference Schedule, \"+\n \" (p) Export the conference schedule to a PDF\");\n } else if (type.equals(\"Organizer\")) {\n System.out.println(\"(1o) Message, (2o) Contacts, (3o) View Conference Schedule\");\n System.out.println(\"(4o) Modify Events, (5o) Add room, (6o) Create a User account\"+\n \" (p) Export the conference schedule to a PDF\");\n System.out.println(\"(7o) View Current Rooms, (8o) Get Event Details\");\n } else if (type.equals(\"Speaker\")) {\n System.out.println(\"(1s) Message, (2s) Contacts, (3s) See Speaker Schedule\");\n System.out.println(\"(4s) Get Event Details, (5s) View Conference Schedule\"+\n \" (p) Export the conference schedule to a PDF\");\n }\n System.out.println(\"Type Quit to logout\");\n }", "private void printMenu() {\n\t\tSystem.out.printf(\"\\n********** MiRide System Menu **********\\n\\n\");\n\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Create Car\", \"CC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Book Car\", \"BC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Complete Booking\", \"CB\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Display ALL Cars\", \"DA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Specific Car\", \"SS\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Available Cars\", \"SA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Seed Data\", \"SD\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Load Cars\", \"LC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Exit Program\", \"EX\");\n\t\tSystem.out.println(\"\\nEnter your selection: \");\n\t\tSystem.out.println(\"(Hit enter to cancel any operation)\");\n\t}", "public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }", "private static void showMenu(){\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"What would you like to do?\");\r\n\t\tSystem.out.println(\"0) Show Shape information\");\r\n\t\tSystem.out.println(\"1) Create Shape\");\r\n\t\tSystem.out.println(\"2) Calculate perimeter\");\r\n\t\tSystem.out.println(\"3) Calculate area\");\r\n\t\tSystem.out.println(\"4) Scale shape\");\r\n\t}", "public static void displayMenu(){\n //*Displays the Menu\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Food Item\", \"Size\", \"Options\", \"Price\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"---------\", \"----\", \"-------\", \"-----\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Drink\", \"S,M,L\", \"Sprite, Rootbeer, and Orange Fanta\", \"$5.50 for small, +$.50 for each size increase\\n\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Burger\", \"N/A\", \"Extra Patty, bacon, cheese, lettuce\", \"$3.00 for a burger, +$.50 for additional toppings\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"\", \"\", \"tomato, pickles, onions\", \"\\n\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Pizza\", \"S,M,L\", \"Pepperoni, sausage, peppers, chicken\", \"$5.00 for small, +$2.50 for each size increase,\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"\", \"\", \"salami, tomatoes, olives, anchovies\", \"+$1.00 for each extra topping\" );\n }", "public static void listMenuOptions(){\n\n System.out.println(\"Please choose an option:\");\n System.out.println(\"(1) Add a task.\");\n System.out.println(\"(2) Remove a task.\");\n System.out.println(\"(3) Update a task.\");\n System.out.println(\"(4) List all tasks.\");\n System.out.println(\"(0) Exit\");\n }", "private void printMainMenu(){\n\t\tprint(\"Please choose from the options below\", System.lineSeparator()+\"1.Login\", \"2.Exit\");\n\t}", "private void mainMenuDetails() {\n try {\n System.out.println(\"Enter your choice:\");\n final int menuOption = option.nextInt();\n switch (menuOption) {\n case 1:\n showFullMenu();\n break;\n case 2:\n acceptRejectResponse();\n break;\n case 3:\n placeOrder();\n break;\n case 4:\n showFullOrder();\n break;\n case 5:\n Runtime.getRuntime().halt(0);\n default:\n System.out.println(\"Choose either 1 or 2\");\n }\n } catch (final Exception e) {\n e.printStackTrace();\n System.out.println(\"enter a valid value\");\n }\n option.nextLine();\n mainMenu();\n }", "public static void f_menu() {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"--------------DIGITALSOFT---------------\");\n System.out.println(\"-----version:1.0------28/04/2020.-------\");\n System.out.println(\"-----Angel Manuel Correa Rivera---------\");\n System.out.println(\"----------------------------------------\");\n }", "private static void showMenu() {\n System.out.println(\"1. Dodaj zadanie\");\n System.out.println(\"2. Wykonaj zadanie.\");\n System.out.println(\"3. Zamknij program\");\n }", "private static void displayUserMenu() {\n\t\tSystem.out.println(\"\\t User Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"ar <reponame> : To add a new repo \\n\"\n\t\t\t\t+ \"dr <reponame> : To delete a repo \\n\"\n\t\t\t\t+ \"or <reponame> : To open repo \\n\"\n\t\t\t\t+ \"lr : To list repo \\n\"\n\t\t\t\t+ \"lo : To logout \\n\"\n\t\t\t\t+ \"====================================\\n\");\n\t}", "public static void architectUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the architects\");\n System.out.println(\"2 - Would you like to search for a architect's information\");\n System.out.println(\"3 - Adding a new architect's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }", "public void displaymenu()\r\n\t{\r\n\t\tSystem.out.println(\"Welcome to the COMP2396 Authentication system!\");\r\n\t\tSystem.out.println(\"1. Authenticate user\");\r\n\t\tSystem.out.println(\"2. Add user record\");\r\n\t\tSystem.out.println(\"3. Edit user record\");\r\n\t\tSystem.out.println(\"4. Reset user password\");\r\n\t\tSystem.out.println(\"What would you like to perform?\");\r\n\t}", "public static void displayMenu() {\r\n System.out.print(\"\\nName Saver Server Menu\\n\\n\"\r\n +\"1. Add a name\\n2. Remove a name\\n3. List all names\\n\"\r\n +\"4. Check if name recorded\\n5. Exit\\n\\n\"\r\n +\"Enter selection [1-5]:\");\r\n }", "public void showMenu() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\t1. Show vertices\");\n\t\tSystem.out.println(\"\\t2. Show adjacent vertices\");\n\t\tSystem.out.println(\"\\t3. Get vertex count\");\n\t\tSystem.out.println(\"\\t4. Get edge count\");\n\t\tSystem.out.println(\"\\t5. Add vertex\");\n\t\tSystem.out.println(\"\\t6. Add edge\");\n\t\tSystem.out.println(\"\\t7. Remove vertex\");\n\t\tSystem.out.println(\"\\t8. Remove edge\");\n\t\tSystem.out.println(\"\\t9. Check connectivity\");\n\t\tSystem.out.println(\"\\t0. Check adjacency\");\n\t\tSystem.out.println(\"\\tTRAVERSAL ALGORITHMS\");\n\t\tSystem.out.println(\"\\t11. Depth-first traversal\");\n\t\tSystem.out.println(\"\\t12. Breadth-first traversal\");\n\t\t\n\t\tSystem.out.println(\"\\tINPUT -1 TO EXIT\");\n\t\tSystem.out.println();\n\t}", "private void mainMenuDetails() {\r\n try {\r\n System.out.println(\"Enter your choice:\");\r\n int menuOption = option.nextInt();\r\n switch (menuOption) {\r\n case 1:\r\n showFullMenu();\r\n break;\r\n case 2:\r\n empLogin();\r\n break;\r\n case 3:\r\n venLogin();\r\n // sub menu should not be this\r\n break;\r\n case 4:\r\n Runtime.getRuntime().halt(0);\r\n default:\r\n System.out.println(\"Choose either 1,2,3\");\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"enter a valid value\");\r\n }\r\n option.nextLine();\r\n mainMenu();\r\n }", "private void presentMenu() {\n System.out.println(\"\\nHi there, kindly select what you would like to do:\");\n System.out.println(\"\\ta -> add a task\");\n System.out.println(\"\\tr -> remove a task\");\n System.out.println(\"\\tc -> mark a task as complete\");\n System.out.println(\"\\tm -> modify a task\");\n System.out.println(\"\\tv -> view all current tasks as well as tasks saved previously\");\n System.out.println(\"\\tct -> view all completed tasks\");\n System.out.println(\"\\ts -> save tasks to file\");\n System.out.println(\"\\te -> exit\");\n }", "public void displayMenu() {\r\n\t\tSystem.out.println(\"Enter a number between 0 and 8 as explained below: \\n\");\r\n\t\tSystem.out.println(\"[\" + ADD_CUSTOMER + \"] Add a customer.\");\r\n\t\tSystem.out.println(\"[\" + ADD_MODEL + \"] Add a model.\");\r\n\t\tSystem.out.println(\"[\" + ADD_TO_INVENTORY + \"] Add a washer to inventory.\");\r\n\t\tSystem.out.println(\"[\" + PURCHASE + \"] Purchase a washer.\");\r\n\t\tSystem.out.println(\"[\" + LIST_CUSTOMERS + \"] Display all customers.\");\r\n\t\tSystem.out.println(\"[\" + LIST_WASHERS + \"] Display all washers.\");\r\n\t\tSystem.out.println(\"[\" + DISPLAY_TOTAL + \"] Display total sales.\");\r\n\t\tSystem.out.println(\"[\" + SAVE + \"] Save data.\");\r\n\t\tSystem.out.println(\"[\" + EXIT + \"] to Exit\");\r\n\t}", "public void showMenu()\r\n {\r\n System.out.println(\"Enter Truck order: \");\r\n \r\n super.showCommon();\r\n \r\n \r\n super.showMenu(\"What size truck is this? \", SIZE);\r\n \r\n \r\n \r\n \r\n \r\n \r\n super.showMenu(\"What is the engine size of the truck?\", ENGINE_SIZE);\r\n \r\n \r\n \r\n }", "private void displayEditMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Edit Menu ------------\");\r\n System.out.println(\"(1) Edit Car Colour\");\r\n System.out.println(\"(2) Edit Car Price\");\r\n System.out.println(\"(3) Back to Main Menu\");\r\n }", "@Override\r\n public final void display() {\r\n System.out.println(\"\\n\\t===============================================================\");\r\n System.out.println(\"\\tEnter the letter associated with one of the following commands:\");\r\n \r\n for (String[] menuItem : HelpMenuView.menuItems) {\r\n System.out.println(\"\\t \" + menuItem[0] + \"\\t\" + menuItem[1]);\r\n }\r\n System.out.println(\"\\t===============================================================\\n\");\r\n }", "public void menu() {\n System.out.println(\n \" Warehouse System\\n\"\n + \" Stage 3\\n\\n\"\n + \" +--------------------------------------+\\n\"\n + \" | \" + ADD_CLIENT + \")\\tAdd Client |\\n\"\n + \" | \" + ADD_PRODUCT + \")\\tAdd Product |\\n\"\n + \" | \" + ADD_SUPPLIER + \")\\tAdd Supplier |\\n\"\n + \" | \" + ACCEPT_SHIPMENT + \")\\tAccept Shipment from Supplier |\\n\"\n + \" | \" + ACCEPT_ORDER + \")\\tAccept Order from Client |\\n\"\n + \" | \" + PROCESS_ORDER + \")\\tProcess Order |\\n\"\n + \" | \" + CREATE_INVOICE + \")\\tInvoice from processed Order |\\n\"\n + \" | \" + PAYMENT + \")\\tMake a payment |\\n\"\n + \" | \" + ASSIGN_PRODUCT + \")\\tAssign Product to Supplier |\\n\"\n + \" | \" + UNASSIGN_PRODUCT + \")\\tUnssign Product to Supplier |\\n\"\n + \" | \" + SHOW_CLIENTS + \")\\tShow Clients |\\n\"\n + \" | \" + SHOW_PRODUCTS + \")\\tShow Products |\\n\"\n + \" | \" + SHOW_SUPPLIERS + \")\\tShow Suppliers |\\n\"\n + \" | \" + SHOW_ORDERS + \")\\tShow Orders |\\n\"\n + \" | \" + GET_TRANS + \")\\tGet Transaction of a Client |\\n\"\n + \" | \" + GET_INVOICE + \")\\tGet Invoices of a Client |\\n\"\n + \" | \" + SAVE + \")\\tSave State |\\n\"\n + \" | \" + MENU + \")\\tDisplay Menu |\\n\"\n + \" | \" + EXIT + \")\\tExit |\\n\"\n + \" +--------------------------------------+\\n\");\n }", "private static void displayMenu() {\n\t\tSystem.out.println(\"\\n\\nWelcome to Seneca@York Bank!\\n\" +\n\t\t\t\t\"1. Open an account.\\n\" +\n\t\t\t\t\"2. Close an account.\\n\" +\n\t\t\t\t\"3. Deposit money.\\n\" +\n\t\t\t\t\"4. Withdraw money.\\n\" +\n\t\t\t\t\"5. Display accounts. \\n\" +\n\t\t\t\t\"6. Display a tax statement.\\n\" +\n\t\t\t\t\"7. Exit\\n\");\n\t}", "private static void MainMenuRec(){\n System.out.println(\"Choose one of the following:\");\n System.out.println(\"-----------------------------\");\n System.out.println(\"1. Book room\");\n System.out.println(\"2. Check-out\");\n System.out.println(\"3. See room list\");\n System.out.println(\"4. Create a new available room\");\n System.out.println(\"5. Delete a room\");\n System.out.println(\"6. Make a room unavailable\");\n System.out.println(\"7. Make a (unavailable) room available\");\n System.out.println(\"8. Back to main menu\");\n System.out.println(\"-----------------------------\");\n }", "private static void printMainMenu() {\n\t\tprintln(\"Main Menu:\");\n\t\tprintln(\"\\tI: Import Movie <Title>\");\n\t\tprintln(\"\\tD: Delete Movie <Title>\");\n\t\tprintln(\"\\tS: Sort Movies\");\n\t\tprintln(\"\\tA: Sort Actors\");\n\t\tprintln(\"\\tQ: Quit\");\n\t}", "public static void mainMenu() {\r\n\t\tSystem.out.println(\"============= Text-Werkzeuge =============\");\r\n\t\tSystem.out.println(\"Bitte Aktion auswählen:\");\r\n\t\tSystem.out.println(\"1: Text umkehren\");\r\n\t\tSystem.out.println(\"2: Palindrom-Test\");\r\n\t\tSystem.out.println(\"3: Wörter zählen\");\r\n\t\tSystem.out.println(\"4: Caesar-Chiffre\");\r\n\t\tSystem.out.println(\"5: Längstes Wort ermitteln\");\r\n\t\tSystem.out.println(\"0: Programm beenden\");\r\n\t\tSystem.out.println(\"==========================================\");\r\n\t}", "public OptionsMenu() {\n\t\tsuper(OPTIONS_WINDOW_TITLE);\n\t\tQ = new Quoridor();\n\t\tinitialize();\n\t\tsetVisible(true);\n\t}", "public static void proManagerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Project Manager's Information\");\n System.out.println(\"2 - Would you like to search for a Project Manager's information\");\n System.out.println(\"3 - Adding a new Project Manager's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "public void displayHelpMenuView()\n {\n System.out.println(\"\\nHelp menu selected.\");\n }", "private void ShowMenu() {\n\t\tSystem.out.println(\"Please enter a number between 0 and 6 to perform the below actions:\\n\" + \n\t\t\t\t\"0: Exit the program\\n\" + \n\t\t\t\t\"1: Show total population for all zip codes available\\n\" + \n\t\t\t\t\"2: Show the total parking fines per capita for each zip code available\\n\" + \n\t\t\t\t\"3: Show the average market value for residences in a specified zip code\\n\" + \n\t\t\t\t\"4: Show the average total livable area for residences in a specified zip code\\n\" + \n\t\t\t\t\"5: Show the total residential market value per capita for a specified zip code\\n\" +\n\t\t\t\t\"6: Show a sorted list of zip codes and their most common fine in that zip code. Values sorted by total livable area per capita\");\n\t}", "private static void displayMenu() {\n System.out.println(\"Menu : \");\n System.out.println(\"Type any number for selection\");\n for (int i = 1; i <= totalPlayers; i++) {\n System.out.println(i + \")View \" + playerList.get(i - 1) + \" cards\");\n }\n System.out.println(\"8)Display Each Player's Hand Strength\");\n System.out.println(\"9)Declare Winner\");\n System.out.println(\"10)Exit\");\n }", "static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }", "private static void displayRepoMenu() {\n\t\tSystem.out.println(\"\\t Repo Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"su <username> : To subcribe users to repo \\n\"\n\t\t\t\t+ \"ci: To check in changes \\n\"\n\t\t\t\t+ \"co: To check out changes \\n\"\n\t\t\t\t+ \"rc: To review change \\n\"\n\t\t\t\t+ \"vh: To get revision history \\n\"\n\t\t\t\t+ \"re: To revert to previous version \\n\"\n\t\t\t\t+ \"ld : To list documents \\n\"\n\t\t\t\t+ \"ed <docname>: To edit doc \\n\"\n\t\t\t\t+ \"ad <docname>: To add doc \\n\"\n\t\t\t\t+ \"dd <docname>: To delete doc \\n\"\n\t\t\t\t+ \"vd <docname>: To view doc \\n\"\n\t\t\t\t+ \"qu : To quit \\n\" \n\t\t\t\t+ \"====================================\\n\");\n\t}", "protected abstract void addMenuOptions();", "public static void customerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the customers\");\n System.out.println(\"2 - Would you like to search for a customer's information\");\n System.out.println(\"3 - Adding a new customer's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "public void printMenu()\n {\n String menu = (\"------------- Menu -------------\\nDisplay collection\\nCheck out materials\\nQuit\\n--------------------------------\\nPlease click one of the buttons to the right\");\n jTextPane1.setText(menu);\n jButton1.enableInputMethods(true);\n jButton2.enableInputMethods(true);\n jButton3.enableInputMethods(true);\n jButton4.enableInputMethods(false);\n }", "public static void options(){\n System.out.println(\"Choose from the following options \");\n System.out.println(\"0 Print the options again\");\n System.out.println(\"1 Create Student Records\");\n System.out.println(\"2 Create Teacher Records\");\n System.out.println(\"3 Edit the Records\");\n System.out.println(\"4 Get the Record Count\");\n System.out.println(\"5 Exit\");\n }", "public static void menu() {\n\t\tSystem.out.println(\"\\nPlease select which type of argument to generate by entering the associated number.\\n\");\n\t\tfor(int i = 0; i < type.length; i++) {\n\t\t\tSystem.out.println((i+1)+\". \"+type[i]);\n\t\t}\n\t\tSystem.out.println(\"8. Quit\");\n\t}", "public static void printMenu(){\n System.out.print(\"1. List all writing groups\\n\" +\n \"2. List all the data for one writing group\\n\"+\n \"3. List all publishers\\n\"+\n \"4. List all the data for one publisher\\n\"+\n \"5. List all books\\n\"+\n \"6. List all the data for one book\\n\"+\n \"7. Insert new book\\n\"+\n \"8. Insert new publisher\\n\"+\n \"9. Remove a book\\n\"+\n \"10. Quit\\n\\n\");\n }", "private void printMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Opret\");\n System.out.println(\"(2) Find\");\n System.out.println(\"(3) Slet\");\n System.out.print(\"Valg: \");\n }", "private void displayMenu() {\r\n\t\tif (this.user instanceof Administrator) {\r\n\t\t\tnew AdminMenu(this.database, (Administrator) this.user);\r\n\t\t} else {\r\n\t\t\tnew BorrowerMenu(this.database);\r\n\t\t}\r\n\t}", "private void menuSetup()\n {\n menuChoices = new String []\n {\n \"Add a new product\",\n \"Remove a product\",\n \"Rename a product\",\n \"Print all products\",\n \"Deliver a product\",\n \"Sell a product\",\n \"Search for a product\",\n \"Find low-stock products\",\n \"Restock low-stock products\",\n \"Quit the program\" \n };\n }", "void printMainMenu(){\n\t\tSystem.out.println(\"\\n\\nMarketo Music\");\n\t\tSystem.out.println(\"Main Menu\");\n\t\tSystem.out.println(\"1. Create Playlist: create <playlist name>\");\n\t\tSystem.out.println(\"2. Edit Playlist: edit <playlist id>\");\n\t\tSystem.out.println(\"3. Print Song: song <song id>\");\n\t\tSystem.out.println(\"4. Print Playlist: playlist <playlist id>\");\n\t\tSystem.out.println(\"5. Print All Songs or Playlists: print song/playlist\");\n\t\tSystem.out.println(\"6. Search Song: search artist/title <string of words to be searched>\");\n\t\tSystem.out.println(\"7. Sort songs: sort artist/title\");\n\t\tSystem.out.println(\"8. Quit: quit\");\n\t\tSystem.out.print(\"Enter a Command : \");\n\t}", "@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}", "public static void displayMainMenu() {\n\t\tSystem.out.println(\"1.) Scan network\");//looks for IP address\n\t\tSystem.out.println(\"2.) Wait for connections\");//server\n\t\tSystem.out.println(\"3.) Connect to client\");//client\n\t\tSystem.out.println(\"4.) Exit\");\n\t}", "public abstract void displayMenu();", "public static void structEMain(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Create a new Structural Engineer Profile\");\n System.out.println(\"2 - Search for Structural Engineer Profile\\n\");\n\n System.out.println(\"0 - Continue\");\n }", "public static void WriteMainMenu(){\r\n System.out.println(\"\\n=================Welcome to McDonalds=================\");\r\n System.out.println(\"1. Take Order \\n2. Edit McDonalds Menu \\n3. Exit application \");\r\n }", "public void showOptions()\n {\n //make the options window visible\n optionsScreen.setVisible(true);\n }", "private static void menu()\r\n\t{\r\n\t\tSystem.out.println(\"0. ** FOR INSTRUCTOR **\");\r\n\t\tSystem.out.println(\" Seed 5 URLs, set 3 keywords, creates 1000 Producers and 10 Consumers\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"1. Add seed url\");\r\n\t\tSystem.out.println(\"2. Add consumer (Parser)\");\r\n\t\tSystem.out.println(\"3. Add producer (Fetcher)\");\r\n\t\tSystem.out.println(\"4. Add keyword search\");\r\n\t\tSystem.out.println(\"5. Print stats\");\r\n\t}", "public void displayMenu()\n {\n System.out.println(\"-----------------Welcome to 256 Game------------------\");\n System.out.println(\"press 1 to register a player\");\n System.out.println(\"press 2 to start a new game\");\n System.out.println(\"press 3 to view a help menu\");\n System.out.println(\"press 4 to exist\");\n System.out.println(\"------------------------------------------------------\");\n }", "public static void showOptions() {\n System.out.println(new StringJoiner(\"\\n\")\n .add(\"*************************\")\n .add(\"1- The participants' directory.\")\n .add(\"2- The RDVs' agenda.\")\n .add(\"3- Quit the app.\")\n .add(\"*************************\")\n );\n }", "static void mainMenu()\n {\n clrscr();\n System.out.print(\"\\n\"\n + title()\n + \"Go on, \" + Player.current.name + \", choose away ...\\n\"\n + \"1. Match time!\\n\"\n + \"2. Pokedex pls\\n\"\n + \"3. Show me my stats\\n\"\n + \"4. I suck at life and want to quit\\n\"\n + \"(1/2/3/4): \");\n\n // checks for int input, or routes back to mainMenu()\n int option = input.hasNextInt()? input.nextInt() : mainCallbacks.length - 1;\n\n // just defaults to quit if options > length of array of callbacks (here 5)\n mainCallbacks[Math.min(option, mainCallbacks.length - 1)].call();\n mainMenu();\n }", "public static void readMenu(){\n\t\tSystem.out.println(\"Menu....\");\n\t\tSystem.out.println(\"=====================\");\n\t\tSystem.out.println(\"1. Book A Ticket\\t2. See Settings\\n3. Withdraw\\t4. Deposit\");\n\n\t}", "public void showMemberCategoryMenu() {\n System.out.println(\"Visa lista med: \");\n System.out.println(\"\\t1. Barnmedlemmar\");\n System.out.println(\"\\t2. Ungdomsmedlemmar\");\n System.out.println(\"\\t3. Vuxenmedlemmar\");\n System.out.println(\"\\t4. Seniormedlemmar\");\n System.out.println(\"\\t5. VIP-medlemmar\");\n System.out.print(\"Ange val: \");\n }", "public void options() {\n\n audio.playSound(LDSound.SMALL_CLICK);\n if (canViewOptions()) {\n Logger.info(\"HUD Presenter: options\");\n uiStateManager.setState(GameUIState.OPTIONS);\n }\n }", "public void displayMenu() {\n\t\tSystem.out.println(\"\\n1 to see vehicles in a date interval\");\n\t\tSystem.out.println(\"2 to see a specific reservation\");\n\t\tSystem.out.println(\"3 to see all reservations\");\n\t\tSystem.out.println(\"9 to exit\\n\");\n\t\ttry {\n\t\t\tString in = reader.readLine();\n\t\t\tswitch (in) {\n\t\t\tcase \"1\":\n\t\t\t\tdisplayCarsInInterval();\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\tdisplaySpecificBooking();\n\t\t\t\tbreak;\n\t\t\tcase \"3\":\n\t\t\t\tdisplayBookings();\n\t\t\t\tbreak;\n\t\t\tcase \"9\":\n\t\t\t\tSystem.out.println(\"Client application terminated\");\n\t\t\t\tSystem.exit(0);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Please insert a valid number\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unexpected problem with reading your input, please try again.\");\n\t\t}\n\t\tdisplayMenu();\n\t}", "private void printLoggedInMenu(){\n\t\tprint(\"Please choose from the options below\"+System.lineSeparator(), \n\t\t\"1.Search Users\", \"2.Search Movies\", \"3.View Feed\", \"4.View Profile\", \"5.Logout\", \"6.Exit\");\n\t}", "static void montaMenu() {\n System.out.println(\"\");\r\n System.out.println(\"1 - Novo cliente\");\r\n System.out.println(\"2 - Lista clientes\");\r\n System.out.println(\"3 - Apagar cliente\");\r\n System.out.println(\"0 - Finalizar\");\r\n System.out.println(\"Digite a opcao desejada: \");\r\n System.out.println(\"\");\r\n }", "private void printMainMenu() {\n\t\tSystem.out.println(\"1. Go adventuring\");\n\t\tSystem.out.println(\"2. Enter tavern\");\n\t\tSystem.out.println(\"3. Show details about your character\");\n\t\tSystem.out.println(\"4. Exit game\");\n\t}", "public void showMenu(){\n\t\tSystem.out.println(\"******************************************************\");\n\t\tSystem.out.println(\"************Welcome to the holding program************\");\n\t\tSystem.out.println(\"******************************************************\");\n\t\tint option = -1;\n\t\twhile(option != 0){\n\t\t\tSystem.out.println(\"******************************************************\");\n\t\t\tSystem.out.println(\"***************Please, select an option***************\");\n\t\t\tSystem.out.println(\"******************************************************\");\n\t\t\tSystem.out.println(\"0. To exit of the program\");\n\t\t\tSystem.out.println(\"1. To add a public service company\");\n\t\t\tSystem.out.println(\"2. To add an university company\");\n\t\t\tSystem.out.println(\"3. To add a high school company\");\n\t\t\tSystem.out.println(\"4. To add a technological company\");\n\t\t\tSystem.out.println(\"5. To add a food company\");\n\t\t\tSystem.out.println(\"6. To add a medicine company\");\n\t\t\tSystem.out.println(\"7. Show the information of the holding\");\n\t\t\tSystem.out.println(\"8. Register a poll\");\n\t\t\tSystem.out.println(\"9. To add a employee\");\n\t\t\tSystem.out.println(\"10. Find the extension of a employee\");\n\t\t\tSystem.out.println(\"11. Find the mails of all the employees that are occupied a position\");\n\t\t\tSystem.out.println(\"12. To add a product\");\n\t\t\toption = reader.nextInt();\n\t\t\treader.nextLine();\n\t\t\tswitch(option){\n\t\t\t\tcase 0:\n\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\tpublicService();\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\tuniversity();\n\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\thighSchool();\n\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\ttechnological();\n\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\tfood();\n\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\tmedicine();\n\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\tSystem.out.println(theHolding.wholeInformation());\n\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\tregisterPoll();\n\t\t\t\tbreak;\n\t\t\t\tcase 9:\n\t\t\t\taddEmployee();\n\t\t\t\tbreak;\n\t\t\t\tcase 10:\n\t\t\t\textensionEmployee();\n\t\t\t\tbreak;\n\t\t\t\tcase 11:\n\t\t\t\tmailsPosition();\n\t\t\t\tbreak;\n\t\t\t\tcase 12:\n\t\t\t\taddProduct();\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Select a correct option\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private static String getMenu() { // method name changes Get_menu to getMenu()\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tsb.append(\"\\nLibrary Main Menu\\n\\n\")\r\n\t\t .append(\" M : add member\\n\")\r\n\t\t .append(\" LM : list members\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" B : add book\\n\")\r\n\t\t .append(\" LB : list books\\n\")\r\n\t\t .append(\" FB : fix books\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" L : take out a loan\\n\")\r\n\t\t .append(\" R : return a loan\\n\")\r\n\t\t .append(\" LL : list loans\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" P : pay fine\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" T : increment date\\n\")\r\n\t\t .append(\" Q : quit\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\"Choice : \");\r\n\t\t \r\n\t\treturn sb.toString();\r\n\t}", "public static void f_menu(){\n System.out.println(\"╔══════════════════════╗\");\r\n System.out.println(\"║ SoftAverageHeight ║\");\r\n System.out.println(\"║Version 1.0 20200428 ║\");\r\n System.out.println(\"║Created by:Andres Diaz║\");\r\n System.out.println(\"╚══════════════════════╝\");\r\n\r\n }", "public void controllerMenu(){\n\t\tint option=1;\n\t\t\n\t\twhile(option!=0){ \n\t\t\tSystem.out.println(\"You are in the air controller menu\");\n\t\t\tSystem.out.println(\"Write the number corresponding to the action you quant to perform:\");\n\t\t\tSystem.out.println(\"1. Add plane (basic info)\");\n\t\t\tSystem.out.println(\"2. Add detailed information of a plane\");\n\t\t\tSystem.out.println(\"3. Show airspace\");\n\t\t\tSystem.out.println(\"4. Encrypt plane\");\n\t\t\tSystem.out.println(\"5. Decrypt plane\");\n\t\t\tSystem.out.println(\"Press 0 to exit\");\n\t\t\t\n\t\t\toption = entry.nextInt();\n\t\t\t\n\t\t\tswitch(option){\t// switch with a method for each operation\n\t\t\t\tcase 1: \n\t\t\t\t\taddPlane();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: \n\t\t\t\t\tafegirInfo();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3: \n\t\t\t\t\tdisplayInfo();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4: \n\t\t\t\t\tencrypt();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tdesencriptar();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private static void printFileOperationMenu() {\n System.out.println(\"-------------------------------------\");\n System.out.println(\"File operation menu\");\n System.out.println(\"1. Retrieve file names from directory\");\n System.out.println(\"2. Add a file.\");\n System.out.println(\"3. Delete a file.\");\n System.out.println(\"4. Search a file.\");\n System.out.println(\"5. Change directory.\");\n System.out.println(\"6. Exit to main menu.\");\n\n }", "private void menu() { \r\n\t\tSystem.out.println(\" ---------WHAT WOULD YOU LIKE TO DO?---------\");\r\n\t\tSystem.out.println(\"1) Move\");\r\n\t\tSystem.out.println(\"2) Save\");\r\n\t\tSystem.out.println(\"3) Quit\");\r\n\t\t\r\n\t}", "private void displayMainMenu () {\n System.out.println();\n System.out.println(\n \"Enter the number of the action to perform: \");\n System.out.println(\n \"Run game...............\" + PLAY_GAME);\n System.out.println(\n \"Exit...................\" + EXIT);\n }", "public String showMainCourseMenu(String foodOptionName){\n stringBuilder = new StringBuilder();\n for (int i = 0; i < menuLoader.getMainCourseMenu().get(foodOptionName).size(); i++) {\n stringBuilder.append((i + 1) + \". \" + menuLoader.getMainCourseMenu().get(foodOptionName).get(i) + \"\\n\");\n }\n return stringBuilder.toString();\n }", "public static void mainMenu() throws InterruptedException {\n\n // Calling the delay method to slow down the speed of the menu presentation\n delay();\n\n //Displaying the menu options by using the system out method\n System.out.println(\"Menu Main: \\n\");\n System.out.println(\"1 - Create a project\");\n System.out.println(\"2 - View projects\");\n System.out.println(\"3 - Completed projects\");\n System.out.println(\"4 - Customer information\");\n System.out.println(\"5 - Architect information\");\n System.out.println(\"6 - Project Manager Information\");\n System.out.println(\"7 - Structural Engineer Information\");\n System.out.println(\"8 - Past Due projects\\n\");\n System.out.println(\"0 - Exit\\n\");\n }", "public void branchMenu(int option){\n switch(option){\n case 1:\n System.out.println(\"Starting security view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.SECURITY);\n break;\n case 2:\n System.out.println(\"Starting application view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.APPLICATION);\n break;\n case 3:\n System.out.println(\"Starting manager view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.MANAGER);\n break;\n case 4:\n System.out.println(\"Starting swipe view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.SWIPE);\n break;\n case 5:\n System.out.println(\"Quitting application...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.QUIT);\n break;\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_window, menu);\n MenuItem m = menu.add(2,4,9,\"Debug Service\");\n m.setCheckable(true);\n m.setChecked(GRClient.getInstance().isDebug());\n\n menu.add(3,9,1, (isSocalConnected) ? \"Sign Out\" : \"Sign In\");\n menu.add(3,8,100,\"Send Feedback\");\n return true;\n }", "public static void academicClusterMenu() {\n\t\tCareerPlanningApplication.setHeader(\"CAREER PLANNING APP\");\n\t\tSystem.out.println(\"1. Add academic clusters\");\n\t\tSystem.out.println(\"2. View academic clusters\");\n\t\tSystem.out.println(\"3. Delete an academic cluster\");\n\t\tSystem.out.println(\"4. Return to Main Menu\");\n\t\tHelper.line(80, \"-\");\n\t}" ]
[ "0.8074894", "0.7981746", "0.79690343", "0.79351485", "0.79014033", "0.78811127", "0.78034264", "0.78005266", "0.77369213", "0.7678341", "0.7657931", "0.76449746", "0.76411605", "0.76353866", "0.7632333", "0.7601582", "0.7600717", "0.7592056", "0.758922", "0.7578484", "0.7559366", "0.75401074", "0.7536073", "0.75246966", "0.75186056", "0.7497413", "0.74596965", "0.7451974", "0.74298143", "0.742572", "0.7411587", "0.73848855", "0.73642653", "0.7352738", "0.73463225", "0.7335966", "0.73340434", "0.7329083", "0.72863215", "0.7271327", "0.7269996", "0.72465795", "0.7237639", "0.72204524", "0.72135806", "0.71989477", "0.71901566", "0.7186312", "0.71695274", "0.715044", "0.71370006", "0.71327037", "0.71266335", "0.7120625", "0.7117528", "0.711597", "0.70981395", "0.70908546", "0.70906466", "0.7054819", "0.7042383", "0.7022252", "0.70178705", "0.70098263", "0.700241", "0.6995564", "0.69813687", "0.6977653", "0.69770706", "0.69686997", "0.6966854", "0.6966746", "0.6953149", "0.6951539", "0.6950218", "0.69397074", "0.69315416", "0.6908343", "0.6904719", "0.6897638", "0.68940353", "0.6891219", "0.68852437", "0.6872341", "0.6866803", "0.6864692", "0.68641233", "0.6858329", "0.68500876", "0.68407726", "0.68377453", "0.68216294", "0.68201315", "0.68120253", "0.6807368", "0.68026084", "0.679162", "0.67816895", "0.67594504", "0.6746924" ]
0.7089574
59
/ This method handles the response object coming back from the CTP protocol. The object contains both the status and any application level information and uses the CTP protocol to communication with the server.
static void processResponse(CTPResponse response) { for(int i=0;i<response.GetNumResponses();i++) { int type = response.getReponseType(i); switch (type) { case CTPResponse.ERROR_RSP:{ if(response.getStatus(i)== -1) System.out.println("ERROR_RSP Invalid client request"); else System.out.println("ERROR_RSP "+response.getErrorText(i)); break; } case CTPResponse.ACKCONNECT_RSP:{ System.out.println("ACKCONNECT_RSP received"); break; } case CTPResponse.ACKOPEN_RSP:{ System.out.println("ACKOPEN_RSP received"); break; } case CTPResponse.ACKLOCK_RSP:{ System.out.println("ACKLOCK_RSP received"); break; } case CTPResponse.ACKEDIT_RSP:{ System.out.println("ACKEDIT_RSP received"); break; } case CTPResponse.SERVRELEASE_RSP:{ System.out.println("SERVRELEASE_RSP received"); break; } case CTPResponse.CONTENTS_RSP:{ System.out.println("CONTENTS_RSP received"); System.out.println("Position in file = "+response.getPosInfile(i)); System.out.println("file data = "+response.getFilData(i)); break; } case CTPResponse.MOVE_RSP:{ System.out.println("MOVE_RSP received"); System.out.println("Cursor position in file= "+response.getPosInfile(i)); break; } case CTPResponse.STATUS_RSP:{ System.out.println("STATUS_RSP received"); System.out.println("Checksum = "+response.getChecksum(i)); break; } case CTPResponse.EDIT_RSP:{ System.out.println("EDIT_RSP received"); System.out.println("action = "+response.getEditAction(i)); System.out.println("Position in file = "+response.getPosInfile(i)); System.out.println("file data = "+response.getFilData(i)); break; } case CTPResponse.CLOSE_RSP:{ System.out.println("CLOSE_RSP received"); break; } default: System.out.println("Invalid Response type received"); }//end switch }//end for loop }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void handleResponse() {\n\t\t\n\t}", "@Override\n\tpublic void processResponse(Response response)\n\t{\n\t\t\n\t}", "public int getResponse() {return response;}", "@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONArray response) {\n\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\tgetTopicDetailsInfos(response,\"init\");\r\n\t\t\t\t\t\tFlag = \"ok\";\r\n\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n String decoded = null;\n try {\n decoded = new String(response, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n Log.d(TAG, \"API call onSuccess = \" + statusCode + \", Headers: \" + headers[0] + \", response.length: \" + response.length +\n \", decoded:\" + response);\n userDidLeave();\n }", "@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tFlag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\tString empty = response.getString(\"empty\");\r\n\t\t\t\t\t\t\tLoger.i(\"test4\", \"444444444--->\"+empty);\r\n\t\t\t\t\t\t\tif(empty.equals(\"no\")){\r\n\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\trepairInitLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty yes\");//已完成 和未完成都为空\r\n\t\t\t\t\t\t\t}else if(empty.equals(\"ok\")){\r\n\t\t\t\t\t\t\t\trepairInitLayout.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty no\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}", "@Override\n public void processResult(HttpResponseMessage response) {\n }", "public void handleResponseInternal(long connection, Object obj) {\n JResponse response = (JResponse) obj;\n Logger.m1416d(TAG, \"Action - handleResponse - connection:\" + connection + \", response:\" + response.toString());\n if (connection != NetworkingClient.sConnection.get()) {\n Logger.m1432w(TAG, \"Response connection is out-dated. \");\n }\n Long rid = response.getHead().getRid();\n Requesting origin = dequeSentQueue(rid);\n if (origin == null) {\n Logger.m1432w(TAG, \"Not found the request in SentQueue when response.\");\n } else {\n rid = origin.request.getHead().getRid();\n endSentTimeout(rid);\n }\n Requesting requesting = (Requesting) this.mRequestingCache.get(rid);\n if (requesting != null) {\n endRequestTimeout(requesting);\n } else {\n Logger.m1432w(TAG, \"Not found requesting in RequestingCache when response.\");\n }\n }", "private void getResponse() {\n response = new Response();\n\n getResponseCode();\n getResponseMessage();\n getResponseBody();\n\n LOG.info(\"--- RESPONSE ---\");\n LOG.info(\"Code: \" + response.getResponseCode());\n LOG.info(\"Message: \" + response.getResponseMessage());\n LOG.info(\"Body: \" + response.getResponseBody());\n LOG.info(\"*************************************\");\n }", "@Override\n public void onResponse(JSONObject response) {\n hideCustomLoadingView();\n try {\n String status = response.getString(\"status\");\n if (status.equals(\"1\")) {\n String order_status = response.getString(\"order_status\");\n customer.online_status = order_status;\n //if(order_status.equals(\"waiting\") || order_status.equals(\"start\")) {\n showCustomerProcessDlg(customer, position);\n// } else {\n// showToast(\"This user was left\");\n //}\n } else if (status.equals(\"false\")) {\n showToast(\"Fail\");\n } else {\n showToast(\"Network Error!\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n showToast(\"Network Error!\");\n }\n }", "@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tFlag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\tString empty=response.getString(\"empty\");\r\n\t\t\t\t\t\t\tLoger.i(\"test5\", \"5555555555--->\"+response.toString());\r\n\t\t\t\t\t\t\tif(\"no\".equals(empty)){\r\n\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\trepairInitLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty yes1111111111111\");\r\n\t\t\t\t\t\t\t}else if(\"ok\".equals(empty)){\r\n\t\t\t\t\t\t\t\trepairInitLayout.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty no\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "protected HttpResponse doReceiveResponse(final HttpRequest request, final HttpClientConnection conn,\n final HttpContext context)\n throws HttpException, IOException\n {\n// log.debug(\"EspMeshHttpRequestExecutor::doReceiveResponse()\");\n if (request == null)\n {\n throw new IllegalArgumentException(\"HTTP request may not be null\");\n }\n if (conn == null)\n {\n throw new IllegalArgumentException(\"HTTP connection may not be null\");\n }\n if (context == null)\n {\n throw new IllegalArgumentException(\"HTTP context may not be null\");\n }\n \n HttpResponse response = null;\n int statuscode = 0;\n \n // check whether the request is instantly, instantly request don't wait the response\n boolean isInstantly = request.getParams().isParameterTrue(EspHttpRequest.ESP_INSTANTLY);\n if (isInstantly)\n {\n ProtocolVersion version = new ProtocolVersion(\"HTTP\", 1, 1);\n StatusLine statusline = new BasicStatusLine(version, 200, \"OK\");\n // let the connection used only once to check whether the device is available\n context.setAttribute(\"timeout\", 1);\n response = ResponseFactory.newHttpResponse(statusline, context);\n Header contentLengthHeader = new BasicHeader(HTTP.CONTENT_LEN, \"0\");\n response.addHeader(contentLengthHeader);\n }\n else\n {\n if (!request.getRequestLine().getMethod().equals(EspHttpRequest.METHOD_COMMAND))\n {\n while (response == null || statuscode < HttpStatus.SC_OK)\n {\n \n response = conn.receiveResponseHeader();\n if (canResponseHaveBody(request, response))\n {\n conn.receiveResponseEntity(response);\n }\n statuscode = response.getStatusLine().getStatusCode();\n \n } // while intermediate response\n }\n else\n {\n ProtocolVersion version = new ProtocolVersion(\"HTTP\", 1, 1);\n StatusLine statusline = new BasicStatusLine(version, 200, \"OK\");\n response = ResponseFactory.newHttpResponse(statusline, context);\n // copy request headers\n // Header[] requestHeaders = request.getAllHeaders();\n // for (Header requestHeader : requestHeaders) {\n // System.out.println(\"requestHeader:\" + requestHeader);\n // response.addHeader(requestHeader);\n // }\n \n Header[] contentLengthHeader = request.getHeaders(HTTP.CONTENT_LEN);\n if (contentLengthHeader == null || contentLengthHeader.length != 1)\n {\n throw new IllegalArgumentException(\"contentLengthHeader == null || contentLengthHeader.length != 1\");\n }\n // at the moment, mesh command request and response len is the same\n response.addHeader(contentLengthHeader[0]);\n \n conn.receiveResponseEntity(response);\n }\n }\n \n // for device won't reply \"Connection: Keep-Alive\" by default, add the header by manual\n if (response != null && response.getFirstHeader(HTTP.CONN_DIRECTIVE) == null)\n {\n response.addHeader(HTTP.CONN_DIRECTIVE, HTTP.CONN_KEEP_ALIVE);\n }\n \n return response;\n \n }", "@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\tString flag = null;\r\n\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tflag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\tif(\"no\".equals(flag)){\r\n\t\t\t\t\t\t\t\tLoger.i(\"TEST\", \"topic is empty yes\");\r\n\t\t\t\t\t\t\t\tmessage.what = NOINFO_SUCCESS_CODE;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tLoger.i(\"TEST\", \"topic is empty no\");\r\n\t\t\t\t\t\t\t\tmessage.what = INIT_FAILED_CODE;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tgetTopicHandler.sendMessage(message);\r\n\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\tLoger.i(\"TEST\", \"pullUpFromSrv-ERROR->\"+e.getMessage());\r\n\t\t\t\t\t\t\tmessage.what = INIT_FAILED_CODE;\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}", "public Object getResponse ()\r\n {\r\n\r\n return response_;\r\n }", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif (WebApi.isRespSuccess(response)){\r\n\t\t\t\tString str = WebApi.getRespMsg(response);\r\n\t\t\t\tif (str != WebApi.API_RESP_MSG_NULL){\r\n\t\t\t\t\tupdateApkState(str);\r\n\t\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_UPDATED);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "protected void onPVMPostsResponse( HttpServletRequest req, HttpServletResponse resp ) throws Exception {\r\n\tHttpSession session = req.getSession( false );\r\n\tif (session == null) throw new NullPointerException(\"Illegal call. Session has has not been created \");\r\n\tSessionState si = (SessionState)session.getAttribute(\"MEV_SESSION\");\r\n\tif (si == null) throw new NullPointerException(\"Illegal call. Session info has not been created for the current session\");\r\n\tPVMResponseAcceptStrategy strategy = new PVMResponseAcceptStrategy( si, m_properties );\r\n\tstrategy.acceptPVMResponse( req, resp );\r\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n // Hide Progress Dialog\n prgDialog.hide();\n // try {\n // JSON Object\n// String str=new String(response);\n// JSONObject obj = new JSONObject(str);\n // When the JSON response has status boolean value assigned with true\n if(statusCode==200){\n\n // Display successfully registered message using Toast\n Toast.makeText(getApplicationContext(), \"Thanks for the Donation.Our representative will contact you shortly :)\", Toast.LENGTH_LONG).show();\n navigateToHomeActivity();\n }\n\n }", "@Override\n public void onResponse(String response) {\n Log.i(\"Checking\", response + \" \");\n if(new ServerReply(response).getStatus())\n {\n Toast.makeText(context,new ServerReply(response).getReason(),Toast.LENGTH_LONG).show();\n }\n\n }", "public static void setResponse(\n FlightContext context, Object responseObject, HttpStatus responseStatus) {\n FlightMap workingMap = context.getWorkingMap();\n workingMap.put(JobMapKeys.RESPONSE.getKeyName(), responseObject);\n workingMap.put(JobMapKeys.STATUS_CODE.getKeyName(), responseStatus);\n }", "protected void handleSuccessMessage(Response response) {\n\t\tonRequestResponse(response);\n\t}", "@Override\r\n\t\tpublic void onComplete(String response, Object state) {\n\t\t\t\r\n\t\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] server_response) {\n try {\n progress.dismiss();\n String response = String.valueOf(new String(server_response, \"UTF-8\"));\n // parse response\n XMLParser parser = new XMLParser();\n Document doc = parser.getDomElement(response, url);\n\n if (doc == null) {\n Dialog.simpleWarning(Lang.get(\"returned_xml_failed\"));\n } else {\n NodeList successNode = doc.getElementsByTagName(\"success\");\n if (successNode.getLength() > 0) {\n Element success = (Element) successNode.item(0);\n Config.context.setTitle(Title);\n\n login_form.setVisibility(View.VISIBLE);\n profile_layer.setVisibility(View.GONE);\n\n Account.logout();\n\n Dialog.toast(success.getTextContent());\n\n menu_logout.setVisible(false);\n menu_remove_account.setVisible(false);\n\n if (Config.activeInstances.contains(\"MyListings\")) {\n Config.activeInstances.remove(\"MyListings\");\n MyListings.removeInstance();\n\n Utils.removeContentView(\"MyListings\");\n }\n loginForm(login_form, Config.context);\n\n LoginManager.getInstance().logOut();\n dialog.dismiss();\n } else {\n NodeList errorNode = doc.getElementsByTagName(\"error\");\n\n if (errorNode.getLength() > 0) {\n // handle errors\n Element error = (Element) errorNode.item(0);\n Dialog.simpleWarning(Lang.get(error.getTextContent()));\n }\n }\n }\n\n } catch (UnsupportedEncodingException e1) {\n\n }\n }", "@Override\n public void onResponse(JSONObject response) {\n hideCustomLoadingView();\n try {\n String status = response.getString(\"status\");\n if (status.equals(\"1\")) {\n String order_status = response.getString(\"order_status\");\n final boolean isStarted = order_status.equalsIgnoreCase(\"start\");\n// photoIV.setBorderColor(ContextCompat.getColor(B_HomeActivity.this, position == 0 ? isStarted ? R.color.colorGreen : R.color.colorAmber : R.color.white));\n tvUserStatus.setText(position == 0 ? isStarted ? \" Cutting \" : \" Waiting \" : \"\");\n tvUserStatus.setTextColor(ContextCompat.getColor(B_HomeActivity.this, R.color.white));\n //if(order_status.equals(\"waiting\") || order_status.equals(\"start\")) {\n// showCustomerProcessDlg(customer, position);\n// } else {\n// showToast(\"This user was left\");\n //}\n } else if (status.equals(\"false\")) {\n showToast(\"Fail\");\n } else {\n showToast(\"Network Error!\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n showToast(\"Network Error!\");\n }\n }", "public abstract void onReceiveResponse(ExchangeContext context);", "@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONArray response) {\n\t\t\t\t\t\trepairInitLayout.setVisibility(View.GONE);\r\n\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\tgetTopicDetailsInfos(response,\"init\");\r\n\t\t\t\t\t\tFlag = \"ok\";\r\n\t\t\t\t\t\tcRequesttype = true;\r\n//\t\t\t\t\t\tmaddapter.notifyDataSetChanged();\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}", "@Override\r\n public void onResponse(String ServerResponse) {\n progressDialog.dismiss();\r\n\r\n // Showing response message coming from server.\r\n Toast.makeText(appointment.this, ServerResponse, Toast.LENGTH_LONG).show();\r\n\r\n\r\n }", "@Override\n\tpublic void onResponse(BaseResponse baseResp) {\n\t\tSystem.out.println(\"onResponse() --> baseResp.toString() = \" + baseResp.toString()); \n System.out.println(\"onResponse() --> baseResp.errCode = \" + baseResp.errCode); \n System.out.println(\"onResponse() --> baseResp.errMsg = \" + baseResp.errMsg); \n System.out.println(\"onResponse() --> baseResp.reqPackageName = \" + baseResp.reqPackageName); \n System.out.println(\"onResponse() --> baseResp.transaction = \" + baseResp.transaction); \n switch (baseResp.errCode) {\n case WBConstants.ErrorCode.ERR_OK:\n Toast.makeText(this, \"成功!!\", Toast.LENGTH_LONG).show();\n break;\n case WBConstants.ErrorCode.ERR_CANCEL:\n Toast.makeText(this, \"用户取消!!\", Toast.LENGTH_LONG).show();\n break;\n case WBConstants.ErrorCode.ERR_FAIL:\n Toast.makeText(this, baseResp.errMsg + \":失败!!\", Toast.LENGTH_LONG).show();\n break;\n }\n\n\t}", "@Override\n public void onSuccess(int statusCode, cz.msebera.android.httpclient.Header[] headers, JSONObject response) {\n try {\n String status = response.getString(\"status\");\n if (status.contains(\"status not ok\")) {\n lt.error();\n Toast.makeText(activity, response.getString(\"error\"), Toast.LENGTH_LONG).show();\n } else {\n lt.success();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tFlag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\t\tif(\"no\".equals(Flag)){\r\n\t\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\t\t\tnew Timer().schedule(new TimerTask() {\r\n\t\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}, 1000);\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty yes\");\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty no\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tFlag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\t\tif(\"no\".equals(Flag)){\r\n\t\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\t\t\tnew Timer().schedule(new TimerTask() {\r\n\t\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}, 1000);\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty yes\");\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty no\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t\t}", "@Override\n public void onResponse(String response) {\n System.out.println(\"Recieved Response: \" + response);\n }", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n//\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "@Override\n\tpublic void processRequest(HttpRequest request, HttpResponse response) throws Exception {\n\t\tresponse.setHeaderField( \"Server-Name\", \"Las2peer 0.1\" );\n\t\tresponse.setContentType( \"text/xml\" );\n\t\t\n\t\t\n\t\t\n\t\tif(authenticate(request,response))\n\t\t\tif(invoke(request,response));\n\t\t\t\t//logout(_currentUserId);\n\t \n\t\n\t\t//connector.logMessage(request.toString());\n\t\t\n\t\t\n\t}", "@Override\n public void onResponseSuccess(final String resp) {\n }", "@Override\n\tpublic void processResponse(ResponseEvent responseEvent) {\n\t\tResponse response = responseEvent.getResponse();\n\t\ttry {\n\t\t\t// Display the response message in the text area.\n\t\t\t//printMessage(\"\\nReceived response: \" + response.toString());\n\n\t\t\tClientTransaction tid = responseEvent.getClientTransaction();\n\t\t\tCSeqHeader cseq = (CSeqHeader) response.getHeader(CSeqHeader.NAME);\n\t\t\tif (response.getStatusCode() == Response.OK) {\n\t\t\t\tif (cseq.getMethod().equals(Request.REGISTER)) {\n\t\t\t\t\tSystem.out.println(\"regist ACK OK\");\n\t\t\t\t\t//onInvite();\n\t\t\t\t} else if (cseq.getMethod().equals(Request.INVITE)) {\n\t\t\t\t\tDialog dialog = inviteTid.getDialog();\n\t\t\t\t\tRequest ackRequest = dialog.createAck(cseq.getSeqNumber());\n\t\t\t\t\tdialog.sendAck(ackRequest);\n\t\t\t\t\tSystem.out.println(\"Sending ACK\");\n\t\t\t\t} else if (cseq.getMethod().equals(Request.MESSAGE)) {\n\t\t\t\t\tSystem.out.println(\"Send OK !\");\n\t\t\t\t} else if (cseq.getMethod().equals(Request.CANCEL)) {\n\t\t\t\t\tSystem.out.println(\"Sending BYE -- cancel went in too late !!\");\n\t\t\t\t}\n\t\t\t} else if (response.getStatusCode() == Response.PROXY_AUTHENTICATION_REQUIRED\n\t\t\t\t\t|| response.getStatusCode() == Response.UNAUTHORIZED) {\n\t\t\t\tauthenticationHelper = ((SipStackExt) sipStack)\n\t\t\t\t\t\t.getAuthenticationHelper(new AccountManagerImpl(),\n\t\t\t\t\t\t\t\theaderFactory);\n\t\t\t\tinviteTid = authenticationHelper.handleChallenge(response, tid,\n\t\t\t\t\t\tsipProvider, 5);\n\t\t\t\tinviteTid.getRequest().addHeader(\n\t\t\t\t\t\theaderFactory.createExpiresHeader(3600));\n\t\t\t\tinviteTid.getRequest().setMethod(Request.REGISTER);\n\t\t\t\tinviteTid.sendRequest();\n\t\t\t\tinvco++;\n\t\t\t\tprintMessage(\"[processResponse] Request sent:\\n\" + inviteTid.getRequest().toString() + \"\\n\\n\");\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "@Override\n\t\t\t\t\tpublic void onResponse(String response) {\n\n\t\t\t\t\t}", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n\tpublic void onResp(BaseResp arg0) {\n\t\tswitch (arg0.getType()) {\n\t\t\tcase ConstantsAPI.COMMAND_SENDAUTH: {\n\t\t\t\tswitch (arg0.errCode) {\n\t\t\t\tcase BaseResp.ErrCode.ERR_OK: {\n\t\t\t\t\tSendAuth.Resp result = (SendAuth.Resp) arg0;\n\t\t\t\t\t// call jni\n\t\t\t\t\tSetAccountInfo(result.code);\n\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase BaseResp.ErrCode.ERR_USER_CANCEL:\n\t\t\t\tdefault: {\n\t\t\t\t\t// �����版�剧ず��诲��������\n\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ConstantsAPI.COMMAND_SENDMESSAGE_TO_WX:\n\t\t\t\t//SetMessaegRespInfo();\n\t\t\t\tSendMessageToWX.Resp result = (SendMessageToWX.Resp)arg0;\n\t\t\t\t\n\t\t\t\tif(BaseResp.ErrCode.ERR_OK == arg0.errCode){\n\t\t\t\t\t SetMessaegRespInfo( result.transaction );\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\n\t\t\n\t\t}\n\t\tfinish();\n\t}", "@Override\n public void onResponse(String response) {\n }", "public void parseResponse();", "protected void onMEVPollsForResponse( HttpServletRequest req, HttpServletResponse resp ) throws Exception {\r\n\tHttpSession session = req.getSession( false );\r\n\tif (session == null) throw new NullPointerException(\"Illegal call. Session has not been created \");\r\n\tSessionState si = (SessionState)session.getAttribute(\"MEV_SESSION\");\r\n\tif (si == null) throw new NullPointerException(\"Illegal call. Session info has not been created for the current session\");\r\n\tMEVPollAcceptStrategy strategy = new MEVPollAcceptStrategy( si, m_properties );\r\n\tstrategy.acceptPollRequest( req, resp );\r\n }", "protected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException\r\n\t{\r\n\t\t/**\r\n\t\t * Note: the \"resp\" is the only destination for an incoming requests\r\n\t\t */\r\n\t\tfinal long clientChannelID = Long.valueOf(req.getHeader(\"channelID\"));\r\n\t\t//final String clientID = req.getProtocol() + req.getRemoteAddr() + clientChannelID;\r\n\t\t\r\n\t\tSmartObjectInputStream input = new SmartObjectInputStream(req.getInputStream());\r\n\r\n\t\tLong xid = 0L;\r\n\t\tfinal WaitingCallback blocking = new WaitingCallback();\r\n\t\ttry\r\n\t\t{\r\n\t\t\tchannelEndpoint.updateDeserializingThread(Thread.currentThread(),\r\n\t\t\t\t\ttrue);\r\n\t\t\tfinal CommMessage msg = CommMessage.parse(input);\r\n\t\t\txid = msg.getXID();\r\n\r\n\t\t\tsynchronized (callbacks)\r\n\t\t\t{\r\n\t\t\t\tcallbacks.put(xid + clientChannelID, blocking);\r\n\t\t\t}\r\n\t\t\tmsg.setXID(xid + clientChannelID); //update ID for preventing naming conflict\r\n\t\t\t\r\n\t\t\tchannelEndpoint.getChannelFacade().receivedMessage(this, msg);\r\n\t\t}\r\n\t\tcatch (final IOException ioe)\r\n\t\t{\r\n\t\t\tchannelEndpoint.getChannelFacade().receivedMessage(this, null);\r\n\t\t}\r\n\t\tcatch (final Throwable t)\r\n\t\t{\r\n\t\t\tt.printStackTrace();\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tchannelEndpoint.updateDeserializingThread(Thread.currentThread(),\r\n\t\t\t\t\tfalse);\r\n\t\t}\r\n\r\n\t\tCommMessage responseMsg = null;\r\n\r\n\t\t// wait for the reply\r\n\t\tsynchronized (blocking)\r\n\t\t{\r\n\t\t\tfinal long timeout = System.currentTimeMillis()\r\n\t\t\t\t\t+ CommConstants.TIMEOUT;\r\n\t\t\tresponseMsg = blocking.getResult();\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\twhile (responseMsg == null && System.currentTimeMillis() < timeout)\r\n\t\t\t\t{\r\n\t\t\t\t\tblocking.wait(CommConstants.TIMEOUT);\r\n\t\t\t\t\tresponseMsg = blocking.getResult();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (InterruptedException ie)\r\n\t\t\t{\r\n\t\t\t\tthrow new RemoteCommException(\r\n\t\t\t\t\t\t\"Interrupted while waiting for callback\", ie);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (responseMsg != null)\r\n\t\t{\r\n\t\t\tresponseMsg.setXID(responseMsg.getXID() - clientChannelID);//reset ID\r\n\t\t\tresp.setContentType(\"multipart/x-dpartner\");\r\n\t\t\tSmartObjectOutputStream output = new SmartObjectOutputStream(resp.getOutputStream());\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tchannelEndpoint.updateSerializing(Thread.currentThread(), true);\r\n\t\t\t\tresponseMsg.send(output);\r\n\t\t\t\tresp.flushBuffer();\r\n\t\t\t}\r\n\t\t\tcatch (IOException e)\r\n\t\t\t{\r\n\t\t\t\tthrow e;\r\n\t\t\t}\r\n\t\t\tfinally\r\n\t\t\t{\r\n\t\t\t\tchannelEndpoint.updateSerializing(Thread.currentThread(), false);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new RemoteCommException(\r\n\t\t\t\t\t\"Method Invocation failed, timeout exceeded.\");\r\n\t\t}\r\n\t}", "protected void onPostExecute(SendMessage response) {\n\n Log.i(\"response\", String.valueOf(response) + Error);\n// if (response.getStatus().equalsIgnoreCase(\"true\")) {\n// Intent intent = new Intent(Lo.this, MainActivity.class);\n// startActivity(intent);\n\n// } else {\n// Toast.makeText(ChatActivity.this, response.getStatus(), Toast.LENGTH_LONG).show();\n// }\n\n\n // Show Response Json On Screen (activity)\n // uiUpdate.setText(Content);\n\n /****************** Start Parse Response JSON Data *************/\n\n // String OutputData = \"\"\n// \tSharedPreferences sp = getApplicationContext()\n\n\n }", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t\tBundle bundle = new Bundle();\r\n\t\t\t\tbundle.putInt(HANDLER_DATA_APK_INDEX, this.getApkIndex());\r\n\t\t\t\tMessage msg =new Message();\r\n\t\t\t\tmsg.setData(bundle);\r\n\t\t\t\tmsg.what = HANDLER_MSG_APK_UPLOAD;\r\n\t\t\t\thandler.sendMessage(msg);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "public Object handleCommandResponse(Object response) throws RayoProtocolException;", "@Override\n public void onResponse(String response)\n {\n\n }", "public Http11Response() {\n\t\tsuper();\n\t\tsetVersion(\"HTTP/1.1\");\n\t\taddHeader(\"Server\", \"Shreejit's server/1.2\");\n\t\taddHeader(\"Connection\", \"Close\");\n\n\t\tTimeZone timeZone = TimeZone.getTimeZone(\"GMT\");\n\t\tCalendar cal = Calendar.getInstance(timeZone);\n\t\taddHeader(\"Date\", Parser.formatDate(cal.getTime()));\n\t}", "@Override\n public void onResponse(String response) {\n }", "protected T getResponse() {\n return responseData;\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponseRecieved(String reply) {\n\n if(!reply.equals(\"error\")) {\n Context context = getApplicationContext();\n CharSequence text = reply;\n int duration = Toast.LENGTH_LONG;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n EditText serverReply = (EditText) findViewById(R.id.editTextServerReply);\n serverReply.setText((CharSequence) serverReply, EditText.BufferType.NORMAL);\n\n //Deserializing response and pulling session data out\n Response r = new Gson().fromJson(reply, Response.class);\n\n account.sessionID = r.result.session_id;\n\n AccountMan.AccountMan a = new AccountMan.AccountMan();\n a.AddAccount(account);\n }\n\n }", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t\tBundle bundle = new Bundle();\r\n\t\t\t\tbundle.putInt(HANDLER_DATA_APK_INDEX, this.getApkIndex());\r\n\t\t\t\tMessage msg =new Message();\r\n\t\t\t\tmsg.setData(bundle);\r\n\t\t\t\tmsg.what = HANDLER_MSG_APK_ADD;\r\n\t\t\t\thandler.sendMessage(msg);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n Utils.logApiResponseTime(calendar, tag + \" \" + url);\n mHandleSuccessResponse(tag, response);\n\n }", "@Override\n public void onResponse(JSONObject response) {\n hideCustomLoadingView();\n try {\n String status = response.getString(\"status\");\n if (status.equals(\"1\")) {\n showToast(\"Started\");\n setCustomers();\n } else if (status.equals(\"false\")) {\n showToast(\"Fail\");\n } else {\n showToast(\"Network Error!\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n showToast(\"Network Error!\");\n }\n }", "@Override\n\t\t\t\t\t\tpublic void onResponse(String response) {\n\t\t\t\t\t\t\tparseRespense(response);\n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONArray response) {\n\t\t\t\t\t\tLoger.i(\"TEST\",response.toString());\r\n\t\t\t\t\t\tgetTopicDetailsInfos(response,\"add\");\r\n\t\t\t\t\t\tbPullUpStatus = true;\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n\t\t\tpublic void handle(Response response) throws Exception\n\t\t\t{\n\t\t\t\tif(response ==null){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(response.getStatusCode()==200){\n\t\t\t\t\tSystem.out.println(\"push seccuess\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n\t\t\t\tsuper.onSuccess(statusCode, headers, response);\n\t\t\t\ttry {\n\n\t\t\t\t\tif (statusCode == 200) {\n\t\t\t\t\t\tif (response != null) {\n\t\t\t\t\t\t\tif (response.has(\"status\")) {\n\t\t\t\t\t\t\t\tif (response.getInt(\"status\") == 1) {\n\t\t\t\t\t\t\t\t\tshowCustomToast(response.getString(\"message\"));\n\n\t\t\t\t\t\t\t\t\tmhandle.postDelayed(runnbale, 1000);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tshowCustomToast(response.getString(\"message\"));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tshowCustomToast(R.string.toast1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t}\n\t\t\t\tdismissLoadingDialog();\n\t\t\t}", "@Override\n\t\t\tpublic void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n\t\t\t\tsuper.onSuccess(statusCode, headers, response);\n\t\t\t\ttry {\n\n\t\t\t\t\tif (statusCode == 200) {\n\t\t\t\t\t\tif (response != null) {\n\t\t\t\t\t\t\tif (response.has(\"status\")) {\n\t\t\t\t\t\t\t\tif (response.getInt(\"status\") == 1) {\n\t\t\t\t\t\t\t\t\tshowCustomToast(response.getString(\"message\"));\n\t\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tshowCustomToast(response.getString(\"message\"));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tshowCustomToast(R.string.toast1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t}\n\t\t\t\tdismissLoadingDialog();\n\t\t\t}", "public int getResponseStatus() {\n return responseStatus;\n }", "@Override\r\n\t\t\t\t\tpublic void onResponse(HttpResponse resp) {\n\t\t\t\t\t\tLog.i(\"HttpPost\", \"Success\");\r\n\r\n\t\t\t\t\t}", "private static Response process(Object result) {\n if (result == null) return Response.serverError().build();\n if (result instanceof Response.Status) return Response.status((Response.Status) result).build();\n return Response.ok(result).build();\n }", "public responseConversation processUpdate(Update update){\n LOGGER.info(\"Receiving an update from user {}\",update);\n int response = 0;\n List<String> options = new ArrayList<>();\n List<String> messages = new ArrayList<>();\n if(isNewUser(update)){\n LOGGER.info(\"First time using app for: {} \",update.getMessage().getFrom() );\n response = 1;\n }\n else{\n List<CpCar> allCars;\n List<CpTravelSearch> allSearch;\n Boolean validation;\n String newLastName,newFirstName,newCellphone,newCI,newBrand,newModel,newEnrollmentNumber,newPassenger, newStartPlace, newPlace, newTravelRider;\n Integer idUser;\n CpCar newCar;\n CpTravelRider confirm;\n CpPerson cpPerson;\n CpUser cpUser;\n CpTravel currentTravel = new CpTravel();\n CpTravelSearch search;\n cpUser = cpUserRepository.findByBotUserId(update.getMessage().getFrom().getId().toString());\n\n int last_conversation = cpUser.getConversationId();\n //What happens when chatbot receives a response to a conversation \"last conversation\"\n switch (last_conversation){\n //****************************************\\\\\n //Here is the initial registering\\\\\n //****************************************\\\\\n case 1:\n idUser = cpUser.getPersonId().getPersonId();\n LOGGER.info(\"Buscando el id {} en CpPerson\",idUser);\n cpPerson = cpPersonRepository.findById(idUser).get();\n newLastName = update.getMessage().getText();\n //See if the Last name only has alphabetical Letters and spaces\n validation = isOnlyAlphabeticalCharacters(newLastName);\n if(validation){\n cpPerson.setLastName(newLastName);\n cpPersonRepository.save(cpPerson);\n response = 2;\n }\n else{\n response = 4;\n }\n\n break;\n case 2:\n idUser = cpUser.getPersonId().getPersonId();\n LOGGER.info(\"Buscando el id {} en CpPerson\",idUser);\n cpPerson = cpPersonRepository.findById(idUser).get();\n newFirstName = update.getMessage().getText();\n validation = isOnlyAlphabeticalCharacters(newFirstName);\n if(validation){\n cpPerson.setFirstName(newFirstName);\n cpPersonRepository.save(cpPerson);\n response = 3;\n }\n else{\n response = 5;\n }\n break;\n case 3:\n idUser = cpUser.getPersonId().getPersonId();\n LOGGER.info(\"Buscando el id {} en CpPerson\",idUser);\n cpPerson = cpPersonRepository.findById(idUser).get();\n response = 3;\n if(update.getMessage().getText().equals(\"Carpooler\")){\n //When a user is not a carpooler in the chatbot\n if(cpPerson.getCarpool()==0){\n response = 6;\n }\n //When a user is a carpooler in the chatbot\n else{\n response = 10;\n }\n cpPerson.setCarpool(1);\n cpPersonRepository.save(cpPerson);\n }\n if(update.getMessage().getText().equals(\"Rider\")){\n response=20;\n }\n if(update.getMessage().getText().equals(\"Corregir registro\")){\n response = 4;\n }\n break;\n //****************************************\\\\\n //Here the user can correct its mistakes on the registering\\\\\n //****************************************\\\\\n case 4:\n //Try again to enter Last Name\n idUser = cpUser.getPersonId().getPersonId();\n cpPerson = cpPersonRepository.findById(idUser).get();\n newLastName = update.getMessage().getText();\n validation = isOnlyAlphabeticalCharacters(newLastName);\n if(validation){\n cpPerson.setLastName(newLastName);\n cpPersonRepository.save(cpPerson);\n response = 2;\n }\n else{\n\n response = 4;\n }\n break;\n case 5:\n //Try again to enter First Name\n idUser = cpUser.getPersonId().getPersonId();\n cpPerson = cpPersonRepository.findById(idUser).get();\n newFirstName = update.getMessage().getText();\n validation = isOnlyAlphabeticalCharacters(newFirstName);\n if(validation){\n cpPerson.setFirstName(newFirstName);\n cpPersonRepository.save(cpPerson);\n response = 3;\n }\n else{\n response = 5;\n }\n break;\n //****************************************\\\\\n //Here starts the carpooler part\\\\\n //****************************************\\\\\n case 6:\n idUser = cpUser.getPersonId().getPersonId();\n LOGGER.info(\"Buscando el id {} en CpPerson\",idUser);\n cpPerson = cpPersonRepository.findById(idUser).get();\n newCellphone = update.getMessage().getText();\n if(isValidCellphone(newCellphone)){\n cpPerson.setCellphoneNumber(newCellphone);\n cpPersonRepository.save(cpPerson);\n response = 7;\n }\n else{\n response = 8;\n }\n break;\n case 7:\n idUser = cpUser.getPersonId().getPersonId();\n LOGGER.info(\"Buscando el id {} en CpPerson\",idUser);\n cpPerson = cpPersonRepository.findById(idUser).get();\n newCI = update.getMessage().getText();\n if(isValidCI(newCI)){\n cpPerson.setCiNumber(newCI);\n cpPersonRepository.save(cpPerson);\n response = 10;\n }\n else{\n response = 9;\n }\n break;\n case 8:\n idUser = cpUser.getPersonId().getPersonId();\n cpPerson = cpPersonRepository.findById(idUser).get();\n newCellphone = update.getMessage().getText();\n if(isValidCellphone(newCellphone)){\n cpPerson.setCellphoneNumber(newCellphone);\n cpPersonRepository.save(cpPerson);\n response = 7;\n }\n else{\n response = 8;\n }\n break;\n case 9:\n idUser = cpUser.getPersonId().getPersonId();\n cpPerson = cpPersonRepository.findById(idUser).get();\n newCI = update.getMessage().getText();\n if(isValidCI(newCI)){\n cpPerson.setCiNumber(newCI);\n cpPersonRepository.save(cpPerson);\n response = 10;\n }\n else{\n response = 9;\n }\n break;\n //****************************************\\\\\n //Here is the Menu for Carpooler\\\\\n //****************************************\\\\\n case 10:\n idUser = cpUser.getPersonId().getPersonId();\n LOGGER.info(\"Buscando el id {} en CpPerson\",idUser);\n cpPerson = cpPersonRepository.findById(idUser).get();\n response = 10;\n //Here is the menu for the carpooler\n if(update.getMessage().getText().equals(\"Registrar Vehículo\")){\n response = 11;\n }\n if(update.getMessage().getText().equals(\"Ver Vehículos\")){\n response = 19;\n }\n if(update.getMessage().getText().equals(\"Registrar Viaje\")){\n LOGGER.info(\"Registrar Viaje\");\n response = 27;\n }\n if(update.getMessage().getText().equals(\"Cancelar Viaje\")){\n idUser = cpUser.getPersonId().getPersonId();\n cpPerson = cpPersonRepository.findById(idUser).get();\n List<CpTravel> activeTravels = travelBl.findActiveTravels(cpPerson);\n if(activeTravels.size()>0){\n int a=1;\n for(CpTravel c: activeTravels){\n messages.add(\"Viaje \"+a+\"\\n\"+travelBl.toStringOption(c));\n options.add(\"Viaje \"+a);\n a++;\n }\n response = 38;\n }\n else{\n options.add(\"Ok\");\n response = 40;\n }\n\n }\n if(update.getMessage().getText().equals(\"Volver al Menú Principal\")){\n response = 3;\n }\n break;\n //****************************************\\\\\n //Here is the registering for the car\\\\\n //****************************************\\\\\n case 11:\n idUser = cpUser.getPersonId().getPersonId();\n LOGGER.info(\"Buscando el id {} en CpPerson\",idUser);\n newBrand = update.getMessage().getText();\n if(isOnlyAlphaNumeric(newBrand)){\n newCar = new CpCar();\n newCar.setPersonId(cpUser.getPersonId());\n newCar.setBrand(newBrand);\n newCar.setEnrollmentNumber(\"NULL\");\n newCar.setModel(\"NULL\");\n newCar.setCapacity(0);\n newCar.setStatus(1);\n newCar.setTxHost(\"localhost\");\n newCar.setTxUser(\"admin\");\n newCar.setTxDate(new Date());\n cpCarRepository.save(newCar);\n response = 12;\n }\n else{\n response = 15;\n }\n break;\n case 12:\n idUser = cpUser.getPersonId().getPersonId();\n LOGGER.info(\"Buscando el id {} en CpPerson\",idUser);\n newModel = update.getMessage().getText();\n if(isOnlyAlphaNumeric(newModel)){\n allCars = cpCarRepository.findAll();\n newCar = getLastCar(allCars,idUser);\n newCar.setModel(newModel);\n cpCarRepository.save(newCar);\n response = 13;\n }\n else{\n response = 16;\n }\n break;\n case 13:\n idUser = cpUser.getPersonId().getPersonId();\n LOGGER.info(\"Buscando el id {} en CpPerson\",idUser);\n newEnrollmentNumber = update.getMessage().getText();\n if(isEnrollmentNumberValid(newEnrollmentNumber)){\n allCars = cpCarRepository.findAll();\n newCar = getLastCar(allCars,idUser);\n newCar.setEnrollmentNumber(newEnrollmentNumber);\n cpCarRepository.save(newCar);\n response = 14;\n }\n else{\n response = 17;\n }\n break;\n case 14:\n idUser = cpUser.getPersonId().getPersonId();\n LOGGER.info(\"Buscando el id {} en CpPerson\",idUser);\n newPassenger = update.getMessage().getText();\n if(isOnlyNumbers(newPassenger)) {\n allCars = cpCarRepository.findAll();\n newCar = getLastCar(allCars, idUser);\n newCar.setCapacity(Integer.parseInt(newPassenger));\n cpCarRepository.save(newCar);\n response = 10;\n }\n else{\n response = 18;\n }\n break;\n case 15:\n idUser = cpUser.getPersonId().getPersonId();\n newBrand = update.getMessage().getText();\n if(isOnlyAlphaNumeric(newBrand)){\n newCar = new CpCar();\n newCar.setPersonId(cpUser.getPersonId());\n newCar.setBrand(newBrand);\n newCar.setEnrollmentNumber(\"NULL\");\n newCar.setModel(\"NULL\");\n newCar.setCapacity(0);\n newCar.setStatus(1);\n newCar.setTxHost(\"localhost\");\n newCar.setTxUser(\"admin\");\n newCar.setTxDate(new Date());\n cpCarRepository.save(newCar);\n response = 12;\n }\n else{\n response = 15;\n }\n break;\n case 16:\n idUser = cpUser.getPersonId().getPersonId();\n newModel = update.getMessage().getText();\n if(isOnlyAlphaNumeric(newModel)){\n allCars = cpCarRepository.findAll();\n newCar = getLastCar(allCars,idUser);\n newCar.setModel(newModel);\n cpCarRepository.save(newCar);\n response = 13;\n }\n else{\n response = 16;\n }\n break;\n case 17:\n idUser = cpUser.getPersonId().getPersonId();\n newEnrollmentNumber = update.getMessage().getText();\n if(isEnrollmentNumberValid(newEnrollmentNumber)){\n allCars = cpCarRepository.findAll();\n newCar = getLastCar(allCars,idUser);\n newCar.setEnrollmentNumber(newEnrollmentNumber);\n cpCarRepository.save(newCar);\n response = 14;\n }\n else{\n response = 17;\n }\n break;\n case 18:\n idUser = cpUser.getPersonId().getPersonId();\n newPassenger = update.getMessage().getText();\n if(isOnlyNumbers(newPassenger)) {\n allCars = cpCarRepository.findAll();\n newCar = getLastCar(allCars, idUser);\n newCar.setCapacity(Integer.parseInt(newPassenger));\n cpCarRepository.save(newCar);\n response = 10;\n }\n else{\n response = 18;\n }\n break;\n case 19:\n response = 10;\n break;\n case 20:\n idUser = cpUser.getPersonId().getPersonId();\n LOGGER.info(\"Buscando el id {} en CpPerson\",idUser);\n cpPerson = cpPersonRepository.findById(idUser).get();\n response = 20;\n //Here is the menu for the carpooler\n if(update.getMessage().getText().equals(\"Buscar Viaje\")){\n response = 21;\n }\n if(update.getMessage().getText().equals(\"Ver Viaje\")){\n //CpTravelRider myTravels;\n idUser = cpUser.getPersonId().getPersonId();\n cpPerson = cpPersonRepository.findById(idUser).get();\n List<CpTravel> activeTravels = travelBl.findActiveTravels(cpPerson);\n if(activeTravels.size()>0){\n int a=1;\n for(CpTravel c: activeTravels){\n messages.add(\"Viaje \"+a+\"\\n\"+travelBl.toStringOption(c));\n options.add(\"Viaje \"+a);\n a++;\n }\n response = 38;\n }\n\n response = 22;\n }\n if(update.getMessage().getText().equals(\"Cancelar Viajes\")){\n response = 23;\n }\n if(update.getMessage().getText().equals(\"Volver al Menú Principal\")){\n response = 3;\n }\n break;\n case 21:\n CpZone selectedZone1 = zoneBl.findByName(update.getMessage().getText());\n List<CpPlace> placesZone1 = placeBl.findByZone(selectedZone1);\n for(CpPlace place:placesZone1){\n options.add(place.toStringOption());\n }\n idUser = cpUser.getPersonId().getPersonId();\n LOGGER.info(\"Buscando el id {} en CpPerson\",idUser);\n search = new CpTravelSearch();\n search.setIdPerson(cpUser.getPersonId().getPersonId());\n search.setPlaceStart(\"NULL\");\n search.setPlaceFinish(\"NULL\");\n search.setDepartureTime(\"NULL\");\n LOGGER.info(search.toString());\n LOGGER.info(idUser.toString());\n cpTravelSearchRepository.save(search);\n response = 23;\n break;\n case 22:\n response = 20;\n break;\n case 23:\n idUser = cpUser.getPersonId().getPersonId();\n LOGGER.info(\"Buscando el id {} en CpPerson\",idUser);\n newPlace = update.getMessage().getText();\n allSearch = cpTravelSearchRepository.findAll();\n search = getLastSearch(allSearch,idUser);\n search.setPlaceStart(newPlace);\n cpTravelSearchRepository.save(search);\n response = 42;\n break;\n case 24:\n idUser = cpUser.getPersonId().getPersonId();\n LOGGER.info(\"Buscando el id {} en CpPerson\",idUser);\n cpPerson = cpPersonRepository.findById(idUser).get();\n response = 30;\n\n if(update.getMessage().getText().equals(\"Si\")){\n allSearch = cpTravelSearchRepository.findAll();\n search = getLastSearch(allSearch,idUser);\n cpTravelSearchRepository.save(search);\n\n cpPerson = cpPersonRepository.findById(idUser).get();\n CpTravel cancel = travelBl.getActiveCanceledTravel(cpPerson);\n //MULTICAST TO DO\n options.add(\"Ok\");\n\n String travelid=update.getMessage().getText();\n\n\n List<CpTravel> travels = cpTravelRepository.findAll();\n CpTravel currenTravel = travelBl.getLastTravel(travels,cpPerson);\n\n LOGGER.info(\"Buscando el id {} en CpPerson\",idUser);\n confirm = new CpTravelRider();\n confirm.setPersonId(cpPerson);\n confirm.setTravelId(currenTravel);\n LOGGER.info(confirm.toString());\n LOGGER.info(idUser.toString());\n\n confirm.setStatus(1);\n confirm.setTxHost(\"localhost\");\n confirm.setTxUser(\"admin\");\n confirm.setTxDate(new Date());\n cpTravelRiderRepository.save(confirm);\n response = 25;\n }\n if(update.getMessage().getText().equals(\"No\")){\n response=26;\n }\n break;\n case 25:\n LOGGER.info(\"Se confirme el viaje y se vuelve al menu\");\n response = 20;\n break;\n case 26:\n LOGGER.info(\"Se cancela el viaje y se vuelve al menu\");\n response = 20;\n break;\n case 27:\n LOGGER.info(\"Registering an empty travel\");\n //Set carName without spaces to search this in DB\n String carName = update.getMessage().getText();\n carName = carName.replace(\" \",\"\");\n cpUser = userBl.findUserByTelegramUserId(update);\n cpPerson = personBl.findPersonById(cpUser.getPersonId().getPersonId());\n List<CpCar> allCarsList = carBl.all();\n CpCar carForTravel = null;\n for(CpCar car: allCarsList){\n if(car.getPersonId().getPersonId() == cpPerson.getPersonId()){\n String probCar = car.toStringOption().replace(\" \",\"\");\n if(probCar.equals(carName)){\n carForTravel = carBl.findById(car.getCarId());\n }\n }\n }\n if(carForTravel == null){\n response = 27;\n }\n else{\n CpTravel cpTravel = new CpTravel();\n cpTravel.setCarId(carForTravel);\n cpTravel.setDepartureTime(\"-\");\n cpTravel.setCost(new BigDecimal(\"0.00\"));\n cpTravel.setNumberPassengers(0);\n cpTravel.setPetFriendly(0);\n cpTravel.setStatus(1);\n cpTravel.setTxUser(\"admin\");\n cpTravel.setTxHost(\"localhost\");\n cpTravel.setTxDate(new Date());\n cpTravelRepository.save(cpTravel);\n response = 28;\n }\n break;\n case 28:\n CpZone selectedZone = zoneBl.findByName(update.getMessage().getText());\n List<CpPlace> placesZone = placeBl.findByZone(selectedZone);\n for(CpPlace place:placesZone){\n options.add(place.toStringOption());\n }\n response = 31;\n break;\n case 29:\n\n response = 10;\n break;\n case 30:\n LOGGER.info(\"Se notifica Entrada no valida y se vuelve al menu\");\n response = 20;\n break;\n case 31:\n CpPlace startPlace = placeBl.getPlaceByName(update.getMessage().getText());\n idUser = cpUser.getPersonId().getPersonId();\n cpPerson = cpPersonRepository.findById(idUser).get();\n List<CpTravel> travels = cpTravelRepository.findAll();\n CpTravel currenTravel = travelBl.getLastTravel(travels,cpPerson);\n for(CpPlace place:placeBl.all()){\n options.add(place.toStringOption());\n }\n if(startPlace!=null && currenTravel!=null) {\n CpTravelPlace cpTravelPlace = new CpTravelPlace();\n cpTravelPlace.setPlaceId(startPlace);\n cpTravelPlace.setTravelId(currenTravel);\n cpTravelPlace.setposition(1);\n cpTravelPlace.setStatus(1);\n cpTravelPlace.setTxHost(\"localhost\");\n cpTravelPlace.setTxUser(\"admin\");\n cpTravelPlace.setTxDate(new Date());\n cpTravelPlaceRepository.save(cpTravelPlace);\n options.add(\"Terminar\");\n response=32;\n }\n //LIST ALL PLACES WITHOUT ORDER\n else{\n response = 31;\n }\n break;\n case 32:\n options.clear();\n CpPlace placeSelected = placeBl.getPlaceByName(update.getMessage().getText());\n idUser = cpUser.getPersonId().getPersonId();\n cpPerson = cpPersonRepository.findById(idUser).get();\n List<CpTravel> travelList = cpTravelRepository.findAll();\n CpTravel lastTravel = travelBl.getLastTravel(travelList,cpPerson);\n int lastPosition = travelPlaceBl.getLastPosition(lastTravel);\n if(update.getMessage().getText().equals(\"Terminar\")){\n response = 33;\n }\n else{\n for(CpPlace place:placeBl.all()){\n options.add(place.toStringOption());\n }\n options.add(\"Terminar\");\n response = 32;\n //STORE IN DB a new stop\n CpTravelPlace travelPlace = new CpTravelPlace();\n travelPlace.setposition(lastPosition);\n travelPlace.setTxUser(\"admin\");\n travelPlace.setTxHost(\"localhost\");\n travelPlace.setTxDate(new Date());\n travelPlace.setTravelId(lastTravel);\n travelPlace.setPlaceId(placeSelected);\n travelPlace.setStatus(1);\n cpTravelPlaceRepository.save(travelPlace);\n }\n break;\n case 33:\n if(validator.isValidDate(update.getMessage().getText())){\n LOGGER.info(\"Fecha Valida\");\n idUser = cpUser.getPersonId().getPersonId();\n cpPerson = cpPersonRepository.findById(idUser).get();\n currentTravel = travelBl.getLastTravel(cpTravelRepository.findAll(),cpPerson);\n currentTravel.setDepartureTime(update.getMessage().getText());\n cpTravelRepository.save(currentTravel);\n response = 34;\n }\n else{\n LOGGER.info(\"Fecha Invalida\");\n response = 33;\n }\n break;\n case 34:\n if(validator.isCorrectCurrency(update.getMessage().getText())){\n LOGGER.info(\"Correct currency\");\n idUser = cpUser.getPersonId().getPersonId();\n cpPerson = cpPersonRepository.findById(idUser).get();\n currentTravel = travelBl.getLastTravel(cpTravelRepository.findAll(),cpPerson);\n currentTravel.setCost(new BigDecimal(update.getMessage().getText()));\n cpTravelRepository.save(currentTravel);\n response = 35;\n }\n else{\n LOGGER.info(\"Incorrect currency\");\n response = 34;\n }\n break;\n case 35:\n idUser = cpUser.getPersonId().getPersonId();\n cpPerson = cpPersonRepository.findById(idUser).get();\n currentTravel = travelBl.getLastTravel(cpTravelRepository.findAll(),cpPerson);\n CpCar carTravel = currentTravel.getCarId();\n LOGGER.info(carTravel.toStringOption());\n if(validator.isOnlyNumbers(update.getMessage().getText())){\n if(carTravel.getCapacity()>=Integer.parseInt(update.getMessage().getText())){\n currentTravel.setNumberPassengers(Integer.parseInt(update.getMessage().getText()));\n cpTravelRepository.save(currentTravel);\n LOGGER.info(\"Capacidad aceptada\");\n options.clear();\n options.add(\"Si\");\n options.add(\"No\");\n response = 36;\n }\n else{\n LOGGER.info(\"Capacidad Excedida\");\n response = 35;\n }\n }\n else{\n LOGGER.info(\"Not Only numbers in Capacity\");\n response = 35;\n }\n break;\n case 36:\n idUser = cpUser.getPersonId().getPersonId();\n cpPerson = cpPersonRepository.findById(idUser).get();\n currentTravel = travelBl.getLastTravel(cpTravelRepository.findAll(),cpPerson);\n String message = update.getMessage().getText();\n if(message.equals(\"Si\")){\n currentTravel.setPetFriendly(1);\n cpTravelRepository.save(currentTravel);\n response=37;\n }\n else{\n if(message.equals(\"No\")){\n currentTravel.setPetFriendly(0);\n cpTravelRepository.save(currentTravel);\n response=37;\n }\n else{\n response = 36;\n }\n }\n break;\n case 37:\n idUser = cpUser.getPersonId().getPersonId();\n cpPerson = cpPersonRepository.findById(idUser).get();\n currentTravel = travelBl.getLastTravel(cpTravelRepository.findAll(),cpPerson);\n currentTravel.setDescription(update.getMessage().getText());\n cpTravelRepository.save(currentTravel);\n response = 10;\n break;\n case 38:\n idUser = cpUser.getPersonId().getPersonId();\n cpPerson = cpPersonRepository.findById(idUser).get();\n CpTravel travelToCancel = travelBl.getTravelByInfo(update.getMessage().getText(),cpPerson);\n if(travelToCancel!=null) {\n travelToCancel.setStatus(2);\n cpTravelRepository.save(travelToCancel);\n options.add(\"Si\");\n options.add(\"No\");\n response = 39;\n }\n else{\n response = 10;\n }\n break;\n case 39:\n response = 10;\n if(update.getMessage().getText().equals(\"Si\")){\n idUser = cpUser.getPersonId().getPersonId();\n cpPerson = cpPersonRepository.findById(idUser).get();\n CpTravel cancel = travelBl.getActiveCanceledTravel(cpPerson);\n LOGGER.info(cancel.getTravelId().toString());\n cancel.setStatus(0);\n cpTravelRepository.save(cancel);\n //MULTICAST TO DO\n options.add(\"Ok\");\n response = 41;\n }\n if(update.getMessage().getText().equals(\"No\")){\n idUser = cpUser.getPersonId().getPersonId();\n cpPerson = cpPersonRepository.findById(idUser).get();\n CpTravel cancel = travelBl.getActiveCanceledTravel(cpPerson);\n LOGGER.info(cancel.getTravelId().toString());\n cancel.setStatus(1);\n cpTravelRepository.save(cancel);\n }\n break;\n case 40:\n LOGGER.info(\"No active travels\");\n response = 10;\n break;\n case 41:\n LOGGER.info(\"Travel Cancel Confirmation NO\");\n response = 10;\n break;\n case 42:\n LOGGER.info(\"Fecha Valida\");\n idUser = cpUser.getPersonId().getPersonId();\n allSearch = cpTravelSearchRepository.findAll();\n search = getLastSearch(allSearch,idUser);\n search.setDepartureTime(update.getMessage().getText());\n cpTravelSearchRepository.save(search);\n\n List<CpTravel> selectTravel = travelBl.findActiveTravelsAll();\n LOGGER.info(\"Numero de viajes encontrados: {}\", selectTravel.size());\n List<CpTravel> travelsFound = travelBl.selectTravels(selectTravel, search);\n LOGGER.info(\"Numero de viajes con filtro: {}\", travelsFound.size());\n for(CpTravel travel:travelsFound){\n options.add((travel.toStringInfo()));\n }\n\n response = 43;\n break;\n case 43:\n\n response = 24;\n break;\n }\n cpUser.setConversationId(response);\n cpUserRepository.save(cpUser);\n }\n responseConversation result = new responseConversation(response,options,messages);\n return result;\n }", "@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tJSONArray response) {\n\t\t\t\t\t\t\tgetTopicDetailsInfos(response,\"init\");\r\n\t\t\t\t\t\t\tFlag = \"ok\";\r\n\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\tmaddapter.notifyDataSetChanged();\r\n\t\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t\t}", "public String handleResponse(final HttpResponse response) throws IOException{\n int status = response.getStatusLine().getStatusCode();\n if (status >= 200 && status < 300) {\n HttpEntity entity = response.getEntity();\n if(entity == null) {\n return \"\";\n } else {\n return EntityUtils.toString(entity);\n }\n } else {\n return \"\"+status;\n }\n }", "@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tbyte[] binaryData) {\n\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tMap<String, String> map = new HashMap<String, String>();\r\n\t\t\t\t\t\t\t\tfor (Header h : headers) {\r\n\t\t\t\t\t\t\t\t\tLogger.d(\"---\", h.getName() + \"----------->\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ URLDecoder.decode(h.getValue(), \"UTF-8\"));\r\n\t\t\t\t\t\t\t\t\tmap.put(h.getName(),\r\n\t\t\t\t\t\t\t\t\t\t\tURLDecoder.decode(h.getValue(), \"UTF-8\"));\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (binaryData != null) {\r\n\t\t\t\t\t\t\t\t\tLogger.d(\"---+\", \"content : \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ new String(binaryData, \"GBK\"));\r\n\r\n\t\t\t\t\t\t\t\t\tString data = new String(binaryData, \"GBK\");\r\n\t\t\t\t\t\t\t\t\tif (map.get(\"msgcde\").equals(\"0000000\")) {\r\n\t\t\t\t\t\t\t\t\t\tString msg = data.substring(136,\r\n\t\t\t\t\t\t\t\t\t\t\t\tdata.length() - 1);\r\n//\t\t\t\t\t\t\t\t\t\tinfo = ClassicXML.readStringXmlOut(msg);\r\n//\t\t\t\t\t\t\t\t\t\tif (info.size() != 0) {\r\n//\t\t\t\t\t\t\t\t\t\t\tmAdapter = new MyAdapter(context,\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\tR.layout.cxdt_list_item, info);\r\n//\t\t\t\t\t\t\t\t\t\t\tmListView.setAdapter(mAdapter);\r\n\t//\r\n//\t\t\t\t\t\t\t\t\t\t} else {\r\n//\t\t\t\t\t\t\t\t\t\t\tTool.showToast(context, \"没有定投记录!\");\r\n//\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tTool.showToast(context, \"系统错误!\");\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\r\n//\t\t\t\t\t\t\tif (ppd != null) {\r\n//\t\t\t\t\t\t\t\tppd.dismiss();\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}", "public void setResponseStatus(int responseStatus) {\n this.responseStatus = responseStatus;\n }", "java.lang.String getResponse();", "public abstract String getResponse();", "private void processResponse(Vector response)\n throws IBMLPacketException {\n println(\"Processing response ...\\n\");\n\n // for each items in the vector\n for (int i = 0; i < response.size(); i++) {\n Object obj = response.get(i);\n\n if (obj instanceof String) { // normal\n \tString msg = \"#\" + i + \" (String) : \" + obj;\n println(msg);\n\n } else if (obj instanceof IBMLError) { // error\n IBMLError errorObj = (IBMLError) obj;\n String msg = \"#\" + i + \" (IBMLError) : \" + errorObj.getCode() + \", \" + errorObj.getMessage();\n println(msg);\n\n } else {\n \tString msg = \"#\" + i + \" : \" + response.get(i);\n \tprintln(msg);\n\n }\n\n }\n\n }", "public String receiveResponse()\n\t{\n\t\t\n\t}", "@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\t\tString flag = null;\r\n\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tflag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\t\tif(\"no\".equals(flag)){\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"TEST\", \"topic is empty yes\");\r\n\t\t\t\t\t\t\t\t\tmessage.what = NOINFO_SUCCESS_CODE;\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"TEST\", \"topic is empty no\");\r\n\t\t\t\t\t\t\t\t\tmessage.what = INIT_FAILED_CODE;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tgetTopicHandler.sendMessage(message);\r\n\t\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\tmessage.what = INIT_FAILED_CODE;\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t\t}", "public NCCP_Response(int dl)\n {\n super(dl);\n }", "public int getResponse() {\r\n return response;\r\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response)\n {\n super.onSuccess(statusCode, headers, response);\n System.out.println(\"申请预订接口=\" + response);\n }", "@Override\n public void onResponse(String response, int id) {\n processData(response);\n\n }", "@Override\n\t\t\tprotected void deliverResponse(String response) {\n\n\t\t\t}", "@Override\n public void onResponse(Response response) throws IOException {\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n ResponseResult result = null;\n\n try {\n P2PBridgeWebServiceStub stub = new P2PBridgeWebServiceStub();\n GetStatus stat = new GetStatus();\n stat.setIpAddress(request.getParameter(\"ip_address\"));\n stat.setMake(request.getParameter(\"device\"));\n stat.setModel(request.getParameter(\"model\"));\n stat.setUserName(request.getParameter(\"username\"));\n stat.setPassword(request.getParameter(\"password\"));\n\n GetStatusResponse res = stub.getStatus(stat);\n result = res.get_return();\n\n System.out.println(result.getResult());\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n Utils.generateResponse(result, response);\n }", "public void handleResponse(byte[] result, Command originalCommand);", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String name = request.getParameter(GenericConstants.COMPONENT_PNAME);\n \n RealTimeSUStateHelper suRTHelper = new RealTimeSUStateHelper(name);\n String responseData = suRTHelper.getServiceUnitsState();\n response.setStatus(HttpServletResponse.SC_OK);\n response.setHeader(RealTimeStatisticServlet.CONTENT_TYPE_HEADER, \n RealTimeStatisticServlet.CONTENT_TYPE_VALUE);\n response.setHeader(RealTimeStatisticServlet.CACHE_CONTROL_HEADER, \n RealTimeStatisticServlet.CACHE_CONTROL_VALUE);\n \n // Write out the message on the response stream\n OutputStream outputStream = response.getOutputStream();\n try {\n outputStream.write(responseData.getBytes());\n } catch (IOException e2) {\n }\n outputStream.flush();\n \n }", "@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tJSONArray response) {\n\t\t\t\t\t\t\tgetTopicDetailsInfos(response,\"init\");\r\n\t\t\t\t\t\t\tbPullUpStatus = true;\r\n\t\t\t\t\t\t\tmaddapter = new RepairCircleAdapter(forumtopicLists, PropertyRepairActivity.this,1);\r\n\t\t\t\t\t\t\tactualListView.setAdapter(maddapter);\r\n\t\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t\t}", "public void setResponseStatus(String responseStatus)\r\n\t{\r\n\t\tthis.responseStatus = responseStatus;\r\n\t}", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif (WebApi.isRespSuccess(response)){\r\n\t\t\t\tJSONArray array = WebApi.getRespArray(response);\r\n\t\t\t\tif (array != null){\r\n\t\t\t\t\tPrefProxy.setCategoryList(context, array.toString());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "@Override\n protected void onPostExecute(Boolean result) {\n super.onPostExecute(result);\n Object obj = JSONValue.parse(serverResponse);\n JSONObject jsonObject = (JSONObject)obj;\n Log.d(\"CustomerRegistartn:// \", \"onPostExecution \");\n String status = (String)jsonObject.get(\"STATUS\");\n int statusInt = Integer.parseInt(status);\n Log.d(\"CustomerRegistartn:// \", \"onPostExecution \");\n techStatus = (TextView)findViewById(R.id.techStatus);\n if(statusInt ==0){\n techStatus.setText(\"You are now Busy\");\n }\n if(statusInt == 1){\n techStatus.setText(\"You are now Available\");\n }\n if(statusInt == 2){\n techStatus.setText(\"You are not Available\");\n }\n }", "public BasicResponse(ResponseObject responseObject, int responseStatus) {\n this.responseObject = responseObject;\n this.responseStatus = responseStatus;\n }", "public DacGetStatusResponse() {\n super();\n this.setStatusInfoList(new LazyArrayList<StatusInfo>());\n }", "private void sendResponse(String sHTTPMethod, String sHTTPRequest, int iStatusCode, String sResponse, boolean bPersistentConnection) {\n // determine if sending file and if redirect -> determines response\n boolean bIsFileSend = sHTTPMethod.equalsIgnoreCase(\"GET\") && iStatusCode == 200;\n boolean bIsRedirect = iStatusCode == 301;\n\n // write header\n String sStatus = getStatusLine(iStatusCode) + END_LINE;\n String sLocation = (bIsRedirect) ? (\"Location: \" + sResponse) + END_LINE : (\"\"); // only if redirect\n String sServerDetails = getServerDetails() + END_LINE;\n String sContentLength = \"Content-Length: \" + sResponse.length() + END_LINE;\n String sContentType = getContentType(sHTTPRequest) + END_LINE;\n String sConnection = getConnectionLine(bPersistentConnection) + END_LINE;\n String sSpaceBetweenHeaderAndBody = END_LINE;\n FileInputStream fin = null;\n\n // update content length if sending a file -> create file input stream\n if (bIsFileSend) {\n try {\n fin = new FileInputStream(ROOT_FOLDER.toString() + \"/\" + sResponse); // if file request, then sResponse is the file path\n sContentLength = \"Content-Length: \" + Integer.toString(fin.available()) + END_LINE;\n } catch (IOException e) {\n System.out.println(\"There was an error creating the file input stream for the response:\");\n System.out.println(\" \" + e);\n }\n }\n\n try {\n // send HTTP Header\n outToClient.writeBytes(sStatus);\n if (bIsRedirect) {\n outToClient.writeBytes(sLocation); // only send Location on redirect\n }\n outToClient.writeBytes(sServerDetails);\n outToClient.writeBytes(sContentType);\n outToClient.writeBytes(sContentLength);\n outToClient.writeBytes(sConnection);\n outToClient.writeBytes(sSpaceBetweenHeaderAndBody);\n\n // send HTTP Body\n if (bIsFileSend) {\n sendFile(fin, outToClient); // send file\n } else if (!bIsRedirect && !sHTTPMethod.equalsIgnoreCase(\"HEAD\")) {\n outToClient.writeBytes(sResponse); // send HTML msg back\n }\n\n // print HTTP Header and Body to console\n System.out.println(sStatus);\n System.out.println(sServerDetails);\n System.out.println(sContentType);\n System.out.println(sContentLength);\n System.out.println(sConnection);\n if (bIsRedirect) {\n System.out.println(sLocation);\n }\n if (bIsFileSend) {\n System.out.println(\"File sent: \" + sResponse);\n } else {\n System.out.println(\"Response: \" + sResponse);\n }\n System.out.println();\n\n // close connection\n if (!bPersistentConnection) {\n outToClient.close();\n }\n\n } catch (IOException e) {\n System.out.println(\"writeBytes did not complete:\");\n System.out.println(\" \" + e + \"\\n\");\n }\n }", "protected void doConsumeResponse() throws Exception {\n if (response.getEntity() != null)\n response_data = EntityUtils.toByteArray(response.getEntity());\n }", "@Override\n\tpublic void sendResponse() {\n\t\t\n\t}" ]
[ "0.6304658", "0.6102429", "0.60794353", "0.6042613", "0.59790355", "0.595583", "0.5944515", "0.59403706", "0.5909417", "0.58953005", "0.58791834", "0.5821708", "0.5821708", "0.58187044", "0.58085716", "0.57672924", "0.57288325", "0.5704436", "0.5690366", "0.5689301", "0.5679535", "0.5673136", "0.5668009", "0.56661445", "0.56645656", "0.5657118", "0.5644824", "0.56385887", "0.5637487", "0.5636679", "0.56301266", "0.5629653", "0.5629653", "0.5621108", "0.5614671", "0.56087387", "0.56076014", "0.5606845", "0.5601796", "0.5601501", "0.5597423", "0.55915046", "0.55829203", "0.55823153", "0.5574035", "0.55689496", "0.5560742", "0.5559561", "0.5557188", "0.5552002", "0.55447286", "0.55417097", "0.5537697", "0.5516525", "0.55070466", "0.55070466", "0.55070466", "0.55014175", "0.5497468", "0.54970753", "0.54897404", "0.54882497", "0.54843175", "0.54835474", "0.54827017", "0.54735684", "0.5472016", "0.54716575", "0.5467345", "0.5464954", "0.54647964", "0.54617983", "0.5458292", "0.54548347", "0.5453697", "0.54506457", "0.54438937", "0.5441649", "0.5441471", "0.543444", "0.54339063", "0.54335594", "0.5431711", "0.5428661", "0.5424782", "0.54241425", "0.5421245", "0.54193", "0.5409478", "0.54094356", "0.54087836", "0.54043734", "0.540182", "0.5401094", "0.54010373", "0.53925896", "0.5377027", "0.5376194", "0.53757304", "0.5360985" ]
0.6547068
0
Checking whether the user has requested the components whose quantity is available
@Override public void onClick(View view) { if (count == 0){ Toast.makeText(EachComponentActivity.this, "Seriously! Zero components?", Toast.LENGTH_LONG).show(); return; } else if (Integer.parseInt(availStr) - count < 0){ Toast.makeText(EachComponentActivity.this, "Cool down! We don't have so many components available", Toast.LENGTH_LONG).show(); return; } // Network call for requesting to issue the component Call<BasicModel> requestComponent = memberAPI.requestComponent(token, id, Integer.toString(count)); requestComponent.enqueue(new Callback<BasicModel>() { @Override public void onResponse(Call<BasicModel> call, retrofit2.Response<BasicModel> response) { String success = response.body().getSuccess().toString(); String message = response.body().getMessage(); Toast.makeText(EachComponentActivity.this, message, Toast.LENGTH_LONG).show(); if (success.equals("true")){ Intent i = new Intent(EachComponentActivity.this, TabbedActivity.class); i.putExtra("name", currentUsername); i.putExtra("email", currentUserEmail); i.putExtra("regnum", currentUserRegNum); i.putExtra("phonenum", currentUserPhoneNum); i.putExtra("numissued", numissue); i.putExtra("token", token); startActivity(i); } confirmationDialog.dismiss(); } @Override public void onFailure(Call<BasicModel> call, Throwable t) { confirmationDialog.dismiss(); Toast.makeText(EachComponentActivity.this, "An error occured", Toast.LENGTH_LONG).show(); t.printStackTrace(); } }); // End of the network call }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasQuantity();", "private void checkProductAvailability()\n\t{\n\n\t\tprodMsg = \"\";\n\t\tcartIsEmpty = false;\n\n\t\tMap <String,Product> products = getProducts();\n\n\t\tint qtyRequested, qtyAvailable;\n\n\t\t// Check for unavailable products\n\t\tfor ( Product p : shoppingCart.getProducts().keySet() )\n\t\t{\n\t\t\tfor ( String s : products.keySet() )\n\t\t\t{\n\t\t\t\tif ( products.get(s).getName().equals(p.getName()) )\n\t\t\t\t{\n\t\t\t\t\t// Modify product to write to file\n\t\t\t\t\tqtyRequested = shoppingCart.getProducts().get(p);\n\t\t\t\t\tqtyAvailable = products.get(s).getQtyAvailable();\n\n\t\t\t\t\tif ( qtyAvailable < qtyRequested )\n\t\t\t\t\t\tunavailableProds.put(p, new ArrayList <>(Arrays.asList(qtyRequested, qtyAvailable)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Show warning\n\t\tif ( !unavailableProds.isEmpty() )\n\t\t{\n\t\t\tprodMsg = \"The cart products were not available anymore in the requested quantity, only the available quantity has been bought:\\n\\n\";\n\n\t\t\tfor ( Product p : unavailableProds.keySet() )\n\t\t\t{\n\t\t\t\tprodMsg += p.getName() + \": requested: \" + unavailableProds.get(p).get(0) + \", available: \"\n\t\t\t\t\t\t+ unavailableProds.get(p).get(1) + \"\\n\";\n\n\t\t\t\tif ( unavailableProds.get(p).get(1) == 0 )\n\t\t\t\t\tshoppingCart.removeProduct(p);\n\t\t\t\telse\n\t\t\t\t\tshoppingCart.getProducts().replace(p, unavailableProds.get(p).get(1));\n\t\t\t}\n\n\t\t\tif ( shoppingCart.getProducts().size() == 0 )\n\t\t\t{\n\t\t\t\tcartIsEmpty = true;\n\t\t\t\tprodMsg = \"All of your products were not available anymore for purchase: payment cancelled.\\nPlease select some new products.\";\n\t\t\t}\n\t\t}\n\t}", "public boolean checkInventory(int serialNum, int qty){\n \n //create a boolean var and set to false- change to true only if there is enough of requested inventory\n boolean enoughInventory = false;\n \n //loop through all Inventory\n for(int i=0; i<this.items.size(); i++){\n //check if inventoryItem has matching serialNumber with specified serialNum\n if(this.items.get(i).getSerialNum()==serialNum){\n //if serial numbers match, check if inventoryItem has enough in stock for requested order\n if(this.items.get(i).getQty() >= qty){\n enoughInventory = true; //if quantity in inventory is greater than or equal to requested quantity there is enough\n }\n }\n }\n \n //return enoughInventory- will be false if no serial number matched or if there was not enough for requested qty\n return enoughInventory;\n \n }", "private boolean checkStock(){\n int i;\n int inventorySize = inventory.size();\n int count = 0;\n for(i = 0; i < inventorySize; i++){\n count = count + inventory.get(i).getStock();\n\n }\n //System.out.println(\"Count was: \" + count);\n if(count < 1){\n return false;\n }else{\n return true;\n }\n }", "private int checkItemQuantity() {\n\n int desiredQuantity = initialQuantity;\n MenusItem tempItem = null;\n tempItem = ItemCart.getInstance().checkItem(menusItem);\n\n if(tempItem != null){\n desiredQuantity = tempItem.getDesiredQuantity();\n }\n\n\n return desiredQuantity;\n }", "boolean isSetValueQuantity();", "public boolean isSetQuantity()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(QUANTITY$10) != 0;\n }\n }", "private boolean checkValidQuantity (int quantity){\n if (quantity >= 0){\n return true;\n }\n return false;\n }", "final boolean isValidCartQty() {\n Map<Integer, ReturnedItemDTO> cartMap = returnTable.getIdAndQuantityMap();\n for (Entry<Integer, ReturnedItemDTO> entry : cartMap.entrySet()) {\n ReturnedItemDTO ret = entry.getValue();\n int qty = ret.qty;\n int damageStatus = ret.damageStatus;\n if (qty > 0 && damageStatus > 0) {\n return true;\n }\n }\n return false;\n\n }", "private void printCheckItemQuantityMenu(Shop shop) {\n System.out.println(\"What is the ID of the tool you would like to look up?\");\n int itemId = receiveNumberInput();\n if (shop.searchInventory(itemId)) {\n System.out.println(\"Quantity: \" + shop.checkToolStock(itemId));\n } else {\n System.out.println(\"Tool does not exist or invalid input, please check spelling and try again.\");\n }\n }", "public void stateForUnavailableItems_InMiniCart() {\n int count = 0;\n List<WebElement> itemInMiniCart = getDriver().findElements(By.xpath(\"//*[@id='itemList']//li\"));\n for (WebElement unavailable : itemInMiniCart) {\n if (count != itemInMiniCart.size()) {\n if (!String.valueOf(unavailable.getAttribute(\"class\")).contains(\"outofstock\")) {\n continue;\n }\n count++;\n System.out.println(\"unavailable ===>> \" + String.valueOf(unavailable.findElement(By.xpath(\"//*[@class='productNameInner']\")).getText()));\n WebElement childQtyStepper = unavailable.findElement(By.xpath(\".//*[@class='mjr-qtyButton plus noSelect']\"));\n Assert.assertFalse(\"Verify Qty Stepper NOT displayed for Unavailable Product via Mini-Cart\", (childQtyStepper.isDisplayed()));\n }\n }\n System.out.println(\"=== Total Number of Products [\" + itemInMiniCart.size() + \"]\");\n System.out.println(\"=== Number of Unavailable Products In Mini-Cart [\" + count + \"]\");\n Assert.assertEquals(\"Verify there is at least one (1) unavailable product \", 1, count);\n }", "protected int checkRowForAdd(GenericValue reservation, String orderId, String orderItemSeqId, String shipGroupSeqId, String productId,\n BigDecimal quantity) {\n // check to see if the reservation can hold the requested quantity amount\n String inventoryItemId = reservation.getString(\"inventoryItemId\");\n BigDecimal resQty = reservation.getBigDecimal(\"quantity\");\n VerifyPickSessionRow pickRow = this.getPickRow(orderId, orderItemSeqId, shipGroupSeqId, productId, inventoryItemId);\n\n if (pickRow == null) {\n if (resQty.compareTo(quantity) < 0) {\n return 0;\n } else {\n return 2;\n }\n } else {\n BigDecimal newQty = pickRow.getReadyToVerifyQty().add(quantity);\n if (resQty.compareTo(newQty) < 0) {\n return 0;\n } else {\n pickRow.setReadyToVerifyQty(newQty);\n return 1;\n }\n }\n }", "public boolean canBuildEquipment(EquipmentType equipmentType) {\n for (AbstractGoods requiredGoods : equipmentType.getGoodsRequired()) {\n if (getGoodsCount(requiredGoods.getType()) < requiredGoods.getAmount()) {\n return false;\n }\n }\n return true;\n }", "private void waitUntilQuantityUpdate(String stepper, String itemCountIcon) {\n String expected;\n switch (stepper) {\n case \"plus\":\n expected = String.valueOf((Integer.valueOf(itemCountIcon)) + 1);\n UtilityHelper.waitUntilExpectedCondition(ITEM_COUNT_ON_SHOPPING_CART, expected);\n Assert.assertEquals(\"Verify Qty Stepper 'Plus': \", expected, ITEM_COUNT_ON_SHOPPING_CART.getText());\n break;\n case \"minus\":\n expected = String.valueOf((Integer.valueOf(itemCountIcon)) - 1);\n UtilityHelper.waitUntilExpectedCondition(ITEM_COUNT_ON_SHOPPING_CART, expected);\n Assert.assertEquals(\"Verify Qty Stepper 'Minus': \", expected, ITEM_COUNT_ON_SHOPPING_CART.getText());\n break;\n }\n }", "public boolean checkExist(String itemName, int Qty) {\n\n for (int i = 0; i < inventory.size(); i++) {\n Map<String, Object> newItem = new HashMap<>();\n newItem = inventory.get(i);\n if (itemName.equals(newItem.get(\"Name\").toString())) {\n int a = Integer.parseInt((String) newItem.get(\"Amount\"));\n //isInList = true;\n if (a >= Qty) {\n isExist = true;\n break;\n } else {\n isExist = false;\n }\n } else {\n isExist = false;\n }\n\n }\n return isExist;\n\n }", "boolean hasCapacity();", "private void checkAvailability() {\n if (productList != null) {\n if (productList.size() == 0) {\n noProductText.setVisibility(View.VISIBLE);\n } else {\n noProductText.setVisibility(View.GONE);\n }\n }\n }", "public boolean canProvideEquipment(EquipmentType equipmentType) {\n for (AbstractGoods goods : equipmentType.getGoodsRequired()) {\n int available = getGoodsCount(goods.getType());\n \n int breedingNumber = goods.getType().getBreedingNumber();\n if (breedingNumber != GoodsType.INFINITY) {\n available -= breedingNumber;\n }\n \n if (available < goods.getAmount()) return false;\n }\n return true;\n }", "boolean isSetNumberOfInstallments();", "boolean isQuantiteProduitDisponible(ProduitFormateUnite produitFormateUnite, int quantite);", "@Override\n public boolean isValid() {\n return (27 - Inventory.getAll().length <= Inventory.find(\"Soft clay\").length)\n || (Inventory.find(\"Soft clay\").length < 1 || Inventory\n .find(\"Astral rune\").length < 1)\n && !Banking.isBankScreenOpen()\n && GlassBlower.antiban.canInteractObject();\n }", "public boolean canBecombo(){\n \treturn price <5;\n }", "private boolean validaCompra() {\n\n List<Purchase> purchasesList = billingClient.queryPurchases(INAPP).getPurchasesList();\n if (purchasesList != null && !purchasesList.isEmpty()) {\n for (Purchase purchase : purchasesList) {\n if (purchase.getSku().equals(skuId)) {\n return true;\n }\n }\n }\n return false;\n\n }", "public static boolean hasBuildingsToProduce(UnitType unitType) {\n\n // Need to have every prerequisite building\n for (Integer unitTypeID : unitType.getRequiredUnits().keySet()) {\n UnitType requiredUnitType = UnitType.getByID(unitTypeID);\n \n// if (requiredUnitType.isLarva()) {\n// continue;\n// }\n// System.out.println(\"=req: \" + requiredUnitType);\n if (!requiredUnitType.isBuilding()) {\n// System.out.println(\" continue\");\n continue;\n }\n \n int requiredAmount = unitType.getRequiredUnits().get(unitTypeID);\n int weHaveAmount = requiredUnitType.isLarva() ? \n SelectUnits.ourLarva().count() : SelectUnits.our().ofType(requiredUnitType).count();\n// System.out.println(requiredUnitType + \" x\" + requiredAmount);\n// System.out.println(\" and we have: \" + weHaveAmount);\n if (weHaveAmount < requiredAmount) {\n return false;\n }\n }\n return true;\n }", "private void buyProduct() {\n\t\tSystem.out.println(\"Enter Number of Product :- \");\n\t\tint numberOfProduct = getValidInteger(\"Enter Number of Product :- \");\n\t\twhile (!StoreController.getInstance().isValidNumberOfProduct(\n\t\t\t\tnumberOfProduct)) {\n\t\t\tSystem.out.println(\"Enter Valid Number of Product :- \");\n\t\t\tnumberOfProduct = getValidInteger(\"Enter Number of Product :- \");\n\t\t}\n\t\tfor (int number = 1; number <= numberOfProduct; number++) {\n\t\t\tSystem.out.println(\"Enter \" + number + \" Product Id\");\n\t\t\tint productId = getValidInteger(\"Enter \" + number + \" Product Id\");\n\t\t\twhile (!StoreController.getInstance().isValidProductId(productId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id\");\n\t\t\t\tproductId = getValidInteger(\"Enter \" + number + \" Product Id\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter product Quantity\");\n\t\t\tint quantity = getValidInteger(\"Enter product Quantity\");\n\t\t\tCartController.getInstance().addProductToCart(productId, quantity);\n\t\t}\n\t}", "private boolean hasCapacity() {\n int used = 0 + evaluations.size() * 2;\n int available = Runtime.getRuntime().availableProcessors() * ServerRunner.getProcessorMultiplier();\n return used < available;\n }", "boolean hasTotalElements();", "public boolean isFullySupplied()\n {\n boolean isFull = !model.needsFuel() || (model.maxFuel == fuel);\n isFull &= (model.maxAmmo == ammo);\n return isFull;\n }", "public Boolean checkAvailability(Item item, Integer current) {\n \tif (item.getQuatity() + current > item.getAvailableQuatity()) {\r\n \t\tSystem.out.println(\"System is unable to add \"\r\n \t\t\t\t+ current + \" \" + item.getItemName() +\r\n \t\t\t\t\". System can only add \"\r\n \t\t\t\t+ item.getAvailableQuatity() + \" \" + item.getItemName() );\r\n \t\treturn false;\r\n \t}\r\n \telse return true;\r\n }", "public boolean meetsRequirement(String sId, String sName, CCode sColor, Type sType, int sLevel, int sCost, Trigger sTrigger, int sPower, int sSoul, String sTrait, String sAbility) {\n \n \t\tboolean isMet = true;\n \n \t\tif (!id.isEmpty()) {\n \n \t\t\tString[] parts = sId.split(\" \");\n \n \t\t\tfor (int i = 0; i < sameID.length; i++) {\n \t\t\t\tisMet = true;\n \t\t\t\tfor (int j = 0; j < parts.length; j++) {\n \t\t\t\t\tisMet = isMet && sameID[i].toLowerCase().contains(parts[j].toLowerCase());\n \t\t\t\t\t/*\n \t\t\t\t\t * if (sameID[i].toLowerCase()\n \t\t\t\t\t * .contains(parts[j].toLowerCase()))\n \t\t\t\t\t * System.out.println(sameID[i] + \"???\" + parts[j]);\n \t\t\t\t\t */\n \t\t\t\t}\n \t\t\t\tif (isMet) {\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \n \t\t\t}\n \t\t\tisMet = true;\n \t\t\tfor (int j = 0; j < parts.length; j++) {\n \t\t\t\tisMet = isMet && id.toLowerCase().contains(parts[j].toLowerCase());\n \t\t\t\t/*\n \t\t\t\t * if (id.toLowerCase().contains(parts[j].toLowerCase()))\n \t\t\t\t * System.out.println(id + \"::CONTAINS::\" + parts[j]);\n \t\t\t\t */\n \t\t\t}\n \n \t\t\t/*\n \t\t\t * if (isMet) { for (int i = 0; i < sameID.length; i++) {\n \t\t\t * System.out.print(\"[(\" + i + \")\" + sameID[i] + \"]\"); }\n \t\t\t * System.out.println(); }\n \t\t\t */\n \t\t}\n \n \t\tif (!sName.isEmpty()) {\n \t\t\tisMet = isMet && (cardName.toLowerCase().contains(sName.toLowerCase()) || cardName_e.toLowerCase().contains(sName.toLowerCase()));\n \t\t}\n \n \t\tif (sColor != null && sColor != CCode.ALL) {\n \t\t\tisMet = isMet && (sColor == c);\n \t\t}\n \n \t\tif (sType != null && sType != CardAssociation.Type.ALL) {\n \t\t\tisMet = isMet && (sType == t);\n \t\t}\n \n \t\tif (sLevel > -1) {\n \t\t\tisMet = isMet && (sLevel == level);\n \t\t}\n \n \t\tif (sCost > -1) {\n \t\t\tisMet = isMet && (sCost == cost);\n \t\t}\n \n \t\tif (sTrigger != null && sTrigger != Trigger.ALL) {\n \t\t\tisMet = isMet && (sTrigger == trigger);\n \t\t}\n \n \t\tif (sPower > -1) {\n \t\t\tisMet = isMet && (sPower == power);\n \t\t}\n \n \t\tif (sSoul > -1) {\n \t\t\tisMet = isMet && (sSoul == soul);\n \t\t}\n \n \t\tif (!sTrait.isEmpty()) {\n \t\t\tisMet = isMet && (trait1.toLowerCase().contains(sTrait) || trait2.toLowerCase().contains(sTrait) || trait1_e.toLowerCase().contains(sTrait) || trait2_e.toLowerCase().contains(sTrait));\n \t\t}\n \n \t\tif (!sAbility.isEmpty()) {\n \n \t\t\tString[] parts = sAbility.split(\" \");\n \n \t\t\tfor (int i = 0; i < parts.length; i++) {\n \t\t\t\tisMet = isMet && (getEffects().toLowerCase().contains(parts[i].toLowerCase()) || getEffects_e().toLowerCase().contains(parts[i].toLowerCase()));\n \t\t\t}\n \t\t}\n \n \t\treturn isMet;\n \t}", "public void Req_Multiple_vol()\n {\n\t boolean reqmultiplepresent =Reqmultiple.size()>0;\n\t if(reqmultiplepresent)\n\t {\n\t\t //System.out.println(\"Request multiple volume report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Request multiple volume report is not present\");\n\t }\n }", "public boolean verifyCartItem()\n\t{ if (einKaufswagenBtn.isDisplayed())\n\t{\n\t\teinKaufswagenBtn.click();\n\t}\n\tfor (int j=0;j<collectnToStorePrdktIdLst.size();j++)\n\t{\n\t\tString expectedProduct1=collectnToStorePrdktIdLst.get(j);\n\t\tList<WebElement> fndProduct=driver.findElements(By.xpath(\"//form[@id='activeCartViewForm']//div[@class='a-section a-spacing-mini sc-list-body sc-java-remote-feature']//div[@class='a-row sc-list-item sc-list-item-border sc-java-remote-feature']\"));\n\t\tfor (int e=0;e<=fndProduct.size();e++)\n\t\t{\n\t\t\tString actProdkt=fndProduct.get(e).getAttribute(\"data-asin\");\n\t\t\tif (actProdkt.contains(expectedProduct1))\n\t\t\t{\n\t\t\t\tcnt++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (cnt==2)\n\t{\n\t\treturn true;\n\t}\n\n\telse\n\t{\n\t\treturn false;\n\t}\n\t}", "public boolean enoughSpaceToBuy(Player p, int numGoods) {\n // check size of cargoArr\n return numGoods <= p.getShip().numOpenSlots();\n }", "public int isAvailable(int sNo){\n\n\n\n for (int i=0; i<count; i++){\n\n if (sNo == theBooks[i].sNo){\n if(theBooks[i].bookQtyCopy > 0){\n\n out.println(\"Book is Available.\");\n return i;\n\n }\n out.println(\"Book is Unavailable\");\n return -1;\n\n }\n\n }\n\n out.println(\"No Book of Serial Number \" + \" Available in Library.\");\n return -1;\n\n\n }", "public void stateForUnavailableItems_InShoppingCart() {\n List<WebElement> productList = getDriver().findElements(By.xpath(\"//*[@id='itemList']//li\"));\n for (int i = 1; i <= productList.size(); i++) {\n WebElement itemList = getDriver().findElement(By.xpath(\"//*[@id='itemList']//li[\" + i + \"]\"));\n String status = itemList.getAttribute(\"class\");\n if (!status.contains(\"outofstock\")) {\n continue;\n }\n String productName = getDriver().findElement(By.xpath(\"//*[@id='itemList']//li[\" + i + \"]//*[@class='mjr-product-name']\")).getText();\n System.out.println(\"=== Product Index [\" + i + \"], Name [\" + productName + \"] is Unavailable\");\n WebElement qtyStepper = getDriver().findElement(By.xpath(\"//*[@id='itemList']//li[\" + i + \"]//div[@class='mjr-qty-stepper']\"));\n Assert.assertFalse(\"=== Verify Qty-Steppers Are Removed for Unavailable Item \", qtyStepper.isDisplayed());\n String notAvailMsg = getDriver().findElement(By.xpath(\"//*[@id='itemList']//li[\" + i + \"]//*[contains(@class,'msgNotAvail')]\")).getText();\n Assert.assertEquals(\"=== Verify Product Not Available Message - Shopping Cart Page \", Constants.notAvailProd_shoppingCart, notAvailMsg);\n WebElement checkoutButtons = getDriver().findElement(By.xpath(\"//*[@class='rightSidebar-footer-inner']//*[@type='submit']\"));\n Assert.assertFalse(\"=== Verify Checkout Buttons are Disabled for Guest OR Signed-In User \", checkoutButtons.isEnabled());\n }\n }", "public boolean checkAvailability(int num_used) {\n return num_used != this.num_uses;\n }", "private boolean hasRequirements() {\n \t\tif (checkHasRequirements) {\n \t\t\thasRequirements = pullRequired(requiredInput, false);\n \t\t\tcheckHasRequirements = false;\n \t\t}\n \t\treturn hasRequirements;\n \t}", "private void checkProducts() {\n for (JButton prodButton : productButtons) {\n if (inventoryManager.checkProductAvailability(prodButton.getText())) {\n prodButton.setEnabled(true);\n } else {\n prodButton.setEnabled(false);\n }\n }\n }", "public boolean hasRequests(){\n return (tradeRequests.size() > 0 || userRequests.size() > 0);\n }", "public void validateRequestToBuyPage(){\r\n\t\tsearchByShowMeAll();\r\n\t\tclickCheckboxAndRenewBuyButton();\r\n\t\tverifyRequestToBuyPage();\r\n\t}", "@Override\n public boolean check(RealPlayer realPlayer) {\n for (Map.Entry<Resource, Integer> entry : productionPowerInput.entrySet()) {\n if (entry.getValue() > realPlayer.getPersonalBoard().getSpecificResourceCount(entry.getKey().getResourceType()))\n return false;\n }\n return true;\n }", "public boolean isItemAvailable(String itemName) {\n\t\tfor (Item item : itemsInStock) {\n\t\t\tif (item.name.equals(itemName) && item.amount >= 1) {\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "boolean examinePaidItems(){\n\t\t\tint count = 0;\n\t\t\tif (!this.items.isEmpty()){\n\t\t\t\tfor (int i = 0; i < this.items.size(); i++){\n\t\t\t\t\tif (this.items.get(i).montaryValue != 0){\n\t\t\t\t\t\tSystem.out.print(this.items.get(i).itemName + \" ($\" + (this.items.get(i).montaryValue * -1) + \"), \");\n\t\t\t\t\t\tcount++;}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!this.receptacle.isEmpty()){//if the location has containers.\n\t\t\t\tfor (int k = 0; k < this.receptacle.size(); k++){//loops through the containers in the location\n\t\t\t\t\tif (!(this.receptacle.get(k) instanceof SpecialtyContainer)){//some containers are hidden, like the depths of the cove. \n\t\t\t\t\t\tfor (int j = 0; j < this.receptacle.get(k).contents.size(); j++){//looks for the items in the non hidden containers\n\t\t\t\t\t\t\tif (this.receptacle.get(k).contents.get(j).montaryValue < 0){//if the item needs to be bought\n\t\t\t\t\t\t\t\tSystem.out.print(this.receptacle.get(k).contents.get(j).itemName + \" ($\" + \n\t\t\t\t\t\t\t\t\t\t(this.receptacle.get(k).contents.get(j).montaryValue * -1) + \"), \");\n\t\t\t\t\t\t\t\tcount++;}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif (count == 0){//it didn't find any items you need to pay for.\n\t\t\t\tSystem.out.println(\"There's nothing here that costs money.\");\n\t\t\t\treturn false;}\n\t\t\treturn true;\n\t\t}", "public Boolean hasNextProduct() {\n\t\treturn getProducts().size() > 0;\n\t}", "public boolean lowQuantity(){\r\n if(getToolQuantity() < 40)\r\n return true;\r\n return false;\r\n }", "static boolean RequestResourse(int Available[], int Allocation[][], int Need[][], int Request[], int ProcessNumber,\n\t\t\tint Processes, int Resourses) {\n\t\tint n = Processes;\n\t\tint m = Resourses;\n\t\tint[] AvailableTemp = new int[m];\n\t\tint[][] AllocationTemp = new int[n][m];\n\t\tint[][] NeedTemp = new int[n][m];\n\t\tint[] Req = new int[m];\n\t\tint Pro_Number = ProcessNumber;\n///////////////////////////////////////////////////////////////////\t\t\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tAvailableTemp[i] = Available[i];\n\t\t}\n//////////////////////////////////////////////////////////////////\t\t\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tReq[i] = Request[i];\n\t\t}\n//////////////////////////////////////////////////////////////////\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < m; j++) {\n\t\t\t\tAllocationTemp[i][j] = Allocation[i][j];\n\t\t\t}\n\t\t}\n/////////////////////////////////////////////////////////////////\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < m; j++) {\n\t\t\t\tNeedTemp[i][j] = Need[i][j];\n\t\t\t}\n\t\t}\n////////////////////////////////////////////////////////////////\t\t\n\t\tboolean Check = true;\n\t\t// For first Check\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tif (NeedTemp[Pro_Number][i] < Req[i]) {\n\t\t\t\tCheck = false; // error condition\n\t\t\t}\n\n\t\t}\n\t\tif (Check) {\n\t\t\tfor (int i = 0; i < m; i++) \n\t\t\t\tif (AvailableTemp[i] < Req[i]) \n\t\t\t\t\tCheck = false; // must be wait .\n\t\t\t\t\n\t\t\t\n\t\t\t// if en all check is true .\n\t\t\t// Step Three .\n\t\t\tif (Check) {\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tAvailableTemp[i] = AvailableTemp[i] - Req[i];\n\t\t\t\t\tAllocationTemp[Pro_Number][i] = AllocationTemp[Pro_Number][i] + Req[i];\n\t\t\t\t\tNeedTemp[Pro_Number][i] = NeedTemp[Pro_Number][i] - Req[i];\n\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"No Of processes : \" + n + \"No Of Resources : \" + m +\"\\n\");\n\t\t\t\tSystem.out.println(\"Allocation Before Safe Algorthim : \" + \"\\n\") ;\n\t\t\t\tfor (int i = 0 ; i < n ; i++ )\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0 ; j < m ; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(AllocationTemp[i][j] + \" \") ; \n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\tSystem.out.println(\"Available Before Safe Algorithm : \") ;\n\t\t\t\tfor (int i =0 ; i < m; i++ )\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(AvailableTemp[i]+\" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\tSystem.out.println(\"Need Before Safe Algorithm :\");\n\t\t\t\tfor (int i = 0 ; i < n ; i++ )\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0 ; j < m ; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(NeedTemp[i][j] + \" \") ; \n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\tif (Safe(n, m, AllocationTemp, NeedTemp, AvailableTemp)) \n\t\t\t\t{\tSystem.out.println(\"testing.\") ; \n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse { \n\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"this request cant be granted . \") ;\n\t\t\t\t}\n\t\t\t}\n\t\t\t else \n\t\t\t {\n\t\t\t\tSystem.out.println(\"P\" + Pro_Number + \"this process must be wait in request algorthim . \");\n\t\t\t }\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Raise error condition , since process has exceeded its maximum claim. \");\n\t\treturn false;\n\n\t}", "public boolean checkQuantity(Integer numToRemove) {\n return this.quantity >= numToRemove;\n }", "private boolean checkGreedyEnergy() {\r\n return myTotal.get(2) < 10 || (myTotal.get(2) < 13 && myTotal.get(2) <= enTotal.get(2));\r\n }", "public boolean isGranted(){\n\n// if (BallotBoxState.Granted.equals(getBallotBoxState()) || this.quorum.get() <= 0) {\n// setBallotBoxState(BallotBoxState.Granted);\n// return true;\n// }\n// return false;\n\n return this.quorum.get() <= 0;\n }", "private boolean checkMultipleUnitEdit() {\r\n\t\tboolean flag=false;\r\n\t\tfor(UIUnitType model:uiUnitType.getUnitValueList()){\r\n\t\t\tif(model.isInputDisplayItem()){\r\n\t\t\t\tflag=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "@Override\n public int requestAvailableCapacity() {\n int total = facility.getCapacity();\n for (Facility facility : facilities) {\n total += facility.getCapacity();\n }\n return total;\n }", "public boolean isAvailable(){\r\n return blockingQueue.size() < maxWorkQueueSize;\r\n }", "protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please specify at least one component\");\n else {\n \t\t//TODO add more checks\n \t\tok();\n }\n }", "public static final boolean consumeQuantity(String productKey, int quantity) {\n\t\tInteger tValue = sConsumableProducts.get(productKey);\n\t\tif (tValue == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tint tQuantity = tValue.intValue();\n\t\t\ttQuantity -= quantity;\n\t\t\tif (tQuantity > 0) {\n\t\t\t\tsConsumableProducts.put(productKey, new Integer(tQuantity));\n\t\t\t} else {\n\t\t\t\tsConsumableProducts.remove(productKey);\n\t\t\t}\n\t\t\treturn tQuantity >= 0;\n\t\t}\n\t}", "@Override\r\n public boolean isAvailable() {\r\n if (getView() == null)\r\n return false;\r\n return getView().getSelectedUsers(true) != null || getView().getSelectedQueries(true) != null;\r\n }", "public boolean hasProduct(ProductBarcode code);", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "public boolean canPickItem(String itemName) {\n boolean canPick = true;\n Item item = currentRoom.getItem(itemName);\n if(item != null) {\n double totalWeight = items.getTotalWeight() + item.getWeight();\n if(totalWeight > maxWeight) {\n canPick = false;\n }\n }\n return canPick; \n }", "boolean hasReqardTypeThree();", "boolean isCartValid();", "public final boolean inUse()\n{\n\tif (_buildTime > 0)\n\t{\n\t\treturn false;\n\t}\n\treturn (_base.getAvailableQuarters() - _rules.getPersonnel() < _base.getUsedQuarters() ||\n\t\t\t_base.getAvailableStores() - _rules.getStorage() < _base.getUsedStores() ||\n\t\t\t_base.getAvailableLaboratories() - _rules.getLaboratories() < _base.getUsedLaboratories() ||\n\t\t\t_base.getAvailableWorkshops() - _rules.getWorkshops() < _base.getUsedWorkshops() ||\n\t\t\t_base.getAvailableHangars() - _rules.getCrafts() < _base.getUsedHangars());\n}", "boolean hasUses();", "public void checkAndExecute(){\n if(priceListener.getSecurityPrice() < buyPrice){\n executionService.buy(security, buyPrice, 100);\n // if the price < buyPrice then executionService.buy(buyquantity)\n }else if ( priceListener.getSecurityPrice() > sellPrice ) {\n executionService.sell(security, buyPrice, 100);\n }\n }", "private void checkBuyCard(PropertyCard card) {\n\t\tboolean almostComplete = checkCollection(this, card);\n\t\tif(almostComplete) {\n\t\t\tboolean boughtCard = buyCard(card);\n\t\t\tif(!boughtCard) {\n\t\t\t\tboolean madeChanges = checkPayment(card.getPrice());\n\t\t\t\tif(madeChanges) {\n\t\t\t\t\tbuyCard(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tboolean opponentAlmostComplete = false;\n\t\t\tfor(Player p: getPlayers()) {\n\t\t\t\tif(checkCollection(p,card)) {\n\t\t\t\t\topponentAlmostComplete = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(opponentAlmostComplete) {\n\t\t\t\tbuyCard(card);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(getMoney()-card.getPrice()>=100) {\n\t\t\t\t\tbuyCard(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic boolean\n\tvalidComponent( int i ) \n\t{\n\t\treturn( i >= 0 && i < 3 );\n\t}", "public boolean canBecombo(){\n \treturn super.getPrice() <4;\n }", "boolean canBuy( final Item item )\n {\n return !ship.contains( item ) && item.getPrice() <= credits;\n }", "private void checkItemsAvailability() {\n if (noItemsText != null && itemList != null && itemRecyclerView != null) {\n if (itemList.size() < 1) {\n itemRecyclerView.setVisibility(View.GONE);\n noItemsText.setVisibility(View.VISIBLE);\n } else {\n noItemsText.setVisibility(View.GONE);\n itemRecyclerView.setVisibility(View.VISIBLE);\n }\n }\n }", "boolean hasUsage();", "public boolean needsRepair() {\n if (id == 5509) {\n return false;\n }\n return inventory.contains(id + 1);\n }", "private boolean canBuy(BuildingType x) {\r\n return gameDetails.buildingsStats.get(x).price <= myself.energy;\r\n }", "public boolean isAvailable(){\n\t\ttry{\n\t\t\tgetPrimingsInternal(\"Test\", \"ATGATGATGATGATGATGATG\");\n\t\t}\n\t\tcatch(IOException e){\n\t\t\treturn false;\n\t\t}\n\t\tcatch(InterruptedException e){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private static boolean checkOrderList() {\n if (size != MainGUI.orderList.size()) {\n size = MainGUI.orderList.size();\n return true;\n }\n\n return false;\n }", "public boolean needUnits(){\n\t\tif(units.size() >= maxUnits){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private void isAbleToBuild() throws RemoteException {\n int gebouwdeGebouwen = speler.getGebouwdeGebouwen();\n int bouwLimiet = speler.getKarakter().getBouwLimiet();\n if (gebouwdeGebouwen >= bouwLimiet) {\n bouwbutton.setDisable(true); // Disable button\n }\n }", "public boolean hasMoreCombination() {\n\t\treturn cursor < combos.length;\n\t}", "public boolean couldBeProfitable(){\n return this.priceBought < this.maximumMachineProfit;\n }", "private void checkAmount() throws IOException {\n //System.out.println(\"The total amount in the cash machine is: \" + amountOfCash);\n for (int i : typeOfCash.keySet()) {\n Integer r = typeOfCash.get(i);\n if (r < 20) {\n sendAlert(i);\n JOptionPane.showMessageDialog(null, \"$\" + i + \"bills are out of stock\");\n }\n }\n }", "@Then(\"^product in shown as available\")\n public void clicks_On_Add_Button(){\n }", "static boolean requiresContainmentQuery(IComponent component, IContainer container, StatusHolder holder) {\r\n\t\tStatusBuilder builder = new StatusBuilder(ComponentSystemPlugin.getDefault());\r\n\t\tIAttributes attr = (IAttributes) component.getAdapter(IAttributes.class);\r\n\t\tif (attr == null) {\r\n\t\t\tif (holder != null) {\r\n\t\t\t\tString fmt = Messages.getString(\"Utilities.NoAttributesAdapterError\"); //$NON-NLS-1$\r\n\t\t\t\tObject params[] = {component.getId()};\r\n\t\t\t\tbuilder.add(IStatus.ERROR, fmt, params);\r\n\t\t\t\tholder.setStatus(builder.createStatus(\"\", null)); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tboolean isNeverAddComponent = attr.getBooleanAttribute(CommonAttributes.NEVER_ADD_COMPONENT, false);\r\n\t\t\r\n\t\tif (isNeverAddComponent && (holder != null)) {\r\n\t\t\tString fmt = Messages.getString(\"Utilities.NeverAddError\"); //$NON-NLS-1$\r\n\t\t\tbuilder.add(IStatus.ERROR, fmt, null);\r\n\t\t}\r\n\r\n\t\tif (isNeverAddComponent && (holder != null)) {\r\n\t\t\tIComponentInstance containerInstance = (IComponentInstance) EcoreUtil\r\n\t\t\t.getRegisteredAdapter(container.getEObject(), IComponentInstance.class);\r\n\t\t\tObject params[] = { component.getFriendlyName(), containerInstance.getName() };\r\n\t\t\tholder.setStatus(builder.createMultiStatus(Messages.getString(\"Utilities.CantAddObjectError\"), params)); //$NON-NLS-1$\r\n\t\t}\r\n\t\treturn isNeverAddComponent;\r\n\t}", "private boolean isAvailable() {\n\t\tfor (int i = 0; i < lawsuitsAsClaimant.size(); i++) {\n\t\t\tif (lawsuitsAsClaimant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check lawsuits as Defendant\n\t\tfor (int i = 0; i < lawsuitsAsDefendant.size(); i++) {\n\t\t\tif (lawsuitsAsDefendant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean verifyInProductPage() {\n\t\tString ExpMsg = \"PRODUCTS\";\t// confirmation msg\n\t\tString ActMsg = Title.getText();\n\t try {\n\t \twait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//div[@id='inventory_container']\")));\n\t\t\tAssert.assertEquals(ActMsg, ExpMsg);\n\t\t\ttest.log(LogStatus.PASS, \"Successful assert we have landed on PRODUCTS page\");\t\n\t }\n\t catch (TimeoutException e) {\n\t\t\ttest.log(LogStatus.FAIL, \"Error: Login failed? Not leading to PRODUCTS page?\");\n\t\t\tAssert.fail(\"Login failed? Not leading to PRODUCTS page?\");\n\t\t\treturn false;\n\t }\n\t\tcatch (Throwable e) {\n\t\t\ttest.log(LogStatus.FAIL, \"Error: Not on PRODUCTS page?!\");\n\t\t\tAssert.fail(\"Not in PRODUCTS page\");\n\t\t\treturn false; \n\t\t}\n\t\treturn true;\n\t\t\n\t}", "public boolean productsTabVerification() {\r\n\t\t\r\n\t\t\r\n\t\twaitUntilPresenceOfElementLocated(ourProductsTab);\r\n\r\n\t\tList<WebElement> list = driver.findElements(By.xpath(\"//a[text()='OUR PRODUCTS']\"));\r\n\t\tif (list != null && !list.isEmpty()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private static boolean hasCapacityForMultiEvaluation() {\n // return true;\n int threshold = 3;\n int available = Runtime.getRuntime().availableProcessors() * ServerRunner.getProcessorMultiplier();\n return available >= threshold;\n }", "@Test(dependsOnMethods = {\"searchItem\"})\n\tpublic void purchaseItem() {\n\t\tclickElement(By.xpath(item.addToCar));\n\t\twaitForText(By.id(item.cartButton), \"1\");\n\t\tclickElement(By.id(item.cartButton));\n\t\t// on checkout screen validating the title and price of item is same as what we selected on search result page by text.\n\t\tAssert.assertTrue(isPresent(locateElement(By.xpath(item.priceLocator(price)))));\n\t\tAssert.assertTrue(isPresent(locateElement(By.xpath(item.titlelocator(title)))));\t\n\t}", "public void verifyNotificationOfUnavailableItemsModalAppears() {\n UtilityHelper.waitUntilElementVisible(UnavailableItems_Modal);\n Assert.assertTrue(\"Notification of Unavailable Items Modal Appear: \", UnavailableItems_Modal.isDisplayed());\n }", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "public boolean isProduced(){\n if(!step1.isEmpty()&&!step2.isEmpty()&&!step3.isEmpty()){\n return true;\n }else {\n return false;\n }\n }", "private boolean DeriveStockWith_FundIsAvailable() {\n\t\tif (getFunds() > 0) {\n\t\t\tif (calculateInputStock_Items() > getFunds()) {\n\t\t\t\tSystem.err.println(\"Insufficient Funds, Cannot restock\");\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t\t// available funds can accommodate input stock requirement\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.err.println(\"Insufficient Funds\");\n\t\t}\n\t\treturn false;\n\t}", "public static final int quantityAvailable(String productKey) {\n\t\tInteger tValue = sConsumableProducts.get(productKey);\n\t\tif (tValue == null) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn tValue.intValue();\n\t\t}\n\t}", "public boolean isBuyable();", "public void checkIsEnabled() {\r\n\t\tMcsElement.getElementByPartAttributeValueAndParentElement(driver, \"div\", \"@class\", PURCHASING_PRODUCT_WINDOW_CLASS, \"input\", \"@name\",\r\n\t\t\t\t\"isEnabled\", true, true).click();\r\n\t\tReporter.log(\"Check IsEnabled\", true);\r\n\t}", "@Test\n\tpublic void testGetQuantityAwaitingAllocation() {\n\t\tfinal List<OrderSku> listSkus = new ArrayList<OrderSku>();\n\t\tfinal OrderSku orderSku1 = new OrderSkuImpl();\n\t\torderSku1.setPrice(1, null);\n\t\torderSku1.setAllocatedQuantity(1);\n\t\tfinal OrderSku orderSku2 = new OrderSkuImpl();\n\t\torderSku2.setPrice(1, null);\n\t\torderSku2.setAllocatedQuantity(0);\n\t\tlistSkus.add(orderSku1);\n\t\tlistSkus.add(orderSku2);\n\n\t\tfinal InventoryDtoImpl inventoryDto = new InventoryDtoImpl();\n\t\tinventoryDto.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventoryDto.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tinventoryDto.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal PersistenceSession persistanceSession = context.mock(PersistenceSession.class);\n\t\tfinal Query query = context.mock(Query.class);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(persistenceEngine).getPersistenceSession(); will(returnValue(persistanceSession));\n\t\t\t\tallowing(persistanceSession).createNamedQuery(ORDER_SKU_SELECT_BY_CODE_AND_STATUS); will(returnValue(query));\n\t\t\t\tallowing(persistenceEngine).retrieveByNamedQuery(with(equal(ORDER_SKU_SELECT_BY_CODE_AND_STATUS)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(Arrays.asList(orderSku1, orderSku2)));\n\t\t\t\tignoring(query).setParameter(with(any(int.class)), with(any(Object.class)));\n\t\t\t\tallowing(query).list(); will(returnValue(listSkus));\n\t\t\t}\n\t\t});\n\n\t\tassertEquals(\n\t\t\t\torderSku2.getQuantity() - orderSku2.getAllocatedQuantity(),\n\t\t\t\tallocationService.getQuantityAwaitingAllocation(productSku\n\t\t\t\t\t\t.getSkuCode(), WAREHOUSE_UID));\n\n\t}", "public boolean buyItem(Product n){\n\n if (balance.buyItem(n.getPrice()) == true & n.getQuantity() != 0 & vending_balance != 0) {\n validPurchase = true; // valid purchase was made\n vending_balance = 0; // resets vending balance to 0\n n.setQuantity(); // product quantity is -1\n return true;\n }\n\n else { // if quantity is 0 or balance is does not meet or exceed product's price\n return false;\n }\n }", "public int getQuantityRequired(){\n return quantityRequired1;\n }", "public void validate_remainingItem_ShoppingCart() {\n System.out.println(\"List of remaining items ===>> \" + listOfShoppingCardItem);\n System.out.println(\"List of Deleted items =====>> \" + listOfDeletedItemNameShoppingCart);\n Assert.assertTrue(!(listOfShoppingCardItem.containsAll(listOfDeletedItemNameShoppingCart)));\n }", "boolean isSetMultipleBetMinimum();" ]
[ "0.70795035", "0.64862", "0.6427308", "0.62513965", "0.6161974", "0.61470306", "0.60770524", "0.59808636", "0.59411633", "0.58759457", "0.58546203", "0.57757044", "0.57736516", "0.5739844", "0.5728675", "0.57283336", "0.5723544", "0.57061124", "0.5705804", "0.56905663", "0.56703526", "0.56627965", "0.5659177", "0.56575805", "0.5637734", "0.5605363", "0.5602611", "0.5600919", "0.5532682", "0.5521921", "0.55212116", "0.55177927", "0.55129546", "0.5510262", "0.5508843", "0.548446", "0.5459831", "0.5459357", "0.5455463", "0.5448527", "0.54419065", "0.54332286", "0.54118735", "0.5407745", "0.5405748", "0.54027", "0.53990567", "0.5396467", "0.53832656", "0.5381029", "0.53613293", "0.53471845", "0.53466696", "0.53352344", "0.53231", "0.5321964", "0.53188896", "0.53125185", "0.53123623", "0.5312351", "0.5310515", "0.5305825", "0.5304459", "0.53019387", "0.52967316", "0.5294905", "0.52903074", "0.5289042", "0.5281801", "0.5281114", "0.5278916", "0.5263347", "0.5247058", "0.5246991", "0.5243207", "0.524301", "0.5234141", "0.5230101", "0.52219975", "0.52191675", "0.5217768", "0.52117336", "0.52111626", "0.52092797", "0.5207741", "0.52045476", "0.52003753", "0.52003753", "0.52003753", "0.52003753", "0.51984274", "0.5192116", "0.5191169", "0.5187566", "0.5185842", "0.51848453", "0.51827043", "0.51826084", "0.51815504", "0.5181499" ]
0.53273576
54
Function for syncing time and date with IST
private String syncTimeStamp(String timestamp){ StringBuilder dateBuilder = new StringBuilder(timestamp); String time = dateBuilder.toString().split("T")[1].substring(0, 8); String[] timeArr = time.split(":"); String seconds = timeArr[2]; String dd = dateBuilder.toString().split("T")[0].split("-")[2]; String mm = dateBuilder.toString().split("T")[0].split("-")[1]; String yyyy = dateBuilder.toString().split("T")[0].split("-")[0]; int hour = Integer.parseInt(timeArr[0]); int minutes = Integer.parseInt(timeArr[1]); minutes += 30; hour+=5; if (minutes>=60){ hour += 1; minutes -= 60; } if (hour >= 24){ hour -= 24; dd = Integer.toString(Integer.parseInt(dd) + 1); if (Integer.parseInt(dd) < 10) dd = "0" + dd; } String minutesString; if (minutes < 10) minutesString = "0" + Integer.toString(minutes); else minutesString = Integer.toString(minutes); String hoursString; if (hour < 10) hoursString = "0" + Integer.toString(hour); else hoursString = Integer.toString(hour); String finalTime = hoursString + ":" + minutesString + ":" + seconds; String finalDate = dd + "-" + mm + "-" + yyyy; return (finalDate + " " + finalTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean useDaylightTime();", "public abstract boolean useDaylightTime();", "public void m1() {\n\t\tLocalDate dateInIndia = LocalDate.now();\r\n\t\tSystem.out.println(\"Date in India \" +dateInIndia);\r\n\r\n\t\t// Current Date and Time\r\n\t\t\t\tLocalTime timeInIndia = LocalTime.now();\r\n\t\t\t\tSystem.out.println(\"Time in India \" +timeInIndia);\r\n\t\t\r\n\t\t\r\n\t\tZoneId PSTZone = ZoneId.of(\"America/Los_Angeles\");\r\n\t\tLocalDate dateInUS = LocalDate.now(PSTZone);\r\n\t\tSystem.out.println(\"Date in US \" +dateInUS);\r\n\t\t\r\n\t\tLocalTime timeInUS = LocalTime.now(PSTZone);\r\n\t\tSystem.out.println(\"Time in US \" +timeInUS);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void testSyncDates(){\r\n \ts1.syncDates();\r\n \ts2.syncDates();\r\n \tassertSame(si.getStartDate(), s1.getStartDate());\r\n \tassertSame(si.getStartDate(), s2.getStartDate());\r\n \t\r\n \tassertSame(si.getEndDate(), s1.getEndDate());\r\n \tassertSame(si.getEndDate(), s2.getEndDate());\r\n \t\r\n \t//site investigator is null. \r\n \tDate now = new Date();\r\n \tStudyInvestigator s3 = new StudyInvestigator();\r\n \ts3.setStartDate(now);\r\n \ts3.syncDates();\r\n \tassertSame(now, s3.getStartDate());\r\n \tassertNull(s3.getEndDate());\r\n \t\r\n \t\r\n }", "Calendar registeredAt();", "private void syncTimeZones()\n {\n resetCounts();\n JwList<AcTimeZone> v = _access.getTimeZoneDb().getAll();\n for ( AcGlobalTimeZone g : getGlobalTimeZones() )\n {\n AcTimeZone a = v.getMatch(g.getCode());\n syncTimeZone(a, g);\n }\n logSummary(\"timezone\");\n }", "public abstract boolean inDaylightTime(java.util.Date date);", "public static void setTime(){\n\t\tCalendar cal = Calendar.getInstance();\n\t\tif (!JsonUtils.RUNNING_LOCALLY){\n\t\t\tcal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 4); //account for UTC offset because of lambda\n\t\t}\n\t\tCURRENT_TIME = formatTime(cal.getTime().toString());\n\t}", "public abstract void aktualisiereZeitpunk(int momentanZeitpunkt);", "private DateTime goodLocalTimeUse() {\n LocalTime lt = new LocalTime(8, 0, 0, 0);\n return new DateTime().toDateTime(DateTimeZone.forID(\"America/New_York\"))\n .withTime(lt)\n .toDateTime(DateTimeZone.forID(\"America/Los_Angeles\"));\n }", "Date getRequestedAt();", "private void setUpdatedDateAndTime() {\n // Calendar whose Date object will be converted to a readable date String and time String\n // initially set to the current date and time\n Calendar updatedCalendar = Calendar.getInstance();\n updatedCalendar.clear();\n // subtract 1 because Calendar month numbering is 0-based, ex. January is 0\n updatedCalendar.set(UPDATED_YEAR, UPDATED_MONTH-1, UPDATED_DAY, UPDATED_HOUR, UPDATED_MINUTE);\n\n Date updatedTime = updatedCalendar.getTime();\n time = DateFormat.getTimeInstance(DateFormat.SHORT).format(updatedTime);\n // format date to show day of week, month, day, year\n date = DateFormat.getDateInstance(DateFormat.FULL).format(updatedTime);\n }", "XMLGregorianCalendar getSystemEntryDate();", "private void updateSimState(Date currentSimDateTime){\n\n SimpleDateFormat ft =\n new SimpleDateFormat(\"E yyyy.MM.dd 'at' hh:mm:ss a\");\n String simDateTime = ft.format(currentSimDateTime);\n\n\n for(Person person : entirePopulation){\n for (Task task : person.getSchedule().getTasks()){\n int taskHour = task.getHourOfDay();\n\n int currentSimHour = currentSimDateTime.getHours();\n\n String output = \"{\" + taskHour + \" , \" + currentSimHour + \"}\";\n Log.d(\"Testing\", output);\n\n if(taskHour == currentSimHour ){\n // Perform given task now.\n Log.d(\"Task Executed: \", task.getTaskName());\n }\n }\n }\n }", "public Timestamp getHC_WorkStartDate2();", "public void twentyFourHour() {\n\n //Date format 24 hour\n DateFormat twelveHour = new SimpleDateFormat(\"HH:mm\", Locale.ENGLISH);\n\n setTimeZone();\n\n Calendar s = Calendar.getInstance(sydney);\n twelveHour.setTimeZone(sydney);\n\n String timeS = twelveHour.format(s.getTime());\n sydneyTime = findViewById(R.id.sydneytime);\n sydneyTime.setText(timeS);\n\n Calendar t = Calendar.getInstance(tokyo);\n twelveHour.setTimeZone(tokyo);\n\n String timeT = twelveHour.format(t.getTime());\n tokyoTime = findViewById(R.id.tokyotime);\n tokyoTime.setText(timeT);\n\n Calendar a = Calendar.getInstance(auckland);\n twelveHour.setTimeZone(auckland);\n\n String timeA = twelveHour.format(a.getTime());\n aucklandTime = findViewById(R.id.aucklandtime);\n aucklandTime.setText(timeA);\n\n Calendar d = Calendar.getInstance(dubai);\n twelveHour.setTimeZone(dubai);\n\n String timeD = twelveHour.format(d.getTime());\n dubaiTime = findViewById(R.id.dubaitime);\n dubaiTime.setText(timeD);\n\n Calendar n = Calendar.getInstance(newyork);\n twelveHour.setTimeZone(newyork);\n\n String timeN = twelveHour.format(n.getTime());\n newyorkTime = findViewById(R.id.newyorktime);\n newyorkTime.setText(timeN);\n }", "private DateTime goodLocalTimeUse2() {\n LocalTime lt = new LocalTime(8, 0, 0, 0);\n return new DateTime().toDateTime(DateTimeZone.getDefault())\n .withTime(lt)\n .toDateTime(DateTimeZone.forID(\"America/Los_Angeles\"));\n }", "@Test\n public void testTimezone() {\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/Paris\"));\n\n SunTimes paris = SunTimes.compute()\n .on(2020, 5, 1) // May 1st, 2020, starting midnight\n .latitude(48, 51, 24.0) // Latitude of Paris: 48°51'24\" N\n .longitude(2, 21, 6.0) // Longitude: 2°21'06\" E\n .execute();\n System.out.println(\"Sunrise in Paris: \" + paris.getRise());\n System.out.println(\"Sunset in Paris: \" + paris.getSet());\n\n SunTimes newYork = SunTimes.compute()\n .on(2020, 5, 1) // May 1st, 2020, starting midnight\n .at(40.712778, -74.005833) // Coordinates of New York\n .execute();\n System.out.println(\"Sunrise in New York: \" + newYork.getRise());\n System.out.println(\"Sunset in New York: \" + newYork.getSet());\n\n SunTimes newYorkTz = SunTimes.compute()\n .on(2020, 5, 1) // May 1st, 2020, starting midnight\n .timezone(\"America/New_York\") // ...New York timezone\n .at(40.712778, -74.005833) // Coordinates of New York\n .execute();\n System.out.println(\"Sunrise in New York: \" + newYorkTz.getRise());\n System.out.println(\"Sunset in New York: \" + newYorkTz.getSet());\n }", "public void twelveHour() {\n\n //Date format 12 hour\n DateFormat twelveHour = new SimpleDateFormat(\"hh:mm aa\", Locale.ENGLISH);\n\n setTimeZone();\n\n Calendar s = Calendar.getInstance(sydney);\n twelveHour.setTimeZone(sydney);\n\n String timeS = twelveHour.format(s.getTime());\n sydneyTime = findViewById(R.id.sydneytime);\n sydneyTime.setText(timeS);\n\n Calendar t = Calendar.getInstance(tokyo);\n twelveHour.setTimeZone(tokyo);\n\n String timeT = twelveHour.format(t.getTime());\n tokyoTime = findViewById(R.id.tokyotime);\n tokyoTime.setText(timeT);\n\n Calendar a = Calendar.getInstance(auckland);\n twelveHour.setTimeZone(auckland);\n\n String timeA = twelveHour.format(a.getTime());\n aucklandTime = findViewById(R.id.aucklandtime);\n aucklandTime.setText(timeA);\n\n Calendar d = Calendar.getInstance(dubai);\n twelveHour.setTimeZone(dubai);\n\n String timeD = twelveHour.format(d.getTime());\n dubaiTime = findViewById(R.id.dubaitime);\n dubaiTime.setText(timeD);\n\n Calendar n = Calendar.getInstance(newyork);\n twelveHour.setTimeZone(newyork);\n\n String timeN = twelveHour.format(n.getTime());\n newyorkTime = findViewById(R.id.newyorktime);\n newyorkTime.setText(timeN);\n }", "public void setDateAndTime(int d,int m,int y,int h,int n,int s);", "private DateTime goodLocalDateTimeUse() {\n LocalDateTime ldt = new LocalDateTime(2020, 6, 2, 8, 0, 0, 0);\n return new DateTime(ldt.getYear(), ldt.getMonthOfYear(), ldt.getDayOfYear(), ldt.getHourOfDay(),\n ldt.getMinuteOfHour(), ldt.getSecondOfMinute(), ldt.getMillisOfSecond(),\n DateTimeZone.forID(\"America/New_York\"))\n .toDateTime(DateTimeZone.forID(\"America/Los_Angeles\"));\n\n }", "long getDateTime();", "public static LocalDateTime hawaiiLocalTimeDateNow() {\n return TimeService.hawaiiLocalTimeDateNow();\n }", "public static void main(String[] args) {\n System.out.println(\"Instant.now(): \" + Instant.now());\n System.out.println(\"LocalDate.now(): \" + LocalDate.now());\n System.out.println(\"LocalTime.now(): \" + LocalTime.now());\n System.out.println(\"LocalDateTime.now(): \" + LocalDateTime.now());\n System.out.println(\"ZonedDateTime.now(): \" + ZonedDateTime.now());\n\n //All output values are using the ISO 8601 standard formatting. For dates, the basic for‐\n //mat is yyyy-MM-dd. For times, the format is hh:mm:ss.sss.\n\n //The of method for the date/time classes\n System.out.println(\"First landing on the Moon:\");\n LocalDate moonLandingDate = LocalDate.of(1969, Month.JULY, 20);\n LocalTime moonLandingTime = LocalTime.of(20, 18);\n System.out.println(\"Date: \" + moonLandingDate);\n System.out.println(\"Time: \" + moonLandingTime);\n System.out.println(\"Neil Armstrong steps onto the surface: \");\n LocalTime walkTime = LocalTime.of(20, 2, 56, 150_000_000);\n LocalDateTime walk = LocalDateTime.of(moonLandingDate, walkTime);\n System.out.println(walk);\n\n Set<String> regionNames = ZoneId.getAvailableZoneIds();\n System.out.println(\"There are \" + regionNames.size() + \" region names\");\n\n //Applying a time zone to a LocalDateTime\n LocalDateTime dateTime = LocalDateTime.of(2017, Month.JULY, 4, 13, 20, 10);\n ZonedDateTime nyc = dateTime.atZone(ZoneId.of(\"America/New_York\"));\n System.out.println(nyc);\n ZonedDateTime london = nyc.withZoneSameInstant(ZoneId.of(\"Europe/London\"));\n System.out.println(london);\n\n //Some methods in the Month enum\n System.out.println(\"Days in Feb in a leap year: \" +\n Month.FEBRUARY.length(true));\n System.out.println(\"Day of year for first day of Aug (leap year): \" +\n Month.AUGUST.firstDayOfYear(true));\n System.out.println(\"Month.of(1): \" + Month.of(1));\n System.out.println(\"Adding two months: \" + Month.JANUARY.plus(2));\n System.out.println(\"Subtracting a month: \" + Month.MARCH.minus(1));\n\n //Creating Dates and Times from Existing Instances\n //Once you’ve created a LocalDate, LocalTime, LocalDateTime, or ZonedDateTime,\n //it can no longer be changed. each returns a new instance, which is a copy of the original with the added\n //amount.\n\n //Using plus methods on LocalDate and LocalTime\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\");\n LocalDate start = LocalDate.of(2017, Month.FEBRUARY, 2);\n LocalDate end = start.plusDays(3);\n assertEquals(\"2017-02-05\", end.format(formatter));\n end = start.plusWeeks(5);\n assertEquals(\"2017-03-09\", end.format(formatter));\n end = start.plusMonths(7);\n assertEquals(\"2017-09-02\", end.format(formatter));\n end = start.plusYears(2);\n assertEquals(\"2019-02-02\", end.format(formatter));\n\n formatter = DateTimeFormatter.ISO_LOCAL_TIME;\n LocalTime startLocaltime = LocalTime.of(11, 30, 0, 0);\n LocalTime endLocaltime = startLocaltime.plusNanos(1_000_000);\n assertEquals(\"11:30:00.001\", end.format(formatter));\n startLocaltime = startLocaltime.plusSeconds(20);\n assertEquals(\"11:30:20\", end.format(formatter));\n startLocaltime = startLocaltime.plusMinutes(45);\n assertEquals(\"12:15:00\", end.format(formatter));\n startLocaltime = startLocaltime.plusHours(5);\n assertEquals(\"16:30:00\", end.format(formatter));\n\n Period period = Period.of(2, 3, 4); // 2 years, 3 months, 4 days\n LocalDateTime startLocalDateTime = LocalDateTime.of(2017, Month.FEBRUARY, 2, 11, 30);\n LocalDateTime endLocalDateTime = startLocalDateTime.plus(period);\n assertEquals(\"2019-05-06T11:30:00\",\n startLocalDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n startLocalDateTime = startLocalDateTime.plus(3, ChronoUnit.HALF_DAYS);\n assertEquals(\"2017-02-03T23:30:00\",\n startLocalDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n startLocalDateTime = startLocalDateTime.minus(period);\n assertEquals(\"2014-10-29T11:30:00\",\n startLocalDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n startLocalDateTime = startLocalDateTime.minus(2, ChronoUnit.CENTURIES);\n assertEquals(\"1817-02-02T11:30:00\",\n startLocalDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n startLocalDateTime = startLocalDateTime.plus(3, ChronoUnit.MILLENNIA);\n assertEquals(\"5017-02-02T11:30:00\",\n startLocalDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n\n LocalDateTime start2 = LocalDateTime.of(2017, Month.FEBRUARY, 2, 11, 30);\n LocalDateTime end2 = start2.withMinute(45);\n assertEquals(\"2017-02-02T11:45:00\",\n start2.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n end2 = start2.withHour(16);\n assertEquals(\"2017-02-02T16:30:00\",\n end2.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n end2 = start2.withDayOfMonth(28);\n assertEquals(\"2017-02-28T11:30:00\",\n end2.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n end2 = start2.withDayOfYear(300);\n assertEquals(\"2017-10-27T11:30:00\",\n end2.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n end2 = start2.withYear(2020);\n assertEquals(\"2020-02-02T11:30:00\",\n end2.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n\n LocalDateTime start3 = LocalDateTime.of(2017, Month.FEBRUARY, 2, 11, 30);\n start3.withDayOfMonth(29);\n\n //Adjusting the month to an invalid value\n LocalDateTime start4 = LocalDateTime.of(2017, Month.JANUARY, 31, 11, 30);\n LocalDateTime end4 = start4.with(ChronoField.MONTH_OF_YEAR, 2);\n assertEquals(\"2017-02-28T11:30:00\",\n end.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n\n\n }", "private DateTime goodLocalDateTimeUse2() {\n LocalDateTime ldt = new LocalDateTime(2020, 6, 2, 8, 0, 0, 0);\n return new DateTime(ldt.getYear(), ldt.getMonthOfYear(), ldt.getDayOfYear(), ldt.getHourOfDay(),\n ldt.getMinuteOfHour(), ldt.getSecondOfMinute(), ldt.getMillisOfSecond(),\n DateTimeZone.getDefault())\n .toDateTime(DateTimeZone.forID(\"America/Los_Angeles\"));\n\n }", "public void verifyDate(){\n\n // currentDateandTime dataSingleton.getDay().getDate();\n\n }", "@Override\n\tpublic java.util.Date getSyncTime() {\n\t\treturn _userSync.getSyncTime();\n\t}", "long getInhabitedTime();", "Date getUpdateTime();", "@SimpleFunction(description = \"Gets the current time.\"\n + \"It is formatted correctly for iSENSE\")\n public String GetTime() {\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n return sdf.format(cal.getTime()).toString();\n }", "Date getTimeStamp();", "protected abstract void updateDayTime(fr.inria.phoenix.diasuite.framework.datatype.daytime.DayTime currentTime) throws Exception;", "private Date getSamoaNow() {\n\t\t// Get the current datetime in UTC\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.setTime(new Date());\n\t\t\n\t\t// Get the datetime minus 11 hours (Samoa is UTC-11)\n\t\tcalendar.add(Calendar.HOUR_OF_DAY, -11);\n\t\t\n\t\treturn calendar.getTime();\n\t}", "static String createNormalDateTimeString() {\n return NORMAL_STROOM_TIME_FORMATTER.format(ZonedDateTime.now(ZoneOffset.UTC));\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "private String currentDateTime() {\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n String date = df.format(Calendar.getInstance().getTime());\n return date;\n }", "public void setProvisionTime(java.util.Calendar param){\n localProvisionTimeTracker = true;\n \n this.localProvisionTime=param;\n \n\n }", "Date getAccessTime();", "private String timeConversion() {\n Calendar local = Calendar.getInstance();\n Calendar GMT = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n\n //Time from the PINPoint\n int hours, minutes, seconds, day, month, year;\n hours = (record[10] & 0xF8) >> 3;\n minutes = ((record[10] & 0x07) << 3) + ((record[11] & 0xE0) >> 5);\n seconds = ((record[11] & 0x1F) << 1) + ((record[12] & 0x80) >> 7);\n seconds += (record[12] & 0x7F) / 100;\n day = (record[13] & 0xF8) >> 3;\n month = ((record[13] & 0x07) << 1) + ((record[14] & 0x80) >> 7);\n year = (record[14] & 0x7F) + 2000;\n \n month--; //Months in java are 0-11, PINPoint = 1-12;\n\n //Set GMTs time to be the time from the PINPoint\n GMT.set(Calendar.DAY_OF_MONTH, day);\n GMT.set(Calendar.MONTH, month);\n GMT.set(Calendar.YEAR, year);\n GMT.set(Calendar.HOUR_OF_DAY, hours);\n GMT.set(Calendar.MINUTE, minutes);\n GMT.set(Calendar.SECOND, seconds);\n\n //Local is set to GMTs time but with the correct timezone\n local.setTimeInMillis(GMT.getTimeInMillis());\n\n //Set Local time to be the time converted from GMT\n int lHours, lMinutes, lSeconds, lDay, lMonth, lYear;\n lHours = local.get(Calendar.HOUR_OF_DAY);\n lMinutes = local.get(Calendar.MINUTE);\n lSeconds = local.get(Calendar.SECOND);\n lDay = local.get(Calendar.DAY_OF_MONTH);\n lMonth = local.get(Calendar.MONTH);\n\n lMonth++; //Months in java are 0-11, humans read 1-12\n\n lYear = local.get(Calendar.YEAR);\n\n return hR(lMonth) + \"/\" + hR(lDay) + \"/\" + lYear + \" \" + hR(lHours) + \":\" + hR(lMinutes) + \":\" + hR(lSeconds);\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "public LocalDateTime convertToEST(ZonedDateTime time){\n ZoneId estZoneID = ZoneId.of(\"America/New_York\");\n ZonedDateTime estTime = time.withZoneSameInstant(estZoneID);\n return estTime.toLocalDateTime();\n }", "@SuppressWarnings(\"unused\")\n private void syncLinuxTimeZones()\n {\n syncLinuxTimezoneHeaders();\n }", "public interface Clock {\n public LocalDateTime getCurrentTimestamp();\n}", "public void sync() {\n new Thread(new Runnable() {\n public void run() {\n\n try {\n syncWeatherData();\n } catch (IOException e) {\n Log.i(\"sync\", \"error syncing weather data\");\n e.printStackTrace();\n }\n try {\n syncEnergyData();\n } catch (IOException e) {\n Log.i(\"sync\", \"error syncing energy data\");\n e.printStackTrace();\n }\n\n Date now = new Date();\n lastUpdated = now.getTime();\n SharedPreferences sharedPref = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);\n SharedPreferences.Editor e = sharedPref.edit();\n e.putLong(\"lastUpdated\", lastUpdated);\n e.commit();\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n df.setTimeZone(SimpleTimeZone.getTimeZone(\"US/Central\"));\n\n Log.i(\"sync\", \"consumption \" + getLiveDemand());\n Log.i(\"sync\", \"windmill1 \" + getLiveProduction(1));\n Log.i(\"sync\", \"temp \" + getCurrentTemperature());\n Log.i(\"sync\", \"wind \" + getCurrentWindSpeed());\n }\n }).start();\n\n }", "Calendar getArrivalDateAndTime();", "public abstract Date getStartTime();", "public String getTimestamp() \n{\n Calendar now = Calendar.getInstance();\n return String.format(\"20%1$ty-%1$tm-%1$td_%1$tHh%1$tMm%1$tSs\", now);\n}", "public static void main(String []args) {\n ZonedDateTime zd1 = ZonedDateTime.now();\n ZonedDateTime zd2 = ZonedDateTime.now(ZoneId.of(\"Europe/London\"));\n \n System.out.println(zd1);\n System.out.println(zd2);\n \n \n }", "private void zeitGeber() {\n GregorianCalendar datum = new GregorianCalendar();\n stunden = datum.get(Calendar.HOUR_OF_DAY);\n minuten = datum.get(Calendar.MINUTE);\n sekunden = datum.get(Calendar.SECOND);\n inform();\n }", "public static void queryLyftTaskAndStore(LocationAndTime locationAndTime,LyftClientUtil lyftClient){\n Map requestMap=new HashMap<>();\n requestMap.put(\"startLatitude\",locationAndTime.getStartLatitude());\n requestMap.put(\"startLongitude\",locationAndTime.getStartLongitude());\n requestMap.put(\"endLatitude\",locationAndTime.getEndLatitude());\n requestMap.put(\"endLongitude\",locationAndTime.getEndLongitude());\n List<CostEstimate> costEstimates=lyftClient.getCostEstimate(requestMap).getCostEstimates();\n LocalDateTime localDateTime=Instant.ofEpochMilli(locationAndTime.getJourneyStartTime().getTime()).atZone( ZoneId.systemDefault()).toLocalDateTime();\n LocalDateTime now=LocalDateTime.now();\n LocalDateTime toDateTime=LocalDateTime.of( now.getYear(),now.getMonthValue(),now.getDayOfMonth() , localDateTime.getHour(), localDateTime.getMinute(), localDateTime.getSecond());\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");\n if(costEstimates!=null){\n for(CostEstimate estimate:costEstimates){\n estimate.setCurrentDate(formatter.format(toDateTime.atZone(ZoneId.systemDefault()).toInstant()));\n csvUtilLyft.writeRecordToFile(estimate);\n }\n }\n\n\n }", "public void setRegisterDateTime(Date dateTime) { this.registerDateTime = dateTime; }", "private void showCurrentDateTime(long ts) {\n String target = \"1904/01/01 12:00 AM\"; // Your given date string\n long millis = TimeUnit.MILLISECONDS.convert(ts, TimeUnit.NANOSECONDS);\n DateFormat formatter = new SimpleDateFormat(\"yyyy/MM/dd hh:mm aaa\");\n formatter.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n Date date = null;\n try {\n date = formatter.parse(target);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n long newTimeInmillis = date.getTime() + millis;\n Date date2 = new Date(newTimeInmillis);\n curT.setText(\"now: \" + date2);\n }", "public static void updateCalendar() {\n time = Calendar.getInstance();\n hour = time.get(Calendar.HOUR_OF_DAY);\n minute = time.get(Calendar.MINUTE);\n day = time.get(Calendar.DAY_OF_MONTH);\n month = time.get(Calendar.MONTH) + 1; \n year = time.get(Calendar.YEAR);\n\n }", "Date getUpdatedDate();", "public static LocalTime hawaiiLocalTimeNow() {\n return TimeService.hawaiiLocalTimeNow();\n }", "Time save(Time time);", "gen.grpc.hospital.examinations.DateTime getDateTime();", "private Date getTestListingDateTimeStamp() {\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n\n GregorianCalendar calendar = new GregorianCalendar(2010, 0, 1, 17, 0);\n return new Date(calendar.getTimeInMillis());\n }", "public String getSystemTime() {\n\t\tSimpleDateFormat dateTimeInGMT = new SimpleDateFormat(\"dd-MMM-yyyy hh\");\n\t\t// Setting the time zoneS\n\t\tdateTimeInGMT.setTimeZone(TimeZone.getTimeZone(\"America/New_York\"));\n\t\tString timeZone = dateTimeInGMT.format(new Date());\n\t\treturn timeZone;\n\n\t}", "public static String GetIsoDateTime(Date dateToFormat) {\n\t\t// GPX specs say that time given should be in UTC, no local time.\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n\t\tsdf.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n\n\t\treturn sdf.format(dateToFormat);\n\t}", "org.hl7.fhir.DateTime getAppliesDateTime();", "default void onCustomStartTimeChanged(LocalTime startTime) {}", "public static URL getUrlForTimeSync() {\r\n\t\tString strUrl = getBaseURL() + \"mip_services/core/api/1.0/miscellaneous/time\";\r\n\t\treturn str2url(strUrl);\r\n\t}", "Date getDateUpdated();", "private void lastUpdate(LocalDateTime ldt) {\n\n lastUpdated = timeFormatter(ldt);\n }", "private void updateLabel() {\n String myFormat = \"yyyy-MM-dd\"; //In which you need put here\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.UK);\n\n serviceDate = sdf.format(myCalendar.getTime());\n callTimeSlotService();\n }", "DateTimeStruct getDateTimeStruct();", "void addDate(long t) {\n\tif (act != null) {\n\t long date = act.getDate() + t;\n\t act.setLocation(act.getMap(), act.getX(), act.getY(), date);\n\t}\n }", "private byte[] syncCurrentTime() {\n long time_sec, time_mse;\n TimeZone timeZone;\n byte[] time = new byte[4];\n Calendar now = Calendar.getInstance();\n\n timeZone = now.getTimeZone();\n time_mse = System.currentTimeMillis() + timeZone.getRawOffset();\n time_sec = time_mse / 1000;\n\n time[0] = (byte) (time_sec & 0xff);\n time[1] = (byte) ((time_sec >> 8) & 0xff);\n time[2] = (byte) ((time_sec >> 16) & 0xff);\n time[3] = (byte) ((time_sec >> 24) & 0xff);\n\n return setMessageByteData(mTheCmd, time, time.length);\n }", "void setUserTimeZoneCode(int userTimeZoneCode);", "public Date getSystemDateTime(){\n\t\tDate systemDate = new Date();\t\t\n\t\treturn systemDate;\n\t}", "static long getDateTime(){\n return System.currentTimeMillis();\n }", "public abstract void synchronizeTime(Map<String,List<Map<String,String>>> data, long syncTime);", "java.lang.String getArrivalTime();", "java.lang.String getArrivalTime();", "public void storeRegularDayTripStationScheduleWithRS();", "private static String getStamp() {\n\t\t\t return new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t\t}", "Calendar getTimeStamp();", "TemporalService accountingForTransmissionTime();", "private String formatTimeToICS(LocalDateTime date) {\n return DateTimeFormatter.ofPattern(\"YYYYMMddTHHmmss\").format(date);\n }", "DateTime getTime();", "public static String getCurrentTime(){\n Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone(\"Asia/Singapore\"));\n Date currentDate = calendar.getTime();\n return currentDate.toString();\n }", "private void fillInDateTime ( final String dateField, final String date, final String timeField,\n final String time ) {\n waitForAngular();\n fillInDate( dateField, date );\n fillInTime( timeField, time );\n }", "public String getDateTimeFormated(Context context){\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\"\n , context.getResources().getConfiguration().locale);\n sdf.setTimeZone(TimeZone.getDefault());\n return sdf.format(new Date(mDateTime));\n //setting the dateformat to dd/MM/yyyy HH:mm:ss which is how the date is displayed when a dream is saved\n }", "private void getDateTime() {\n String todayDateTime = String.valueOf(Calendar.getInstance().getTime());\n\n // Calendar.getInstance().getTime() returns a long string of various data for today, split and access what we need\n String[] splitTime = todayDateTime.split(\" \");\n\n dayDate = splitTime[1] + \" \" + splitTime[2] + \" \" + splitTime[5]; // Month, Day, Year\n dayTime = splitTime[3];\n }", "public String getCurrentDateAndTime(){\n return dateTimeFormatter.format(current);\n }", "org.hl7.fhir.DateTime addNewAppliesDateTime();", "public static void main(String[] args) {\n LocalDateTime currentTime = LocalDateTime.now();\n System.out.println(\"Current DateTime: \" + currentTime);\n\n LocalDate date1 = currentTime.toLocalDate();\n System.out.println(\"date : \" + date1);\n\n Month month = currentTime.getMonth();\n int day = currentTime.getDayOfMonth();\n int seconds = currentTime.getSecond();\n int nano = currentTime.getNano();\n\n System.out.println(\"Month: \" + month + \" day: \" + day + \" seconds: \" + seconds + \" nano: \" + nano);\n\n LocalDateTime date2 = currentTime.withDayOfMonth(10).withYear(2012);\n System.out.println(\"date2: \" + date2);\n\n //12 december 2014\n LocalDate date3 = LocalDate.of(2014, Month.DECEMBER, 12);\n System.out.println(\"date3: \" + date3);\n\n //22 hour 15 minutes\n LocalTime date4 = LocalTime.of(22, 15);\n System.out.println(\"date4: \" + date4);\n \n //parse a string\n LocalTime date5 = LocalTime.parse(\"20:15:30\");\n System.out.println(\"date5: \" + date5);\n\n System.out.println(\"\");\n // Get the current date and time\n ZonedDateTime zonedDateTime = ZonedDateTime.parse(\"2007-12-03T10:15:30+05:30[Asia/Karachi]\");\n System.out.println(\"date1: \" + zonedDateTime);\n\n ZoneId id = ZoneId.of(\"Europe/Paris\");\n System.out.println(\"ZoneId: \" + id);\n\n ZoneId currentZone = ZoneId.systemDefault();\n System.out.println(\"CurrentZone: \" + currentZone);\n System.out.println(\"\");\n \n //Get the current date\n LocalDate today = LocalDate.now();\n System.out.println(\"Current date: \" + today);\n\n //add 1 week to the current date\n LocalDate nextWeek = today.plus(1, ChronoUnit.WEEKS);\n System.out.println(\"Next week: \" + nextWeek);\n\n //add 1 month to the current date\n LocalDate nextMonth = today.plus(1, ChronoUnit.MONTHS);\n System.out.println(\"Next month: \" + nextMonth);\n\n //add 1 year to the current date\n LocalDate nextYear = today.plus(1, ChronoUnit.YEARS);\n System.out.println(\"Next year: \" + nextYear);\n\n //add 10 years to the current date\n LocalDate nextDecade = today.plus(1, ChronoUnit.DECADES);\n System.out.println(\"Date after ten year: \" + nextDecade);\n System.out.println(\"\");\n// \n// With Java 8, two specialized classes are introduced to deal with the time differences.\n//\n//Period - It deals with date based amount of time.\n//\n//Duration - It deals with time based amount of time.\n //Get the current date working with Periods\n LocalDate datePeriod = LocalDate.now();\n System.out.println(\"Current date: \" + datePeriod);\n\n //add 1 month to the current date\n LocalDate datePeriod2 = datePeriod.plus(1, ChronoUnit.MONTHS);\n System.out.println(\"Next month: \" + datePeriod2);\n\n Period period = Period.between(datePeriod2, datePeriod);\n System.out.println(\"Period: \" + period);\n\n //work with durations\n LocalTime time1 = LocalTime.now();\n Duration twoHours = Duration.ofHours(2);\n\n LocalTime time2 = time1.plus(twoHours);\n Duration duration = Duration.between(time1, time2);\n\n System.out.println(\"Duration: \" + duration);\n\n// TemporalAdjuster is used to perform the date mathematics.\n// For example, get the \"Second Saturday of the Month\" or \"Next Tuesday\".\n// Let us see them in action.\n// \n System.out.println(\"\");\n//Get the current date\n LocalDate dateArithmatic = LocalDate.now();\n System.out.println(\"Current date: \" + dateArithmatic);\n\n //get the next tuesday\n LocalDate nextTuesday = dateArithmatic.with(TemporalAdjusters.next(DayOfWeek.TUESDAY));\n System.out.println(\"Next Tuesday on : \" + nextTuesday);\n\n //get the second saturday of next month\n LocalDate firstInYear = LocalDate.of(dateArithmatic.getYear(), dateArithmatic.getMonth(), 1);\n LocalDate secondSaturday = firstInYear.with(TemporalAdjusters.nextOrSame(DayOfWeek.SATURDAY))\n .with(TemporalAdjusters.next(DayOfWeek.SATURDAY));\n System.out.println(\"Second Saturday on : \" + secondSaturday);\n\n //Sql date time\n java.util.Date javaDate = new java.util.Date();\n long javaTime = javaDate.getTime();\n System.out.println(\"\\n\\nThe Java Date is: \" + javaDate.toString());\n\n java.sql.Date sqlDate = new java.sql.Date(javaTime);\n System.out.println(\"The SQL DATE is: \" + sqlDate.toString());\n\n java.sql.Time sqlTime = new java.sql.Time(javaTime);\n System.out.println(\"The SQL TIME is: \" + sqlTime.toString());\n\n java.sql.Timestamp sqlTimestamp = new java.sql.Timestamp(javaTime);\n System.out.println(\"The SQL TIMESTAMP is: \" + sqlTimestamp.toString());\n }", "long getSettlementDate();", "public Date getUpdateDatetime();", "public String getSystemDateTime() {\n\t\tjava.text.SimpleDateFormat sdfDate = new java.text.SimpleDateFormat(\"yyyy/MM/dd\");\n java.text.SimpleDateFormat sdfTime = new java.text.SimpleDateFormat(\"HH:mm\");\n Date now = new Date();\n String strDate = sdfDate.format(now);\n String strTime = sdfTime.format(now);\n System.out.println(\"Date: \" + strDate);\n System.out.println(\"Time: \" + strTime); \n return \"date\"+strDate+\" \"+strTime;\n\t}", "@Override\n\tpublic Long updateStartTime() {\n\t\treturn null;\n\t}", "public void formatDateTime() {\n // Check if type of parsing is for display or not. \n // If it is for display, no need to check if date has already passed.\n if (parseType != 2) {\n startDate = dtFormat.formatDate(startDate,0);\n endDate = dtFormat.formatDate(endDate,0);\n } else {\n startDate = dtFormat.formatDate(startDate,1);\n endDate = dtFormat.formatDate(endDate,1);\n }\n \n startTime = dtFormat.formatTime(startTime);\n endTime = dtFormat.formatTime(endTime);\n }", "public boolean setSyncDate(String syncDate) {\n boolean ret = false;\n SQLiteDatabase db = null;\n JSObject retObj = new JSObject();\n\n try {\n db = getConnection(false, secret);\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n Date date = formatter.parse(syncDate.replaceAll(\"Z$\", \"+0000\"));\n long syncTime = date.getTime() / 1000L;\n String[] statements = { \"UPDATE sync_table SET sync_date = \" + syncTime + \" WHERE id = 1;\" };\n retObj = execute(db, statements);\n } catch (Exception e) {\n Log.d(TAG, \"Error: setSyncDate failed: \", e);\n } finally {\n if (db != null) db.close();\n if (retObj.getInteger(\"changes\") != Integer.valueOf(-1)) ret = true;\n return ret;\n }\n }", "public boolean setSyncDate(String syncDate) {\n boolean ret = false;\n SQLiteDatabase db = null;\n JSObject retObj = new JSObject();\n\n try {\n db = getConnection(false, secret);\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n Date date = formatter.parse(syncDate.replaceAll(\"Z$\", \"+0000\"));\n long syncTime = date.getTime() / 1000L;\n String[] statements = { \"UPDATE sync_table SET sync_date = \" + syncTime + \" WHERE id = 1;\" };\n retObj = execute(db, statements);\n } catch (Exception e) {\n Log.d(TAG, \"Error: setSyncDate failed: \", e);\n } finally {\n if (db != null) db.close();\n if (retObj.getInteger(\"changes\") != Integer.valueOf(-1)) ret = true;\n return ret;\n }\n }", "@Test\n\tpublic void t3_localdatetime_main() {\n\t\tLocalDateTime in = K_ZDT.toLocalDateTime();\n\t\t\n\t\t_TestEntityWithLocalDateTime toDb = new _TestEntityWithLocalDateTime();\n\t\ttoDb.setId(new Random().nextLong());\n\t\ttoDb.setUserEntered(in);\n\t\t\n\t\tmongo.save(toDb);\n\t\t\n\t\t_TestEntityWithLocalDateTime fromDb = mongo.findById(toDb.getId(), _TestEntityWithLocalDateTime.class);\n\t\tassertNotNull(fromDb);\n\t\t\n\t\tassertEquals(in, fromDb.getUserEntered());\n\t}", "private void updateTimeEntryData()\n throws RedmineException\n {\n if (System.currentTimeMillis() > (timeEntriesUpdateTimeStamp+Settings.cacheExpireTime*1000))\n {\n synchronized(timeEntries)\n {\n // get total number of time entries\n int timeEntryCount = getDataLength(\"/time_entries\",\"time_entry\");\n for (int i = timeEntries.size(); i < timeEntryCount; i++)\n {\n timeEntries.add(TIME_ENTRY_NULL);\n }\n\n // get date of first time entry (Note: always sorted descending and cannot be changed)\n timeEntryStartDate = new Date();\n getData(\"/time_entries\",\"time_entry\",timeEntryCount-1,1,new ParseElementHandler<TimeEntry>()\n {\n public void data(Element element)\n {\n timeEntryStartDate = getDateValue(element,\"spent_on\");\n//Dprintf.dprintf(\"timeEntryStartDate=%s\",timeEntryStartDate);\n }\n });\n\n timeEntriesUpdateTimeStamp = System.currentTimeMillis();\n }\n }\n }", "public static Date currentDate() {\n Date currentDate = new Date();\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n format.setTimeZone(TimeZone.getTimeZone(\"gmt\"));\n String strTime = format.format(currentDate);\n\n SimpleDateFormat formatLocal = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\n try {\n currentDate = formatLocal.parse(strTime);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n return currentDate;\n }", "public java.time.LocalDateTime convertToCurrentZone(java.time.LocalDateTime time_input){\r\n java.time.LocalDateTime newDateTime = time_input.atZone(ZoneId.of(\"GMT\")).withZoneSameInstant(getTimeZone().toZoneId()).toLocalDateTime();\r\n return newDateTime;\r\n }" ]
[ "0.60160035", "0.60160035", "0.59304947", "0.5751548", "0.5728073", "0.56225705", "0.5584139", "0.546276", "0.54462445", "0.5418456", "0.5406008", "0.53754693", "0.5344766", "0.5344477", "0.5337096", "0.5326439", "0.53236514", "0.53134483", "0.5306695", "0.5292911", "0.5285637", "0.5272364", "0.527106", "0.5267775", "0.52592057", "0.52523565", "0.524944", "0.524803", "0.5244343", "0.5239135", "0.5221816", "0.52116036", "0.52036947", "0.5194751", "0.5190648", "0.5190648", "0.51796854", "0.5162126", "0.51533103", "0.51510334", "0.51197344", "0.5119038", "0.51169115", "0.5116809", "0.5110602", "0.51042897", "0.5101882", "0.510056", "0.5098576", "0.5098096", "0.50955194", "0.5085525", "0.50834167", "0.5083115", "0.507508", "0.50709474", "0.5062393", "0.5059584", "0.5054517", "0.504225", "0.50392294", "0.50281006", "0.50258285", "0.5023075", "0.50214094", "0.50172967", "0.5014856", "0.5014402", "0.50124097", "0.5005222", "0.50034153", "0.5001509", "0.4996091", "0.49953583", "0.49941707", "0.49941707", "0.49908033", "0.49897096", "0.49881577", "0.4987074", "0.49806997", "0.49744233", "0.49704057", "0.49670532", "0.49660227", "0.49657455", "0.49608657", "0.49606717", "0.49589002", "0.4958335", "0.4951002", "0.49473503", "0.49388745", "0.49358207", "0.4932463", "0.4932463", "0.49307558", "0.4927059", "0.492376", "0.49224696" ]
0.5470627
7
TODO Autogenerated method stub
public static void main(String[] args) { int [] a=new int[5]; a[1]=10; a[2]=20; a[3]=30; a[4]=40; a[5]=50; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public void mo55254a() {\n }", "@Override\n\tprotected void initValue()\n\t{\n\n\t}" ]
[ "0.66730285", "0.65698135", "0.6524193", "0.64818907", "0.6477969", "0.6459897", "0.64150065", "0.6378023", "0.62785167", "0.6256323", "0.62391806", "0.6225302", "0.6203955", "0.6196986", "0.6196986", "0.6193411", "0.6188864", "0.6175446", "0.61352557", "0.6129083", "0.6081512", "0.6078478", "0.604346", "0.6027257", "0.6019896", "0.6001062", "0.5969694", "0.5969694", "0.59695363", "0.5950136", "0.5940857", "0.5923273", "0.59109026", "0.5904841", "0.58943695", "0.58871347", "0.5884626", "0.5871665", "0.5857174", "0.58529896", "0.58477926", "0.5827649", "0.58111745", "0.5810771", "0.58093345", "0.58093345", "0.58016413", "0.5792614", "0.57915145", "0.57915145", "0.57915145", "0.57915145", "0.57915145", "0.57915145", "0.579047", "0.5788485", "0.5783461", "0.5783461", "0.57756454", "0.57756454", "0.57756454", "0.57756454", "0.57756454", "0.5762863", "0.57603353", "0.57603353", "0.5751224", "0.5751224", "0.5751224", "0.5751004", "0.573491", "0.573491", "0.573491", "0.572175", "0.5717107", "0.5717079", "0.5717079", "0.5717079", "0.5717079", "0.5717079", "0.5717079", "0.5717079", "0.5716174", "0.5715048", "0.5704484", "0.5700041", "0.5699844", "0.56887585", "0.56792545", "0.5674781", "0.56728446", "0.56702185", "0.5662837", "0.5657697", "0.56568635", "0.56568635", "0.56568635", "0.5656818", "0.5655768", "0.56533396", "0.56532913" ]
0.0
-1
private boolean accepted = false;
public Packet1Login () { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isAccept(){\n return isAccept; \n }", "boolean getAccepted();", "public boolean getAccepted()\n {\n return accepted;\n }", "boolean isAccepting();", "public boolean accepted() {\r\n\r\n return m_bAccepted;\r\n\r\n }", "public boolean getAccepted() {\n return accepted_;\n }", "public boolean getAccepted() {\n return accepted_;\n }", "public boolean isAccepting() {\n\t\treturn isAccepting;\n\t}", "public void setAccepted_tou(boolean accepted_tou);", "void acceptTrade(boolean accept);", "public Boolean getFriendAccepted() {\n return friendAccepted;\n }", "boolean isConfirmed(){\n\t\treturn confirmed;\n\t}", "public boolean validate(){\n return true;\n }", "public void validate(){\n if (validated){\n validated = false;\n } else {\n validated = true;\n }\n }", "public boolean isValidated(){\n return getValidatedFlag();\n }", "boolean valid() {\n return true;\n }", "boolean valid() {\n return true;\n }", "boolean valid() {\n return true;\n }", "public boolean isAutomaticAccept() {\n return getBooleanProperty(\"IsAutomaticAccept\");\n }", "public void setAccepted() {\r\n\t\tstatus = \"Accepted\";\r\n\t}", "boolean supportsAccepts();", "public Builder setAccepted(boolean value) {\n \n accepted_ = value;\n onChanged();\n return this;\n }", "public void setAccept(boolean accept) {\n this.accept = accept;\n }", "public boolean isValid() {\r\n\treturn bValid;\r\n}", "public boolean getRejected() {\n return rejected;\n }", "boolean isReceiving();", "public boolean getIsChosen();", "private CheckBoolean() {\n\t}", "public Boolean getValidate(){\n return validated;\n }", "@Override\n\tpublic void receive(boolean value) {\n\t\t\n\t}", "public String getIsAccept() {\r\n\t\treturn isAccept;\r\n\t}", "public boolean isValid(){\n\t\treturn true;\n\t}", "public boolean isAcceptWeight() {\n return acceptWeight;\n }", "boolean isSending();", "@Test\n\tpublic void acceptedOfferCanNotBeRejected() {\n\t}", "public void setFriendAccepted(Boolean friendAccepted) {\n this.friendAccepted = friendAccepted;\n }", "public boolean getAccepted_tou();", "@Override\r\n public boolean accept() {\n return canEat();\r\n }", "@Override\r\n\tpublic void validate() {\n\t\tsuper.validate();\r\n\t\tif(nofck == null)\r\n\t\t\tnofck = false;\r\n\t}", "public boolean getRejected() {\n return rejected;\n }", "@Override\r\n\tpublic boolean isValid() {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean rejectIt() {\n\t\treturn false;\n\t}", "boolean getValid();", "protected boolean isValid()\r\n {\r\n \treturn true;\r\n }", "boolean isConfirmed();", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "boolean isTransmitting();", "void changeAcceptance(final boolean acceptance);", "public Boolean getInplay(){\n return inplay;\n }", "public boolean isRequest(){\n return false;\n }", "void newGame(boolean isAccepted);", "@Override\n\t\tpublic boolean isValid() {\n\t\t\treturn false;\n\t\t}", "public void setRejected(boolean value) {\n this.rejected = value;\n }", "public void onEulaAction(boolean isAccepted);", "public boolean softAccept(Thing candidate){\n if(thing == null){\n thing = candidate;\n return true;\n }else{\n return false;\n }\n }", "public boolean isAccepted_tou();", "ReadPolyState(boolean isAccept){\n this.isAccept = isAccept; \n }", "private boolean Verific() {\n\r\n\treturn true;\r\n\t}", "private\n boolean\n allowEvents()\n {\n return itsAllowEvents;\n }", "public void setIsChosen(boolean isChosen);", "public abstract boolean isConfirmed();", "public Boolean valid() {\n return valid;\n }", "public java.lang.Boolean getRejected () {\n\t\treturn rejected;\n\t}", "private void setBlocked(boolean value) {\n\n blocked_ = value;\n }", "@Test\n\tpublic void rejectedOfferCanNotBeAccepted() {\n\t}", "protected boolean isValid() {\n \t\treturn valid;\n \t}", "@Override\n\tpublic boolean validate() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean validate() {\n\t\treturn false;\n\t}", "public filter(String acc){\r\n\t\taccepted = acc;\r\n\t}", "public boolean getAI(){return ai;}", "public boolean isGuard(){\n return false;\n }", "public boolean isAllowed() {\n return isAllowed;\n }", "Boolean acceptRequest(User user);", "public boolean isAllowed() {\n \t\treturn isAllowed;\n \t}", "public boolean isValid(){\n\t\treturn valid;\n\t}", "public boolean validate()\n {\n return !disposed;\n }", "public void setRejected (java.lang.Boolean rejected) {\n\t\tthis.rejected = rejected;\n\t}", "@Override\n\tpublic boolean approveIt() {\n\t\treturn false;\n\t}", "public boolean getHIPPAWaiver(){return this.HIPPAWaiver;}", "boolean getIsOk();", "public void setIsAccept(String isAccept) {\r\n\t\tthis.isAccept = isAccept;\r\n\t}", "public boolean getClaim(){\n return isClaimed;\n}", "boolean isGoodQuestion(){\n\t\treturn goodQ;\n\t}", "@Override\n\tpublic boolean paie() {\n\t\treturn false;\n\t}", "@Override\n public void accept(Boolean aBoolean) throws Exception {\n UserFilter userFilter = new UserFilter();\n userFilter.setDistance(RestaurantFilterActivity.DEFAULT_DISTANCE);\n userFilter.setOpen(false);\n userFilter.setDelivery(false);\n userFilter.setDailyMenu(false);\n getDataManager().saveUserFilter(userFilter).subscribe(new Consumer<Long>() {\n @Override\n public void accept(Long aLong) throws Exception {\n getDataManager().setActiveUserFilterId(aLong);\n // konacno otvaranje\n getMvpView().openUserRestaurantsActivity();\n }\n });\n\n }", "public void setClaim(boolean a){\n isClaimed= a;\n \n}", "@Override\r\n\tpublic void acceptTrade(boolean willAccept) {\n\t\t\r\n\t}", "public boolean isValid() {\n\t\treturn false;\n\t}", "boolean isCancelled(){\n\t\treturn cancelled;\n\t}", "public boolean isValid() {\n return true;\n }", "public boolean isSent(){\t\n\t\treturn sent;\n\t}", "boolean canAcceptTrade();", "@Override\n\tpublic boolean isAcceptingInput() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAcceptingInput() {\n\t\treturn true;\n\t}", "@Override\r\n public boolean validate() {\n return true;\r\n }", "public boolean isResponse(){\n return true;\n }", "public abstract boolean esComestible();", "public Boolean shouldAbandon() {\n return false;\n }", "public boolean isBooked(){\n return booked;\n }" ]
[ "0.7938067", "0.7820838", "0.76796335", "0.75513697", "0.738345", "0.7266136", "0.7101427", "0.682295", "0.6646082", "0.65599823", "0.6459853", "0.6435376", "0.64240706", "0.64115995", "0.6370042", "0.6369344", "0.6369344", "0.6369344", "0.63677055", "0.63515306", "0.63146156", "0.62742585", "0.6257744", "0.6178353", "0.61604255", "0.6124506", "0.61115485", "0.60985225", "0.60967034", "0.6090324", "0.60591257", "0.60498774", "0.6049292", "0.6035157", "0.60314184", "0.6029677", "0.6012326", "0.59956914", "0.59938514", "0.59886205", "0.5972204", "0.5970508", "0.5965868", "0.59653455", "0.59535825", "0.593954", "0.593954", "0.593954", "0.593834", "0.5936865", "0.5933997", "0.5924273", "0.59188926", "0.5918074", "0.5906022", "0.5903127", "0.590237", "0.5887601", "0.58834875", "0.58787405", "0.58678025", "0.5849377", "0.58479303", "0.5844076", "0.5837285", "0.58361363", "0.5834164", "0.5830304", "0.58275384", "0.58275384", "0.5822482", "0.58154905", "0.5807178", "0.57967436", "0.57937163", "0.57876706", "0.57763624", "0.5774797", "0.5770625", "0.5762958", "0.5758538", "0.5752207", "0.57510746", "0.5748868", "0.57464397", "0.574603", "0.5744178", "0.5741879", "0.5734321", "0.57304126", "0.5724159", "0.5723138", "0.57220966", "0.5720937", "0.5710864", "0.5710864", "0.57055694", "0.5705515", "0.56888247", "0.56878966", "0.5683364" ]
0.0
-1
if post is repost, then name of repost source else it's null and shouldn't be used, as the fields below
public String getRepost_source_name() { return repost_source_name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPost() {\r\n return post;\r\n }", "private String getAuthor(CloudEntity post) {\n if (post.getCreatedBy() != null) {\n return \" \" + post.getCreatedBy().replaceFirst(\"@.*\", \"\");\n } else {\n return \"<anonymous>\";\n }\n }", "private String getAuthor(CloudEntity post) {\n if (post.getCreatedBy() != null) {\n return \" \" + post.getCreatedBy().replaceFirst(\"@.*\", \"\");\n } else {\n return \"<anonymous>\";\n }\n }", "public String getPost() {\n return post;\n }", "public String getPost() {\n return post;\n }", "public String sourceField() {\n return this.sourceField;\n }", "public void setPost(String post) {\n this.post = post == null ? null : post.trim();\n }", "public void setPost(String post) {\n this.post = post == null ? null : post.trim();\n }", "public void setPost(String post) {\r\n this.post = post == null ? null : post.trim();\r\n }", "@Override\r\n\tpublic String getPosto() {\n\t\treturn null;\r\n\t}", "@Override\n public String getName() {\n return source.getName();\n }", "public String getReName() {\n return reName;\n }", "@Override\n \tpublic String getSource() {\n \t\tif (super.source != refSource) {\n \t\t\tif (refSource == null) {\n \t\t\t\trefSource = super.source;\n \t\t\t} else {\n \t\t\t\tsuper.source = refSource;\n \t\t\t}\n \t\t}\n \t\treturn refSource;\n \t}", "public static String getTriggerField(){\n return WHAT_IS_THE_SOURCE_OF_FUNDS.getFieldNameValue();\n }", "String getPresetName();", "@Override\n public String toString() {\n return \"Post number: \" + this.id + \"\\n\" +\n this.content + \"\\n\" +\n \"Written by: \" + this.user.getUsername() + \"\\n\" +\n //The expression below checks if the url\n //field is null. If not, it displays the url.\n //If it is, it just displays an empty string\n \"URL: \" + (this.url != null ? this.url : \"\");\n\n }", "public String getPostSubject() {\n return postSubject;\n }", "public void setPoster (String s) {\n poster = s;\n }", "public void setReName(String reName) {\n this.reName = reName == null ? null : reName.trim();\n }", "public String getDefaultSourcePropertyName() {\r\n return null;\r\n }", "public String getPostUser() {\n return postUser;\n }", "public String getSource() {\n/* 312 */ return getValue(\"source\");\n/* */ }", "public Post selectPostChange(Post post) {\n\t\treturn postDao.selectPostChange(post);\r\n\t}", "java.lang.String getAssociatedSource();", "@Override\n\tpublic Post updatePost(Post post) {\n\t\treturn null;\n\t}", "private String resolveName()\n {\n\n String forwardName = null;\n\n // trigger\n final EventFacade trigger = this.getTrigger();\n\n if (trigger != null)\n {\n\n forwardName = trigger.getName();\n\n }\n\n // name\n if (forwardName == null)\n {\n\n forwardName = this.getName();\n\n }\n\n // target\n if (forwardName == null)\n {\n\n forwardName = this.getTarget().getName();\n\n }\n\n // else\n if (forwardName == null)\n {\n\n forwardName = \"unknown\";\n\n }\n\n // return\n return forwardName;\n\n }", "public String getRequestUrlName() {\n return \"Source\"; // TODO: parameter\n }", "@Override\n public String getSource()\n {\n return null;\n }", "@Override\r\n\tpublic String getSource() {\n\t\treturn null;\r\n\t}", "@Override\r\n public String getSource()\r\n {\n return null;\r\n }", "public void setDatePost(String datePost) {\n this.datePost = datePost == null ? null : datePost.trim();\n }", "public String getSQLName(){\n\t\tif(source==null){\n\t\t\t//no source predicate is associated with this pred\n\t\t\treturn name;\n\t\t}\n\t\treturn source.getSQLName();\n\t}", "public void setPost(WPPost post) {this.post = post;}", "public String getFieldName() {\n int index = getFieldIndex();\n if (index == 0)\n return null;\n\n ComplexEntry entry = (ComplexEntry) getPool().getEntry(index);\n String name = entry.getNameAndTypeEntry().getNameEntry().getValue();\n if (name.length() == 0)\n return null;\n return name;\n }", "public java.lang.String getRevisedRemark () {\n\t\treturn revisedRemark;\n\t}", "public String getPoster() {\n return getElement().getPoster();\n }", "public String toString() {\n return \"submission\";\n }", "protected String get_object_name() {\n\t\treturn null;\n\t}", "protected String get_object_name() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic String getInitialValue(IDirectEditingContext context) {\n\t\tPictogramElement pe = context.getPictogramElement();\r\n\t\tif( PropertyUtil.isResourceTypeNameShape(pe) ) {\r\n\t\t\tResourceType rt = (ResourceType) getBusinessObjectForPictogramElement(pe);\r\n \t\t\treturn rt.getName();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public String getFieldTypeName() {\n int index = getFieldIndex();\n if (index == 0)\n return null;\n\n ComplexEntry entry = (ComplexEntry) getPool().getEntry(index);\n String name = getProject().getNameCache().getExternalForm(entry.\n getNameAndTypeEntry().getDescriptorEntry().getValue(), false);\n if (name.length() == 0)\n return null;\n return name;\n }", "public java.lang.String getPost() {\n return instance.getPost();\n }", "public void bind(Post post) {\n // Profile Picture\n // Username\n tvUsername.setText(post.getUser().getUsername());\n // Post Image\n ParseFile postImage = post.getImage();\n if (postImage != null) {\n Glide.with(context).load(postImage.getUrl()).fitCenter().into(ivPostImage);\n }\n // Description\n tvDescription.setText(post.getDescription());\n // Profile Picture Comment\n // Time Ago\n Date createdAt = post.getCreatedAt();\n String timeAgo = Post.calculateTimeAgo(createdAt);\n tvTimeAgo.setText(timeAgo);\n }", "public StrColumn getPostRelStatus() {\n return delegate.getColumn(\"post_rel_status\", DelegatingStrColumn::new);\n }", "public void setReviewerName(java.lang.String reviewerName) {\n this.reviewerName = reviewerName;\n }", "void post(Post post) {\n if (post instanceof Video) {\n vd.compressVideo((Video) post);\n } else if (post instanceof Image) {\n id.decorateImage((Image) post);\n } else if (post instanceof Text) {\n tg.checkGrammar((Text) post);\n }\n }", "void editMyPost(Post post);", "public String getPostingText() {\n return postingText;\n }", "@Override\r\n\tpublic String setPosto(String posto) {\n\t\treturn null;\r\n\t}", "public void setRevisedRemark (java.lang.String revisedRemark) {\n\t\tthis.revisedRemark = revisedRemark;\n\t}", "protected abstract String getRefName();", "protected Uri getPostUri() {\n //@formatter:off\n return Uri.parse(getAdapter().getPost(mPager.getCurrentItem())\n .getFullPermalink(SharedPreferencesHelper.getUseMobileInterface(this)));\n //@formatter:on\n }", "public static void refreshPostDetails(Post post) {\n\t\tbp.setCenter(showPostDetails(post));\n\t}", "public String getSurRemark() {\n return surRemark;\n }", "public String getShipping(){\n return this.post.getType();\n }", "public String getPostUrl() {\r\n\t\treturn postUrl;\r\n\t}", "public String getSource() {\n\t\treturn (String) _object.get(\"source\");\n\t}", "public String getPostURI() {\n return host + postResource;\n }", "public java.lang.String getReviewerName() {\n return reviewerName;\n }", "public void setTitle(String postTitle) {\n\t\tthis.postTitle = postTitle;\n\t}", "public java.lang.String getDisplaysource()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DISPLAYSOURCE$10);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public Integer getPostType() {\n return postType;\n }", "public String getPostForm() {\r\n if (getVisible() && getEnabled())\r\n return \"<postfield name=\\\"\"+getName()+\"\\\" value=\\\"$(\"+getName()+\")\\\"/>\";\r\n return \"\";\r\n }", "public String getRemasterTitle() {\r\n\t\treturn this.remasterTitle;\r\n\t}", "public WPPost getPost() {return post;}", "@Override\n\tpublic String getRefTitle() {\n\t\treturn \"数据来源连接\";\n\t}", "public VBeatPostModel getPost(String postId){\n List<VBeatPostModel> postList = AppLocalDB.getInstance().db.postDao().getPost(postId);\n\n if(postList.size() == 0) {\n return null;\n } else {\n return postList.get(0);\n }\n\n }", "@Override\n\tpublic String getAdderName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"(relation \" +\n\t\t\t\t(this.source != null ? this.source.getId() : \"nil\") + \" \" +\n\t\t\t\tthis.name.toString() + \" \" +\n\t\t\t\t(this.dest != null ? this.dest.toString() : \"nil\") + \")\";\n\t}", "Optional<String> getSource();", "private String m6598O() {\n try {\n Field declaredField = Class.forName(\"android.app.Activity\").getDeclaredField(\"mReferrer\");\n declaredField.setAccessible(true);\n return (String) declaredField.get(this);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"<reflectGetReferrer>,Exception: \" + e.toString());\n return null;\n }\n }", "public void setSource(String value) {\n/* 304 */ setValue(\"source\", value);\n/* */ }", "protected String get_object_name() {\n\t\treturn this.fieldname;\n\t}", "@Override\n protected void validateEdit(Fornecedor post) {\n\n }", "Achievements getPostDetails();", "String getRemediationDetail();", "public String getSourceString() {\n return null;\n }", "public void setPostSubject(String postSubject) {\n this.postSubject = postSubject == null ? null : postSubject.trim();\n }", "public String getReviewer() {\n return reviewer;\n }", "public java.lang.String getPost() {\n java.lang.String ref = \"\";\n if (patternCase_ == 4) {\n ref = (java.lang.String) pattern_;\n }\n return ref;\n }", "public String get_source() {\n\t\treturn source;\n\t}", "public void bind(Post post) {\n tvDesc.setText(post.getDescription());\n tvUser.setText(post.getUser().getUsername());\n ParseFile image = post.getImage();\n if(image != null) {\n Glide.with(context).load(post.getImage().getUrl()).into(ivPost);\n }\n createdAt = post.getCreatedAt();\n timeAgo = post.calculateTimeAgo(createdAt);\n tvTime.setText(timeAgo);\n }", "public String getPostTableName() {\r\n\t\treturn postTableName;\r\n\t}", "@VTID(27)\n java.lang.String getSourceName();", "public String getRel() {\r\n return rel;\r\n }", "public void setTimePost(Date timePost) {\n this.timePost = timePost;\n }", "public String getOriginalReference() {\n return originalReference;\n }", "@Override\n\tpublic String associatedEntityName(String field) {\n\t\treturn null;\n\t}", "public String detailOriginOrReturn();", "public M csrtTypeNameNull(){if(this.get(\"csrtTypeNameNot\")==null)this.put(\"csrtTypeNameNot\", \"\");this.put(\"csrtTypeName\", null);return this;}", "@Override\r\n\tpublic String getRefBillType() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getRefBillType() {\n\t\treturn null;\r\n\t}", "public ResourceReferenceDt getReferrer() { \n\t\tif (myReferrer == null) {\n\t\t\tmyReferrer = new ResourceReferenceDt();\n\t\t}\n\t\treturn myReferrer;\n\t}", "String getDest_typ();", "@Override\n public String getName() {\n return null;\n }", "public String getPreview(String name) {\r\n\t\tif (storedPreviews.containsKey(name))\r\n\t\t\treturn storedPreviews.get(name);\r\n\t\treturn null;\r\n\t}", "public String getOriginalTitle() {\n return originalTitle;\n }", "public String getRemasterRecordLabel() {\r\n\t\treturn this.remasterRecordLabel;\r\n\t}", "public PostRecord() {\n super(PostTable.POST);\n }", "public void setReviewer(String reviewer) {\n this.reviewer = reviewer == null ? null : reviewer.trim();\n }" ]
[ "0.5484667", "0.5398647", "0.5398647", "0.53782326", "0.53782326", "0.5293879", "0.5264819", "0.5264819", "0.52594906", "0.52585196", "0.5204132", "0.51208055", "0.51114005", "0.5091545", "0.5083218", "0.5066336", "0.5055588", "0.5054206", "0.49994957", "0.49966052", "0.4994894", "0.4965926", "0.49474418", "0.49251196", "0.49209362", "0.49022815", "0.4899108", "0.48979652", "0.48910218", "0.48812747", "0.48739558", "0.48570758", "0.4856353", "0.4829537", "0.48292875", "0.48126137", "0.4802793", "0.48027667", "0.48027667", "0.47813308", "0.47798392", "0.4769169", "0.4763334", "0.47466093", "0.47433072", "0.47333118", "0.47318834", "0.47311437", "0.47204155", "0.4706057", "0.47054413", "0.47023085", "0.4702116", "0.46915814", "0.46885523", "0.46719912", "0.4671805", "0.46678162", "0.46623024", "0.46594957", "0.4659384", "0.46573028", "0.46471724", "0.4632722", "0.46301112", "0.46294087", "0.46277222", "0.46244964", "0.46161887", "0.46105495", "0.4609693", "0.45958135", "0.45942402", "0.45876622", "0.45848072", "0.45781136", "0.45744917", "0.4574089", "0.45737115", "0.4571929", "0.4569268", "0.45690152", "0.45513332", "0.4551232", "0.45495674", "0.4549137", "0.4543243", "0.4536159", "0.45349452", "0.4521207", "0.45210567", "0.45210567", "0.45150867", "0.4514502", "0.44799435", "0.44744158", "0.44734395", "0.4472538", "0.4465647", "0.44646809" ]
0.7412061
0
Get value of genres.
@NonNull public final List<Genres> getGenres() { return this.genres; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Set<String> getGenres() {\r\n return this.genres;\r\n }", "public String getGenre()\r\n {\r\n String answer=genre;\r\n return answer;\r\n }", "public String getGenus() {\n return genus;\n }", "public int getGenre() {\n return genre;\n }", "public String getGenre() {\n return genre;\n }", "public String getGenre() {\n return genre;\n }", "public Genre getGenre() {\n return genre;\n }", "public Genre getGenre() {\n return genre;\n }", "public Genre getGenre() {\n\n return genre;\n }", "@Nullable\n GenresPage getGenres();", "protected float[] getGenes() {\n\t\t\treturn genes;\n\t\t}", "public String getGenresString(){\n String genres =\"\";\n for (String str : allGenres){\n genres += str +\", \";\n }\n return genres;\n }", "public String getGenreString() {\r\n return genre.getTheBookType();\r\n }", "public Map<String, Gene> getGenes() {\n return genes;\n }", "public String getGenre()\n {\n return bookGenre;\n }", "public String genre14(){\n String genre14MovieTitle = \" \";\n for(int i = 0; i < results.length; i++){\n if(results[i].genre()) {\n genre14MovieTitle += results[i].getTitle() + \"\\n\";\n }\n }\n System.out.println(genre14MovieTitle);\n return genre14MovieTitle;\n }", "public TheatreGenre getGenre() {\n\t\treturn genre;\n\t}", "public static List<Genre> get() throws IOException {\n return get(null);\n }", "public String hGenre(int tunnusnro) {\r\n List<Genre> kaikki = new ArrayList<Genre>();\r\n for (Genre genre : this.alkiot) {\r\n \t kaikki.add(genre);\r\n }\r\n for (int i = 0; i < kaikki.size(); i++) {\r\n if (tunnusnro == kaikki.get(i).getTunnusNro()) {\r\n return kaikki.get(i).getGenre();\r\n }\r\n }\r\n return \"ei toimi\";\r\n }", "public BookType getGenre() {\r\n return genre;\r\n }", "public ArrayList<MovieGenreModel> getAllGenres() {\n\t\treturn null;\n\t}", "public ObservableList<String> getAllGenres(){\n return allGenres;\n }", "public lanyotech.cn.park.protoc.CommonProtoc.PARKINGPICTURE getPictureGenre() {\n return pictureGenre_;\n }", "public lanyotech.cn.park.protoc.CommonProtoc.PARKINGPICTURE getPictureGenre() {\n return pictureGenre_;\n }", "lanyotech.cn.park.protoc.CommonProtoc.PARKINGPICTURE getPictureGenre();", "public ArrayList<Integer> getGen() {\n\treturn _gen;\n }", "public String getGenreName(int g) {\n this.connect();\n String sqlGenre = \"SELECT genreType FROM genres WHERE genreID = ?\";\n String genreName = \"\";\n\n try (Connection conn = this.getConnection();\n PreparedStatement genre = conn.prepareStatement(sqlGenre)) {\n genre.setInt(1,g);\n ResultSet rsG = genre.executeQuery();\n //gets genreID\n if (rsG.next()) {\n genreName = rsG.getString(\"genreType\");\n } else {\n System.out.println(\"Genre not in database!\");\n }\n } catch(SQLException e) {\n System.out.println(e.getMessage());\n }\n return genreName;\n }", "public String getBasedOnGenre(String genre) {\n String cap = genre.substring(0, 1).toUpperCase() + genre.substring(1);\n StringBuilder json = new StringBuilder();\n for (Node node: books) {\n if (node.getItem().getGenre().equals(cap)) {\n json.append(((Book)node.getItem()).getJSON()).append(\"\\n\");\n }\n }\n for (Node node: music) {\n if (node.getItem().getGenre().equals(cap)) {\n json.append(((Music)node.getItem()).getJSON()).append(\"\\n\");\n }\n }\n for (Node node: movies) {\n if (node.getItem().getGenre().equals(cap)) {\n json.append(((Movie)node.getItem()).getJSON()).append(\"\\n\");\n }\n }\n return json.toString();\n }", "public Album setGenres(Set<String> genres) {\r\n this.genres = genres;\r\n return this;\r\n }", "ImmutableList<SchemaOrgType> getGenreList();", "private static HashMap<Integer, String> getMovieGenres() {\n String url = \"http://api.themoviedb.org/3/genre/movie/list?api_key=\" + BuildConfig.APPLICATION_ID;\r\n\r\n JSONArray genres = null;\r\n Integer id;\r\n String genre;\r\n\r\n HashMap<Integer, String> movieGenresMap = new HashMap<Integer, String>();\r\n\r\n try {\r\n genres = new JSONArray(\r\n \"[{\\\"id\\\":28,\\\"name\\\":\\\"Action\\\"},{\\\"id\\\":12,\\\"name\\\":\\\"Adventure\\\"},{\\\"id\\\":16,\\\"name\\\":\\\"Animation\\\"},{\\\"id\\\":35,\\\"name\\\":\\\"Comedy\\\"},{\\\"id\\\":80,\\\"name\\\":\\\"Crime\\\"},{\\\"id\\\":99,\\\"name\\\":\\\"Documentary\\\"},{\\\"id\\\":18,\\\"name\\\":\\\"Drama\\\"},{\\\"id\\\":10751,\\\"name\\\":\\\"Family\\\"},{\\\"id\\\":14,\\\"name\\\":\\\"Fantasy\\\"},{\\\"id\\\":10769,\\\"name\\\":\\\"Foreign\\\"},{\\\"id\\\":36,\\\"name\\\":\\\"History\\\"},{\\\"id\\\":27,\\\"name\\\":\\\"Horror\\\"},{\\\"id\\\":10402,\\\"name\\\":\\\"Music\\\"},{\\\"id\\\":9648,\\\"name\\\":\\\"Mystery\\\"},{\\\"id\\\":10749,\\\"name\\\":\\\"Romance\\\"},{\\\"id\\\":878,\\\"name\\\":\\\"Science Fiction\\\"},{\\\"id\\\":10770,\\\"name\\\":\\\"TV Movie\\\"},{\\\"id\\\":53,\\\"name\\\":\\\"Thriller\\\"},{\\\"id\\\":10752,\\\"name\\\":\\\"War\\\"},{\\\"id\\\":37,\\\"name\\\":\\\"Western\\\"}]\");\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (genres != null && genres.length() > 0) {\r\n try {\r\n for (int i = 0; i < genres.length(); i++) {\r\n JSONObject genrePair = genres.getJSONObject(i);\r\n id = genrePair.getInt(\"id\");\r\n genre = genrePair.getString(\"name\");\r\n movieGenresMap.put(id, genre);\r\n\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n return movieGenresMap;\r\n\r\n }", "public void setGenre(int genre) {\n this.genre = genre;\n }", "public boolean isSetGenres() {\n return this.genres != null;\n }", "public boolean isSetGenres() {\r\n return this.genres != null;\r\n }", "private double getGenreScore(Movie movie) {\n double genreScore = 0;\n\n for (String genre : this.generes) {\n if (movie.getGenre().contains(genre)) {\n genreScore = genreScore + 1;\n }\n }\n return genreScore;\n }", "public void setGenre() {\r\n this.genre = genre;\r\n }", "public void setGenre(String genre)\r\n {\r\n this.genre=genre;\r\n }", "public void showGenre(Genre genre) {\n for (Record r : cataloue) {\n if (r.getGenre() == genre) {\n System.out.println(r);\n }\n }\n\n }", "public void setGenre(String genre) {\n this.genre = genre;\n }", "public java.util.List<java.lang.String> getGeneIds() {\n return geneIds;\n }", "public int[] getGenes() {\r\n\t\tint[] genes = new int[9];\r\n\t\tgenes[0] = this.command.ordinal();\r\n\t\tif(this.senseDir == null){\r\n\t\t\tgenes[1] = -1;\r\n\t\t}else{\r\n\t\t\tgenes[1] = this.senseDir.ordinal();\r\n\t\t}\r\n\t\tif(this.turnDir == null){\r\n\t\t\tgenes[2] = -1;\r\n\t\t}else{\r\n\t\t\tgenes[2] = this.turnDir.ordinal();\r\n\t\t}\r\n\t\tgenes[3] = this.marker;\r\n\t\tgenes[4] = this.p;\r\n\t\tgenes[5] = this.st1;\r\n\t\tgenes[6] = this.st2;\r\n\t\tif(this.condition == null){\r\n\t\t\tgenes[7] = -1;\r\n\t\t}else{\r\n\t\t\tgenes[7] = this.condition.ordinal();\r\n\t\t}\r\n\t\tgenes[8] = this.senseMarker;\r\n\t\treturn genes;\r\n\t}", "public int getGenreID(String gen) {\n this.connect();\n String sqlGenre = \"SELECT genreID FROM genres WHERE genres.genreType = ?\";\n int genID = 0;\n\n try (Connection conn = this.getConnection();\n PreparedStatement genre = conn.prepareStatement(sqlGenre)) {\n genre.setString(1,gen);\n ResultSet rsG = genre.executeQuery();\n //gets genreID\n if (rsG.next()) {\n genID = rsG.getInt(\"genreID\");\n } else {\n System.out.println(\"Genre not in database!\");\n genID = addGenre(gen);\n }\n } catch(SQLException e) {\n System.out.println(e.getMessage());\n }\n return genID;\n }", "public void setGenre(Genre genre) {\n this.genre = genre;\n }", "public void setGenre(Genre genre) {\n this.genre = genre;\n }", "public abstract double getGen(int i);", "public java.util.List<java.lang.String> getGeneIds() {\n return geneIds;\n }", "@Override\n\tpublic List<Genre> displayAllGenres() throws MovieException {\n\t\treturn obj.displayAllGenres();\n\t}", "public String getGeneList() {\n return geneList;\n }", "public void setGenre(ArrayList<String> genre) {\n this.genre = genre;\n }", "public List<String> emitGenotype() {\n\t\tList<String> genotype = new ArrayList<String>();\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tdouble random = Math.random();\n\t\t\tif (random < 0.0005) {\n\t\t\t\tgenotype.add(\"1\");\n\t\t\t} else {\n\t\t\t\tgenotype.add(\"0\");\n\t\t\t}\n\t\t}\n\t\treturn(genotype);\n\t}", "public void setGenus(String genus) {\n this.genus = genus;\n }", "private static ArrayList<String> getGenre(String songID) throws SQLException {\n ArrayList<String> genres = new ArrayList<>();\n genreStatement = conn.createStatement();\n genreResultSet = genreStatement.executeQuery(\"SELECT * FROM genre, trackGenre WHERE trackGenre.track_id = '\" + songID + \"' AND trackGenre.genre = genre.name;\");\n while (genreResultSet.next()){\n genres.add(genreResultSet.getString(\"name\"));\n }\n return genres;\n }", "Builder addGenre(String value);", "public void addGenre() {\n ResultSet result = null;\n try {\n result = server.executeStatement(\"SELECT genreID FROM productiongenre WHERE prodID = \" + \"'\" + getId() + \"'\" + \";\");\n if(result.next())\n genre = result.getString(\"genreID\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public final void setGenres(@NonNull final List<Genres> genresParam) {\n this.genres = genresParam;\n }", "public void randomGenre(View view) {\r\n String[] randomGenre = {\"Rock\", \"Funk\", \"Hip hop\", \"Country\", \"Pop\", \"Blues\", \"K-pop\", \"Punk\", \"House\", \"Soul\"};\r\n int index = (int) (Math.random() * 10);\r\n displayMessage(\"Your random genre is: \" + randomGenre[index]);\r\n }", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getGeneName() {\n return geneName;\n }", "public GeneticCode getGeneticCode() {\n\t\treturn _geneticCode;\n\t}", "ore_values FindOreValue(String ore) {\n int i;\n for (i = 0; i < ov.size(); i++) {\n ore_values v = ov.get(i);\n if (v.ore_name.equals(ore)) {\n return v;\n }\n }\n return null;\n }", "public String getStringOfGene()\n {\n String print = \"\";\n for(int x = 0; x < numOfCoef; x++)\n {\n print = print +\"||\"+ vectOfCoef.get(x);\n }\n return print;\n }", "public void setGenre(String genre){\n\t\t//FIXME\n\t\tthis.genre = genre;\n\t}", "public String genresListText(Song [] songList){\n\t\t\n\t\tString text = \"\";\n\t\t\n\t\tfor(int i=0; i<songList.length; i++){\n\t\t\n\t\t\tif(songList[i]!=null){\n\t\t\t\tif( (i>0)&&(songList[i-1].getSongGenre().equals(songList[i].getSongGenre()))){ \n\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\ttext+= songList[i].getSongGenre() + \",\";\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn text;\n\t}", "protected Gene getGene(int innovation) {\n\t\treturn genes.get(innovation);\n\t}", "public String getRg() {\n return rg;\n }", "public RefSeq getGeneAnn() {\n\t\treturn geneAnn;\n\t}", "private static int getGenreIndex(String genre){\n\t\tint index = -1;\n\t\tif(genre.equalsIgnoreCase(\"biology\"))\n\t\t\tindex = 0;\n\t\telse if(genre.equalsIgnoreCase(\"mathematics\"))\n\t\t\tindex = 1;\n\t\telse if(genre.equalsIgnoreCase(\"chemistry\"))\n\t\t\tindex = 2;\n\t\telse if(genre.equalsIgnoreCase(\"physics\"))\n\t\t\tindex = 3;\n\t\telse if(genre.equalsIgnoreCase(\"science_fiction\"))\n\t\t\tindex = 4;\n\t\telse if(genre.equalsIgnoreCase(\"fantasy\"))\n\t\t\tindex = 5;\n\t\telse if(genre.equalsIgnoreCase(\"action\"))\n\t\t\tindex = 6;\n\t\telse if(genre.equalsIgnoreCase(\"drama\"))\n\t\t\tindex = 7;\n\t\telse if(genre.equalsIgnoreCase(\"romance\"))\n\t\t\tindex = 8;\n\t\telse if(genre.equalsIgnoreCase(\"horror\"))\n\t\t\tindex = 9;\n\t\telse if(genre.equalsIgnoreCase(\"history\"))\n\t\t\tindex = 10;\n\t\telse if(genre.equalsIgnoreCase(\"autobiography\"))\n\t\t\tindex = 11;\n\t\telse if(genre.equalsIgnoreCase(\"biography\"))\n\t\t\tindex = 12;\n\t\telse{\n\t\t\tSystem.out.println(\"Invalid Genre Input: Genre entered was invalid\");\n\t\t}\n\t\treturn index;\n\t}", "@GET(\"/v1/genres\")\r\n void getGenres( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n Callback<Collection<GenreData>> callBack);", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "public String get_gene_id() {\n return m_gene_id;\n }", "public String getRegulations() {\n return regulations;\n }", "boolean hasPictureGenre();", "public UGen[] getuGenArray() {\n\t\treturn uGenArray;\n\t}", "public ECP getGen(){return gen;}", "public String value() {\n // actual gear shift\n return gear;\n }", "Builder addGenre(Text value);", "protected Gene getRandomGene() {\n\t\tArrayList<Gene> genearr = new ArrayList<Gene>();\n\t\tgenearr.addAll(genes.values());\n\t\treturn genearr.get(Braincraft.randomInteger(genearr.size()));\n\t}", "@GET\n public List<JsonGenre> getAll() {\n \tList<Genre> genres = genreDao.getGenres();\n \tLOGGER.info(\"find \"+genres.size()+\" genres in the database\");\n \tArrayList<JsonGenre> ls = new ArrayList<JsonGenre>();\n \tfor (Genre s:genres) {\n \t\tls.add(new JsonGenre(s.getId(), s.getName()));\n \t}\n \treturn ls;\n }", "public String getValue() throws IOException\r\n {\r\n return getDictionary().getNameAsString( \"V\" );\r\n }", "public String getGenero() {\n return genero;\n }", "int getGenderValue();", "public void testGetGenre()\r\n {\r\n assertTrue(genre.equals(song.getGenre()));\r\n }", "org.hl7.fhir.String getValueString();" ]
[ "0.7314812", "0.71404386", "0.6872192", "0.6759065", "0.6695309", "0.6695309", "0.666906", "0.666906", "0.66670334", "0.6480045", "0.64668125", "0.6391309", "0.63498026", "0.6239639", "0.61940795", "0.617089", "0.6146264", "0.6142114", "0.60263443", "0.5986027", "0.5983872", "0.5971784", "0.5932504", "0.59274393", "0.5890565", "0.58347476", "0.57750744", "0.57608265", "0.5718009", "0.5659707", "0.56099975", "0.5585821", "0.55814534", "0.5558204", "0.5550173", "0.55475265", "0.55281717", "0.55030936", "0.549379", "0.54754454", "0.5450518", "0.5442487", "0.5430577", "0.5430577", "0.54235005", "0.54111993", "0.5400225", "0.5396377", "0.5383351", "0.53101504", "0.5297422", "0.5270976", "0.5269598", "0.52640885", "0.5262132", "0.5253945", "0.5251423", "0.5251423", "0.5251423", "0.5251423", "0.5251423", "0.5251423", "0.5251423", "0.5251423", "0.5251423", "0.5250294", "0.5235139", "0.5212138", "0.5204841", "0.5202668", "0.51971555", "0.5186814", "0.5170792", "0.5158725", "0.51560485", "0.51454854", "0.5142788", "0.5142788", "0.5142788", "0.5142788", "0.5142788", "0.5142788", "0.5142788", "0.5142788", "0.5142788", "0.5142788", "0.51401395", "0.51380175", "0.51374584", "0.5132263", "0.5130379", "0.5112107", "0.510597", "0.51021403", "0.5099411", "0.50924855", "0.50866705", "0.50782436", "0.50681394", "0.5064682" ]
0.718113
1
Set value of genres.
public final void setGenres(@NonNull final List<Genres> genresParam) { this.genres = genresParam; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Album setGenres(Set<String> genres) {\r\n this.genres = genres;\r\n return this;\r\n }", "public void setGenre(int genre) {\n this.genre = genre;\n }", "public void setGenre() {\r\n this.genre = genre;\r\n }", "public void setGenre(Genre genre) {\n this.genre = genre;\n }", "public void setGenre(Genre genre) {\n this.genre = genre;\n }", "public void setGenre(String genre)\r\n {\r\n this.genre=genre;\r\n }", "public void setGenre(String genre){\n\t\t//FIXME\n\t\tthis.genre = genre;\n\t}", "public void setGenre(ArrayList<String> genre) {\n this.genre = genre;\n }", "public void setGenre(String genre) {\n this.genre = genre;\n }", "public void modifyGenres(ArrayList<String> genreList)// --> Bytter ut Genre-arrayen med en ny array over de nye sjangerene for lokalet.\n\t{\n\t\tgenres = genreList;\n\t}", "public Set<String> getGenres() {\r\n return this.genres;\r\n }", "public void setGenus(String genus) {\n this.genus = genus;\n }", "public void setGenre(String genreStr) {\n String genresRemovedCommas = genreStr.replaceAll(COMMA, EMPTY);\r\n String[] genresArray = genresRemovedCommas.split(SPACE);\r\n Collections.addAll(genres, genresArray);\r\n }", "Builder addGenre(String value);", "public void setGenre(TheatreGenre genre) {\n\t\tthis.genre = genre;\n\t}", "public abstract void setGen(int i, double value);", "public void setRandomGenes(int i){\n if (i > populationSize){\n throw new IllegalArgumentException(\"The number of random genes per generation must not be greater than the population size\");\n }\n randGenes = i;\n }", "public Gel_BioInf_Models.VirtualPanel.Builder setGeneIds(java.util.List<java.lang.String> value) {\n validate(fields()[4], value);\n this.geneIds = value;\n fieldSetFlags()[4] = true;\n return this; \n }", "Builder addGenre(Text value);", "public boolean isSetGenres() {\n return this.genres != null;\n }", "public boolean isSetGenres() {\r\n return this.genres != null;\r\n }", "public void setGenero(Genero genero)\r\n/* 148: */ {\r\n/* 149:271 */ this.genero = genero;\r\n/* 150: */ }", "@NonNull\n public final List<Genres> getGenres() {\n return this.genres;\n }", "Builder addGenre(URL value);", "private void saveGenres(){\n\t\tFile genreList = new File(Paths.get(\"genres.txt\").toString());\n\t\ttry{\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(genreList));\n\t\t\tfor (String s : genres){\n\t\t\t\twriter.write(s);\n\t\t\t\twriter.newLine();\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch(IOException ex){\n\t\t\t\n\t\t}\n\t}", "public void setGov(int value);", "public void addGenre(String newGenre) {\n this.genre.add(newGenre);\n }", "public static void setUpGenres(Context context){\n SharedPreferences mSetting = context.getSharedPreferences(StaticVars.GENRE_SHARED_PREFERENCES,Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = mSetting.edit();\n //putting genre name and its id on shikimori\n\n\n editor.putInt(\"Drama\",8);\n editor.putInt(\"Драма\",8);\n editor.putInt(\"Game\",11);\n editor.putInt(\"Игры\",11);\n editor.putInt(\"Psychological\",40);\n editor.putInt(\"Психологическое\",40);\n editor.putInt(\"Adventure\",2);\n editor.putInt(\"Приключения\",2);\n editor.putInt(\"Music\",19);\n editor.putInt(\"Музыка\",19);\n editor.putInt(\"Action\",1);\n editor.putInt(\"Экшен\",1);\n editor.putInt(\"Comedy\",4);\n editor.putInt(\"Комедия\",4);\n editor.putInt(\"Demons\",6);\n editor.putInt(\"Демоны\",6);\n editor.putInt(\"Police\",39);\n editor.putInt(\"Полиция\",39);\n editor.putInt(\"Space\",29);\n editor.putInt(\"Космос\",29);\n editor.putInt(\"Ecchi\",9);\n editor.putInt(\"Этти\",9);\n editor.putInt(\"Fantasy\",10);\n editor.putInt(\"Фэнтези\",10);\n editor.putInt(\"Historical\",13);\n editor.putInt(\"Исторический\",13);\n editor.putInt(\"Horror\",14);\n editor.putInt(\"Ужасы\",14);\n editor.putInt(\"Magic\",16);\n editor.putInt(\"Магия\",16);\n editor.putInt(\"Mecha\",18);\n editor.putInt(\"Меха\",18);\n editor.putInt(\"Parody\",20);\n editor.putInt(\"Пародия\",20);\n editor.putInt(\"Samurai\",21);\n editor.putInt(\"Самураи\",21);\n editor.putInt(\"Romance\",22);\n editor.putInt(\"Романтика\",22);\n editor.putInt(\"School\",23);\n editor.putInt(\"Школа\",23);\n editor.putInt(\"Shoujo\",25);\n editor.putInt(\"Сёдзе\",25);\n editor.putInt(\"Shounen\",27);\n editor.putInt(\"Сёнен\",27);\n editor.putInt(\"Shounen Ai\",28);\n editor.putInt(\"Сёнен Ай\",28);\n editor.putInt(\"Sports\",30);\n editor.putInt(\"Спорт\",30);\n editor.putInt(\"Vampire\",32);\n editor.putInt(\"Вампиры\",32);\n editor.putInt(\"Harem\",35);\n editor.putInt(\"Гарем\",35);\n editor.putInt(\"Slice of Life\",36);\n editor.putInt(\"Повседневность\",36);\n editor.putInt(\"Seinen\",42);\n editor.putInt(\"Сейнен\",42);\n editor.putInt(\"Josei\",43);\n editor.putInt(\"Дзёсей\",43);\n editor.putInt(\"Supernatural\",37);\n editor.putInt(\"Сверхъестественное\",37);\n editor.putInt(\"Thriller\",41);\n editor.putInt(\"Триллер\",41);\n editor.putInt(\"Shoujo Ai\",26);\n editor.putInt(\"Сёдзе Ай\",26);\n editor.putInt(\"Sci-Fi\",24);\n editor.putInt(\"Фантастика\",24);\n editor.putInt(\"Super Power\",31);\n editor.putInt(\"Супер сила\",31);\n editor.putInt(\"Military\",38);\n editor.putInt(\"Военное\",38);\n editor.putInt(\"Mystery\",7);\n editor.putInt(\"Детектив\",7);\n editor.putInt(\"Kids\",15);\n editor.putInt(\"Детское\",15);\n editor.putInt(\"Cars\",3);\n editor.putInt(\"Машины\",3);\n editor.putInt(\"Martial Arts\",17);\n editor.putInt(\"Боевые искусства\",17);\n editor.putInt(\"Dementia\",5);\n editor.putInt(\"Безумие\",5);\n\n editor.apply();\n\n\n\n }", "public void setGeneIds(java.util.List<java.lang.String> value) {\n this.geneIds = value;\n }", "public void setGears(int gears);", "public void setFiction() {\n if (super.getGenre() == null || super.getGenre().length() == 0) {\n super.setGenre(\"Fiction\");\n } else if (!super.getGenre().contains(\"FICTION\")) {\n super.setGenre(super.getGenre() + \", Fiction\");\n }\n super.setGenre(super.getGenre().toUpperCase());\n }", "public void setGi( int value) {\n\n\t\tthis.gi = value;\n\t}", "public void setGi(java.math.BigInteger gi)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(GI$22, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(GI$22);\r\n }\r\n target.setBigIntegerValue(gi);\r\n }\r\n }", "public void setClinicalRelevantVariants(Gel_BioInf_Models.File value) {\n this.clinicalRelevantVariants = value;\n }", "private static void initializeAllGenresList(){\n\t\tfor(int i = 0; i < 13; i ++){\n\t\t\tALL_GENRES.add(new HashSet<String>());\n\t\t}\n\t}", "public String getGenus() {\n return genus;\n }", "public String getGenre() {\n return genre;\n }", "public String getGenre() {\n return genre;\n }", "private void createGenres() {\n ArrayList<String> gen = new ArrayList<>();\n //\n for (Movie mov : moviedb.getAllMovies()) {\n for (String genre : mov.getGenre()) {\n if (!gen.contains(genre.toLowerCase()))\n gen.add(genre.toLowerCase());\n }\n }\n\n Collections.sort(gen);\n\n genres = gen;\n }", "public Builder setPictureGenre(lanyotech.cn.park.protoc.CommonProtoc.PARKINGPICTURE value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n pictureGenre_ = value;\n onChanged();\n return this;\n }", "private void loadToChoice() {\n\t\tfor(Genre genre : genreList) {\n\t\t\tuploadPanel.getGenreChoice().add(genre.getName());\n\t\t}\n\t}", "public Genre getGenre() {\n\n return genre;\n }", "public Genre getGenre() {\n return genre;\n }", "public Genre getGenre() {\n return genre;\n }", "public int getGenre() {\n return genre;\n }", "public void setMaxGenerations(int value) { maxGenerations = value; }", "public void setMethodGen(MethodGen mg){\n\t\tthis.mg = mg;\n\t}", "@Override\n\tpublic void set(int id, Generator generator) {\n\t}", "public void setG(byte[] value) {\n this.g = ((byte[]) value);\n }", "public void setRelevantRegions(Gel_BioInf_Models.File value) {\n this.relevantRegions = value;\n }", "public void randomGenre(View view) {\r\n String[] randomGenre = {\"Rock\", \"Funk\", \"Hip hop\", \"Country\", \"Pop\", \"Blues\", \"K-pop\", \"Punk\", \"House\", \"Soul\"};\r\n int index = (int) (Math.random() * 10);\r\n displayMessage(\"Your random genre is: \" + randomGenre[index]);\r\n }", "public void set(int symbol, int freq);", "public void rumoreAltroSettore(int idGioc, String value){\n\t\t partita.rumore(idGioc, value);\n\t}", "public void setGene(int x, double value)\n {\n this.vectOfCoef.set(x, value);\n }", "protected float[] getGenes() {\n\t\t\treturn genes;\n\t\t}", "public void setSimilarGenes(String name, String[] groups) {\r\n\t\tif(!similarGeneGroups.containsKey(name)) {\r\n\t\tsimilarGeneGroups.put(name, groups);\r\n\t\t}\r\n\t\t\r\n\t}", "public void setGenerations(int generations) {\n this.generations = generations;\n }", "public void setGeneSetName(String name) {\r\n\t\tgeneSetName=name;\r\n\r\n\t}", "public void setPgenCounter(byte[] value) {\n this.pgenCounter = ((byte[]) value);\n }", "void setGensNoImprovement(int gensNoImprovement);", "public void setNextGeneration() {\n // create a temporary population\n ArrayList<Genotype> tempPopulation = new ArrayList<Genotype>();\n\n // select mates\n while (tempPopulation.size() < populationSize) {\n tempPopulation.add(Genotype.Mate(rouletteSelection(),\n rouletteSelection(), crossoverProbability));\n }\n }", "@Override\n public void changeGenusTo(String genusName, boolean preserveLabel) {\n //return null;\n }", "public Gel_BioInf_Models.VirtualPanel.Builder setClinicalRelevantVariants(Gel_BioInf_Models.File value) {\n validate(fields()[7], value);\n this.clinicalRelevantVariants = value;\n fieldSetFlags()[7] = true;\n return this; \n }", "public void setResolution(int value) {\n this.resolution = value;\n }", "private void updateTaxonWithGenesLoaded( Taxon taxon ) {\n if ( !taxon.getIsGenesUsable() ) {\n taxon.setIsGenesUsable( true );\n taxonService.update( taxon );\n log.info( \"Updating taxon genes loaded to true for taxon \" + taxon );\n }\n\n }", "public void setVariantSetIds(java.util.List<java.lang.String> value) {\n this.variantSetIds = value;\n }", "public void setGigi(int newValue){\r\n gigi = newValue;\r\n }", "public ArrayList<MovieGenreModel> getAllGenres() {\n\t\treturn null;\n\t}", "public void setSetSpec(String val) {\n\n\t\tsetSpec = val;\n\n\t}", "public void addGenreAction()\n\t{\n\t\tViewNavigator.loadScene(\"Add Genre\", ViewNavigator.ADD_GENRE_SCENE);\n\t}", "public Builder setShirt(int value) {\n bitField0_ |= 0x00000008;\n shirt_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic void setToRandomValue(RandomGenerator a_numberGenerator) {\n\n\t}", "public TheatreGenre getGenre() {\n\t\treturn genre;\n\t}", "public void testGetGenre()\r\n {\r\n assertTrue(genre.equals(song.getGenre()));\r\n }", "public void set_quality(int value) {\n setUIntBEElement(offsetBits_quality(), 16, value);\n }", "public com.dj.model.avro.LargeObjectAvro.Builder setVar14(java.lang.Float value) {\n validate(fields()[15], value);\n this.var14 = value;\n fieldSetFlags()[15] = true;\n return this;\n }", "public void addGenre(String genre) throws SQLException {\n myGenreManager.addGenre(genre);\n allGenres.add(genre);\n }", "void update(String selectedGene);", "public final void setHavaitutFrekvenssit(final int[] frekvenssit) {\r\n this.havaitutFrekvenssit = frekvenssit;\r\n }", "@Nullable\n GenresPage getGenres();", "public String getGenre()\r\n {\r\n String answer=genre;\r\n return answer;\r\n }", "public void setRegisNo(String regisNo)\n {\n // put your code here\n this.regisNo = regisNo;\n }", "private void setRegVal(SwapMote mote, int regId, String value)\n {\n SwapValue swapVal;\n // Does \"value\" represent a numeric value?\n try\n {\n long lVal;\n // Try with decimal format first\n lVal = Long.parseLong(value);\n // Calculate length\n int i;\n long a = lVal;\n for(i=0 ; i<Long.SIZE ; i++)\n {\n if ((a = a/0xFF) < 1)\n break;\n }\n // Create SWAP value\n swapVal = new SwapValue(lVal, i);\n }\n catch (Exception ex)\n {\n // Finaly, try with ASCII format\n swapVal = new SwapValue(value);\n }\n\n try\n {\n mote.cmdRegister(regId, swapVal);\n }\n catch (CcException ex)\n {\n ex.print();\n }\n }", "@Override\n\tpublic void addGenre(Genre genre) throws MovieException {\n obj.addGenre(genre);\n\t}", "public void setRegister(int index, long val){\n \t\tif(index >=1 && index < 32){\n \t\t\tregFile[index].setValue(val);\n \t\t}\n \t\telse throw new Error(\"Cannot access $r\" + index);\n \t}", "public Gel_BioInf_Models.VirtualPanel.Builder setRelevantRegions(Gel_BioInf_Models.File value) {\n validate(fields()[6], value);\n this.relevantRegions = value;\n fieldSetFlags()[6] = true;\n return this; \n }", "public void xsetGi(org.apache.xmlbeans.XmlInteger gi)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlInteger target = null;\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().find_element_user(GI$22, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().add_element_user(GI$22);\r\n }\r\n target.set(gi);\r\n }\r\n }", "public void setParameterValue(String name, String value) {\n\tgetLogger().finest(\"Setting: \"+name+\" = \"+value);\n\tif (name.equals(\"genie.restart\")) {\n\t _parameters.put(name,value.substring(0,CHARS_RESTART));\n\t} else if (name.equals(\"genie.lout\")) {\n\t _parameters.put(name,value.substring(0,CHARS_LOUT));\n\t} else if (name.equals(\"genie.lin\")) {\n\t _parameters.put(name,value.substring(0,CHARS_LIN));\n\t} else {\n\t _parameters.put(name,value);\n\t}\n }", "public void setRarity(Rarity rare)\r\n {\r\n\tthis.rare = rare;\r\n }", "@Override\n\tpublic String addGenre(Genre songName, Genre songArtist, Genre songBpm, Genre songGenre) {\n\t\treturn null;\n\t}", "public void setGiro(int giro2){\n\t\t//hacer lo esto con giro set y get\n\t\tthis.giro=giro2;\n\t}", "public org.ga4gh.models.CallSet.Builder setVariantSetIds(java.util.List<java.lang.String> value) {\n validate(fields()[3], value);\n this.variantSetIds = value;\n fieldSetFlags()[3] = true;\n return this; \n }", "public Builder setFreq(int value) {\n bitField0_ |= 0x00000008;\n freq_ = value;\n onChanged();\n return this;\n }", "public void setSiegeWeaponDamage(short siegeWeaponDamage);", "private void setRegNum(int regNum) {\n this.regNum = regNum;\n }", "void setGenreDao(final GenreDao genreDao);", "public void setPanelGen(int panelGen){\n this.mFarm.setPanelGen(panelGen);\n }", "public void setGENGRP(java.lang.String GENGRP) {\n this.GENGRP = GENGRP;\n }", "public ChangeGenreDialog(java.awt.Frame parent, boolean modal) throws MovieException {\n super(parent, modal);\n initComponents();\n readGenres();\n \n }", "public void setBigram(NGram v) {\n if (QuestionNGram_Type.featOkTst && ((QuestionNGram_Type)jcasType).casFeat_bigram == null)\n jcasType.jcas.throwFeatMissing(\"bigram\", \"edu.cmu.deiis.types.QuestionNGram\");\n jcasType.ll_cas.ll_setRefValue(addr, ((QuestionNGram_Type)jcasType).casFeatCode_bigram, jcasType.ll_cas.ll_getFSRef(v));}" ]
[ "0.7171276", "0.6911898", "0.6832238", "0.6805773", "0.6805773", "0.680106", "0.66749614", "0.6652907", "0.6525283", "0.64809847", "0.6439726", "0.6348256", "0.63074744", "0.6177354", "0.616128", "0.61476666", "0.60114205", "0.58765167", "0.5820067", "0.5793832", "0.57569486", "0.5750031", "0.57461905", "0.57106996", "0.5705728", "0.5674988", "0.5656516", "0.562999", "0.56146556", "0.5554095", "0.5532182", "0.5513343", "0.5434453", "0.54200625", "0.5419871", "0.54159826", "0.5401494", "0.5401494", "0.53975004", "0.53853697", "0.5365596", "0.5356891", "0.53563076", "0.53563076", "0.53559923", "0.5349497", "0.53359646", "0.53196424", "0.5317785", "0.52975875", "0.52918506", "0.52668536", "0.52650356", "0.5241281", "0.5240499", "0.52392304", "0.5228443", "0.51850235", "0.51775247", "0.51771384", "0.5174284", "0.5163884", "0.512495", "0.5050961", "0.50322", "0.503021", "0.5029415", "0.50241244", "0.5020289", "0.50066024", "0.50038946", "0.5003245", "0.49972212", "0.49813655", "0.49774483", "0.49717492", "0.49642676", "0.4962708", "0.49566132", "0.49565133", "0.49504682", "0.4943596", "0.49402896", "0.49397534", "0.49355316", "0.49297616", "0.49257624", "0.49232307", "0.49228576", "0.49129355", "0.4911555", "0.49081346", "0.49031702", "0.49000767", "0.48968348", "0.48902574", "0.48795298", "0.4878045", "0.4871269", "0.48630008" ]
0.7185563
0
Constructor for a den, calls its parent class obstacle, sets the image and fills a circle with said image
Den(SimWorld aWorld) { super(aWorld); Image den = new Image(denURL); this.getCollisionArea().setFill(Color.TRANSPARENT); this.getCollisionBody().setFill(new ImagePattern(den, this.getxPos(), this.getyPos(), 1, 1, true)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Obstacle(int x, int y, int length, String direction)\n {\n super(x, y, length, direction);\n updateImages();\n }", "public Obstacle(int xPos,BufferedImage bi)\r\n {\r\n super(xPos,(int)(bi.getHeight()*2/3*(Math.random()*0.5+0.25)),bi);\r\n //super(x,y,width,height);\r\n }", "public Obstacle(int x, int y) {\n super(x, y);\n }", "public ObstacleSprite(int left, int top, int right, int bottom, OBSTACLE_SPEED obstacleSpeed, Game game)\n {\n super(left, top, right, bottom, game);\n speed = (int) Math.round(DEFAULT_OBSTACLE_SPEED * (obstacleSpeed.value / 2.0));\n wasTouched = false;\n\n if(obstacleSpriteImage == null)\n {\n Bitmap settingsBitmap = BitmapFactory.decodeResource(resources, R.drawable.missile);\n obstacleSpriteImage = new AndroidImage(settingsBitmap, AndroidGraphics.ImageFormat.ARGB4444);\n }\n\n if(obstacleExplosionImage == null)\n {\n Bitmap settingsBitmap = BitmapFactory.decodeResource(resources, R.drawable.explosion);\n obstacleExplosionImage = new AndroidImage(settingsBitmap, AndroidGraphics.ImageFormat.ARGB4444);\n }\n }", "public void setConstructingObstacle(Obstacle obstacle);", "public Obstacle(Location location) {\n super(location);\n }", "public Ball(AbstractGame world) {\n super(world);\n innerColor = Color.WHITE;\n myCircle = new Circle(15);\n myCircle.setFill(innerColor);\n myCircle.setCenterX(x);\n myCircle.setCenterY(y);\n myShape = myCircle;\n }", "public Zombie(int x, int y, Map map) {\r\n\t\tsuper(x, y, imagePath, map);\r\n\t\t\r\n\t}", "public Porteur_img_eau(int x, int y, int rayon){\n Circle fond_eau = new Circle(x,y, rayon);\n fond_eau.setFill(Color.BLUE);\n this.getChildren().add(fond_eau);\n this.setLayoutX(x);\n this.setLayoutY(y);\n\n }", "public Ball(Binge game, int x, int y, int diameter){\n\t\tsuper(game,x,y);\n\t\tthis.xcenter = x + diameter/2;\n\t\tthis.ycenter = y + diameter/2;\n\t\tthis.diameter = diameter;\n\t\tthis.theball = new Ellipse2D.Double(x,y,diameter,diameter);\n\t}", "public CarrierShape(int x,int y)\n {\n super(x,y);\n }", "Turtle(int x, int y, String image){super(x, y, \"turtle.png\");}", "public RoadSign() {\n super(0, 0, \"roadsign_speed_50.png\");\n }", "public DoorTile(int x, int y) {\r\n\t\tsuper(\"resources/door.gif\", x, y);\r\n\t}", "public Circle(){}", "public Circle(int x, int y) {\n\t \n\tSystem.out.println(\"Circel constructor called.\"); \n \n\tthis.X=x;\n\tthis.Y=y;\n}", "public CarrierShape()\n {\n super();\n }", "public Turtle(String name, int x, int y) {\n\tthis.name= name;\n\tLocX1 = 0;\n\tLocY1 = 0;\n\tLocX2 = 0;\n\tLocY2 = 0;\n\tangle = 0; // rotation angle \n\twriting = true; // default pen down\n\tcolor = Color.BLACK; // default color\n\theading = 90; // default facing north, 90 degrees\n\tdelta = 0;\n\tdraw = true;\n\ttry {\n bimg = ImageIO.read(new File(\"./Images/TurtleBlue.png\"));\n } catch (Exception e) {\n e.printStackTrace();\n }\n}", "Oval(int width, int height, int x, int y){\n setWidth(width);\n setHeight(height);\n setX(x);\n setY(y);\n }", "public Shape(double x, double y) { \n\t\t\tthis(x, y, RADIUS_DEFAULT, Color.BLACK, 50, 50, 15, 15, \"\", ShapeType.CIRCLE); \n\t\t}", "public Goal(int x, int y) {\n // catch the i and j here and store them in variables\n this.x = x;\n this.y = y;\n\n try {\n String projectRootDirectory = \"/Users/olivierkendra/Documents/itp_workspace/ProgAssignment2\"; // TODO: Don't make this hardcoded\n this.imageAlive = ImageIO.read(new File(projectRootDirectory + \"/goal-alive.png\"));\n this.imageDead = ImageIO.read(new File(projectRootDirectory + \"/goal-dead.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n this.imageCurrent = this.imageAlive;\n }", "public Celda(int x, int y) {\n this.x=x;\n this.y=y;\n this.tipo=CAMINO;\n this.celdaSelec =false;\n\n indexSprite = 0; //indice que corresponde a una subimagen de frente\n\n try {\n jugador = ImageIO.read(new File(\"images/jugador.png\"));\n obstaculo = ImageIO.read(new File(\"images/obstaculo.png\"));\n obstaculo20 = ImageIO.read(new File(\"images/obstaculo-2.png\"));\n obstaculo21 = ImageIO.read(new File(\"images/obstaculo-3.png\"));\n obstaculo22 = ImageIO.read(new File(\"images/obstaculo-4.png\"));\n obstaculo23 = ImageIO.read(new File(\"images/obstaculo-5.png\"));\n obstaculo24 = ImageIO.read(new File(\"images/obstaculo-6.png\"));\n obstaculo25 = ImageIO.read(new File(\"images/obstaculo-7.png\"));\n adversario = ImageIO.read(new File(\"images/adversario.png\"));\n recompensa = ImageIO.read(new File(\"images/recompensa.png\"));\n casa = ImageIO.read(new File(\"images/casa.png\"));\n\n imagenSprites = ImageIO.read(new File(\"images/sprite_jugador.png\"));\n imagenSpritesAdversario = ImageIO.read(new File(\"images/sprite_adversario.png\"));\n //creo una array de 4 x 1\n sprites = new BufferedImage[4 * 1];\n spritesAdversario = new BufferedImage[4 * 1];\n //lo recorro separando las imagenes\n for (int i = 0; i < 1; i++) {\n for (int j = 0; j < 4; j++) {\n sprites[(i * 4) + j] = imagenSprites.getSubimage(i * PIXEL_CELDA, j * PIXEL_CELDA,PIXEL_CELDA, PIXEL_CELDA);\n spritesAdversario[(i * 4) + j] = imagenSpritesAdversario.getSubimage(i * PIXEL_CELDA, j * PIXEL_CELDA, PIXEL_CELDA, PIXEL_CELDA);\n }\n }\n //adversario = spritesAdversario[indexSprite];\n } catch (IOException error) {\n System.out.println(\"Error: \" + error.toString());\n }\n }", "public DumbEnemy(){\n setImage(new GreenfootImage(SPRITE_W,SPRITE_H));\n }", "public Gatete() {\r\n\t\tsuper();\r\n\t\timg = new JLabelGatete();\r\n\t}", "public ObstacleSprite(int topPixelStart, OBSTACLE_SPEED obstacleSpeed, Game game)\n {\n this(((topPixelStart + (Configuration.GAME_WIDTH - Configuration.FIELD_WIDTH) / 2) - DEFAULT_OBSTACLE_WIDTH / 2),\n -DEFAULT_OBSTACLE_HEIGHT + 1, ((topPixelStart + (Configuration.GAME_WIDTH - Configuration.FIELD_WIDTH) / 2) + DEFAULT_OBSTACLE_WIDTH),\n 1, obstacleSpeed, game);\n }", "public Circle(){\r\n\t \t// System.out.println(\"Default constructor dipanggil.\");\r\n\t \tjejari = 1;\r\n\t \tx = 5;\r\n\t \tbilObjekWujud++;\r\n\t }", "public Circle(){\n }", "public Ocean()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n BF bf = new BF();\n addObject(bf,500,300);\n SF sf = new SF();\n addObject(sf,100,300);\n }", "public Generator(int x, int y, int length){\r\n super(x, y, length, 30);\r\n setOn(true);\r\n try{setImage(ImageIO.read(new File(\"Resources/Blocks/grey.png\")));}catch(IOException e){e.printStackTrace();}\r\n }", "SimpleCircle() {\n\t\tradius=1;\n\t}", "public VisibleThing(String name, int x, int y) {\n // super call to set the name\n super(name);\n\n // set the x and y position of the object\n this.x = x;\n this.y = y;\n\n // load the image to the image field\n this.image = super.getProcessing().loadImage(\"images\" + File.separator + name + \".png\");\n }", "public Circle() {\n this(0, 0, 1);\n }", "public void addObstacle(Coord obstacleCoord);", "public Cow(int x, int y) {\n\t\tsuper(x, y);\n\t\tloadImages();\n\t}", "public Circle(double jejari){\r\n\t\t// this();//panggil default constructor\r\n\t\t this.jejari = jejari;\r\n\t\t x = 5;\r\n\t\t// this(jejari, 59); //panggil constructor 2 parameter\r\n\t\tbilObjekWujud++;\r\n\t}", "public Hero(int x, int y) {\r\n this.centerX = x;\r\n this.centerY = y;\r\n this.currentHealth = 100;\r\n rect1 = new FloatRect (100,630,80,110);\r\n imgTexture = new Texture ();\r\n try {\r\n imgTexture.loadFromFile (Paths.get (ImageFile));\r\n } catch (IOException ex) {\r\n ex.printStackTrace ();\r\n }\r\n imgTexture.setSmooth (true);\r\n\r\n img = new Sprite (imgTexture);\r\n img.setOrigin (Vector2f.div (new Vector2f (imgTexture.getSize ()), 2));\r\n img.setPosition (x, y);\r\n // Store references to object and key methods\r\n obj = img;\r\n setPosition = img::setPosition;\r\n\r\n background = new Sprite (bg.loadTextures ());\r\n background.setOrigin(Vector2f.div(new Vector2f(bg.getTexture1 ()), 1000000));\r\n background.setPosition (0,0);\r\n }", "public Big_shot(double x,double y,double velocity,double angle){\n\t\tsuper(x,y,velocity,angle,100,30);\n\t}", "public Scania(double x, double y) {\n super(2, Color.WHITE, 300, \"Scania\", x, y);\n try{icon = ImageIO.read(DrawPanel.class.getResourceAsStream(\"/pics/Scania.jpg\"));\n }catch (IOException ex)\n {\n ex.printStackTrace();\n icon = null;\n }\n }", "public void initPlateau() {\r\n\t\t// On place les obstacles\r\n\t\tint epaisseur = 20;\r\n\t\tint delta = 50;\r\n\t\tint espace = 150;\r\n\t\tobstacles.add(new Obstacle(0,0,width,epaisseur));\r\n\t\tobstacles.add(new Obstacle(0,height - epaisseur,width,epaisseur));\r\n\t\tobstacles.add(new Obstacle(0,0,epaisseur,height));\r\n\t\tobstacles.add(new Obstacle(width - epaisseur,0,epaisseur,height));\r\n\t\t\r\n\t\tobstacles.add(new Obstacle(0,100,width-espace,epaisseur));\r\n\t\tobstacles.add(new Obstacle(espace,200,width-espace,epaisseur));\r\n\t\tobstacles.add(new Obstacle(0,300,width-espace,epaisseur));\r\n\t\tobstacles.add(new Obstacle(espace,400,width-espace,epaisseur));\r\n\t\t\r\n\t\t// On place les objectifs\r\n\t\t\r\n\t\tobjectifs.add(new Objectif(400,50));\r\n\t\tobjectifs.add(new Objectif(150,50));\r\n\t\tobjectifs.add(new Objectif(300,50));\r\n\t\tobjectifs.add(new Objectif(50,50));\r\n\t\tobjectifs.add(new Objectif(400,50));\r\n\t\tobjectifs.add(new Objectif(600,50));\r\n\t\tobjectifs.add(new Objectif(700,70));\r\n\t\tobjectifs.add(new Objectif(730,100));\r\n\t\tobjectifs.add(new Objectif(730,130));\r\n\t\tobjectifs.add(new Objectif(100,150));\r\n\t\tobjectifs.add(new Objectif(200,150));\r\n\t\tobjectifs.add(new Objectif(400,150));\r\n\t\tobjectifs.add(new Objectif(500,150));\r\n\t\tobjectifs.add(new Objectif(600,150));\r\n\t\tobjectifs.add(new Objectif(700,150));\r\n\t\tobjectifs.add(new Objectif(70,200));\r\n\t\tobjectifs.add(new Objectif(100,250));\r\n\t\tobjectifs.add(new Objectif(500,250));\r\n\t\tobjectifs.add(new Objectif(300,250));\r\n\t\tobjectifs.add(new Objectif(600,250));\r\n\t\tobjectifs.add(new Objectif(700,270));\r\n\t\tobjectifs.add(new Objectif(730,300));\r\n\t\tobjectifs.add(new Objectif(730,330));\r\n\t\tobjectifs.add(new Objectif(100,350));\r\n\t\tobjectifs.add(new Objectif(200,350));\r\n\t\tobjectifs.add(new Objectif(700,350));\r\n\t\tobjectifs.add(new Objectif(500,350));\r\n\t\tobjectifs.add(new Objectif(300,350));\r\n\t\tobjectifs.add(new Objectif(100,350));\r\n\t\tobjectifs.add(new Objectif(70,400));\r\n\t\tobjectifs.add(new Objectif(100,450));\r\n\t\tobjectifs.add(new Objectif(500,450));\r\n\t\tobjectifs.add(new Objectif(300,450));\r\n\t\tobjectifs.add(new Objectif(600,450));\r\n\t\t\r\n\t}", "public Boss() {\n\t\tlife = 3;\n\t\timage = new Image(\"/Model/boss3.png\", true);\n\t\tboss = new ImageView(image);\n\t\tRandom r = new Random();\n\t\tboss.setTranslateX(r.nextInt(900));\n\t\tboss.setTranslateY(0);\n\t\tisAlive = true;\n\t}", "public Player(PImage img) {\r\n\t\tx_ = startX;\r\n\t\ty_ = startY;\r\n\t\tinvincible = false;\r\n\t\tinvinceFrames = 200;\r\n\t\thealth_ = 50;\r\n\t\tshots = new ArrayList();\r\n\t\tisAlive = true;\r\n\t\tsprite = img;\r\n\t\tvy_ = 0.0f;\r\n\t\tmoving = 0;\r\n\t}", "public Stage1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1200, 900, 1);\n \n GreenfootImage image = getBackground();\n image.setColor(Color.BLACK);\n image.fill();\n star();\n \n \n \n //TurretBase turretBase = new TurretBase();\n playerShip = new PlayerShip();\n scoreDisplay = new ScoreDisplay();\n addObject(scoreDisplay, 100, 50);\n addObject(playerShip, 100, 450);\n \n }", "public Life(BufferedImage img, int spe, String dir, int rowOfObject, int colOfObject, int objectSD) {\n\t\tsuper(img, spe, dir, rowOfObject, colOfObject);\n\t\t\n\t\tthis.image = img;\n\t\tthis.speed = spe;\n\t\tthis.row = rowOfObject; //could also be Y coord depending on what value is passed\n\t\tthis.col = colOfObject; //could also be X coord depending on what value is passed\n\t\tthis.safe = true; // true by default\n\t\tthis.objectSeperatorDistance = img.getWidth(); //default is width of itself so no overlapping objects\n\t}", "public ScoreBoard()\r\n {\r\n super();\r\n int boardWidth = 200;\r\n int boardHeight = 30;\r\n \r\n board = new GreenfootImage(boardWidth,boardHeight);\r\n board.setColor(Color.green); \r\n //&& Color.blue);\r\n board.fillRect(0, 0, boardWidth,boardHeight);\r\n this.setImage(board);\r\n \r\n //draw it\r\n update();\r\n }", "public Cow() {\n\t\tsuper();\n\t\tloadImages();\n\t}", "public Circle() {\n this( 1.0 ); \n }", "public Proyectil(){\n disparar=false;\n ubicacion= new Rectangle(0,0,ancho,alto);\n try {\n look = ImageIO.read(new File(\"src/Disparo/disparo.png\"));\n } catch (IOException ex) {\n System.out.println(\"error la imagen del proyectil no se encuentra en la ruta por defecto\");\n }\n }", "public Circle(int x, int y) {\n super(x-5,y-5);\n name = \"Circle\";\n width = 2*5;\n height = 2*5;\n radius = 5;\n }", "SimpleCircle() {\n\t\tradius = 1;\n\t}", "public ObstacleSelector(World world, float width, float height) {\n\t this.world = world;\n \n\t pointer = new Rectangle();\n \tpointer.width = width;\n \tpointer.height = height;\n \n \tmouseJointDef = new MouseJointDef();\n \t\n \tmouseJointDef.frequencyHz = DEFAULT_FREQUENCY;\n \tmouseJointDef.dampingRatio = DEFAULT_DAMPING;\n \tforce = DEFAULT_FORCE;\n \n \tBodyDef groundDef = new BodyDef();\n\t\tgroundDef.type = BodyDef.BodyType.StaticBody;\n\t\tCircleShape groundShape = new CircleShape();\n\t\tgroundShape.setRadius(pointer.width);\n\t\tground = world.createBody(groundDef);\n\t\tground.createFixture(groundShape,0);\n\n\t if (ground != null) {\n\t FixtureDef groundFixture = new FixtureDef();\n \tgroundFixture.shape = groundShape;\n \tground.createFixture(groundFixture);\n \t}\n\t \n\t drawScale = new Vector2(1,1);\n }", "public RoadSign(int x, int y, String imageFileName) {\n super(x, y, imageFileName);\n }", "public HighwayCar(){\r\n \t\r\n \tint dir = (int) (Math.random() * 4 % 4);\r\n \t\r\n setDirection(dir * Math.PI / 2); \r\n \r\n setProperty(\"icon\", \"/robot.png\");\r\n setProperty(\"size\", 20);\r\n Clock.addClockListener(this, 2);\r\n }", "public Monstruo(int posX, int posY ,Image image) {\n\t\tsuper(posX, posY, image);\n\t\torientacion = 3;\n\t\tvida = 10;\n\t\tdinero = 0;\n\t\tspeed = 1;\n\t\tstrength = 1;\n\t\tdefense = 1;\n\t\tweapon = 1;\n\t\tarmor = 1;\n\t}", "public CarrierShape(int x,int y, int deltaX, int deltaY)\n {\n super(x,y,deltaX,deltaY);\n }", "public Circle(int x, int y, int r) {\n super(x-r,y-r);\n name = \"Circle\";\n width = 2*r;\n height = 2*r;\n radius = r;\n }", "Enemy(Bitmap image) {\n super(image);\n }", "public Tower (ImageView test) {\n super.setImageView(test);\n }", "public Ogre(int x, int y) {\r\n\t\tsuper(\"resources/ogre.gif\", x, y);\r\n\t}", "public Coloca_imagen(){\n \n \n }", "public CarrierShape(int x, int y, int deltaX, int deltaY, int width, int height)\n {\n super(x,y,deltaX,deltaY,width,height);\n }", "public Circle() {\n\t\tr=0.0; //by defalut set radius to something so we have a circle \n\t}", "public Circle()\r\n\t{\r\n\t\tradius = 0.0;\r\n\t}", "public Ball (String Image, int posX, int posY, boolean j1){\n\t\tsuper(Image, posX, posY);\n\t\tSystem.out.println(j1);\n\t\tif (j1) {\n\t\t\tthis.setSpeedX(2);\n\t\t\tthis.setSpeedY(2);\n\t\t}\n\t\telse {\n\t\t\tthis.setSpeedX(-2);\n\t\t\tthis.setSpeedY(-2);\n\t\t}\n\t}", "public Cowboy(int initialX, int initialY) throws Exception {\n super(Image.createImage(\"/images/cowboy.png\"), WIDTH, HEIGHT);\n myInitialX = initialX;\n myInitialY = initialY;\n // we define the reference pixel to be in the middle\n // of the cowboy image so that when the cowboy turns\n // from right to left (and vice versa) he does not\n // appear to move to a different location.\n defineReferencePixel(WIDTH / 2, 0);\n setRefPixelPosition(myInitialX, myInitialY);\n setFrameSequence(FRAME_SEQUENCE);\n }", "public Circle(){ // 1 constructor\n this.radius = DEFAULT_RADIUS;\n this.color = DEFAULT_COLOR;\n }", "public Dragon(int x,int y, int size, Color c, String n){\n this.x = x;\n this.y = y;\n this.size = size;\n this.c = c; // You saw nothing.\n health = 50;\n name = n;\n bodyX = x + size * 25;\n bodyY = y + size * 25;\n bodyWidth = size * 60;\n bodyHeight = size * 50;\n }", "@Override\r\n public void paintComponent(Graphics g){\r\n super.paintComponent(g);\r\n Image fondo = loadImage(\"fondo.png\");\r\n g.drawImage(fondo, 0, 0, this);\r\n g.drawRect(this.tanque.getX(), this.tanque.getY(), 30, 30);\r\n Image tank = loadImage(this.tanque.getImagenes()[tanque.getAngulo()]);\r\n g.drawImage(tank, tanque.getX(), tanque.getY(), this);\r\n }", "public Ball(int x, int y, int radius, Color color, int xVelocity, int yVelocity, int xWall, int yWall){\n this.x=x;\n this.y=y;\n this.radius=radius;\n this.color=color;\n this.xVelocity=xVelocity;\n this.yVelocity=yVelocity;\n this.xWall=xWall;\n this.yWall=yWall;\n\n}", "public Spaeti(int pos_x, int pos_y, Enums.Direction direction) {\n super(pos_x, pos_y);\n this.direction = direction;\n this.rechargeDuration = 15;\n try {\n this.image_on = new Image(\"/res/img/objects/spaeti_on.png\");\n this.image_off = new Image(\"/res/img/objects/spaeti_off.png\");\n this.image_on.rotate(GameUtils.getImageRotationFromDirection(direction));\n this.image_off.rotate(GameUtils.getImageRotationFromDirection(direction));\n this.image = image_on;\n } catch (SlickException e) {\n e.printStackTrace();\n }\n }", "public Whim(int x, int y, PImage ghost, PImage frightened, int speed) {\n super(x, y, ghost, frightened, speed);\n }", "Boss(String imgPath, int x, int y, int hitPoints, Node player) {\n super(new ImageView(imgPath), x, y, hitPoints);\n\n this.getView().setTranslateX(x);\n this.getView().setTranslateY(y);\n this.defaultHp = hitPoints;\n this.isAlive = true;\n this.player = player;\n\n bossTimer = new AnimationTimer() {\n @Override\n public void handle(long now) {\n\n bossMove();\n\n }\n };\n bossTimer.start();\n }", "public Turtle (Pixmap image, Location center, Dimension size, Dimension canvasBounds) {\n super(image, center, size);\n myCanvasBounds = canvasBounds;\n myCenterXValue = (int) myCanvasBounds.getWidth() / 2;\n myCenterYValue = (int) myCanvasBounds.getHeight() / 2;\n }", "public Dragon()\n {\n // initialise instance variables\n //Hi my name is jen\n this(50, 50, 1, Color.GREEN, \"Unnamed\");\n /*x = 50;\n y = 50;\n size = 1;\n c = Color.GREEN; // INS comment here.\n health = 35;\n name = \"Unnamed\";*/\n }", "Enemy(int x, int y, Bitmap image) {\n super(x, y, image);\n }", "public Triagem() {\n ImageIcon logo = new ImageIcon(\"src/Imagens/icone.png\");\n setIconImage(logo.getImage());\n initComponents();\n setLocationRelativeTo(null);\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n }", "public DamageReductionBoost(int x, int y, ID id) {\r\n super(x, y, id);\r\n\r\n try {\r\n img = ImageIO.read(DistractionAction.class.getResourceAsStream(\"LevelThree/headphones.png\"));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public ObstacleSelector(World world) {\n\t\tthis(world,DEFAULT_MSIZE,DEFAULT_MSIZE);\t\n }", "public Door(Direction direction){\n this.direction=direction;\n location=new PointF();\n setLocation(direction);\n rect = new RectF(location.x - size, location.y - size, location.x + size, location.y + size);\n }", "public Cenario1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(900, 600, 1);\n adicionar();\n \n }", "public Factory(Cell cell, Player owner, Game game) {\n\t\tsuper(\"Factory\", 300, cost, 200, cell, owner, game);\n\t\tthis.setImageLocation(\"/imgs/buildings/Factory.png\");\n\t}", "public void drawTheImage(Graphics g)\r\n\t{\r\n\t\tg.setColor(Color.BLACK);\r\n\t\tg.fillOval(theX, theY, 10,10);\r\n\t\ttheX+=velX;\r\n\t\ttheY+=velY;\r\n\t}", "Ball(int x, int y, int dx, int dy){\n this.x = this.originalX = x;\n this.y = this.originalY = y;\n this.dx = this.originalDX = dx;\n this.dy = this.originalDY = dy;\n s = new ShapeRenderer();\n s.setColor(1,1,1,1);//white\n }", "private void initialiseRobotImage(int x, int y) {\r\n\t\trobotImage = new RobotImageComponent(Constant.ROBOTIMAGEPATHS[this.getDirection()], Constant.ROBOTWIDTH, Constant.ROBOTHEIGHT);\r\n\t\tframe.add(robotImage);\r\n\t\trobotImage.setLocation(Constant.MARGINLEFT + (Constant.GRIDWIDTH * 3 - Constant.ROBOTWIDTH)/2 + (x-1) * Constant.GRIDWIDTH, Constant.MARGINTOP + (Constant.GRIDHEIGHT * 3 - Constant.ROBOTHEIGHT)/2 + (y-1) * Constant.GRIDHEIGHT);\r\n\t}", "Board() {\n currentlyPlacedShip = null;\n imageMap = new TreeMap<ShipType, Image>();\n fillImageMap();\n try {\n hit = ImageIO.read(getClass().getResource(\"img/hit.gif\"));\n board = ImageIO.read(getClass().getResource(\"img/board.gif\"));\n mishit = ImageIO.read(getClass().getResource(\"img/mishit.gif\"));\n } catch(IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\tif(directY != 0){\n\t\t\tif(directX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),900, 150, 150, 150);\n\t\t\t}else if(directX == -1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),1050, 150, 150, 150);\n\t\t\t}else{\n\t\t\t\tif(lastDirectX == 1){\n\t\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),900, 150, 150, 150);\n\t\t\t\t}else{\n\t\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),1050, 150, 150, 150);\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(isMove){\n\t\t\tif(directX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),((Main.getInstance().getCurrentFrame() % 2) + 1) * 150, 150, 150, 150);\n\t\t\t}else if(directX == -1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),((Main.getInstance().getCurrentFrame() % 2) + 4)* 150, 150, 150, 150);\n\t\t\t}\n\t\t}else{\n\t\t\tif(lastDirectX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),0, 150, 150, 150);\n\t\t\t}else{\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 150, 150, 150);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tgc.drawImage(hanzoBody, x-55, y-50);\n\t\tgc.drawImage(hanzoLeg, x-55, y-50);\n\t\t//gc.drawImage(hanzoFX, x-55, y-50);\n\t\t\n\t}", "private RadiusSector() {}", "public Ball(int x, int y, int diameter)\n {\n currentBallX = x;\n currentBallY = y;\n this.diameter = diameter;\n }", "public Hazard() {\n super(\"img/hazard.png\");\n }", "public Shape()\n\t{\n\t\tinitShape();\n\t}", "Sprite(float x, float y, float w, float h) {\n _img = createImage(1, 1, RGB);\n _x = x;\n _y = y;\n _w = w;\n _h = h;\n _rotVector = new PVector(1, 0, 0);\n resetRectHitbox();\n }", "public Circle(int x, int y, int r, Color c) {\n super(x-r,y-r);\n color = c;\n name = \"Circle\";\n width = 2*r;\n height = 2*r;\n radius = r;\n }", "public LED(int x, int y, int radius, int color, Graphics g)\n {\n // variablen instanzieren\n g2d = (Graphics2D) g;\n \n //LED instanzieren\n g.setColor(new Color(color));\n g.fillOval(x, y, radius, radius);\n }", "public Food(int x, int y) {\n\t\tsuper(\"FOOD.png\",x,y);\n\t}", "public Shape() {\n\t\tthis(DEFAULT_X_POS, DEFAULT_Y_POS, DEFAULT_DELTA_X, DEFAULT_DELTA_Y, DEFAULT_WIDTH, DEFAULT_HEIGHT);\n\t}", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n if(image != null)\n {\n \tScaleImage();\n \tg.drawImage(image, 0, 0, null);\n }\n \n if(isFood())\n\t\t{\n \t\n\t\t\tGraphics2D g2 = (Graphics2D) g;\n\t\t\tg2.setColor(Color.red);\n\t\t\tg2.setStroke(new BasicStroke(3));\n\t\t\tg2.drawArc(getWidth()/2, getHeight()/2-5, 10, 10, 30, 210);\t \n\t\t\tg2.drawArc(getWidth()/2, getHeight()/2+5, 10, 10, 180, 270);\n\t\t\tg2.setStroke(new BasicStroke(1));\n\t\t\t\n\t\t}\n \n for (int i = 0; i < listAnimals.size(); i++) {\n\t\t\t(listAnimals.get(i)).drawAnimal(g);\n\t\t\t//System.out.println(\"draw object \" + listAnimals.get(i) + \", location \" + listAnimals.get(i).getLocation());\n\t\t}\n \n }", "public Image()\r\n {\r\n super();\r\n setBounds( 0, 0, 10, 10 );\r\n }", "public PantallaVictoria()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(400, 600, 1); \n prepare();\n }", "public GameObject(PImage img, int x, int y, int width, int height, int[] velocity){\n this.img = img;\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.velocity= velocity;\n health = 1; //Default value for health\n }", "public Circle() {\r\n this.radius = 0.0;\r\n this.center = new Point();\r\n }", "public Spider(double x, double y)\n\t{\n\t\tsuper(x, y, \"Res/indaSpider.png\", 2);\n\t\thspd = 0.4;\n\t\tvspd = 0.4;\n\t\tspeed = 0.4;\n\t\timageSpeed = 0.05;\n\t\tdamage = 1;\n\t\talarm = new Alarm(50);\n\t\tshootTimer = new Alarm(200);\n\t\trandom = new Random();\n\t\tclose = false;\n\t}" ]
[ "0.7068792", "0.69335586", "0.66839164", "0.664373", "0.64438975", "0.641301", "0.62040687", "0.61856294", "0.61387783", "0.6136247", "0.61089164", "0.6102967", "0.6047973", "0.6031576", "0.6021365", "0.601118", "0.59972227", "0.599391", "0.5970624", "0.59531003", "0.59425354", "0.59421206", "0.5935587", "0.5915154", "0.59071225", "0.5903259", "0.58881116", "0.58827937", "0.5834281", "0.5813457", "0.58065814", "0.5806118", "0.57964593", "0.5789129", "0.5782836", "0.57819104", "0.5765618", "0.5758268", "0.57489", "0.5748805", "0.57465756", "0.57410574", "0.57377416", "0.5734131", "0.57197404", "0.57143515", "0.5709041", "0.57086253", "0.5703816", "0.570327", "0.56933117", "0.56791794", "0.567659", "0.5670714", "0.5667395", "0.5663464", "0.5662119", "0.56587", "0.5656828", "0.56565", "0.56517154", "0.5645935", "0.5643886", "0.5614681", "0.56098884", "0.56081235", "0.560276", "0.5593667", "0.5582276", "0.5570451", "0.55694747", "0.55693454", "0.55680203", "0.55668074", "0.55621", "0.5559324", "0.5559132", "0.5551736", "0.55454427", "0.5538228", "0.5537393", "0.5535619", "0.55352926", "0.5531917", "0.5526983", "0.55256456", "0.552542", "0.55214965", "0.5519086", "0.55181646", "0.5516525", "0.55137277", "0.5513051", "0.5507655", "0.55053276", "0.55049855", "0.5503207", "0.54989624", "0.5482682", "0.5474489" ]
0.67793643
2
Start of getters and setters for the den's attributes
public boolean isOccupied() { return isOccupied; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected LPDMODOMAttribute() {\n }", "@Override\npublic void setAttributes() {\n\t\n}", "public int getDen()\n {\n return den;\n }", "private void setAllAttributesFromController() {\n obsoData.setSupplier(supplier);\n \n obsoData.setEndOfOrderDate(endOfOrderDate);\n obsoData.setObsolescenceDate(obsolescenceDate);\n \n obsoData.setEndOfSupportDate(endOfSupportDate);\n obsoData.setEndOfProductionDate(endOfProductionDate);\n \n obsoData.setCurrentAction(avlBean.findAttributeValueListById(\n ActionObso.class, actionId));\n obsoData.setMtbf(mtbf);\n \n obsoData.setStrategyKept(avlBean.findAttributeValueListById(\n Strategy.class,\n strategyId));\n obsoData.setContinuityDate(continuityDate);\n \n obsoData.setManufacturerStatus(avlBean.findAttributeValueListById(\n ManufacturerStatus.class, manufacturerStatusId));\n obsoData.setAirbusStatus(avlBean.findAttributeValueListById(\n AirbusStatus.class, airbusStatusId));\n \n obsoData.setLastObsolescenceUpdate(lastObsolescenceUpdate);\n obsoData.setConsultPeriod(avlBean.findAttributeValueListById(\n ConsultPeriod.class, consultPeriodId));\n \n obsoData.setPersonInCharge(personInCharge);\n obsoData.setCommentOnStrategy(comments);\n }", "private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}", "public void setdat()\n {\n }", "public Person getDoctor(){\n return doctor;\n }", "public double getLoY() {\r\n\treturn fieldLoY;\r\n}", "public Attributes getAttributes() { return this.attributes; }", "@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n // #[regen=yes,id=DCE.E1700BD9-298C-DA86-4BFF-194B41A6CF5E]\n // </editor-fold> \n protected String getProperties() {\n\n return \"Size = \" + size + \", Index = \" + value;\n\n }", "public void setNombre(String nombre) {this.nombre = nombre;}", "public void set() {\r\n\t\tage = 19;\r\n\t\tname = \"ΎΛ·»\";\r\n\t\theight = 161;\r\n\t\tsetWeight(50);\r\n\t\tSystem.out.println(getWeight());\r\n\t}", "public void setNombre(String nombre) {\r\n\tthis.nombre = nombre;\r\n}", "public int getArmadura(){return armadura;}", "public Attr() {\n\t\t\tsuper();\n\t\t}", "public String getDenotation(){\n return this.denotation;\n }", "@Override\r\n protected void parseAttributes()\r\n {\n\r\n }", "public String getAttributeName() {\n/* 85 */ return this.attributeName;\n/* */ }", "public Property() {\n\t\tcity=\"\";\n\t\towner=\"\";\n\t\tpropertyName=\"\";\n\t\trentAmount=0;\n\t\tplot= new Plot(0,0,1,1);\n\t}", "public void setBirthday() { this.birthday = birthday; }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public void setAge(int age) { this.age = age; }", "public void setupProperties() {\n // left empty for subclass to override\n }", "public String getNome () { return this.nome; }", "public double getSalary(){\r\n return salary;\r\n }", "public int getAge() {return age;}", "public void setNombre(String nombre){\n this.nombre =nombre;\n }", "public double getLoZ() {\r\n\treturn fieldLoZ;\r\n}", "public AttributeBornMchMother() {\n }", "public Student getStudent() { return student; }", "public double getHiY() {\r\n\treturn fieldHiY;\r\n}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n public List<MappedField<?>> getAttributes() {\n return attributes;\n }", "public String getNombre()\r\n/* 113: */ {\r\n/* 114:204 */ return this.nombre;\r\n/* 115: */ }", "public String getNome(){\r\n return this.nome;\r\n }", "public String getNombre(){\n return nombre;\n }", "public double getWage(){\r\n return wage; \r\n }", "public String getNombre(){\n return nombre;\n }", "public String getNombre()\r\n/* 17: */ {\r\n/* 18:41 */ return this.nombre;\r\n/* 19: */ }", "@Override\r\n\tpublic Map<String, String> getAttributes() {\r\n\t\treturn this.attributes;\r\n\t}", "public void setNombre(String nombre)\r\n/* 65: */ {\r\n/* 66: 76 */ this.nombre = nombre;\r\n/* 67: */ }", "public int getAge(){\n return age;\n }", "@Basic\r\n\tpublic DukatAmount getPrice(){\r\n\t\treturn price;\r\n\t}", "@SuppressWarnings(\"unused\")\n CADNemaMotor () {\n // Set typical initial values, which user can edit before saving\n type = \"1\";\n }", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "public void setNombre(String nombre)\r\n/* 118: */ {\r\n/* 119:214 */ this.nombre = nombre;\r\n/* 120: */ }", "private Disc() {\n super(\"\");\n barcode = \"\";\n director = \"\";\n fsk = 0;\n }", "public Double getDoubleAttribute();", "public String getnombre(){\n return nombre;\n }", "public String getNombre(){\r\n return nombre;\r\n }", "public String getNome(){\n return this.nome;\n }", "public int getDef(){\n return def;\n }", "@Override\n\tpublic void loadProperties() {\n\t\tPropertySet mPropertySet = PropertySet.getInstance();\n\t\tdouble kp = mPropertySet.getDoubleValue(\"angleKp\", 0.05);\n\t\tdouble ki = mPropertySet.getDoubleValue(\"angleKi\", 0.0);\n\t\tdouble kd = mPropertySet.getDoubleValue(\"angleKd\", 0.0001);\n\t\tdouble maxTurnOutput = mPropertySet.getDoubleValue(\"turnPIDMaxMotorOutput\", Constants.kDefaultTurnPIDMaxMotorOutput);\n\t\tmAngleTolerance = mPropertySet.getDoubleValue(\"angleTolerance\", Constants.kDefaultAngleTolerance);\n\t\tsuper.setPID(kp, ki, kd);\n\t\tsuper.setOutputRange(-maxTurnOutput, maxTurnOutput);\n\t}", "public AttributeDescriptorDTO()\n\t{\n\t\tsuper();\n\t}", "public double getMontoDescuento(){\n return localMontoDescuento;\n }", "public String getDoctorID(){\n return doctorID;\n }", "public int getAtt(){ \r\n return att;\r\n }", "@Override\n\tpublic AttributeMap getAttributes() {\n\t\treturn defaultEdgle.getAttributes();\n\t}", "public int getDef(){\r\n return def;\r\n }", "public int get () { return rating; }", "public String getNombre()\r\n/* 60: */ {\r\n/* 61: 67 */ return this.nombre;\r\n/* 62: */ }", "private void initReservedAttributes()\n {\n addIgnoreProperty(ATTR_IF_NAME);\n addIgnoreProperty(ATTR_REF);\n addIgnoreProperty(ATTR_UNLESS_NAME);\n addIgnoreProperty(ATTR_BEAN_CLASS);\n addIgnoreProperty(ATTR_BEAN_NAME);\n }", "public String getNombre(){\n return nombre;\n }", "public String getNombre(){\n return nombre;\n }", "public int getLength(){ // getter method\n return length; // return the value of the class attribute radius\n }", "public String getNome(){\r\n return nome;\r\n }", "Attributes getAttributes();", "public double getDm() {\n return dm;\n }", "public String getDENNGAY()\n {\n return this.DENNGAY;\n }", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "public void setPrice(double price){this.price=price;}", "@Override\n protected void updateProperties() {\n }", "public Dipendente() {\r\n\t\tsetnMat();\r\n\t}", "@Override\n public String getNom() {\n return nom;\n }", "public String getDoctorName(){\n \treturn doctorName;\n }", "public String getD() {\n return d;\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\r\n\tpublic ArrayList<Object> getAttributesValues() {\n\t\tArrayList<Object> listValeur = super.getAttributesValues();\r\n\t\tlistValeur.add(nombreMaxPassagers);\r\n\t\treturn listValeur;\r\n\t}", "public double getLoX() {\r\n\treturn fieldLoX;\r\n}", "public Age getAge() {\n return age;\n }", "@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}", "private ReadProperty()\r\n {\r\n\r\n }", "public double getPrice(){return price;}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "public static void main(String[] args) {\n Student s1 = new Student();\r\n \r\n //set the age for the student \r\n// s1.age = -500; \r\n// System.out.println(\"Age: \"+s1.age);\r\n\r\n s1.setAge(-500);\r\n System.out.println(s1.getAge()); //23 \r\n\r\n \r\n }", "@Override\n public String getDeskripsi() {\n return deskripsi;\n }", "@Override\n public String getDeskripsi() {\n return deskripsi;\n }", "public String getDm() {\n return dm;\n }", "public void setDer(int der) {\r\n\t\tthis.der = der;\r\n\t}", "@Override // Métodos que fazem a anulação\n\tpublic void getBonificação() {\n\t\t\n\t}", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "public void setAttributes(IEntityObject obj) {\r\n\tDispenser dObj = (Dispenser) obj;\r\n\tdObj.pk = this.pk;\r\n\tdObj.versionInfoID = this.versionInfoID;\r\n\tdObj.interfaceID = this.interfaceID;\t\r\n\tdObj.setBlender(this.blender);\r\n }", "public MotivoLlamadoAtencion getMotivoLlamadoAtencion()\r\n/* 114: */ {\r\n/* 115:123 */ return this.motivoLlamadoAtencion;\r\n/* 116: */ }" ]
[ "0.62572896", "0.61184543", "0.61093616", "0.5925485", "0.58334154", "0.58183116", "0.580006", "0.579021", "0.56900734", "0.5663036", "0.56483746", "0.56095654", "0.5600501", "0.5572973", "0.5543671", "0.54985535", "0.54926705", "0.5488107", "0.5486233", "0.54527575", "0.54511946", "0.54258716", "0.5420068", "0.54091364", "0.54008496", "0.5385746", "0.5379807", "0.53670466", "0.5366259", "0.5361208", "0.5361103", "0.5356952", "0.53535944", "0.53526527", "0.53409666", "0.53375506", "0.53343195", "0.5325965", "0.5323105", "0.5318151", "0.53164655", "0.53125656", "0.5311138", "0.53057724", "0.5296455", "0.5296455", "0.5288602", "0.52883095", "0.5283061", "0.5282914", "0.52692896", "0.52689123", "0.52677375", "0.52653503", "0.5264656", "0.52633524", "0.52626294", "0.52584726", "0.5256171", "0.52560353", "0.5253392", "0.52512485", "0.5250598", "0.5243413", "0.5243413", "0.52391744", "0.52376986", "0.52376604", "0.52366", "0.5236369", "0.52357316", "0.52350277", "0.52350277", "0.52350277", "0.52350277", "0.52350277", "0.52350277", "0.5230123", "0.52278876", "0.5221958", "0.5219725", "0.5216446", "0.5212355", "0.52100754", "0.51997447", "0.5196733", "0.5191743", "0.5190385", "0.5188982", "0.51865", "0.51787066", "0.5174815", "0.51738113", "0.5173463", "0.5173463", "0.51700586", "0.5167779", "0.5167068", "0.5166043", "0.51658016", "0.51626307" ]
0.0
-1
/ access modifiers changed from: packageprivate
public interface zzxu<T> { boolean equals(T t, T t2); int hashCode(T t); T newInstance(); void zza(T t, zzxt zzxt, zzvk zzvk) throws IOException; void zza(T t, zzzh zzzh) throws IOException; int zzai(T t); boolean zzaj(T t); void zzd(T t, T t2); void zzy(T t); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void prot() {\n }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "private void kk12() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "public abstract void mo70713b();", "public void m23075a() {\n }", "public void mo38117a() {\n }", "private MApi() {}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public abstract void mo56925d();", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void mo21779D() {\n }", "public abstract void mo27386d();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "void m1864a() {\r\n }", "public abstract Object mo26777y();", "public void mo21825b() {\n }", "protected boolean func_70814_o() { return true; }", "public final void mo91715d() {\n }", "public abstract void mo27385c();", "public void mo97908d() {\n }", "public void mo21782G() {\n }", "private TMCourse() {\n\t}", "private test5() {\r\n\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private Util() { }", "protected void mo6255a() {\n }", "private abstract void privateabstract();", "public void mo21877s() {\n }", "public void mo21787L() {\n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "public void mo21791P() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public abstract void mo6549b();", "public void mo23813b() {\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }", "public void mo44053a() {\n }", "public void smell() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo115190b() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void mo21785J() {\n }", "public void mo21793R() {\n }", "public void mo21878t() {\n }", "public void mo56167c() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public abstract String mo118046b();", "public void mo115188a() {\n }", "private SourcecodePackage() {}", "public abstract String mo41079d();", "void mo57277b();", "public void mo6944a() {\n }", "public abstract void mo30696a();", "public abstract void mo42329d();", "private final zzgy zzgb() {\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "protected boolean func_70041_e_() { return false; }", "zzafe mo29840Y() throws RemoteException;", "private Singletion3() {}", "public abstract void mo42331g();", "public abstract void mo35054b();", "public abstract String mo13682d();", "public void mo21786K() {\n }", "public void mo3376r() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo3749d() {\n }", "public void mo21794S() {\n }", "public void mo12628c() {\n }", "private Infer() {\n\n }", "public void mo9848a() {\n }", "public abstract void mo27464a();", "private OMUtil() { }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private NativeSupport() {\n\t}", "public void mo2740a() {\n }", "@Override\n public boolean isPrivate() {\n return true;\n }" ]
[ "0.71507126", "0.66852754", "0.6558074", "0.6482426", "0.64311445", "0.638545", "0.63839656", "0.63482744", "0.63302624", "0.6277197", "0.62635255", "0.6250569", "0.62368745", "0.6233547", "0.6228953", "0.6197293", "0.6197293", "0.6194772", "0.6184139", "0.6180766", "0.61573917", "0.6152649", "0.6152198", "0.6116647", "0.61093503", "0.6108619", "0.60879374", "0.60821515", "0.60723346", "0.6068983", "0.60565233", "0.60564804", "0.605594", "0.6050983", "0.60498387", "0.60470885", "0.60436356", "0.603736", "0.60237354", "0.60237354", "0.60237354", "0.60237354", "0.6019666", "0.60196143", "0.6018301", "0.601686", "0.60056096", "0.600329", "0.5999082", "0.5997544", "0.59962994", "0.5995191", "0.5991293", "0.5991293", "0.5991293", "0.5991293", "0.5991293", "0.5991293", "0.5991293", "0.5991282", "0.5987402", "0.5987402", "0.5984476", "0.59827936", "0.5973211", "0.5958472", "0.5957542", "0.5953589", "0.59519774", "0.594738", "0.59457314", "0.59445536", "0.5942774", "0.5940164", "0.5938114", "0.5938083", "0.5926483", "0.59255004", "0.59255004", "0.5925304", "0.5914172", "0.5909818", "0.59050065", "0.59049857", "0.5904506", "0.5899379", "0.5896449", "0.5894286", "0.58935714", "0.5890183", "0.58829314", "0.58781534", "0.58774024", "0.58768195", "0.5875799", "0.5873635", "0.5867603", "0.5867603", "0.5866908", "0.58663774", "0.58619076" ]
0.0
-1
a Countable interface to display Alligator objects in the console
public interface Countable { //methods used to count an object void incrementCount(); void resetCount(); int getCount(); String getCountString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void show()\n {\n System.out.println( getFullName() + \", \" +\n String.format(Locale.ENGLISH, \"%.1f\", getAcademicPerformance()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getSocialActivity()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getCommunicability()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getInitiative()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getOrganizationalAbilities())\n );\n }", "public void afficher() {\n\t\tfor(int i=0;i<this.taille;i++) {\n\t\t\tfor (int j=0;j<this.taille;j++) {\n\t\t\t\tSystem.out.print(grille.get(i).get(j).getTypeOccupation()+\"\");\n\t\t\t}\n\t\t\tSystem.out.println(\" \");\n\t\t}\n\t}", "@Override\r\n\tpublic void showClassmate() {\n\t\tSystem.out.println(\"你的同学有: \"+classmateRelations);\r\n\t}", "public void displayseat() {\n\t\tString occ;\n\t\tif (this.isOccupied()) {\n\t\t\tocc = ANSI_RED+\"XX\"+ANSI_RESET+\"..\"+ANSI_RED+\"XX\"+ANSI_RESET;\n\t\t}\n\t\telse if (this.isReserved()){\n\t\t\tocc = ANSI_GREEN+\"ME\"+ANSI_RESET+\"..\"+ANSI_GREEN+\"ME\"+ANSI_RESET;\n\t\t}\n\t\telse {\n\t\t\tocc = ANSI_BLUE+\"__\"+ANSI_RESET+\"..\"+ANSI_BLUE+\"__\"+ANSI_RESET;\n\t\t}\n\t\tSystem.out.print(\"[\" + occ + \"]\");\n\t}", "public String toString() {\r\n\t\tString[] analysis = new String[26];\r\n\t\tString bigLine = String.format(\"LETTER ANALYSIS: \" + '\\n' + \"%-6s\" + '\\t' + \"%-6s\" + '\\t' + \"%-6s\" +\r\n\t\t\t\t\t\t\t'\\t' + \"%-6s\" + '\\t' + \"%-6s\" + '\\n', \"Letter\", \"Freq\", \"Freq%\", \"AvFreq%\", \"Diff\");\r\n\t\tfor(int i = 0; i < 26; i++) {\r\n\t\t\tanalysis[i] = returnAnArray(i);\r\n\t\t\tbigLine+=analysis[i];\r\n\t\t} bigLine += \"The most frequent letter is \" + mostFrequent + \" at \" + formatDoubles(max);\r\n\t\treturn bigLine;\r\n\t\t\r\n\t}", "public void visOversikt() {\r\n System.out.println(\"\\nPerson Oversikt:\");\r\n\r\n for(Person person : personListe.values()) {\r\n System.out.println(\"\\n\" + person);\r\n System.out.println(person + \" eier \" + (person.eierSize() + person.utlaantSize()) + \" DVD'er\");\r\n System.out.println(person + \" laaner ut \" + person.utlaantSize() + \" DVD'er\");\r\n System.out.println(person + \" laaner \" + person.laanerSize() + \" DVD'er\");\r\n }\r\n }", "public void print()\r\n {\n if (getOccupants().length != 0)\r\n {\r\n \t// will use the print method in the person class\r\n getOccupants()[0].print();\r\n }\r\n else if (this.explored)\r\n {\r\n System.out.print(\"[ H ]\");\r\n }\r\n else\r\n {\r\n System.out.print(\"[ ]\");\r\n }\r\n\r\n }", "public void showLineage() {\n\t\tfor (Iterator i = this.getLineage().iterator(); i.hasNext();) {\n\t\t\tprtln((String) i.next());\n\t\t}\n\t}", "@Override\n public String toString () {\n return getAge ()+\" - \" + getTotal ();\n }", "public void showInfo(){\n\t\tfor (int i = 0; i < this.cd.size(); i++) {\n\t\t\tthis.cd.get(i).showInfo();\n\t\t}\n\t\tSystem.out.println(\"\\tToatl amount: \" + calTotalAmount());\n\t}", "public void displayAiDistricts() {\r\n\t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~\");\r\n\t\tSystem.out.println(\"Ai districts available!\");\r\n\t\tCollections.sort(computer.getAiDistricts(), c);\r\n\t\tfor (Kingdom elem : computer.getAiDistricts()) {\r\n\t\t\tSystem.out.println(elem);\r\n\t\t}\r\n\t}", "public void showAnts() {\n\t\tfor (int i = 0; i < this.getNumberOfAnts(); i++) {\n\t\t\tSystem.out.println(this.getAnt(i));\n\t\t}\n\t}", "@Override\r\n\tdouble alan() {\n\t\tSystem.out.println(\"Ucgenin Alani : \");\r\n\t\treturn kenar1 * kenar2 /2;\r\n\t}", "public void print(){\n System.out.println(\"(\"+a.getAbsis()+\"_a,\"+a.getOrdinat()+\"_a)\");\n System.out.println(\"(\"+b.getAbsis()+\"_b,\"+b.getOrdinat()+\"_b)\");\n System.out.println(\"(\"+c.getAbsis()+\"_b,\"+c.getOrdinat()+\"_c)\");\n }", "public void display() {\n\tString tm = \"{ \";\n\tIterator it = entrySet().iterator();\n\twhile(it.hasNext()) {\n\t\ttm += it.next() + \" ,\";\n\t}\n\ttm = tm.substring(0, tm.length() - 2) + \" }\";\n\tSystem.out.println(tm);\n }", "public void printOL() {\n\t\tString format = \"%-30s %30s %n\";\n\t\tSystem.out.format(format,\"Item Name:\",this.item.getName());\n\t\tSystem.out.format(format,\"Quantity:\",this.quantity);\n\t\tSystem.out.format(format,\"Supplier:\",this.supplierName);\n\t\t\n\t}", "public final void Display() {\r\n\t\t//Displaying the Total Leave count\r\n\t\tSystem.out.println(\"Employee leave count per year : \" + myLeaveCount);\r\n\t}", "@Override\n\tpublic void Examinar() {\n\t\tSystem.out.println(\"\\nEsta preguiça emite o som tec tec tec ao ser examinada\\n\");\t\n\t}", "public String annulerRv(){\n\t\t// Traitement ici ... \n\t\treturn AFFICHER;\n\t}", "@Override\n\tpublic void attaquer() {\n\t\tSystem.out.println(\"Je suis \" + this.nom + \", j'ai \" + this.age + \" ans et je cueille le gui !\");\n\t}", "@Override\n\tpublic void acreage() {\n\t\tSystem.out.println(\"梯形的面积\"+getAcreage());\n\t}", "@Override\n\tpublic void displayAvgSalariesCompanies() {\n\n\t}", "@Override\n\tpublic int display() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void print() {\n\t\tsuper.print();\n\t\tSystem.out.println(alcohol);\n\t}", "private static void consoleOutput() {\n\n Output airportFlightCounter = new AirportFlightCounter(airports);\n Output flightInventory = new FlightInventory(flights);\n Output flightPassengerCounter = new FlightPassengerCounter(flights);\n Output mileageCounter = new MileageCounter(flights, airports);\n\n airportFlightCounter.toConsole();\n flightInventory.toConsole();\n flightPassengerCounter.toConsole();\n mileageCounter.toConsole();\n }", "public void introduce() {\n\t\tSystem.out.println(\"[\" + this.className() + \"] \" + this.describeRacer());\n\t}", "void display(){\n System.out.println(\"Name:\"+name);\n System.out.println(\"Age:\"+age);\n System.out.println(\"Faculty:\"+faculty);\n System.out.println(\"Department:\"+department);\n System.out.println(\"IsHandicapped:\"+isHandicapped);\n }", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"Pasos dados por \" + a.nombre + \" \" + a.distancia + \" m = \" + pasosActividad + \" / Pasos en total = \" + pasosTotal);\n\t}", "@Override\n public String RolesStatistics() {\n List<Employee> allEmployees = payrollService.AllEmployees();\n int ceo=0,manager=0,project_manager=0,employee=0;\n\n StringBuilder sb = new StringBuilder(\"\");\n for(int i=0;i<allEmployees.size();i++) {\n Employee e = allEmployees.get(i);\n if(e.getRole().getTitle().equals(\"CEO\"))\n ceo++;\n else if(e.getRole().getTitle().equals(\"Manager\"))\n manager++;\n else if(e.getRole().getTitle().equals(\"Project Manager\"))\n project_manager++;\n else if(e.getRole().getTitle().equals(\"Employee\"))\n employee++;\n }\n sb.append(\"Employees: \"+employee+\"\\n\");\n sb.append(\"Project Managers: \"+project_manager+\"\\n\");\n sb.append(\"Managers: \"+manager+\"\\n\");\n sb.append(\"CEOs: \"+ceo+\"\\n\");\n\n return sb.toString();\n }", "private void outputAccounts(){\r\n float total = 0;\r\n Collections.sort(theAccounts);\r\n for(Account aAccount:theAccounts){\r\n System.out.println(aAccount.toString());\r\n total += aAccount.getPremiumBonds();\r\n }\r\n\r\n System.out.println(\"Mediem\");\r\n calculateMediem();\r\n\r\n System.out.println(\"Mean:\");\r\n calculateMean(total);\r\n\r\n System.out.println(\"Mode:\");\r\n calculateMode();\r\n\r\n System.out.println(\"Range\");\r\n calculateRange();\r\n }", "default void display(){\n System.out.println(calculateArea());\n }", "@Override\r\n\tpublic void addAccessories() {\n\t\tSystem.out.println(\"Fitting accessories Luxory car\");\r\n\t\t\r\n\t}", "public static void printIndications() {\n\t\tSystem.out.println(\"\\n\" + \"Usage :\"\n\t\t\t\t+ \"\\n\\t\" + \"java -jar <jar-file> nodeScopeDirectoryPath windowSize\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"nodeScopeDirectoryPath is the path of the directory where the tagged corpus is located\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"windowSize is the size of the sliding window; it must be an integer (usually 2)\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"Other input parameters\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"the file containing the candidates terms must be located at src/main/resources/concepts/candidates.txt\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"the file containing the reference terms must be located at src/main/resources/concepts/reference_samples.txt\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"the file containing the stopwords must be located at src/main/resources/stopwords/stopwords_users.txt\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"Output parameters\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"nodeScopeDirectoryPath/output/pat_context.json\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"nodeScopeDirectoryPath/output/med_context.json\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"nodeScopeDirectoryPath/output/frequency.json\"\n\t\t\t\t+ \"\\n\"\n\t\t\t\t);\n\t}", "public void afficher() {\n System.out.println(this.toString());\n }", "public void displayValues()\n {\n \tSystem.out.println(\"The name of a bicycle is \"+name);\n \tSystem.out.println(\"The cost of a bicycle is \"+cost);\n \tSystem.out.println(\"The total numer of gears \"+gears);\n \t\n \t\n }", "public void printType(){\n l1= v1.distance(v2);\r\n l2= v1.distance(v3);\r\n l3= v2.distance(v3); \r\n if(l1 == l2 && l1==l3 && l2==l3)\r\n System.out.println(\"Equilateral\");\r\n if(l1 == l2 || l1==l3 || l2==l3)\r\n System.out.println(\"Isosceles\");\r\n else \r\n System.out.println(\"Scalene\"); \r\n \r\n }", "public void display () {\n System.out.println(rollNo + \" \" + name + \" \" + college );\n }", "private void cmdInfoState() throws NoSystemException {\n MSystem system = system();\n MModel model = system.model();\n MSystemState state = system.state();\n NumberFormat nf = NumberFormat.getInstance();\n\n System.out.println(\"State: \" + state.name());\n\n // generate report for objects\n Report report = new Report(3, \"$l : $r $r\");\n\n // header\n report.addRow();\n report.addCell(\"class\");\n report.addCell(\"#objects\");\n report.addCell(\"+ #objects in subclasses\");\n report.addRuler('-');\n\n // data\n long total = 0;\n int n;\n\n for (MClass cls : model.classes()) {\n report.addRow();\n String clsname = cls.name();\n if (cls.isAbstract())\n clsname = '(' + clsname + ')';\n report.addCell(clsname);\n n = state.objectsOfClass(cls).size();\n total += n;\n report.addCell(nf.format(n));\n n = state.objectsOfClassAndSubClasses(cls).size();\n report.addCell(nf.format(n));\n }\n\n // footer\n report.addRuler('-');\n report.addRow();\n report.addCell(\"total\");\n report.addCell(nf.format(total));\n report.addCell(\"\");\n\n // print report\n report.printOn(System.out);\n System.out.println();\n\n // generate report for links\n report = new Report(2, \"$l : $r\");\n\n // header\n report.addRow();\n report.addCell(\"association\");\n report.addCell(\"#links\");\n report.addRuler('-');\n\n // data\n total = 0;\n\n for (MAssociation assoc : model.associations()) {\n report.addRow();\n report.addCell(assoc.name());\n n = state.linksOfAssociation(assoc).size();\n report.addCell(nf.format(n));\n total += n;\n }\n\n // footer\n report.addRuler('-');\n report.addRow();\n report.addCell(\"total\");\n report.addCell(nf.format(total));\n\n // print report\n report.printOn(System.out);\n }", "public String toString() {\n\t\treturn \"Analysis using the following analyzer:\\n\"\n\t\t\t\t+ _analyzer.toString();\n\t}", "public Informations() {\n initComponents();\n \n Affichage();\n }", "public String toString() {\n \n return super.toString() + \" Axle Tax Rate: \" \n + PER_AXLE_TAX_RATE * getAxles();\n }", "private void printAccessibility(Map<AccessibilityTarget, ArrayList<Accessor>> targetsToAccessors) {\n Iterator<Map.Entry<AccessibilityTarget, ArrayList<Accessor>>> targetsToAccessorsIter = targetsToAccessors.entrySet().iterator();\n while (targetsToAccessorsIter.hasNext()) {\n Map.Entry<AccessibilityTarget, ArrayList<Accessor>> entry = targetsToAccessorsIter.next();\n AccessibilityTarget target = (AccessibilityTarget) entry.getKey();\n System.out.println(target);\n Iterator<Accessor> accIter = ((List<Accessor>) entry.getValue()).iterator();\n while (accIter.hasNext()) {\n AccessibilityMember accessor = (AccessibilityMember) accIter.next();\n System.out.println(accessor);\n }\n System.out.println(\"=======================\");\n }\n }", "public void printAnnuaireName() {\n\t\t\n\t}", "@Override\n public String toString() {\n return \"\" + this.getAppearance();\n }", "public void printSummary() {\n\t\tSystem.out.println(MessageFormat.format(\"\\nSummary:\\n Name: {0}\\n Range: 1 to {1}\\n\", this.name, this.numSides));\n\t}", "public void printCurrentBattlers() {\n //System.out.println(\"Char hp: \" + character.getCurrHP());\n System.out.printf(\"battle Allies: \");\n for (MovingEntity e: battleAllies) {\n System.out.printf(\"%s \",e.getID());\n }\n System.out.printf(\"\\n\");\n\n System.out.printf(\"battle Enemies: \");\n for (MovingEntity e: battleEnemies) {\n if (e.getBattleBehaviour() instanceof ZombieBattleBehaviour) {\n System.out.printf(\"Z\");\n }\n System.out.printf(\"%s \",e.getID());\n }\n System.out.printf(\"\\n\");\n }", "public String toDisplay(){\n\t\treturn String.format(\"%s | %c | %.2f | %.2f\",name ,gender ,taxableIncome ,taxAmount);\n\t}", "public int getAdvisorCount();", "public void printByUser() {\r\n TUseStatus useStatus;\r\n\t for (int a=0; a < m_current_resources_count; a++)\r\n\t for (int b=0; b < m_current_users_count; b++) {\r\n\t useStatus = m_associations[a][b];\r\n\t if (useStatus!=null) System.out.println(useStatus.toString()); \r\n\t } \r\n }", "public void displayLable() {\n\t\tSystem.out.println(\"Name of Company :\"+name+ \" Address :\"+address);\r\n\t}", "public String toString() {\n\n return \"Passenger count \" + (this.size()) ;\n }", "private static void printTerrainInfo(ParkerPaulTerrain taxable, int count) {\r\n System.out.printf(\"%1$-25s%2$17.2f%3$10.2f%4$13.3f%5$8d%6$10.2f%n\", count + \" \" + taxable.getDescription(), taxable.getArea(), taxable.getUnitPrice(), taxable.getAgroFraction(), taxable.getNumberOfTrees(), taxable.getTax());\r\n }", "public void showGarage() {\n\t\tSystem.out.println(this);\n\t}", "public void showFacilities() {\r\n\t\tfor(Facility f: facilities.values()) {\r\n\t\t\tSystem.out.println(f.toString());\r\n\t\t}\r\n\t}", "public void printByResource() {\r\n TUseStatus useStatus;\r\n\t for (int b=0; b < m_current_users_count; b++)\r\n\t for (int a=0; a < m_current_resources_count; a++) {\r\n\t useStatus = m_associations[a][b];\r\n\t if (useStatus!=null) System.out.println(useStatus.toString()); \r\n\t } \r\n }", "@Override\r\n\tpublic void alimentar() {\n\t\tSystem.out.print(\" como carne, yummy, yummy\");\r\n\t}", "@Override\n public void showInfo() {\n System.out.println(\"Garage {\");\n System.out.println(\"\\tGarage is \" + (isBig ? \"big\" : \"small\"));\n int i = 0;\n for (T car : carsInGarage) {\n System.out.println(\"\\tCar №\" + i + \": \" + car.getShortInfo());\n i++;\n }\n System.out.println(\"}\");\n }", "public void afficher()\n\t{\n\t\tSystem.out.println(\"Centre du cercle en \" + getPosX() + \", \" + getPosY());\n\t\tSystem.out.println(\"Rayon : \" + getRayon());\n\t}", "public String getCount() {\r\n \t\r\n \tBoolean anyAges = Boolean.FALSE;\r\n \tBoolean anyAssayTypes = Boolean.FALSE;\r\n \tint count = 0;\r\n \t\r\n \tfor (String age: ages) {\r\n \t\tif (age.endsWith(\"ANY\")) {\r\n \t\t\tanyAges = Boolean.TRUE;\r\n \t\t}\r\n \t}\r\n \t\r\n \tfor (String type: assayTypes) {\r\n \t\tif (type.equals(\"ANY\")) {\r\n \t\t\tanyAssayTypes = Boolean.TRUE;\r\n \t\t}\r\n \t}\r\n \t\r\n \t// No Restrictions on Ages or AssayTypes, count everything\r\n \tif (anyAssayTypes && anyAges) {\r\n \tcount = record.getPairs().size(); \t\t\r\n \t}\r\n \t\r\n \t// There are restrictions on ages only, iterate and count appropriately.\r\n \t\r\n \telse if (anyAssayTypes) {\r\n \t\tfor (GxdLitAssayTypeAgePair pair: record.getPairs()) {\r\n \t\t\tfor (String age: ages) {\r\n \t\t\t\tif (pair.getAge().equals(age)) {\r\n \t\t\t\t\tcount ++;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \t// There are restrictions on assayTypes only, iterate and count appropriately.\r\n \t\r\n \telse if (anyAges) {\r\n \t\tfor (GxdLitAssayTypeAgePair pair: record.getPairs()) {\r\n \t\t\tfor (String type: assayTypes) {\r\n \t\t\t\tif (pair.getAssayType().equals(type)) {\r\n \t\t\t\t\tcount ++;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \telse {\r\n \t\tfor (GxdLitAssayTypeAgePair pair: record.getPairs()) {\r\n \t\t\tfor (String type: assayTypes) {\r\n \t\t\t\tfor (String age: ages) {\r\n \t\t\t\t\tif (pair.getAssayType().equals(type) && pair.getAge().equals(age)) {\r\n \t\t\t\t\t\tcount ++;\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n\r\n \treturn \"\" + count;\r\n \t\r\n }", "private String getAmountOfAbsencePerClass(List<String> classNames)\n {\n String stringToPrint = \"\";\n\n for (String name : DifferentClasses)\n {\n if (Collections.frequency(classNames, name) != 0)\n {\n stringToPrint += name + \" (\" + Collections.frequency(classNames, name) + \")\\n\";\n }\n }\n return stringToPrint;\n }", "public static void print(ICalculator calculator){\n System.out.println(calculator.addition\r\n (4.1, calculator.addition\r\n (calculator.multiplication(15,7), calculator.power((28/5),2))));\r\n if (calculator instanceof CalculatorWithCounterDecorator){\r\n System.out.println(((CalculatorWithCounterDecorator) calculator).getCountOperation());\r\n }\r\n }", "public void meny(){\r\n System.out.println(\"\\nMeny\");\r\n System.out.println(\"1. Legg til ny person\");\r\n System.out.println(\"2. Kjop ny DVD\");\r\n System.out.println(\"3. Laan bort DVD\");\r\n System.out.println(\"4. Vis info om valgt person\");\r\n System.out.println(\"5. Vis oversikt over personer\");\r\n System.out.println(\"6. Returner DVD\");\r\n System.out.println(\"7. Avslutt\");\r\n }", "public void printDistance()\n\t{\n\t\tArrayList<Robot> ar=new ArrayList<Robot>();\n\t\tIterator<Robot> it;\n\t\tint i=1;//started index\n\t\t\n\t\tar.addAll(robotHM.values());//adding all\n\t\tCollections.sort(ar, new DistanceCompare());//sort by distance\n\t\tit=ar.iterator();\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\tRobot r=it.next();\n\t\t\tSystem.out.println(i+\". \"+r.getName()+\" distance \"+r.getDistance());\n\t\t\ti++;\n\t\t}\n\t}", "public void displayAllInfo(){\nSystem.out.println(\"Dimensions of the room - length in feet : \" + room.getLengthInFeet() + \" width in feet :\" + room.getWidthInFeet());\nSystem.out.println(\"Price per square foot :\" + pricePerSquareFoot);\nSystem.out.println(\"Total Cost :\" + calculateTotalCost());\n}", "@Override\n public String toString() {\n String returnable = \"\";\n int count = 0;\n int[] localSectors = sectors;\n \n for (int i = 0; i < sectors.length; i++) {\n \n if(count % 20 == 0 && count != 0) {\n returnable += \"\\n\";\n }\n returnable += localSectors[i];\n count++;\n }\n return returnable;\n }", "public static void viewRemainingVaccinations() {\n\r\n System.out.println(\"Number of remaining vaccinations - \" + vaccines);\r\n }", "public void display()\n\t{\n\t\tint [] dateDiff=new int[3];\n\t\tSystem.out.println(\"Name: \"+name);\n\t\tSystem.out.println(\"Date of birth: \"+dob);\n\t\tdateDiff=dob.age();\n\t\tSystem.out.println(\"Age: \"+dateDiff[2]+\" Years \"+dateDiff[1]+\" Months \"+dateDiff[0]+\" Days \");\n\t}", "@Override\r\n\tpublic void display() {\n\t\tSystem.out.println(\"Discount Code: \" + discode);\r\n\t\tSystem.out.println(\"Group Size: \" + groupsize);\r\n\t\t\r\n\t}", "private static void show(Comparable[] a) {\n for (int i = 0; i < a.length; i++) {\n System.out.printf(\"a[%d] = %s\\n\", i + 1, a[i].toString());\n }\n System.out.println();\n }", "public void display(){\r\n System.out.println(\"_____________________valuues of__[th]__constuctor_________________________\");\r\n System.out.println(\"No_of_people = \"+NO_OF_PEOPLE);\r\n System.out.println(\"EVENT_NUBMBER = \"+EVENT_NUMBER);}", "public void display() {System.out.println(skaitlis);}", "public interface Formatter {\n\n\t/**\n\t * Formats alignment list to previously defined location depending \n\t * on concrete implementation.\n\t * @param alignmentList alignment list\n\t */\n\tpublic void format(List<Alignment> alignmentList);\n\n}", "public void showAttributes() {\r\n\t\tSystem.out.println(\"Name : \"+getName());\r\n\t\tSystem.out.println(\"ID : \"+getId());\r\n\t\tSystem.out.println(\"Percentage : \"+getPercentage());\r\n\t\tSystem.out.println(\"Skills : \");\r\n\t\tfor(String skill:getSkills()) {\r\n\t\t\tSystem.out.print(skill+\" \");\r\n\t\t}\r\n\t\t\r\n\t}", "int getNumAns(){\n\t\treturn textOps.size();\n\t}", "public void mostrarAyuda() {\r\n\t\t\r\n\t\tEnum_Instrucciones[] arrayEnumerado;\r\n\t\t\r\n\t\tarrayEnumerado = Enum_Instrucciones.getArrayEnumerados();\r\n\t\t\r\n\t\t// El tamano del array de enumerados es 8.\r\n\t\tfor(int i = 0; i < Enum_Instrucciones.tamanoArrayEnumerados(); i++) {\r\n\t\t\tSystem.out.println(arrayEnumerado[i].getDescripcionOrden());\r\n\t\t}\r\n\t}", "private static <Key extends Comparable<Key>> void show(Key[] a) {\n for (int i = 0; i < a.length; i++) {\n System.out.printf(a[i] + \" \");\n }\n }", "void printtotal(total iTotal)\n {\n System.out.println(iTotal.getClassAcft());\n System.out.println(iTotal.getClassBcft());\n System.out.println(iTotal.getClassCcft());\n System.out.println(iTotal.getClassDcft());\n System.out.println(iTotal.getTCFT());\n System.out.println(iTotal.getTAmount());\n System.out.println(iTotal.getLobs());\n }", "public static void displayOccupancy(Airplane airplane){\n\n int vacant = airplane.getAirplaneSeats().length * airplane.getAirplaneSeats()[0].length; // gets number of seats in an airplane\n int occupied = 0;\n\n System.out.println(\"Airplane Layout:\");\n // System.out.print(\" \");\n System.out.println(\" 1st Class 2nd Class\");\n System.out.print(\" \");\n for(int column = 0; column < airplane.getAirplaneSeats().length; column++){\n if(column == 4)\n System.out.print(\" \");\n System.out.format(\"%3s\", column + 1);\n }\n System.out.println();\n for(int column = 0; column < airplane.getAirplaneSeats()[0].length; column++){\n if(column == 2 || column == 6)\n System.out.println();\n System.out.print((char)(column + 65) + \" \");\n for(int row = 0; row < airplane.getAirplaneSeats().length; row++){\n if(row == 4)\n System.out.print(\" \");\n if(airplane.getAirplaneSeats()[row][column].isVacant)\n System.out.print(\"[ ]\");\n else {\n vacant--;\n occupied++;\n System.out.print(\"[x]\");\n }\n }\n System.out.println();\n }\n System.out.format(\"Seats Vacant: %s | Seats Occupied: %s\\n\", vacant, occupied);\n System.out.println(); // to make newline before prompt again\n }", "@Override\n public void display(){\n System.out.println(\"Student id: \"+getStudentId()+\"\\nName is: \"+getName()+\"\\nAge :\"+getAge()+\"\\nAcademic year: \"+getSchoolYear()\n +\"\\nNationality :\"+getNationality());\n }", "private static void show(Comparable[] a) {\n for (Comparable a1 : a)\n System.out.print(a1 + \" \");\n\n System.out.println();\n }", "@Override\n public void affiche(){\n System.out.println(\"Loup : \\n points de vie : \"+this.ptVie+\"\\n pourcentage d'attaque : \"+this.pourcentageAtt+\n \"\\n dégâts d'attaque : \"+this.degAtt+\"\\n pourcentage de parade :\"+this.pourcentagePar+\n \"\\n position : \"+this.pos.toString());\n\n }", "public String toString(){\r\n String text = String.format(\"%-20s %s %-20s %d\", \"Undergrad Student: \", super.toString(), \"\\n\\tYear level:\", getYearLevel());\r\n return text;\r\n }", "public void displayRelation() {\n System.out.print(this.name + \"(\");\n for (int i = 0; i < attributes.size(); i++) {\n System.out.print(attributes.get(i) + \":\" + domains.get(i));\n // Don't add a comma on the last key, value pair\n if (i < attributes.size() - 1)\n System.out.print(\",\");\n\n }\n System.out.print(\")\");\n System.out.print(\"\\nNumber of Tuples: \" + table.size() + \"\\n\");\n for (Tuple t : table)\n System.out.println(t);\n\n }", "public String toString(){\n return \"NAME: \"+this.name+\" ROLL: \"+this.roll+\" MALE: \"+this.male;\r\n }", "public void summary() {\r\n System.out.println(this.nama + \" usia \" + this.usia + \" tahun bekerja di Perusahaan \" + Employee.perusahaan);\r\n System.out.println(\"Memiliki total gaji \" + (Employee.pendapatan + Employee.lembur));\r\n }", "public void format(List<Alignment> alignmentList);", "int getEducationsCount();", "public void output() {\n System.out.printf(\"Dien tich: %.2f \\n\", getArea());\n System.out.printf(\"Chu vi: %.2f \\n\", getPeripheral());\n }", "protected static void show(Comparable[] a) {\n\t\t\r\n\t\tString retStr = \"\";\r\n\t\tfor(int i=0 ; i< a.length; i++)\r\n\t\t\tretStr+=\" \"+a[i];\r\n\t\t\r\n\t\tSystem.out.println(retStr);\r\n\t\t\r\n\t}", "private void printMarks() {\r\n\r\n System.out.println(\"Marks: \");\r\n for(int i = 0; i < numberOfCourses; i++)\r\n System.out.println(marks[i] + \"%\\t\" + letterGrades[i]);\r\n }", "@Override\n public String toString() {\n\tStringBuilder output = new StringBuilder();\n\tif (ontology != null) {\n\t output.append(\"\\nKnowledgebase Metrics\\nInstances: \")\n\t\t .append(countIndividuals()).append(\"\\nTotal Instances: \")\n\t\t .append(countTotalIndividuals())\n\t\t .append(\"\\nClass Richness: \").append(getClassRichness())\n\t\t .append(\"\\nAverage Population: \")\n\t\t .append(getAveragePopulation())\n\t\t .append(\"\\nInstance Coverage: \")\n\t\t .append(getInstanceCoverage()).append(\"\\n\");\n\t}\n\treturn output.toString();\n }", "@Override\n public void information() {\n System.out.println(\"\");\n System.out.println(\"Dog :\");\n System.out.println(\"Age : \" + getAge());\n System.out.println(\"Name : \" + getName());\n System.out.println(\"\");\n }", "public String toString(){\r\n //Add mammal toString to output\r\n output = super.toString();\r\n output += \"Location = \"+location+\"\\nClassification = \"+classification+\"\\nCoat = \"+coat+\"\\n\";\r\n \r\n //If male add additional output\r\n if(gender == \"Male\"){\r\n output+=\"Male lemur = Non-dominant role\\n\";\r\n }\r\n //If female add additional output\r\n else{\r\n output+=\"Female lemur = Dominant role\\n\";\r\n }\r\n return output;\r\n }", "public int getNumAyuAtracc();", "int getAchieveInfoCount();", "public int printAdjReportToConsole() {\n int result = 0;\n Collection<LinkedList<AdjustmentToSale>> colVal = storageAdjustment.values();\n Iterator<LinkedList<AdjustmentToSale>> itList = colVal.iterator();\n LinkedList<AdjustmentToSale> tempList = null;\n Iterator<AdjustmentToSale> itSales = null;\n AdjustmentToSale tempSale = null;\n while (itList.hasNext()) {\n tempList = itList.next();\n itSales = tempList.iterator();\n while (itSales.hasNext()) {\n tempSale = itSales.next();\n System.out.println(\"REPORT: ADJUSTMENT --->Product: \" + tempSale.getProductType() + \" adjustment value: \"\n + tempSale.getValue() + \" adjustment operator: \"\n + tempSale.getOper().toString());\n result++;\n }\n }\n return result;\n }", "public void printAssistants(Player player);", "private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrlConges.dateToString(dateRef));\n \tlistAffAnn = LRSort.sortedArray(listAffAnn, \n \t\t\tEOAffectationAnnuelle.INDIVIDU_KEY + \".\" + EOIndividu.NOM_KEY);\n \t\n \tEOEditingContext ec = new EOEditingContext();\n \tCngUserInfo ui = new CngUserInfo(new CngDroitBus(ec), new CngPreferenceBus(ec), ec, new Integer(3065));\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"service\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"agent\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"contractuel\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"travaillees\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"conges\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"dues\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"restant\");\n \tsb.append(ConstsPrint.CSV_NEW_LINE);\n \t\n \n \tfor (int i = 0; i < listAffAnn.count(); i++) {\n \t\tEOAffectationAnnuelle itemAffAnn = (EOAffectationAnnuelle) listAffAnn.objectAtIndex(i);\n \t\t//\n \t\tEOEditingContext edc = new EOEditingContext();\n \t\t//\n \t\tNSArray array = EOAffectationAnnuelle.findSortedAffectationsAnnuellesForOidsInContext(\n \t\t\t\tedc, new NSArray(itemAffAnn.oid()));\n \t\t// charger le planning pour forcer le calcul\n \t\tPlanning p = Planning.newPlanning((EOAffectationAnnuelle) array.objectAtIndex(0), ui, dateRef);\n \t\t// quel les contractuels\n \t\t//if (p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())) {\n \t\ttry {p.setType(\"R\");\n \t\tEOCalculAffectationAnnuelle calcul = p.affectationAnnuelle().calculAffAnn(\"R\");\n \t\tint minutesTravaillees3112 = calcul.minutesTravaillees3112().intValue();\n \t\tint minutesConges3112 = calcul.minutesConges3112().intValue();\n \t\t\n \t\t// calcul des minutes dues\n \t\tint minutesDues3112 = /*0*/ 514*60;\n \t\t/*\tNSArray periodes = p.affectationAnnuelle().periodes();\n \t\tfor (int j=0; j<periodes.count(); j++) {\n \t\t\tEOPeriodeAffectationAnnuelle periode = (EOPeriodeAffectationAnnuelle) periodes.objectAtIndex(j);\n \t\tminutesDues3112 += periode.valeurPonderee(p.affectationAnnuelle().minutesDues(), septembre01, decembre31);\n \t\t}*/\n \t\tsb.append(p.affectationAnnuelle().structure().libelleCourt()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().nomComplet()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())?\"O\":\"N\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesConges3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesDues3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112 - minutesConges3112 - minutesDues3112)).append(ConstsPrint.CSV_NEW_LINE);\n \t\tLRLog.log((i+1)+\"/\"+listAffAnn.count() + \" (\" + p.affectationAnnuelle().individu().nomComplet() + \")\");\n \t\t} catch (Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tedc.dispose();\n \t\t//}\n \t}\n \t\n\t\tString fileName = \"/tmp/stat_000_\"+listAffAnn.count()+\".csv\";\n \ttry {\n\t\t\tBufferedWriter fichier = new BufferedWriter(new FileWriter(fileName));\n\t\t\tfichier.write(sb.toString());\n\t\t\tfichier.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tLRLog.log(\"writing \" + fileName);\n\t\t}\n }", "public String printInfo() {\n\t\treturn \"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming Center Information\"+\r\n\t\t\t\t\"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming center Name \\t= \" + centerName +\r\n\t\t\t\t\"\\n Location \\t\\t= \" + location + \r\n\t\t\t\t\"\\n Contact Number \\t= \" + contact+\r\n\t\t\t\t\"\\n Operating hour \\t= \"+ operatingHour+\r\n\t\t\t\t\"\\n Number of Employee \\t= \"+ noOfEmployee+ \" pax\";\r\n\t}", "@Override\r\n\t\tpublic String toString() {\r\n\t\t\t\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\r\n\t\t\tint langCount = 0;\r\n\t\t\tint kmerCount = 0;\r\n\t\t\tSet<Language> keys = getDb().keySet();\r\n\t\t\tfor (Language lang : keys) {\r\n\t\t\t\tlangCount++;\r\n\t\t\t\tsb.append(lang.name() + \"->\\n\");\r\n\t\t\t\t \r\n\t\t\t\t Collection<LanguageEntry> m = new TreeSet<>(getDb().get(lang).values());\r\n\t\t\t\t kmerCount += m.size();\r\n\t\t\t\t for (LanguageEntry le : m) {\r\n\t\t\t\t\t sb.append(\"\\t\" + le + \"\\n\");\r\n\t\t\t\t }\r\n\t\t\t}\r\n\t\t\tsb.append(kmerCount + \" total k-mers in \" + langCount + \" languages\"); \r\n\t\t\treturn sb.toString();\r\n\t\t\t}", "public static void printMeny(){\n\t\tSystem.out.println(\"1. Registrer en person\");\n\t\tSystem.out.println(\"2. Print personen\");\n\t}" ]
[ "0.5678967", "0.5655453", "0.56164885", "0.5604035", "0.55992234", "0.5547602", "0.551712", "0.55054003", "0.54958755", "0.5390515", "0.5390303", "0.5369166", "0.53593", "0.5346417", "0.5331111", "0.53269637", "0.532495", "0.53190184", "0.53050506", "0.5284686", "0.52809715", "0.52782965", "0.5271551", "0.5260966", "0.5248162", "0.52456427", "0.5234037", "0.5232657", "0.52226543", "0.52183986", "0.51960397", "0.5195129", "0.5191833", "0.5191076", "0.5188692", "0.51876205", "0.5186458", "0.51767087", "0.5167841", "0.5164102", "0.51579684", "0.5156989", "0.5154756", "0.5152744", "0.5151896", "0.5138444", "0.5137662", "0.513704", "0.5132727", "0.5131795", "0.5129868", "0.51291084", "0.5123933", "0.51196086", "0.51195806", "0.51150906", "0.51129985", "0.5105835", "0.5089581", "0.50802255", "0.50743145", "0.5060637", "0.5055608", "0.50507283", "0.5043366", "0.5042438", "0.5038754", "0.50352675", "0.5032776", "0.50321215", "0.5031726", "0.5023904", "0.502251", "0.5022028", "0.50183636", "0.50173444", "0.50159466", "0.50126535", "0.50109226", "0.5010615", "0.5010256", "0.5008141", "0.5006988", "0.5006725", "0.50046575", "0.5002949", "0.4995141", "0.49940658", "0.49884617", "0.49828032", "0.49799576", "0.4977438", "0.49725685", "0.49683717", "0.49677995", "0.49672255", "0.49668604", "0.49623337", "0.4956393", "0.49555016", "0.49542886" ]
0.0
-1
methods used to count an object
void incrementCount();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getObjectCount() {\n\t\treturn objects.size(); // Replace with your code\n\t}", "public long count() ;", "public int get_count();", "public void count() {\n\t\talgae = -1;\n\t\tcrab = -1;\n\t\tbigFish = -1;\n\t\tfor(GameObjects o: objects) {\n\t\t\tswitch(o.toString()) {\n\t\t\tcase \"algae\":\n\t\t\t\talgae +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"crab\":\n\t\t\t\tcrab +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"big fish\":\n\t\t\t\tbigFish +=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "protected long getObjectCount() {\r\n return objectCount;\r\n }", "public int count();", "public int count();", "public int count();", "public int count();", "public int getNumObjects(){\n return numObjects;\n }", "public static int numberObjects()\r\n\t{\r\n\t\treturn(no_of_obj);\r\n\t}", "public abstract long count();", "public abstract int count();", "public abstract int count();", "public static int count(final IdentifiedObject object) {\n int c = 0;\n final NameIterator it = new NameIterator(object);\n while (it.hasNext()) {\n it.next();\n c++;\n }\n return c;\n }", "public interface Countable {\n\n\t//methods used to count an object \n\tvoid incrementCount();\n\n\tvoid resetCount();\n\n\tint getCount();\n\n\tString getCountString();\n\n}", "@Override\n public long count();", "long getObjectSize(Object instance);", "Integer count();", "Integer count();", "int countObjectFlowStates();", "@Override\n\tpublic void count() {\n\t\t\n\t}", "public int getObjectCounter() {\n return objectCounter;\n }", "int getAoisCount();", "public static void main(String[] args) {\n int objectCount;\n //Now let create 4 instances of the countable class\n\n Countable obj1 = new Countable();\n Countable obj2 = new Countable();\n Countable obj3 = new Countable();\n Countable obj4 = new Countable();\n\n //Get the number of instances from\n //the class's static field\n\n objectCount = obj1.getInstanceCount(); //Here is the note it does not matter which obj1 or obj2 or obj3 or\n //obj4 assign objectCount. Result will be same\n System.out.println(objectCount + \" instances of the class were created.\");\n\n\n }", "int getInCount();", "long count();", "long count();", "long count();", "long count();", "long count();", "long count();", "long count();", "Long count();", "Long count();", "Long count();", "Long count();", "Long count();", "public int bobCount ();", "int count();", "int count();", "int count();", "int count();", "int count();", "int count();", "@Override\npublic long count() {\n\treturn super.count();\n}", "public int getCount() {\n\t\treturn Dispatch.get(object, \"Count\").getInt();\n\t}", "@DISPID(11) //= 0xb. The runtime will prefer the VTID if present\r\n @VTID(18)\r\n int count();", "int getTotalCount();", "int getInfoCount();", "int getInfoCount();", "int getInfoCount();", "Long getAllCount();", "public int getCount() {\n return objects.size();\n }", "public int numberOfOccorrence();", "@Override\n public long count() {\n return super.doCountAll();\n }", "@Override\n public long count() {\n return super.doCountAll();\n }", "@Override\n public long count() {\n return super.doCountAll();\n }", "int getObjectAnnotationsCount();", "int getObjectAnnotationsCount();", "int findAllCount() ;", "@Override\r\n\tpublic Long count(String hql, Object[] obj) throws Exception {\n\t\tString countHQL = \"select count(*) \";\r\n\t\tif (hql.indexOf(\"count\") >1 ) {\r\n\t\t\tcountHQL=\"\";\r\n\t\t}\r\n\t\tQuery q = this.getcurrentSession()\r\n\t\t\t\t.createQuery(countHQL + hql);\r\n\t\tif (obj != null && obj.length > 0) {\r\n\t\t\tfor (int i = 0; i < obj.length; i++) {\r\n\t\t\t\tq.setParameter(i, obj[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (Long) q.uniqueResult();\r\n\t}", "private Count() {}", "private Count() {}", "@Override\r\n\tpublic long count() {\n\t\treturn 0;\r\n\t}", "public int rodCount ();", "int getPersonInfoCount();", "@Override\n\tpublic int getAvailableCount(Object obj){\n\t\tString name= (String) obj;\n\t\tint counter = 0;\n\t\tsql=\"select count(*) from news_sort where sort_name like ? \";\n\t\tDBUtil db = new DBUtil(sql);\n\t\ttry {\n\t\t\tdb.ps.setString(1, \"%\"+name+\"%\");\n\t\t\trs=db.ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tcounter = rs.getInt(1);\n\t\t\t}\n\t\t\treturn counter;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}db.close();\n\t\t}\n\t\treturn 0;\n\t\t\n\t\t\n\t}", "int getCazuriCount();", "@Override\r\n\t\tpublic int count() {\n\t\t\treturn 0;\r\n\t\t}", "public boolean haveCount () ;", "@Override\n\tpublic int selectCount(Object ob) {\n\n\t\tint res = session.selectOne(\"play.all_count\", ob);\n\n\t\treturn res;\n\t}", "public abstract int getCount();", "public int count() {\n\treturn 1;\n}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "public int count() {\r\n return count;\r\n }", "long getCount();", "long getCount();", "public abstract int getSelfCount();", "int getReaultCount();", "public int count() {\n return count;\n }", "public void addCount()\n {\n \tcount++;\n }", "public void incCount() { }", "public int selectCount(Object[] obj) {\n\t\treturn 0;\n\t}", "int getInstanceCount();", "public int count() {\n return this.count;\n }", "public Long getElementCount();", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "int getDetailsCount();", "int getDetailsCount();", "public void count() {\n APIlib.getInstance().addJSLine(jsBase + \".count();\");\n }" ]
[ "0.7644894", "0.74787104", "0.7383855", "0.73790735", "0.736906", "0.73620325", "0.73620325", "0.73620325", "0.73620325", "0.7281292", "0.7255657", "0.7255038", "0.72200644", "0.72200644", "0.7203153", "0.7195934", "0.71314234", "0.7120492", "0.70666987", "0.70666987", "0.70646554", "0.7019165", "0.7015173", "0.69841194", "0.6983361", "0.6981999", "0.6894779", "0.6894779", "0.6894779", "0.6894779", "0.6894779", "0.6894779", "0.6894779", "0.68641955", "0.68641955", "0.68641955", "0.68641955", "0.68641955", "0.68253374", "0.6820935", "0.6820935", "0.6820935", "0.6820935", "0.6820935", "0.6820935", "0.6796946", "0.6781071", "0.67760336", "0.67677736", "0.6743234", "0.6743234", "0.6743234", "0.6710219", "0.6698201", "0.66976374", "0.66861767", "0.66861767", "0.66861767", "0.6683075", "0.6683075", "0.66741973", "0.66700405", "0.665344", "0.665344", "0.6653154", "0.66477937", "0.6642915", "0.6641617", "0.6631568", "0.6622032", "0.6617184", "0.6617019", "0.6608859", "0.6589569", "0.6582332", "0.6582332", "0.6582332", "0.6582332", "0.6582332", "0.6582332", "0.6582332", "0.6582332", "0.65769345", "0.6574513", "0.6574513", "0.6569433", "0.65533584", "0.65481365", "0.6542633", "0.6534044", "0.6532091", "0.65287656", "0.6527195", "0.65217924", "0.65193087", "0.65193087", "0.65193087", "0.65193087", "0.65054643", "0.65054643", "0.649108" ]
0.0
-1
Abstraction of YANG resolvable information. Abstracted to obtain the information required for linking resolution.
public interface Resolvable { /** * Returns the status of resolution. If completely resolved returns enum * value "RESOLVED", if not returns "UNRESOLVED", in case reference of * grouping/typedef is added to uses/type but it's not resolved * "INTRA_FILE_RESOLVED" is returned. * * @return status of resolution */ ResolvableStatus getResolvableStatus(); /** * Set the status of type/uses resolution. If completely resolved set enum * value "RESOLVED", if not set it to "UNRESOLVED", in case reference of * grouping/typedef is added to uses/type but it's not resolved * "INTRA_FILE_RESOLVED" should be set. * * @param resolvableStatus status of resolution */ void setResolvableStatus(ResolvableStatus resolvableStatus); /** * Resolves the linking. * * @throws DataModelException data model exception */ void resolve() throws DataModelException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Link<T> {\n\n /**\n * Resolve the link and get the underlying object.\n *\n * @return the target of the link, not null\n * @throws DataNotFoundException if the link is not resolved\n */\n T resolve();\n\n /**\n * Get the type of the object that this link targets.\n *\n * @return the type of the object, not null\n */\n Class<T> getTargetType();\n\n // TODO - do we want a method to generate a resolved version of a config object e.g. new ResolvedConfigLink(resolver.resolve())\n}", "public interface ResolvableModelicaNode extends ModelicaNode {\n /**\n * Tries to resolve the <b>declaration</b> of the referenced component.\n */\n ResolutionResult getResolutionCandidates();\n}", "public static interface Resolver {\n\t\t\n\t\t/**\n\t\t * Registers an injection manager with a resolver.\n\t\t * \n\t\t * The resolver can asynchronously update the relation to modify the\n\t\t * binding.\n\t\t * \n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.addTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.removeTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.substituteTarget\n\t\t * \n\t\t */\n\t\tpublic void addInjection(RelationInjectionManager injection);\n\t\t\n\t\t/**\n\t\t * Request to lazily resolve an injection.\n\t\t * \n\t\t * This method is invoked by a injection manager to calculate its initial binding\n\t\t * when it is first accessed.\n\t\t * \n\t\t * The resolver must call back the manager to modify the resolved target.\n\t\t * \n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.addTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.removeTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.substituteTarget\n\t\t * \n\t\t */\n\t\tpublic boolean resolve(RelationInjectionManager injection);\n\t\t\n\t\t/**\n\t\t * Request to remove an injection.\n\t\t * \n\t\t * This method is invoked by a injection manager to signify that the\n\t\t * component wants to force the resolution of the relation the next\n\t\t * access\n\t\t * \n\t\t */\n\t\tpublic boolean unresolve(RelationInjectionManager injection);\n\t\t\n\t}", "public java.lang.Object getResolution() {\n return resolution;\n }", "ResolutionResult getResolutionCandidates();", "protected abstract URL resolve(NamespaceId namesapace, String resource) throws IOException;", "public Resolution linkToOrganization() {\r\n Organization o = this.myIsern.getSingleOrganization(this.linkItem);\r\n if (o == null) {\r\n this.name = this.linkItem;\r\n this.added = false;\r\n return new RedirectResolution(ADD_ORG_PAGE).flash(this);\r\n }\r\n else {\r\n this.name = this.linkItem;\r\n this.type = o.getType();\r\n this.contact = o.getContact();\r\n \r\n this.affiliatedResearchers = \r\n this.converter.listToString(o.getAffiliatedResearchers().getAffiliatedResearcher());\r\n \r\n this.country = o.getCountry();\r\n \r\n this.researchKeywords = \r\n this.converter.listToString(o.getResearchKeywords().getResearchKeyword());\r\n \r\n this.researchDescription = o.getResearchDescription();\r\n this.homePage = o.getHomePage();\r\n \r\n this.edited = false;\r\n this.editing = true;\r\n return new RedirectResolution(EDIT_ORG_PAGE).flash(this);\r\n }\r\n }", "public interface RegistrationDataExtractor {\n\n RegistrationData extractDataFromObjectLinks(Link[] objectLinks, LwM2mVersion lwM2mVersion);\n\n public class RegistrationData {\n private String alternatePath;\n private Set<ContentFormat> supportedContentFormats;\n private Map<Integer, Version> supportedObjects;\n private Set<LwM2mPath> availableInstances;\n\n public String getAlternatePath() {\n return alternatePath;\n }\n\n public void setAlternatePath(String alternatePath) {\n this.alternatePath = alternatePath;\n }\n\n public Set<ContentFormat> getSupportedContentFormats() {\n return supportedContentFormats;\n }\n\n public void setSupportedContentFormats(Set<ContentFormat> supportedContentFormats) {\n this.supportedContentFormats = supportedContentFormats;\n }\n\n public Map<Integer, Version> getSupportedObjects() {\n return supportedObjects;\n }\n\n public void setSupportedObjects(Map<Integer, Version> supportedObjects) {\n this.supportedObjects = supportedObjects;\n }\n\n public Set<LwM2mPath> getAvailableInstances() {\n return availableInstances;\n }\n\n public void setAvailableInstances(Set<LwM2mPath> availableInstances) {\n this.availableInstances = availableInstances;\n }\n }\n}", "public abstract void resolve();", "public Resolution resolve(Constraint localConstraint, LocalNode localModel) throws QueryException {\n // globalize the model\n Node modelNode = globalizeNode(localModel);\n if (!(modelNode instanceof URIReference)) throw new QueryException(\"Unexpected model type in constraint: (\" + modelNode.getClass() + \")\" + modelNode.toString());\n // convert the node to a URIReferenceImpl, which includes the Value interface\n URIReferenceImpl model = makeRefImpl((URIReference)modelNode);\n \n // check if this model is really on a remote server\n URI modelUri = model.getURI();\n testForLocality(modelUri);\n \n Answer ans = getModelSession(modelUri).query(globalizedQuery(localConstraint, model));\n return new AnswerResolution(session, ans, localConstraint);\n }", "private interface CatalogResolver extends URIResolver, EntityResolver {\n @Override\n InputSource resolveEntity(String publicId, String systemId);\n }", "interface Remote<\n SomeRemoteType extends Type<SomeRemoteType, SomeRemoteThing>,\n SomeRemoteThing extends Thing<SomeRemoteThing, SomeRemoteType>>\n extends SchemaConcept.Remote<SomeRemoteType>, Type<SomeRemoteType, SomeRemoteThing> {\n\n //------------------------------------- Modifiers ----------------------------------\n\n /**\n * Changes the Label of this Concept to a new one.\n *\n * @param label The new Label.\n * @return The Concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> label(Label label);\n\n /**\n * Sets the Type to be abstract - which prevents it from having any instances.\n *\n * @param isAbstract Specifies if the concept is to be abstract (true) or not (false).\n * @return The concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> isAbstract(Boolean isAbstract);\n\n /**\n * @param role The Role Type which the instances of this Type are allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> plays(Role role);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked in a strictly one-to-one mapping.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> key(AttributeType<?> attributeType);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> has(AttributeType<?> attributeType);\n\n //------------------------------------- Accessors ---------------------------------\n\n /**\n * @return A list of Role Types which instances of this Type can indirectly play.\n */\n Stream<Role.Remote> playing();\n\n /**\n * @return The AttributeTypes which this Type is linked with.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> attributes();\n\n /**\n * @return The AttributeTypes which this Type is linked with as a key.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> keys();\n\n /**\n * @return All the the super-types of this Type\n */\n @Override\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> sups();\n\n /**\n * Get all indirect sub-types of this type.\n * The indirect sub-types are the type itself and all indirect sub-types of direct sub-types.\n *\n * @return All the indirect sub-types of this Type\n */\n @Override\n @CheckReturnValue\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> subs();\n\n /**\n * Get all indirect instances of this type.\n * The indirect instances are the direct instances and all indirect instances of direct sub-types.\n *\n * @return All the indirect instances of this type.\n */\n @CheckReturnValue\n Stream<? extends Thing.Remote<SomeRemoteThing, SomeRemoteType>> instances();\n\n /**\n * Return if the type is set to abstract.\n * By default, types are not abstract.\n *\n * @return returns true if the type is set to be abstract.\n */\n @CheckReturnValue\n Boolean isAbstract();\n\n //------------------------------------- Other ----------------------------------\n\n /**\n * Removes the ability of this Type to play a specific Role\n *\n * @param role The Role which the Things of this Type should no longer be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unplay(Role role);\n\n /**\n * Removes the ability for Things of this Type to have Attributes of type AttributeType\n *\n * @param attributeType the AttributeType which this Type can no longer have\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unhas(AttributeType<?> attributeType);\n\n /**\n * Removes AttributeType as a key to this Type\n *\n * @param attributeType the AttributeType which this Type can no longer have as a key\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unkey(AttributeType<?> attributeType);\n\n @Deprecated\n @CheckReturnValue\n @Override\n default Type.Remote<SomeRemoteType, SomeRemoteThing> asType() {\n return this;\n }\n\n @Deprecated\n @CheckReturnValue\n @Override\n default boolean isType() {\n return true;\n }\n }", "private static Map<String, Object> parseRelToType(RelToType r) {\n\t\tMap<String, Object> result = new HashMap<>();\n\t\tString clazz = r.getClazz();\n\t\t// System.out.println(\"\\t\\t\\tclazz: \" + clazz);\n\t\tresult.put(\"clazz\", clazz);\n\t\tString scheme = r.getScheme();\n\t\t// System.out.println(\"\\t\\t\\tscheme: \" + scheme);\n\t\tresult.put(\"scheme\", scheme);\n\t\tString type = r.getType();\n\t\t// System.out.println(\"\\t\\t\\ttype: \" + type);\n\t\tresult.put(\"type\", type);\n\t\tString v = r.getValue();\n\t\t// System.out.println(\"\\t\\t\\tv: \" + v);\n\t\tresult.put(\"value\", v);\n\t\treturn result;\n\n\t}", "@iri(\"http://persistent.name/rdf/2010/purl#Domain\")\npublic interface Domain extends Partial {\n\t/** Graph of all domains of this domain (including itself). */\n\t@iri(\"http://persistent.name/rdf/2010/purl#definedBy\")\n\tObject getPurlDefinedBy();\n\t/** Graph of all domains of this domain (including itself). */\n\t@iri(\"http://persistent.name/rdf/2010/purl#definedBy\")\n\tvoid setPurlDefinedBy(Object purlDefinedBy);\n\n\t/** Domains further up in this hierarchy. */\n\t@iri(\"http://persistent.name/rdf/2010/purl#domainOf\")\n\tSet<Domain> getPurlDomainOf();\n\t/** Domains further up in this hierarchy. */\n\t@iri(\"http://persistent.name/rdf/2010/purl#domainOf\")\n\tvoid setPurlDomainOf(Set<? extends Domain> purlDomainOf);\n\n\t/** Number of days between validating resolution of explicit PURL targets. */\n\t@iri(\"http://persistent.name/rdf/2010/purl#max-unresolved-days\")\n\tInteger getPurlMaxUnresolvedDays();\n\t/** Number of days between validating resolution of explicit PURL targets. */\n\t@iri(\"http://persistent.name/rdf/2010/purl#max-unresolved-days\")\n\tvoid setPurlMaxUnresolvedDays(Integer purlMaxUnresolvedDays);\n\n\t/** Graph of all the purls that are part of or belong to this domain (including itself). */\n\t@iri(\"http://persistent.name/rdf/2010/purl#mirroredBy\")\n\tObject getPurlMirroredBy();\n\t/** Graph of all the purls that are part of or belong to this domain (including itself). */\n\t@iri(\"http://persistent.name/rdf/2010/purl#mirroredBy\")\n\tvoid setPurlMirroredBy(Object purlMirroredBy);\n\n\t@iri(\"http://persistent.name/rdf/2010/purl#service\")\n\tSet<Service> getPurlServices();\n\t@iri(\"http://persistent.name/rdf/2010/purl#service\")\n\tvoid setPurlServices(Set<? extends Service> purlServices);\n\n\t/** Graph of all services for all domains of this domain (including itself). */\n\t@iri(\"http://persistent.name/rdf/2010/purl#servicedBy\")\n\tObject getPurlServicedBy();\n\t/** Graph of all services for all domains of this domain (including itself). */\n\t@iri(\"http://persistent.name/rdf/2010/purl#servicedBy\")\n\tvoid setPurlServicedBy(Object purlServicedBy);\n\n\tint countTargets() throws QueryEvaluationException;\n\n\tboolean startResolving() throws QueryEvaluationException;\n\n\tboolean isResolving();\n\n\tboolean stopResolving() throws InterruptedException;\n\n\tvoid validatePURLs(XMLGregorianCalendar before, int min, int max,\n\t\t\tXMLGregorianCalendar today) throws OpenRDFException, IOException;\n\n\tvoid refreshGraphs() throws Exception;\n}", "public interface DataUrl extends DataFact {\n String TYPE_NAME = \"link\";\n\n URL getUrl();\n\n @Override\n String getLabel();\n\n @Override\n boolean hasData(DataValidator dataValidator);\n}", "NamedLinkDescriptor createNamedLinkDescriptor();", "public Content getLink(LinkInfo linkInfo) {\n if (linkInfo.type != null) {\n SimpleTypeVisitor14<Content, LinkInfo> linkVisitor = new SimpleTypeVisitor14<>() {\n\n final Content link = newContent();\n\n // handles primitives, no types and error types\n @Override\n protected Content defaultAction(TypeMirror type, LinkInfo linkInfo) {\n link.add(utils.getTypeName(type, false));\n return link;\n }\n\n int currentDepth = 0;\n @Override\n public Content visitArray(ArrayType type, LinkInfo linkInfo) {\n // keep track of the dimension depth and replace the last dimension\n // specifier with varargs, when the stack is fully unwound.\n currentDepth++;\n linkInfo.type = type.getComponentType();\n visit(linkInfo.type, linkInfo);\n currentDepth--;\n if (utils.isAnnotated(type)) {\n linkInfo.type = type;\n link.add(\" \");\n link.add(getTypeAnnotationLinks(linkInfo));\n }\n // use vararg if required\n if (linkInfo.isVarArg && currentDepth == 0) {\n link.add(\"...\");\n } else {\n link.add(\"[]\");\n }\n return link;\n }\n\n @Override\n public Content visitWildcard(WildcardType type, LinkInfo linkInfo) {\n link.add(getTypeAnnotationLinks(linkInfo));\n link.add(\"?\");\n TypeMirror extendsBound = type.getExtendsBound();\n if (extendsBound != null) {\n link.add(\" extends \");\n setBoundsLinkInfo(linkInfo, extendsBound);\n link.add(getLink(linkInfo));\n }\n TypeMirror superBound = type.getSuperBound();\n if (superBound != null) {\n link.add(\" super \");\n setBoundsLinkInfo(linkInfo, superBound);\n link.add(getLink(linkInfo));\n }\n return link;\n }\n\n @Override\n public Content visitTypeVariable(TypeVariable type, LinkInfo linkInfo) {\n link.add(getTypeAnnotationLinks(linkInfo));\n TypeVariable typevariable = (utils.isArrayType(type))\n ? (TypeVariable) utils.getComponentType(type)\n : type;\n Element owner = typevariable.asElement().getEnclosingElement();\n if (!linkInfo.excludeTypeParameterLinks && utils.isTypeElement(owner)) {\n linkInfo.typeElement = (TypeElement) owner;\n Content label = newContent();\n label.add(utils.getTypeName(type, false));\n linkInfo.label = label;\n linkInfo.skipPreview = true;\n link.add(getClassLink(linkInfo));\n } else {\n // No need to link method type parameters.\n link.add(utils.getTypeName(typevariable, false));\n }\n\n if (!linkInfo.excludeTypeBounds) {\n linkInfo.excludeTypeBounds = true;\n TypeParameterElement tpe = ((TypeParameterElement) typevariable.asElement());\n boolean more = false;\n List<? extends TypeMirror> bounds = utils.getBounds(tpe);\n for (TypeMirror bound : bounds) {\n // we get everything as extends java.lang.Object we suppress\n // all of them except those that have multiple extends\n if (bounds.size() == 1 &&\n bound.equals(utils.getObjectType()) &&\n !utils.isAnnotated(bound)) {\n continue;\n }\n link.add(more ? \" & \" : \" extends \");\n setBoundsLinkInfo(linkInfo, bound);\n link.add(getLink(linkInfo));\n more = true;\n }\n }\n return link;\n }\n\n @Override\n public Content visitDeclared(DeclaredType type, LinkInfo linkInfo) {\n TypeMirror enc = type.getEnclosingType();\n if (enc instanceof DeclaredType dt && utils.isGenericType(dt)) {\n // If an enclosing type has type parameters render them as separate links as\n // otherwise this information is lost. On the other hand, plain enclosing types\n // are not linked separately as they are easy to reach from the nested type.\n setEnclosingTypeLinkInfo(linkInfo, dt);\n visitDeclared(dt, linkInfo);\n link.add(\".\");\n setEnclosingTypeLinkInfo(linkInfo, type);\n }\n link.add(getTypeAnnotationLinks(linkInfo));\n linkInfo.typeElement = utils.asTypeElement(type);\n link.add(getClassLink(linkInfo));\n if (linkInfo.includeTypeParameterLinks()) {\n link.add(getTypeParameterLinks(linkInfo));\n }\n return link;\n }\n };\n return linkVisitor.visit(linkInfo.type, linkInfo);\n } else if (linkInfo.typeElement != null) {\n Content link = newContent();\n link.add(getClassLink(linkInfo));\n if (linkInfo.includeTypeParameterLinks()) {\n link.add(getTypeParameterLinks(linkInfo));\n }\n return link;\n } else {\n return null;\n }\n }", "public PaResolucion getPaResolucion(Integer resolucionId) throws Exception;", "protected abstract Content getTypeParameterLinks(LinkInfo linkInfo);", "public interface LinkOpt extends Link {\n\n}", "public ResultMap<BaseNode> listRelatives(QName type, Direction direction);", "public abstract String resolve();", "@NonNullByDefault\npublic interface ILinkingCandidate {\n\n\t/**\n\t * Apply this candidate to the current computation state model. This propagates\n\t * the type information about arguments and child expressions to the\n\t * currently active resolution state.\n\t */\n\tvoid applyToComputationState();\n\t\n\t/**\n\t * Injects the resolved feature into the model with the same semantics as the implicit\n\t * {@link EcoreUtil#resolve(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject) resolve}\n\t * of EMF. This implies that the linked feature call may still point to a proxy afterwards.\n\t */\n\tvoid applyToModel();\n\t\n\t// TODO we should use a smarter acceptor here\n\t// e.g. it should be possible to suppress diagnostics for children of certain expresions\n\t// and therefore it should expose something like 'isSuppressed()'\n\t/**\n\t * Produce diagnostics for this condidate. It is not the responsibility of this\n\t * candidate to propagate the acceptor to its children.\n\t * @return <code>true</code> if further validation should be performed.\n\t */\n\tboolean validate(IAcceptor<? super AbstractDiagnostic> result);\n\t\n\t/**\n\t * Produces the best candidate for the current two candidates. It may turn out\n\t * that both candidates (<code>this</code> and <code>other</code>) are ambiguous \n\t * so no prefered candidate can be chosen. In that case, a new linking candidate\n\t * may be produced that carries this information and will use that on {@link #applyToComputationState()},\n\t * {@link #applyToModel()}, and {@link #validate(IAcceptor)}.\n\t */\n\tILinkingCandidate getPreferredCandidate(ILinkingCandidate other);\n\t\n\t/**\n\t * The currently considered feature (if any). Otherwise <code>null</code>.\n\t */\n\t@Nullable JvmIdentifiableElement getFeature();\n\t\n\t/**\n\t * The current expression that shall be linked.\n\t */\n\tXExpression getExpression();\n\t\n\t/**\n\t * The resolved type arguments.\n\t */\n\tList<LightweightTypeReference> getTypeArguments();\n\n}", "public interface LookupConstraint {\n}", "public ResolutionTypeElements getResolutionTypeAccess() {\n\t\treturn eResolutionType;\n\t}", "public interface UnknownNameReferenceResolver<R, I extends IndexAddressable.NamedIndexAddressable<N>, N extends NamedSemanticRegion<T>, T extends Enum<T>> {\n\n <X> X resolve(Extraction extraction, UnknownNameReference<T> ref, ResolutionConsumer<R, I, N, T, X> c) throws IOException;\n\n default <X> Map<UnknownNameReference<T>, X> resolveAll(Extraction extraction,\n SemanticRegions<UnknownNameReference<T>> refs,\n ResolutionConsumer<R, I, N, T, X> c) throws IOException {\n Map<UnknownNameReference<T>, X> result = new HashMap<>();\n for (SemanticRegion<UnknownNameReference<T>> unk : refs) {\n X item = resolve(extraction, unk.key(), c);\n if (item != null) {\n result.put(unk.key(), item);\n }\n }\n return result;\n }\n\n Class<T> type();\n}", "interface LinkDataSources extends LinkApi {\r\n}", "public ResultMap<BaseNode> queryRelatives(QName type, Direction direction, ObjectNode query);", "@Override\r\n\tprotected void doResolve() {\n\r\n\t}", "@Transient\r\n\tpublic Map<String, Object> getLookups() {\r\n\t\tMap<String,Object> map = new HashMap<String,Object>();\r\n map.put(ICommercialAlias.TARGET_REGISTRY_ID, getId());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_DOCUMENT, getRegistry().getDocument());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_NAME, getRegistry().getName());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_SURNAME, getRegistry().getSurname());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_ALIAS, getRegistry().getAlias());\r\n return map;\r\n\t}", "public interface LookupConstraint {\n\n /**\n * @param lookedUpNodes A set of unique string representations of the nodes discovered\n * @return True if after the recent node discovery, the lookup should be ended.\n */\n boolean isLookupEnded(final Set<String> lookedUpNodes);\n\n}", "@JsonProperty(\"rel\")\n public Link.Rel getRel() {\n return rel;\n }", "void resolve();", "@DISPID(1610940428) //= 0x6005000c. The runtime will prefer the VTID if present\n @VTID(34)\n Relations relations();", "HxType createReference(final HxType resolvedType);", "public interface RuleRefableBase extends org.semanticwb.model.Referensable\r\n{\r\n /**\r\n * Referencia a un objeto de tipo Rule \r\n */\r\n public static final org.semanticwb.platform.SemanticClass swb_RuleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticClass(\"http://www.semanticwebbuilder.org/swb4/ontology#RuleRef\");\r\n public static final org.semanticwb.platform.SemanticProperty swb_hasRuleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticProperty(\"http://www.semanticwebbuilder.org/swb4/ontology#hasRuleRef\");\r\n public static final org.semanticwb.platform.SemanticProperty swb_notInheritRuleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticProperty(\"http://www.semanticwebbuilder.org/swb4/ontology#notInheritRuleRef\");\r\n public static final org.semanticwb.platform.SemanticProperty swb_andEvalRuleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticProperty(\"http://www.semanticwebbuilder.org/swb4/ontology#andEvalRuleRef\");\r\n /**\r\n * Interfaz que define propiedades para elementos que pueden referencia a reglas \r\n */\r\n public static final org.semanticwb.platform.SemanticClass swb_RuleRefable=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticClass(\"http://www.semanticwebbuilder.org/swb4/ontology#RuleRefable\");\r\n\r\n public org.semanticwb.model.GenericIterator<org.semanticwb.model.RuleRef> listRuleRefs();\r\n public boolean hasRuleRef(org.semanticwb.model.RuleRef value);\r\n public org.semanticwb.model.GenericIterator<org.semanticwb.model.RuleRef> listInheritRuleRefs();\r\n\r\n /**\r\n * Adds the RuleRef\r\n * @param value An instance of org.semanticwb.model.RuleRef\r\n */\r\n public void addRuleRef(org.semanticwb.model.RuleRef value);\r\n\r\n /**\r\n * Remove all the values for the property RuleRef\r\n */\r\n public void removeAllRuleRef();\r\n\r\n /**\r\n * Remove a value from the property RuleRef\r\n * @param value An instance of org.semanticwb.model.RuleRef\r\n */\r\n public void removeRuleRef(org.semanticwb.model.RuleRef value);\r\n\r\n/**\r\n* Gets the RuleRef\r\n* @return a instance of org.semanticwb.model.RuleRef\r\n*/\r\n public org.semanticwb.model.RuleRef getRuleRef();\r\n\r\n public boolean isNotInheritRuleRef();\r\n\r\n public void setNotInheritRuleRef(boolean value);\r\n\r\n public boolean isAndEvalRuleRef();\r\n\r\n public void setAndEvalRuleRef(boolean value);\r\n}", "public interface LinkOrResource {\n\n\tHalLink asLink();\n\n\tdefault Optional<HalResource> asResource(){\n\t\tif(this instanceof HalResource){\n\t\t\treturn Optional.of((HalResource) this);\n\t\t}else\n\t\t\treturn Optional.empty();\n\t}\n}", "public abstract Content getTypeAnnotationLinks(LinkInfo linkInfo);", "@Iri(\"http://www.w3.org/ns/ldp#DirectContainer\")\npublic interface LdpDirectContainer extends LdpContainer {\n\n\t/**\n\t * Denote the LDPC's membership-constant-URI\n\t *\n\t * @see https://www.w3.org/TR/ldp/#ldpdc section 5.4.1.3\n\t */\n\t@Iri(\"http://www.w3.org/ns/ldp#membershipResource\")\n\tLdpResource membershipResource();\n\n\tvoid membershipResource(LdpResource ldpr);\n\n\t/**\n\t * Membership predicate used to express which member resources this container\n\t * has, results in the membership triple pattern:\n\t * <p>\n\t * (membership-constant-URI, ${membership-predicate}, member-derived-URI)\n\t * <p>\n\t * <b>ATTENTION:</b> <em>EITHER</em> this <em>OR</em> isMemberOfRelation can be\n\t * used.\n\t *\n\t * @see https://www.w3.org/TR/ldp/#ldpdc section 5.4.1.4.1\n\t */\n\t@Iri(\"http://www.w3.org/ns/ldp#hasMemberRelation\")\n\tProperty hasMemberRelation();\n\n\tvoid hasMemberRelation(Property hasMemberRelation);\n\n\t/**\n\t * Membership predicate used to express which resources are members of this\n\t * container, results in the membership triple pattern:\n\t * <p>\n\t * (membership-derived-URI, ${membership-predicate}, member-constant-URI)\n\t * <p>\n\t * <b>ATTENTION:</b> <em>EITHER</em> this <em>OR</em> hasMemberRelation can be\n\t * used.\n\t *\n\t * @see https://www.w3.org/TR/ldp/#ldpdc section 5.4.1.4.2\n\t */\n\t@Iri(\"http://www.w3.org/ns/ldp#isMemberOfRelation\")\n\tProperty isMemberOfRelation();\n\n\tvoid isMemberOfRelation(Property isMemberOfRelation);\n\n}", "public interface IRelationship<A extends IAttribute> extends IErdNode\n{\n\n /**\n * check the relationship, if the two connected entities are the same\n *\n * @return recursive\n */\n boolean isRecursive();\n\n /**\n * check if this relationship is a weak relationship\n * -> one of the entities is weak\n *\n * @return weak\n */\n boolean isWeakRelationship();\n\n /**\n * return the description of the relationship\n *\n * @return description\n */\n String getDescription();\n\n /**\n * create new attribute to relationship\n *\n * @param p_id name of the attribute\n * @param p_property of the attribute\n * @return self-reference\n */\n A createAttribute( @NonNull final String p_id, @Nonnull final String p_property );\n\n /**\n * get all connected attributes from the relationship in a map\n *\n * @return map with all attributes\n */\n Map<String, IAttribute> getConnectedAttributes();\n\n /**\n * connect entity incl. cardinality to the relationship\n *\n * @param p_entity name of the entity\n * @param p_cardinality cardinality\n * @return self-reference\n */\n IEntity<A> connectEntity( @NonNull final IEntity<IAttribute> p_entity, @NonNull final String p_cardinality );\n\n /**\n * return the connected entities in a map\n *\n * @return connected entities\n */\n Map<String, Collection<String>> getConnectedEntities();\n\n}", "@Override\n public abstract boolean needsResolving();", "public ResultMap<BaseNode> listRelatives(QName type, Direction direction, Pagination pagination);", "void resolveRefs(SymbolTable symbolTable)\n {\n \tEnumeration e = defs.elements();\n\twhile (e.hasMoreElements())\n\t{\n\t Definition d=(Definition) e.nextElement();\n d.resolveRefs(symbolTable); \n\t}\n }", "protected abstract Content getClassLink(LinkInfo linkInfo);", "public interface Facet extends Linkable {\r\n public String getId();\r\n public String getLabel();\r\n public List<FacetValue> getValues();\r\n}", "public ResultMap<BaseNode> queryRelatives(QName type, Direction direction, ObjectNode query, Pagination pagination);", "public void resolveReferences(SchemaDefinition sd, DmcNameClashResolverIF clashResolver) throws ResultException, DmcNameClashException, DmcValueException {\n\n \tIterator<AttributeDefinition> preadl = sd.getAttributeDefList();\n \tif (preadl != null){\n \t\twhile(preadl.hasNext()){\n \t\t\tAttributeDefinition d = preadl.next();\n \t\t\ttry {\n\t\t\t\t\td.resolveReferences(this,clashResolver);\n\t\t\t\t} catch (DmcValueExceptionSet e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n \t\t}\n \t}\n \t\n \tIterator<ComplexTypeDefinition> ctdl = sd.getComplexTypeDefList();\n \tif (ctdl != null){\n \t\twhile(ctdl.hasNext()){\n \t\t\tComplexTypeDefinition ctd = ctdl.next();\n \t\t\t\n \t\t\t// And finally, the complex type def has to have it object class resolved so that\n \t\t\t// we don't run into problems later when generating the DMW schema\n \t\t\ttry {\n\t\t\t\t\tctd.resolveReferences(this,clashResolver);\n\t\t\t\t} catch (DmcValueExceptionSet e) {\n\t\t\t\t\tResultException ex = new ResultException();\n\t\t\t\t\tex.addError(e.toString());\n\t\t\t\t\tex.result.lastResult().fileName(ctd.getFile());\n\t\t\t\t\tex.result.lastResult().lineNumber(ctd.getLineNumber());\n\t\t\t\t\tthrow(ex);\n\t\t\t\t}\n \t\t}\n \t}\n \t\n \t// And more of the same kind of magic with extended references types - we have to\n \t// preresolve the type references in the same way as with attributes\n \tIterator<ExtendedReferenceTypeDefinition> ertdl = sd.getExtendedReferenceTypeDefList();\n \tif (ertdl != null){\n \t\twhile(ertdl.hasNext()){\n \t\t\tExtendedReferenceTypeDefinition ertd = ertdl.next();\n \t\t\t\n \t\t\ttry {\n\t\t\t\t\tertd.resolveReferences(this, clashResolver);\n\t\t\t\t} catch (DmcValueExceptionSet e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n \t\t\t\n \t\t\t// TODO: need a rule for this\n\t\t\t\tif (ertd.getExtendedReferenceClass().getIsNamedBy() == null){\n\t\t\t\t\tResultException ex = new ResultException();\n\t\t\t\t\tex.addError(\"The class: \" + ertd.getExtendedReferenceClass().getObjectName().getNameString() + \" referred to in ExtendedReferenceTypeDefinition \" + ertd.getName() + \" is not a named object.\");\n\t\t\t\t\tex.result.lastResult().fileName(ertd.getFile());\n\t\t\t\t\tex.result.lastResult().lineNumber(ertd.getLineNumber());\n\t\t\t\t\tthrow(ex);\n\t\t\t\t}\n \t\t}\n \t}\n \t\n \tIterator<ActionDefinition> actdl = sd.getActionDefList();\n \tif (actdl != null){\n \t\twhile(actdl.hasNext()){\n \t\t\tActionDefinition d = actdl.next();\n \t\t\ttry {\n\t\t\t\t\td.resolveReferences(this,clashResolver);\n\t\t\t\t} catch (DmcValueExceptionSet e) {\n\t\t\t\t\tResultException ex = new ResultException();\n\t\t\t\t\tex.addError(\"Unresolved references in ActionDefinition: \" + d.getName());\n\t\t\t\t\tex.setLocationInfo(d.getFile(), d.getLineNumber());\n\t\t\t\t\t\n\t\t\t\t\tfor(DmcValueException dve : e.getExceptions()){\n\t\t\t\t\t\tex.moreMessages(dve.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\tthrow(ex);\n\t\t\t\t}\n \t\t}\n \t}\n \t\n \tIterator<AttributeDefinition> adl = sd.getAttributeDefList();\n \tif (adl != null){\n \t\twhile(adl.hasNext()){\n \t\t\tAttributeDefinition d = adl.next();\n \t\t\t\n \t\t\ttry {\n\t\t\t\t\td.resolveReferences(this,clashResolver);\n\t\t\t\t} catch (DmcValueExceptionSet e) {\n\t\t\t\t\tResultException ex = new ResultException();\n\t\t\t\t\tex.addError(\"Unresolved references in AttributeDefinition: \" + d.getName());\n\t\t\t\t\tex.setLocationInfo(d.getFile(), d.getLineNumber());\n\t\t\t\t\t\n\t\t\t\t\tfor(DmcValueException dve : e.getExceptions()){\n\t\t\t\t\t\tex.moreMessages(dve.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\tthrow(ex);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// TODO: MAKE THIS A RULE\n\t\t if ( (d.getValueType() == ValueTypeEnum.HASHMAPPED) || (d.getValueType() == ValueTypeEnum.TREEMAPPED)){\n\t\t \tif (d.getType().getKeyClass() == null){\n\t\t \t\tif (d.getType().getIsRefType()){\n\t\t \t\t\tif (d.getType().getIsExtendedRefType()){\n\t\t\t\t\t\t\t\tResultException ex = new ResultException();\n\t\t\t\t\t\t\t\tex.addError(\"AttributeDefinition: \" + d.getName() + \" cannot have valueType HASHMAPPED/TREEMAPPED since extended reference types are not keyed.\");\n\t\t\t\t\t\t\t\tex.setLocationInfo(d.getFile(), d.getLineNumber());\n\t\t\t\t \t\tthrow(ex);\n\t\t \t\t\t}\n\t\t \t\t\tif (d.getType().getOriginalClass().getIsNamedBy() == null){\n\t\t\t\t\t\t\t\tResultException ex = new ResultException();\n\t\t\t\t\t\t\t\tex.addError(\"AttributeDefinition: \" + d.getName() + \" cannot have valueType HASHMAPPED/TREEMAPPED since the \" + d.getType().getName() + \" type does not refer to a named object.\");\n\t\t\t\t\t\t\t\tex.setLocationInfo(d.getFile(), d.getLineNumber());\n\t\t\t\t \t\tthrow(ex);\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t\telse{\n\t\t\t\t\t\t\tResultException ex = new ResultException();\n\t\t\t\t\t\t\tex.addError(\"AttributeDefinition: \" + d.getName() + \" cannot have valueType HASHMAPPED/TREEMAPPED since the \" + d.getType().getName() + \" type does not have a specified keyClass.\");\n\t\t\t\t\t\t\tex.setLocationInfo(d.getFile(), d.getLineNumber());\n\t\t\t \t\tthrow(ex);\n\t\t \t\t}\n\t\t \t}\n\t\t }\n \t\t}\n \t}\n \t\n \tIterator<ClassDefinition> cdl = sd.getClassDefList();\n \tif (cdl != null){\n \t\twhile(cdl.hasNext()){\n \t\t\tClassDefinition d = cdl.next();\n \t\t\ttry {\n\t\t\t\t\td.resolveReferences(this,clashResolver);\n\t\t\t\t\t\n\t\t\t\t\t// TODO: MAKE THIS A RULE\n\t\t if (d.getAllowedParentsSize() > 0){\n\t\t \t// The name must be hierarchic\n\t\t \tif (d.getIsNamedBy() == null){\n\t\t \t\t\tResultException ex = new ResultException();\n\t\t \t\t\tex.addError(\"The following class indicates that it has allowed parents, but isn't a named object: \" + d.getName());\n\t\t \t\tthrow(ex);\n\t\t \t}\n\t\t \tif (!d.getIsNamedBy().getType().getIsHierarchicName()){\n\t\t \t\t\tResultException ex = new ResultException();\n\t\t \t\t\tex.addError(\"The following class indicates that it has allowed parents, but its naming attribute isn't heirarchic: \" + d.getName());\n\t\t \t\t\tex.result.lastResult().moreMessages(\"isNamedBy: \" + d.getIsNamedBy().getName());\n\t\t \t\tthrow(ex);\n\t\t \t}\n\t\t }\n\n\t\t\t\t} catch (DmcValueExceptionSet e) {\n\t\t\t\t\tResultException ex = new ResultException();\n\t\t\t\t\tex.addError(\"Unresolved references in ClassDefinition: \" + d.getName());\n\t\t\t\t\tex.setLocationInfo(d.getFile(), d.getLineNumber());\n\t\t\t\t\t\n\t\t\t\t\tfor(DmcValueException dve : e.getExceptions()){\n\t\t\t\t\t\tex.moreMessages(dve.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\tthrow(ex);\n\t\t\t\t}\n \t\t}\n\n\n \t}\n \t\n \tIterator<EnumDefinition> edl = sd.getEnumDefList();\n \tif (edl != null){\n \t\twhile(edl.hasNext()){\n \t\t\tEnumDefinition d = edl.next();\n \t\t\ttry {\n \t\t\t\td.resolveReferences(this,clashResolver);\n\t\t\t\t} catch (DmcValueExceptionSet e) {\n\t\t\t\t\tResultException ex = new ResultException();\n\t\t\t\t\tex.addError(\"Unresolved references in EnumDefinition: \" + d.getName());\n\t\t\t\t\tex.setLocationInfo(d.getFile(), d.getLineNumber());\n\t\t\t\t\t\n\t\t\t\t\tfor(DmcValueException dve : e.getExceptions()){\n\t\t\t\t\t\tex.moreMessages(dve.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\tthrow(ex);\n\t\t\t\t}\n \t\t}\n \t}\n \t\n \tIterator<TypeDefinition> tdl = sd.getTypeDefList();\n \tif (tdl != null){\n \t\twhile(tdl.hasNext()){\n \t\t\tTypeDefinition d = tdl.next();\n \t\t\ttry {\n \t\t\t\td.resolveReferences(this,clashResolver);\n\t\t\t\t} catch (DmcValueExceptionSet e) {\n\t\t\t\t\tResultException ex = new ResultException();\n\t\t\t\t\tex.addError(\"Unresolved references in TypeDefinition: \" + d.getName());\n\t\t\t\t\tex.setLocationInfo(d.getFile(), d.getLineNumber());\n\t\t\t\t\t\n\t\t\t\t\tfor(DmcValueException dve : e.getExceptions()){\n\t\t\t\t\t\tex.moreMessages(dve.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\tthrow(ex);\n\t\t\t\t}\n \t\t}\n \t}\n \t \t\n \tIterator<SliceDefinition> sdl = sd.getSliceDefList();\n \tif (sdl != null){\n \t\twhile(sdl.hasNext()){\n \t\t\tSliceDefinition s = sdl.next();\n \t\t\ttry {\n \t\t\t\ts.resolveReferences(this,clashResolver);\n\t\t\t\t} catch (DmcValueExceptionSet e) {\n\t\t\t\t\tResultException ex = new ResultException();\n\t\t\t\t\tex.addError(\"Unresolved references in SliceDefinition: \" + s.getName());\n\t\t\t\t\tex.setLocationInfo(s.getFile(), s.getLineNumber());\n\t\t\t\t\t\n\t\t\t\t\tfor(DmcValueException dve : e.getExceptions()){\n\t\t\t\t\t\tex.moreMessages(dve.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\tthrow(ex);\n\t\t\t\t}\n \t\t}\n \t}\n \t\n \tTreeMap<RuleName,RuleIF> theRules = sd.getRuleInstances(this);\n \tfor(RuleIF rule: theRules.values()){\n \t\ttry {\n \t\t\tif (rule.getRuleDataDMO().getRuleName().equals(\"dmvRRRApplyToAttribute\"))\n \t\t\t\tDebugInfo.debug(\"HERE\");\n\t\t\t\trule.getRuleDataDMO().resolveReferences(this, clashResolver);\n\t\t\t} catch (DmcValueExceptionSet e) {\n\t\t\t\tResultException ex = new ResultException();\n\t\t\t\tex.addError(\"Unresolved references in rule data: \" + rule.getRuleDataDMO().getRuleName());\n//\t\t\t\tex.setLocationInfo(s.getFile(), s.getLineNumber());\n\t\t\t\t\n\t\t\t\tfor(DmcValueException dve : e.getExceptions()){\n\t\t\t\t\tex.moreMessages(dve.getMessage());\n\t\t\t\t}\n\t\t\t\tthrow(ex);\n\t\t\t}\n \t}\n \tsd.setResolvedRules(theRules);\n \t\n \t///////////////////////////////////////////////////////////////////////\n \t// Some additional work required to allow for name clash resolution\n \t// mechanisms in auto generated definition managers. All structural \n \t// DSDefinition derived classes must have a standard mechanism to get\n \t// the name of the module from which they were loaded. In order to\n \t// do this, we have to know the DSDModule with which they are associated\n \t// so that we can get the definedInModuleAttribute. Tricky!\n \t// We find the base definition for the module and then add the partOfDefinitionModule\n \t// attribute so that we can use this information in the DMWGenerator later.\n \tif (sd.isGeneratedSchema() == false){\n \t\t// TODO: the module definitions need to be added to the schema - boy I wish\n \t\t// I had the infrastructure for schemas that I do for other DSDs!\n\t \tcdl = sd.getClassDefList();\n\t \tif (cdl != null){\n\t \t\twhile(cdl.hasNext()){\n\t \t\t\tClassDefinition cd = cdl.next();\n\t \t\t\tif (cd.getDsdModuleDefinition() != null){\n\t \t\t\t\t// This is the base class definition that represents the module\n\t \t\t\t\tClassDefinition base = (ClassDefinition) cd.getDsdModuleDefinition().getBaseDefinition();\n\t \t\t\t\tbase.setPartOfDefinitionModule(cd.getDsdModuleDefinition());\n\t \t\t\t\t\n\t \t\t\t\tTreeMap<DefinitionName,ClassDefinition> derived = base.getAllDerived();\n\t \t\t\t\tfor(ClassDefinition d: derived.values()){\n\t \t\t\t\t\td.setPartOfDefinitionModule(cd.getDsdModuleDefinition());\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n\t \t}\n \t}\n \t\n }", "@Override\n\tprotected void retractResolverSub(ConstraintNetwork metaVariable,\n\t\t\tConstraintNetwork metaValue) {\n\t\t\n\t}", "public void setResolution(java.lang.Object resolution) {\n this.resolution = resolution;\n }", "private RequirementLink parseAttackModelLinkInfo(List<String> factors) {\n\t\t// obtain the elements of the link.\n\t\tElement source = findElementById(factors.get(4));\n\t\tElement target = findElementById(factors.get(5));\n\t\tif (target == null || source == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\t/*\n\t\t * this part is exclusively for requirement elements 0)link; 1)id,51690 2)arrow type,StickArrow; 3)line type, curved; 4)source/tail,51670; 5)destination/head,51490;\n\t\t * 6)label,NoLabel;(The shape of that label is not considered, only the content of that label) 7)dash type,0; 8)thickness,1.0; 9)head scale,1.0 10) layer, Layer 1\n\t\t */\n\t\t// first assign basic information to the link\n\t\tRequirementLink new_link = new RequirementLink();\n\t\tnew_link.setId(factors.get(1));\n\t\tnew_link.setSource(source);\n\t\tnew_link.setTarget(target);\n\t\tsource.getOutLinks().add(new_link);\n\t\ttarget.getInLinks().add(new_link);\n\n\t\t// identify the type of the link. Here we roughly have them as either \"refine\" or \"and-refine\" for simplification, facilitating the intended analysis.\n\t\t// refine\n\t\tif ((factors.get(2).equals(\"SharpArrow\") || factors.get(2).equals(\"StickArrow\") || factors.get(2).equals(\"Arrow\"))\n\t\t\t\t& !new_link.getSource().getType().equals(InfoEnum.RequirementElementType.MIDDLE_POINT.name())) {\n\t\t\tnew_link.setType(InfoEnum.RequirementLinkType.REFINE.name());\n\t\t\t// the target of this link should update the \"refine_links\" information as well\n\t\t\tnew_link.getTarget().refine_links.add(new_link);\n\t\t}\n\t\t// for all and-refine links, the corresponding information should be updated after re-processing the elements\n\t\t// and refine - main\n\t\telse if (factors.get(2).equals(\"SharpArrow\") & new_link.getSource().getType().equals(InfoEnum.RequirementElementType.MIDDLE_POINT.name())) {\n\t\t\tnew_link.setType(InfoEnum.RequirementLinkType.AND_REFINE_ARROW.name());\n\t\t\t// mark as redundant\n\t\t\tnew_link.setRemark(InfoEnum.LinkRemark.REDUNDANT.name());\n\t\t}\n\t\t// and refine - branch\n\t\telse if (factors.get(2).equals(\"NoHead\") & factors.get(6).equals(\"NoLabel\")) {\n\t\t\tnew_link.setType(InfoEnum.RequirementLinkType.AND_REFINE.name());\n\t\t}\n\t\t// exception\n\t\telse {\n\t\t\tCommandPanel.logger.severe(\"Unknown links cannot be imported\");\n\t\t}\n\t\treturn new_link;\n\t}", "public interface ResourceDefinition\n{\n\n\t/**\n\t * Get the native path in the repository for the resource\n\t * \n\t * @return\n\t */\n\tString getRepositoryPath();\n\n\t/**\n\t * Get the external path of the passed in path releative to this resource\n\t * \n\t * @param path\n\t * @return\n\t */\n\tString getExternalPath(String path);\n\n\t/**\n\t * Get the repository path, relative to this resource\n\t * \n\t * @param name\n\t * @return\n\t */\n\tString getRepositoryPath(String name);\n\n\t/**\n\t * Does the path represent a resource that is private for the current\n\t * request This may relate to a logged in user or context. This will control\n\t * the caching headers in the http response.\n\t * \n\t * @return\n\t */\n\tboolean isPrivate();\n\n\t/**\n\t * @return\n\t */\n\tString getFunctionDefinition();\n\n\t/**\n\t * @return\n\t */\n\tint getDepth();\n\n}", "private Resolution getVocabularyConceptResolution() {\r\n HttpServletRequest httpRequest = getContext().getRequest();\r\n String url = httpRequest.getRequestURL().toString();\r\n // String query = httpRequest.getQueryString();\r\n \r\n String[] parameters = StringUtils.split(StringUtils.substringAfter(url, \"/vocabulary/\"), \"/\");\r\n \r\n if (parameters.length >= 2) {\r\n if (!RESERVED_VOCABULARY_EVENTS.contains(parameters[1])) {\r\n RedirectResolution resolution = new RedirectResolution(VocabularyConceptActionBean.class, \"view\");\r\n resolution.addParameter(\"vocabularyFolder.identifier\", parameters[0]);\r\n resolution.addParameter(\"vocabularyConcept.identifier\", parameters[1]);\r\n resolution.addParameter(\"vocabularyFolder.workingCopy\", vocabularyFolder.isWorkingCopy());\r\n \r\n return resolution;\r\n }\r\n }\r\n \r\n return null;\r\n }", "public interface AttributeLink extends org.omg.uml.foundation.core.ModelElement {\n /**\n * Returns the value of reference attribute.\n * @return Value of reference attribute.\n */\n public org.omg.uml.foundation.core.Attribute getAttribute();\n /**\n * Sets the value of reference attribute. See {@link #getAttribute} for description \n * on the reference.\n * @param newValue New value to be set.\n */\n public void setAttribute(org.omg.uml.foundation.core.Attribute newValue);\n /**\n * Returns the value of reference value.\n * @return Value of reference value.\n */\n public org.omg.uml.behavioralelements.commonbehavior.Instance getValue();\n /**\n * Sets the value of reference value. See {@link #getValue} for description \n * on the reference.\n * @param newValue New value to be set.\n */\n public void setValue(org.omg.uml.behavioralelements.commonbehavior.Instance newValue);\n /**\n * Returns the value of reference instance.\n * @return Value of reference instance.\n */\n public org.omg.uml.behavioralelements.commonbehavior.Instance getInstance();\n /**\n * Sets the value of reference instance. See {@link #getInstance} for description \n * on the reference.\n * @param newValue New value to be set.\n */\n public void setInstance(org.omg.uml.behavioralelements.commonbehavior.Instance newValue);\n /**\n * Returns the value of reference linkEnd.\n * @return Value of reference linkEnd.\n */\n public org.omg.uml.behavioralelements.commonbehavior.LinkEnd getLinkEnd();\n /**\n * Sets the value of reference linkEnd. See {@link #getLinkEnd} for description \n * on the reference.\n * @param newValue New value to be set.\n */\n public void setLinkEnd(org.omg.uml.behavioralelements.commonbehavior.LinkEnd newValue);\n}", "public abstract MetaPojosHyperlinkedOutput getHyperlinkedOutput();", "public interface Institution extends WrappedIndividual {\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/RIM/rim.owl#hasAddress\n */\n \n /**\n * Gets all property values for the hasAddress property.<p>\n * \n * @returns a collection of values for the hasAddress property.\n */\n Collection<? extends String> getHasAddress();\n\n /**\n * Checks if the class has a hasAddress property value.<p>\n * \n * @return true if there is a hasAddress property value.\n */\n boolean hasHasAddress();\n\n /**\n * Adds a hasAddress property value.<p>\n * \n * @param newHasAddress the hasAddress property value to be added\n */\n void addHasAddress(String newHasAddress);\n\n /**\n * Removes a hasAddress property value.<p>\n * \n * @param oldHasAddress the hasAddress property value to be removed.\n */\n void removeHasAddress(String oldHasAddress);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/RIM/rim.owl#hasCity\n */\n \n /**\n * Gets all property values for the hasCity property.<p>\n * \n * @returns a collection of values for the hasCity property.\n */\n Collection<? extends String> getHasCity();\n\n /**\n * Checks if the class has a hasCity property value.<p>\n * \n * @return true if there is a hasCity property value.\n */\n boolean hasHasCity();\n\n /**\n * Adds a hasCity property value.<p>\n * \n * @param newHasCity the hasCity property value to be added\n */\n void addHasCity(String newHasCity);\n\n /**\n * Removes a hasCity property value.<p>\n * \n * @param oldHasCity the hasCity property value to be removed.\n */\n void removeHasCity(String oldHasCity);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/RIM/rim.owl#hasInstitutionHomePage\n */\n \n /**\n * Gets all property values for the hasInstitutionHomePage property.<p>\n * \n * @returns a collection of values for the hasInstitutionHomePage property.\n */\n Collection<? extends Object> getHasInstitutionHomePage();\n\n /**\n * Checks if the class has a hasInstitutionHomePage property value.<p>\n * \n * @return true if there is a hasInstitutionHomePage property value.\n */\n boolean hasHasInstitutionHomePage();\n\n /**\n * Adds a hasInstitutionHomePage property value.<p>\n * \n * @param newHasInstitutionHomePage the hasInstitutionHomePage property value to be added\n */\n void addHasInstitutionHomePage(Object newHasInstitutionHomePage);\n\n /**\n * Removes a hasInstitutionHomePage property value.<p>\n * \n * @param oldHasInstitutionHomePage the hasInstitutionHomePage property value to be removed.\n */\n void removeHasInstitutionHomePage(Object oldHasInstitutionHomePage);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/RIM/rim.owl#hasInstitutionName\n */\n \n /**\n * Gets all property values for the hasInstitutionName property.<p>\n * \n * @returns a collection of values for the hasInstitutionName property.\n */\n Collection<? extends String> getHasInstitutionName();\n\n /**\n * Checks if the class has a hasInstitutionName property value.<p>\n * \n * @return true if there is a hasInstitutionName property value.\n */\n boolean hasHasInstitutionName();\n\n /**\n * Adds a hasInstitutionName property value.<p>\n * \n * @param newHasInstitutionName the hasInstitutionName property value to be added\n */\n void addHasInstitutionName(String newHasInstitutionName);\n\n /**\n * Removes a hasInstitutionName property value.<p>\n * \n * @param oldHasInstitutionName the hasInstitutionName property value to be removed.\n */\n void removeHasInstitutionName(String oldHasInstitutionName);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/RIM/rim.owl#hasLatitude\n */\n \n /**\n * Gets all property values for the hasLatitude property.<p>\n * \n * @returns a collection of values for the hasLatitude property.\n */\n Collection<? extends Object> getHasLatitude();\n\n /**\n * Checks if the class has a hasLatitude property value.<p>\n * \n * @return true if there is a hasLatitude property value.\n */\n boolean hasHasLatitude();\n\n /**\n * Adds a hasLatitude property value.<p>\n * \n * @param newHasLatitude the hasLatitude property value to be added\n */\n void addHasLatitude(Object newHasLatitude);\n\n /**\n * Removes a hasLatitude property value.<p>\n * \n * @param oldHasLatitude the hasLatitude property value to be removed.\n */\n void removeHasLatitude(Object oldHasLatitude);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/RIM/rim.owl#hasLongitude\n */\n \n /**\n * Gets all property values for the hasLongitude property.<p>\n * \n * @returns a collection of values for the hasLongitude property.\n */\n Collection<? extends Object> getHasLongitude();\n\n /**\n * Checks if the class has a hasLongitude property value.<p>\n * \n * @return true if there is a hasLongitude property value.\n */\n boolean hasHasLongitude();\n\n /**\n * Adds a hasLongitude property value.<p>\n * \n * @param newHasLongitude the hasLongitude property value to be added\n */\n void addHasLongitude(Object newHasLongitude);\n\n /**\n * Removes a hasLongitude property value.<p>\n * \n * @param oldHasLongitude the hasLongitude property value to be removed.\n */\n void removeHasLongitude(Object oldHasLongitude);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/RIM/rim.owl#hasState\n */\n \n /**\n * Gets all property values for the hasState property.<p>\n * \n * @returns a collection of values for the hasState property.\n */\n Collection<? extends String> getHasState();\n\n /**\n * Checks if the class has a hasState property value.<p>\n * \n * @return true if there is a hasState property value.\n */\n boolean hasHasState();\n\n /**\n * Adds a hasState property value.<p>\n * \n * @param newHasState the hasState property value to be added\n */\n void addHasState(String newHasState);\n\n /**\n * Removes a hasState property value.<p>\n * \n * @param oldHasState the hasState property value to be removed.\n */\n void removeHasState(String oldHasState);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/RIM/rim.owl#hasZipCode\n */\n \n /**\n * Gets all property values for the hasZipCode property.<p>\n * \n * @returns a collection of values for the hasZipCode property.\n */\n Collection<? extends String> getHasZipCode();\n\n /**\n * Checks if the class has a hasZipCode property value.<p>\n * \n * @return true if there is a hasZipCode property value.\n */\n boolean hasHasZipCode();\n\n /**\n * Adds a hasZipCode property value.<p>\n * \n * @param newHasZipCode the hasZipCode property value to be added\n */\n void addHasZipCode(String newHasZipCode);\n\n /**\n * Removes a hasZipCode property value.<p>\n * \n * @param oldHasZipCode the hasZipCode property value to be removed.\n */\n void removeHasZipCode(String oldHasZipCode);\n\n\n\n /* ***************************************************\n * Common interfaces\n */\n\n OWLNamedIndividual getOwlIndividual();\n\n OWLOntology getOwlOntology();\n\n void delete();\n\n}", "@objid (\"000fb1bc-c4bf-1fd8-97fe-001ec947cd2a\")\npublic interface LinkEnd extends UmlModelElement {\n /**\n * The metaclass simple name.\n */\n @objid (\"e6dd0ee9-d2ae-459e-911e-137b205a96a9\")\n public static final String MNAME = \"LinkEnd\";\n\n /**\n * The metaclass qualified name.\n */\n @objid (\"62f5bc44-c159-4a21-873f-c9ba90f5653c\")\n public static final String MQNAME = \"Standard.LinkEnd\";\n\n /**\n * Get the 'graphical owner' related to this end.\n * The owner is the current source or the opposite end's target according to the navigability.\n */\n @objid (\"8b942215-f0a1-454e-9f8a-596315ee40d5\")\n Instance getOwner();\n\n @objid (\"006058b0-2963-1080-943a-001ec947cd2a\")\n void setTarget(final Instance value, final boolean fixModel);\n\n @objid (\"006059f0-2963-1080-943a-001ec947cd2a\")\n void setSource(final Instance value, final boolean fixModel);\n\n /**\n * Sets both ends sources and targets according to the given navigability.\n * <ul>\n * <li>THISSIDE: only current source and target must be filled.</li>\n * <li>OHERSIDE: only opposite source and target must be filled.</li>\n * <li>BOTHSIDES: current source must be equals to opposite target as well as current target and opposite source.</li>\n * <li>NONE: both sources must be filled, but no target</li>\n * </ul>\n * @param value whether or not to synchronize the other end and both source/target values. This end will be made navigable whatever the current navigability is.\n */\n @objid (\"50d3075c-1fcb-4a03-a648-16729171986f\")\n void setNavigable(boolean value);\n\n @objid (\"6d12e031-ad22-449a-9171-6a88d4158b48\")\n boolean isNavigable();\n\n /**\n * Getter for attribute 'LinkEnd.IsOrdered'\n * \n * Metamodel description:\n * <i>Determines if this LinkEnd is ordered.</i>\n */\n @objid (\"fcf73d01-d406-41e9-9490-067237966153\")\n boolean isIsOrdered();\n\n /**\n * Setter for attribute 'LinkEnd.IsOrdered'\n * \n * Metamodel description:\n * <i>Determines if this LinkEnd is ordered.</i>\n */\n @objid (\"85e0d2fc-c5f1-47a6-a7a9-d1d92c110978\")\n void setIsOrdered(boolean value);\n\n /**\n * Getter for attribute 'LinkEnd.IsUnique'\n * \n * Metamodel description:\n * <i>Determines if this LinkEnd is unique.</i>\n */\n @objid (\"ef9777b4-ed2a-4341-bb22-67675cddb70a\")\n boolean isIsUnique();\n\n /**\n * Setter for attribute 'LinkEnd.IsUnique'\n * \n * Metamodel description:\n * <i>Determines if this LinkEnd is unique.</i>\n */\n @objid (\"d7a49a3a-2f15-4f2c-91a0-847c1e869a0c\")\n void setIsUnique(boolean value);\n\n /**\n * Getter for attribute 'LinkEnd.MultiplicityMax'\n * \n * Metamodel description:\n * <i>Maximum value of the Link's multiplicity.</i>\n */\n @objid (\"7bba25c1-4310-45fa-b2ce-d6cdc992be70\")\n String getMultiplicityMax();\n\n /**\n * Setter for attribute 'LinkEnd.MultiplicityMax'\n * \n * Metamodel description:\n * <i>Maximum value of the Link's multiplicity.</i>\n */\n @objid (\"0ef18ad8-3371-4bb9-933d-7b4e156bea34\")\n void setMultiplicityMax(String value);\n\n /**\n * Getter for attribute 'LinkEnd.MultiplicityMin'\n * \n * Metamodel description:\n * <i>Minimum value of the Link's multiplicity. When placed on a target end, the multiplicity specifies the number of target instances that may be associated with a single source instance across the given Link.</i>\n */\n @objid (\"258318a3-c0bd-4ddc-971b-1e72b90fcbb1\")\n String getMultiplicityMin();\n\n /**\n * Setter for attribute 'LinkEnd.MultiplicityMin'\n * \n * Metamodel description:\n * <i>Minimum value of the Link's multiplicity. When placed on a target end, the multiplicity specifies the number of target instances that may be associated with a single source instance across the given Link.</i>\n */\n @objid (\"06670c6b-fb3b-41b3-aefd-29ea57042310\")\n void setMultiplicityMin(String value);\n\n /**\n * Getter for relation 'LinkEnd->Link'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"780bebb2-6884-4789-bdef-ca10444ad5fb\")\n Link getLink();\n\n /**\n * Setter for relation 'LinkEnd->Link'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"cd72633c-53d3-4556-b5de-b52113e3a225\")\n void setLink(Link value);\n\n /**\n * Getter for relation 'LinkEnd->Target'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"19651663-f981-4f11-802a-d5d7cbd6f88a\")\n Instance getTarget();\n\n /**\n * Setter for relation 'LinkEnd->Target'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"8fb70c43-b102-4a64-9424-c7cc07d58fcf\")\n void setTarget(Instance value);\n\n /**\n * Getter for relation 'LinkEnd->OppositeOwner'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"aaf16daa-ed28-496e-bee1-ebf665987a0e\")\n LinkEnd getOppositeOwner();\n\n /**\n * Setter for relation 'LinkEnd->OppositeOwner'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"67ebbbfe-83e1-4802-a6be-2ffada70c737\")\n void setOppositeOwner(LinkEnd value);\n\n /**\n * Getter for relation 'LinkEnd->RealizedInformationFlow'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"d5ab3449-47f3-49a5-9936-6634cda6cb2a\")\n EList<InformationFlow> getRealizedInformationFlow();\n\n /**\n * Filtered Getter for relation 'LinkEnd->RealizedInformationFlow'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"b9cdbb67-9b00-43b4-aa83-a5150ca375e9\")\n <T extends InformationFlow> List<T> getRealizedInformationFlow(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'LinkEnd->Model'\n * \n * Metamodel description:\n * <i>The LinkEnd is an occurrence of this AssociationEnd.</i>\n */\n @objid (\"661a22c1-2de2-4b65-a955-6b755461b1ac\")\n AssociationEnd getModel();\n\n /**\n * Setter for relation 'LinkEnd->Model'\n * \n * Metamodel description:\n * <i>The LinkEnd is an occurrence of this AssociationEnd.</i>\n */\n @objid (\"1a8cb555-55ca-418e-8378-2f50ba867c6b\")\n void setModel(AssociationEnd value);\n\n /**\n * Getter for relation 'LinkEnd->Consumer'\n * \n * Metamodel description:\n * <i>Used for Connectors between Ports to designate the RequiredInterface(s) set the LinkEnd is connected to.</i>\n */\n @objid (\"8f1c9d42-a8ac-4f52-b3f8-2b5f076b4348\")\n RequiredInterface getConsumer();\n\n /**\n * Setter for relation 'LinkEnd->Consumer'\n * \n * Metamodel description:\n * <i>Used for Connectors between Ports to designate the RequiredInterface(s) set the LinkEnd is connected to.</i>\n */\n @objid (\"443e3927-5e5c-43bb-9d78-44c58df8e6fd\")\n void setConsumer(RequiredInterface value);\n\n /**\n * Getter for relation 'LinkEnd->Opposite'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"e10bb26d-c5e7-4f7e-b4cb-8c5551328d52\")\n LinkEnd getOpposite();\n\n /**\n * Setter for relation 'LinkEnd->Opposite'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"322f7781-7f9f-47de-8df7-a12ebfa5784a\")\n void setOpposite(LinkEnd value);\n\n /**\n * Getter for relation 'LinkEnd->Source'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"4e37aa68-c0f7-4404-a2cb-e6088f1dda62\")\n Instance getSource();\n\n /**\n * Setter for relation 'LinkEnd->Source'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"fddcf86a-595c-4c38-ad3f-c2a660a9497b\")\n void setSource(Instance value);\n\n /**\n * Getter for relation 'LinkEnd->Provider'\n * \n * Metamodel description:\n * <i>Used for Connectors between Ports to designate the ProvidedInterface(s) set the LinkEnd is connected to.</i>\n */\n @objid (\"13e63a4b-fab3-4b16-b7f9-69b4d6187c94\")\n ProvidedInterface getProvider();\n\n /**\n * Setter for relation 'LinkEnd->Provider'\n * \n * Metamodel description:\n * <i>Used for Connectors between Ports to designate the ProvidedInterface(s) set the LinkEnd is connected to.</i>\n */\n @objid (\"a3188449-2f95-4e02-a233-e2e48fa5e5b0\")\n void setProvider(ProvidedInterface value);\n\n}", "public interface RelationTypeExtractor {\n String getType(RelationEval e, boolean isActual);\n}", "@Path(\"/link\")\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response linkRead() {\n HashMap<String, String> schema = new HashMap<>();\n schema.put(\"key_url\",\"string\");\n schema.put(\"timestamp\", \"int\");\n schema.put(\"score\",\"float\"); \n schema.put(\"anchor\",\"string\");\n schema.put(\"linktype\",\"string\");\n schema.put(\"url\",\"string\");\n return Response.ok(schema).type(MediaType.APPLICATION_JSON).build();\n }", "public interface RelationInjectionManager extends FieldInterceptor {\n\n\t/**\n\t * The interface of the external resolver that is used to bind this field. \n\t * \n\t */\n\tpublic static interface Resolver {\n\t\t\n\t\t/**\n\t\t * Registers an injection manager with a resolver.\n\t\t * \n\t\t * The resolver can asynchronously update the relation to modify the\n\t\t * binding.\n\t\t * \n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.addTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.removeTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.substituteTarget\n\t\t * \n\t\t */\n\t\tpublic void addInjection(RelationInjectionManager injection);\n\t\t\n\t\t/**\n\t\t * Request to lazily resolve an injection.\n\t\t * \n\t\t * This method is invoked by a injection manager to calculate its initial binding\n\t\t * when it is first accessed.\n\t\t * \n\t\t * The resolver must call back the manager to modify the resolved target.\n\t\t * \n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.addTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.removeTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.substituteTarget\n\t\t * \n\t\t */\n\t\tpublic boolean resolve(RelationInjectionManager injection);\n\t\t\n\t\t/**\n\t\t * Request to remove an injection.\n\t\t * \n\t\t * This method is invoked by a injection manager to signify that the\n\t\t * component wants to force the resolution of the relation the next\n\t\t * access\n\t\t * \n\t\t */\n\t\tpublic boolean unresolve(RelationInjectionManager injection);\n\t\t\n\t} \n\n\t/**\n\t * The relation that is managed by this manager\n\t */\n\tpublic abstract RelationDeclaration getRelation();\n\t\n\t/**\n\t * The relation injection that is managed by this manager\n\t */\n\tpublic abstract RequirerInstrumentation getRelationInjection();\n\n\t\n /**\n * Get an XML representation of the state of this injection\n */\n public abstract Element getDescription();\n\n /**\n * The current state of the manager. \n * \n * A specific manager implementation can have dependencies on some platform services that may\n * become unavailable. In that case the translation from APAM action to platform actions is no\n * longer possible; \n */\n \n public abstract boolean isValid();\n \n\t/**\n\t * Adds a new target to this injection\n\t */\n\tpublic abstract void addTarget(Component target);\n\n\t/**\n\t * Removes a target from the injection\n\t * \n\t * @param target\n\t */\n\tpublic abstract void removeTarget(Component target);\n\n\n}", "private LinkDescription buildLinkDescription(BgpLinkLsNlriVer4 bgpLink) {\n LinkDescription ld = null;\n checkNotNull(bgpLink);\n\n BgpDpid localNodeUri = new BgpDpid(bgpLink, BgpDpid.NODE_DESCRIPTOR_LOCAL);\n DeviceId srcDeviceID = deviceId(uri(localNodeUri.toString()));\n\n BgpDpid remoteNodeUri = new BgpDpid(bgpLink, BgpDpid.NODE_DESCRIPTOR_REMOTE);\n DeviceId dstDeviceID = deviceId(uri(remoteNodeUri.toString()));\n\n deviceProviderService.updatePorts(srcDeviceID, buildPortDescriptions(localNodeUri.toString()));\n\n deviceProviderService.updatePorts(dstDeviceID, buildPortDescriptions(remoteNodeUri.toString()));\n\n ConnectPoint src = new ConnectPoint(srcDeviceID, null);\n\n ConnectPoint dst = new ConnectPoint(dstDeviceID, null);\n\n ld = new DefaultLinkDescription(src, dst, Link.Type.INDIRECT);\n return ld;\n }", "public static interface Resolver\n {\n Constant resolve(Constant constOrig);\n }", "public boolean resolve(RelationInjectionManager injection);", "protected Object readResolve() {\n\tlabelSet = Label.parse(labelString);\n\treturn this;\n }", "public abstract Reference getReference() throws NamingException ;", "public interface Type<SomeType extends Type<SomeType, SomeThing>,\n SomeThing extends Thing<SomeThing, SomeType>>\n extends SchemaConcept<SomeType> {\n\n @Deprecated\n @CheckReturnValue\n @Override\n default Type<SomeType, SomeThing> asType() {\n return this;\n }\n\n @Override\n Remote<SomeType, SomeThing> asRemote(GraknClient.Transaction tx);\n\n @Deprecated\n @CheckReturnValue\n @Override\n default boolean isType() {\n return true;\n }\n\n interface Local<\n SomeType extends Type<SomeType, SomeThing>,\n SomeThing extends Thing<SomeThing, SomeType>>\n extends SchemaConcept.Local<SomeType>, Type<SomeType, SomeThing> {\n }\n\n /**\n * A Type represents any ontological element in the graph.\n * Types are used to model the behaviour of Thing and how they relate to each other.\n * They also aid in categorising Thing to different types.\n */\n interface Remote<\n SomeRemoteType extends Type<SomeRemoteType, SomeRemoteThing>,\n SomeRemoteThing extends Thing<SomeRemoteThing, SomeRemoteType>>\n extends SchemaConcept.Remote<SomeRemoteType>, Type<SomeRemoteType, SomeRemoteThing> {\n\n //------------------------------------- Modifiers ----------------------------------\n\n /**\n * Changes the Label of this Concept to a new one.\n *\n * @param label The new Label.\n * @return The Concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> label(Label label);\n\n /**\n * Sets the Type to be abstract - which prevents it from having any instances.\n *\n * @param isAbstract Specifies if the concept is to be abstract (true) or not (false).\n * @return The concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> isAbstract(Boolean isAbstract);\n\n /**\n * @param role The Role Type which the instances of this Type are allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> plays(Role role);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked in a strictly one-to-one mapping.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> key(AttributeType<?> attributeType);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> has(AttributeType<?> attributeType);\n\n //------------------------------------- Accessors ---------------------------------\n\n /**\n * @return A list of Role Types which instances of this Type can indirectly play.\n */\n Stream<Role.Remote> playing();\n\n /**\n * @return The AttributeTypes which this Type is linked with.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> attributes();\n\n /**\n * @return The AttributeTypes which this Type is linked with as a key.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> keys();\n\n /**\n * @return All the the super-types of this Type\n */\n @Override\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> sups();\n\n /**\n * Get all indirect sub-types of this type.\n * The indirect sub-types are the type itself and all indirect sub-types of direct sub-types.\n *\n * @return All the indirect sub-types of this Type\n */\n @Override\n @CheckReturnValue\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> subs();\n\n /**\n * Get all indirect instances of this type.\n * The indirect instances are the direct instances and all indirect instances of direct sub-types.\n *\n * @return All the indirect instances of this type.\n */\n @CheckReturnValue\n Stream<? extends Thing.Remote<SomeRemoteThing, SomeRemoteType>> instances();\n\n /**\n * Return if the type is set to abstract.\n * By default, types are not abstract.\n *\n * @return returns true if the type is set to be abstract.\n */\n @CheckReturnValue\n Boolean isAbstract();\n\n //------------------------------------- Other ----------------------------------\n\n /**\n * Removes the ability of this Type to play a specific Role\n *\n * @param role The Role which the Things of this Type should no longer be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unplay(Role role);\n\n /**\n * Removes the ability for Things of this Type to have Attributes of type AttributeType\n *\n * @param attributeType the AttributeType which this Type can no longer have\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unhas(AttributeType<?> attributeType);\n\n /**\n * Removes AttributeType as a key to this Type\n *\n * @param attributeType the AttributeType which this Type can no longer have as a key\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unkey(AttributeType<?> attributeType);\n\n @Deprecated\n @CheckReturnValue\n @Override\n default Type.Remote<SomeRemoteType, SomeRemoteThing> asType() {\n return this;\n }\n\n @Deprecated\n @CheckReturnValue\n @Override\n default boolean isType() {\n return true;\n }\n }\n}", "public JsonSchemaMappingLookup() {\n // initialize all mappings from URLs to the respective schema\n businessObjectToJsonSchema.put(\"/rules\", DCC_VALIDATION_RULE_JSON_CLASSPATH);\n businessObjectToJsonSchema.put(\"/bnrules\", DCC_VALIDATION_RULE_JSON_CLASSPATH);\n businessObjectToJsonSchema.put(\"/cclrules\", CCL_JSON_SCHEMA);\n }", "@Override\r\n public void accept(IPropertyValueVisitor visitor) {\r\n // relations\r\n _acceptList(cleon.architecturemethods.systemarc42.metamodel.spec._08_concepts.services.javamodel.IPortService.class, cleon.architecturemethods.systemarc42.metamodel.spec._08_concepts.access.AccessPackage.AccessCommunicationType_servicesForAccess, visitor);\r\n _acceptSingle(ch.actifsource.core.javamodel.IClass.class, ch.actifsource.core.CorePackage.Resource_typeOf, visitor);\r\n }", "public interface InformationGraph {\r\n\t\r\n\tpublic int getNVertex();\r\n\tpublic int getDistanza();\r\n\tpublic int getLarghezzaX();\r\n\tpublic int getLarghezzaY();\r\n\tpublic int getWidth();\r\n\tpublic int getHeight();\r\n}", "public String getRel() {\r\n return rel;\r\n }", "public interface LinkGenerator {\n\n String ATTRIBUTE_CONTROLLER = \"controller\";\n String ATTRIBUTE_RESOURCE = \"resource\";\n String ATTRIBUTE_ACTION = \"action\";\n String ATTRIBUTE_METHOD = \"method\";\n String ATTRIBUTE_URI = \"uri\";\n String ATTRIBUTE_RELATIVE_URI = \"relativeUri\";\n String ATTRIBUTE_INCLUDE_CONTEXT = \"includeContext\";\n String ATTRIBUTE_CONTEXT_PATH = \"contextPath\";\n String ATTRIBUTE_URL = \"url\";\n String ATTRIBUTE_BASE = \"base\";\n String ATTRIBUTE_ABSOLUTE = \"absolute\";\n String ATTRIBUTE_ID = \"id\";\n String ATTRIBUTE_FRAGMENT = \"fragment\";\n String ATTRIBUTE_PARAMS = \"params\";\n String ATTRIBUTE_MAPPING = \"mapping\";\n String ATTRIBUTE_EVENT = \"event\";\n String ATTRIBUTE_ELEMENT_ID = \"elementId\";\n String ATTRIBUTE_PLUGIN = \"plugin\";\n String ATTRIBUTE_NAMESPACE = \"namespace\";\n \n\n Set<String> LINK_ATTRIBUTES = CollectionUtils.newSet(\n ATTRIBUTE_RESOURCE,\n ATTRIBUTE_METHOD,\n ATTRIBUTE_CONTROLLER,\n ATTRIBUTE_ACTION,\n ATTRIBUTE_URI,\n ATTRIBUTE_RELATIVE_URI,\n ATTRIBUTE_CONTEXT_PATH,\n ATTRIBUTE_URL,\n ATTRIBUTE_BASE,\n ATTRIBUTE_ABSOLUTE,\n ATTRIBUTE_ID,\n ATTRIBUTE_FRAGMENT,\n ATTRIBUTE_PARAMS,\n ATTRIBUTE_MAPPING,\n ATTRIBUTE_EVENT,\n ATTRIBUTE_ELEMENT_ID,\n ATTRIBUTE_PLUGIN,\n ATTRIBUTE_NAMESPACE\n );\n\n Map<String, String> REST_RESOURCE_ACTION_TO_HTTP_METHOD_MAP = CollectionUtils.<String, String>newMap(\n \"create\", \"GET\",\n \"save\", \"POST\",\n \"show\", \"GET\",\n \"index\", \"GET\",\n \"edit\", \"GET\",\n \"update\", \"PUT\",\n \"patch\", \"PATCH\",\n \"delete\", \"DELETE\"\n );\n\n Map<String, String> REST_RESOURCE_HTTP_METHOD_TO_ACTION_MAP = CollectionUtils.<String, String>newMap(\n \"GET_ID\", \"show\",\n \"GET\", \"index\",\n \"POST\", \"save\",\n \"DELETE\", \"delete\",\n \"PUT\", \"update\",\n \"PATCH\", \"patch\"\n );\n\n\n /**\n * Generates a link to a static resource for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>base - The base path of the URL, typically an absolute server path</li>\n * <li>contextPath - The context path to link to, defaults to the servlet context path</li>\n * <li>dir - The directory to link to</li>\n * <li>file - The file to link to (relative to the directory if specified)</li>\n * <li>plugin - The plugin that provides the resource</li>\n * <li>absolute - Whether the link should be absolute or not</li>\n * </ul>\n *\n * @param params The named parameters\n * @return The link to the static resource\n */\n String resource(@SuppressWarnings(\"rawtypes\") Map params);\n\n /**\n * Generates a link to a controller, action or URI for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>resource - If linking to a REST resource, the name of the resource or resource path to link to. Either 'resource' or 'controller' should be specified, but not both</li>\n * <li>controller - The name of the controller to use in the link, if not specified the current controller will be linked</li>\n * <li>action - The name of the action to use in the link, if not specified the default action will be linked</li>\n * <li>uri - relative URI</li>\n * <li>url - A map containing the action,controller,id etc.</li>\n * <li>base - Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.</li>\n * <li>absolute - If set to \"true\" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:&lt;port&gt; if no value in Config and not running in production.</li>\n * <li>contextPath - The context path to link to, defaults to the servlet context path</li>\n * <li>id - The id to use in the link</li>\n * <li>fragment - The link fragment (often called anchor tag) to use</li>\n * <li>params - A map containing URL query parameters</li>\n * <li>mapping - The named URL mapping to use to rewrite the link</li>\n * <li>event - Webflow _eventId parameter</li>\n * </ul>\n * @param params The named parameters\n * @return The generator link\n */\n String link(@SuppressWarnings(\"rawtypes\") Map params);\n\n /**\n * Generates a link to a controller, action or URI for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>resource - If linking to a REST resource, the name of the resource or resource path to link to. Either 'resource' or 'controller' should be specified, but not both</li>\n * <li>controller - The name of the controller to use in the link, if not specified the current controller will be linked</li>\n * <li>action - The name of the action to use in the link, if not specified the default action will be linked</li>\n * <li>uri - relative URI</li>\n * <li>url - A map containing the action,controller,id etc.</li>\n * <li>base - Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.</li>\n * <li>absolute - If set to \"true\" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:&lt;port&gt; if no value in Config and not running in production.</li>\n * <li>id - The id to use in the link</li>\n * <li>fragment - The link fragment (often called anchor tag) to use</li>\n * <li>params - A map containing URL query parameters</li>\n * <li>mapping - The named URL mapping to use to rewrite the link</li>\n * <li>event - Webflow _eventId parameter</li>\n * </ul>\n * @param params The named parameters\n * @param encoding The character encoding to use\n * @return The generator link\n */\n String link(@SuppressWarnings(\"rawtypes\") Map params, String encoding);\n\n /**\n * Obtains the context path from which this link generator is operating.\n *\n * @return The base context path\n */\n String getContextPath();\n\n /**\n * The base URL of the server used for creating absolute links.\n *\n * @return The base URL of the server\n */\n String getServerBaseURL();\n}", "public interface Dimension {\n /**\n * Gets the id property: Fully qualified resource Id for the resource.\n *\n * @return the id value.\n */\n String id();\n\n /**\n * Gets the name property: The name of the resource.\n *\n * @return the name value.\n */\n String name();\n\n /**\n * Gets the type property: The type of the resource.\n *\n * @return the type value.\n */\n String type();\n\n /**\n * Gets the location property: The geo-location where the resource lives.\n *\n * @return the location value.\n */\n String location();\n\n /**\n * Gets the tags property: Resource tags.\n *\n * @return the tags value.\n */\n Map<String, String> tags();\n\n /**\n * Gets the sku property: SKU of the resource.\n *\n * @return the sku value.\n */\n String sku();\n\n /**\n * Gets the etag property: ETag of the resource.\n *\n * @return the etag value.\n */\n String etag();\n\n /**\n * Gets the description property: Dimension description.\n *\n * @return the description value.\n */\n String description();\n\n /**\n * Gets the filterEnabled property: Filter enabled.\n *\n * @return the filterEnabled value.\n */\n Boolean filterEnabled();\n\n /**\n * Gets the groupingEnabled property: Grouping enabled.\n *\n * @return the groupingEnabled value.\n */\n Boolean groupingEnabled();\n\n /**\n * Gets the data property: Dimension data.\n *\n * @return the data value.\n */\n List<String> data();\n\n /**\n * Gets the total property: Total number of data for the dimension.\n *\n * @return the total value.\n */\n Integer total();\n\n /**\n * Gets the category property: Dimension category.\n *\n * @return the category value.\n */\n String category();\n\n /**\n * Gets the usageStart property: Usage start.\n *\n * @return the usageStart value.\n */\n OffsetDateTime usageStart();\n\n /**\n * Gets the usageEnd property: Usage end.\n *\n * @return the usageEnd value.\n */\n OffsetDateTime usageEnd();\n\n /**\n * Gets the nextLink property: The link (url) to the next page of results.\n *\n * @return the nextLink value.\n */\n String nextLink();\n\n /**\n * Gets the inner com.azure.resourcemanager.costmanagement.fluent.models.DimensionInner object.\n *\n * @return the inner object.\n */\n DimensionInner innerModel();\n}", "boolean isResolvable(String name);", "boolean references(ResourceElement<S, V> referred, ResourceElement<?, ?> refers);", "public ReactorResult<org.ontoware.rdfreactor.schema.rdfs.Resource> getAllCommercialInformationURL_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), COMMERCIALINFORMATIONURL, org.ontoware.rdfreactor.schema.rdfs.Resource.class);\r\n\t}", "public interface IResource {\n\n\t/**\n\t * An optional attribute that identifies the Resource-element.\n\t */\n\tpublic URI getId();\n\n\tpublic boolean setId(URI id);\n\n\t/**\n\t * An optional attribute. If present, it provides a relative URI template for the identifier of the resource. The\n\t * resource's base URI is given by the Resource-element's parent Resource- or Resources-element. The value of the\n\t * path-attribute may be static or may contain embedded template parameters.\n\t */\n\tpublic String getPath();\n\n\tpublic boolean setPath(String path);\n\n\t/**\n\t * An optional attribute whose type is a space-separated list of URIs. Each value in the list identifies a\n\t * ResourceType-element that defines a set of methods supported by the resource.\n\t */\n\tpublic List<URI> getType();\n\n\tpublic boolean setType(List<URI> type);\n\n\tpublic boolean addType(URI type);\n\n\t/**\n\t * Defines the media type for the query component of the resourve URI. Defaults to\n\t * 'application/x-www-form-urlencoded' if not specified which results in query strings being formatted as specified.\n\t */\n\tpublic String getQueryType();\n\n\tpublic boolean setQueryType(String queryType);\n\n\t/**\n\t * A Resource-element contains zero or more Doc-elements.\n\t */\n\tpublic List<IDoc> getDocs();\n\n\tpublic boolean addDoc(IDoc doc);\n\n\t/**\n\t * A Resource-element contains zero or more Param-elements with one of the following values for its style-attriute:\n\t * template, matrix, query, header.\n\t */\n\tpublic List<IParam> getParams();\n\n\tpublic boolean addParam(IParam param);\n\n\t/**\n\t * A Resource-element contains zero or more Method-elements, each of which describes the input to and output from an\n\t * HTTP protocol method that can be applied to the resource. Such locally-defined methods are added to any methods\n\t * included in ResourceType-elements referred to using the type-attribute.\n\t */\n\tpublic List<IMethod> getMethods();\n\n\tpublic boolean addMethod(IMethod method);\n\n\t/**\n\t * A Resource-element contains zero or more Resource-elements that describe sub-resources. Such sub-resources\n\t * inherit matrix and template parameters from the parent resource since their URI is relative to that of the parent\n\t * resource but they do not inherit query or header parameters specified globally for the parent resource.\n\t */\n\tpublic List<IResource> getResources();\n\n\tpublic boolean addResource(IResource resource);\n\n\tpublic String toString();\n\n}", "public interface DNSResolver {\n /**\n * Resolve the given {@param host} into one or more {@link InetAddress}. The resolved InetAddress-es should be\n * added into the {@param result} list\n *\n * @return true to continue resolving with remaining resolvers, or false to continue resolving\n */\n boolean resolve(String host, List<InetAddress> result);\n}", "public interface LocatedItem<E> {\r\n /**\r\n * Get the item.\r\n * \r\n * @return\r\n */\r\n public E getItem();\r\n\r\n /**\r\n * Get the ontology URI to which the item belongs.\r\n * \r\n * @return\r\n */\r\n public String getOntologyURI();\r\n}", "public interface Meta {\r\n\r\n /**\r\n * Get the Type of the OSM object\r\n * \r\n * @return the Type\r\n */\r\n @NotNull\r\n default Type getType() {\r\n throw new IllegalArgumentException(\"getType is unsupported\");\r\n }\r\n\r\n /**\r\n * Get the OSM elements tags\r\n * \r\n * @return a Map of KV tupels\r\n */\r\n @Nullable\r\n default Map<String, String> getTags() {\r\n throw new IllegalArgumentException(\"getTags is unsupported\");\r\n }\r\n\r\n /**\r\n * Get the OSM display name\r\n * \r\n * @return the OSM display name\r\n */\r\n String getUser();\r\n\r\n /**\r\n * Get the OSM id of the object\r\n * \r\n * @return the OSM id of the object\r\n */\r\n long getId();\r\n\r\n /**\r\n * Get the version of the object\r\n * \r\n * @return the version of the object\r\n */\r\n long getVersion();\r\n\r\n /**\r\n * Get the changeset id for this object\r\n * \r\n * @return the changeset id for this object\r\n */\r\n long getChangeset();\r\n\r\n /**\r\n * Get the timestamp (when this version of the object was created)\r\n * \r\n * @return the timestamp in seconds since the Unic EPOCH\r\n */\r\n long getTimestamp();\r\n\r\n /**\r\n * Get the state of the object\r\n * \r\n * @return a State\r\n */\r\n @NotNull\r\n State getState();\r\n\r\n /**\r\n * If the object is a Way check if it is closed\r\n * \r\n * @return true if the way is closed\r\n */\r\n boolean isClosed();\r\n\r\n /**\r\n * If the object is a Way return the number of way nodes\r\n * \r\n * @return the number of way nodes\r\n */\r\n int getNodeCount();\r\n\r\n /**\r\n * If the object is a Node return the number of ways it is a member of\r\n * \r\n * @return the number of ways the Node is a member of\r\n */\r\n int getWayCount();\r\n\r\n /**\r\n * If the object is a Relation return the number of members it has\r\n * \r\n * If not implemented this returns -1 which should always evaluate to false\r\n * \r\n * @return the number of members the Relation has\r\n */\r\n default int getMemberCount() {\r\n return Range.UNINITALIZED;\r\n }\r\n\r\n /**\r\n * If the object is a Way and closed return the area it covers\r\n * \r\n * @return the area it covers in m^2\r\n */\r\n int getAreaSize();\r\n\r\n /**\r\n * If the object is a Way return its length\r\n * \r\n * @return the the length in m\r\n */\r\n int getWayLength();\r\n\r\n /**\r\n * Get any roles the element has in Relations\r\n * \r\n * @return a Collection containing the roles\r\n */\r\n @NotNull\r\n Collection<String> getRoles();\r\n\r\n /**\r\n * Check if the element is selected\r\n * \r\n * @return true if selected\r\n */\r\n boolean isSelected();\r\n\r\n /**\r\n * Check if a relation has a member with role\r\n * \r\n * @param role the role\r\n * @return true if there is a member with the role\r\n */\r\n boolean hasRole(@NotNull String role);\r\n\r\n /**\r\n * Get a preset from a path specification\r\n * \r\n * @param presetPath the path\r\n * @return an Object that should be a instance of a preset for the syste,\r\n */\r\n @Nullable\r\n Object getPreset(@NotNull String presetPath);\r\n\r\n /**\r\n * Check if the object matches with a preset or a preset group\r\n * \r\n * @param preset the path to the preset or group\r\n * @return true if the object matches\r\n */\r\n boolean matchesPreset(@NotNull Object preset);\r\n\r\n /**\r\n * Check if the element is incomplete (this is not defined in the documentation)\r\n * \r\n * @return true if incomplete\r\n */\r\n boolean isIncomplete();\r\n\r\n /**\r\n * Check if the element is in the current view\r\n * \r\n * @return true if in view\r\n */\r\n boolean isInview();\r\n\r\n /**\r\n * Check if the element and all member elements is in the current view\r\n * \r\n * @return true if in view\r\n */\r\n boolean isAllInview();\r\n\r\n /**\r\n * Check if the element is in the downloaded areas\r\n * \r\n * @return true if in view\r\n */\r\n boolean isInDownloadedArea();\r\n\r\n /**\r\n * Check if the element and all member elements is in the downloaded areas\r\n * \r\n * @return true if in view\r\n */\r\n boolean isAllInDownloadedArea();\r\n\r\n /**\r\n * Check if the current element is a child of an element\r\n * \r\n * @param type type of the element\r\n * @param element the meta interface to the element\r\n * @param parents a List of elements\r\n * @return true if element is a child\r\n */\r\n default boolean isChild(@NotNull Type type, @NotNull Meta element, @NotNull List<Object> parents) {\r\n return false;\r\n }\r\n\r\n /**\r\n * Check if the current element is a parent of an element\r\n * \r\n * @param type type of the element\r\n * @param meta the meta interface to the element\r\n * @param children a List of elements\r\n * @return true if element is a parent\r\n */\r\n default boolean isParent(@NotNull Type type, @NotNull Meta meta, @NotNull List<Object> children) {\r\n return false;\r\n }\r\n\r\n /**\r\n * Return a List of Elements that match the condition c\r\n * \r\n * This is necessary so that we can cache these results in the caller\r\n * \r\n * @param c the Condition\r\n * @return a List of elements\r\n */\r\n @NotNull\r\n default List<Object> getMatchingElements(@NotNull Condition c) {\r\n return new ArrayList<>();\r\n }\r\n \r\n /**\r\n * Get an Meta implementing object \r\n * \r\n * @param o imput object\r\n * @return returns something that implements this interface\r\n */\r\n @NotNull\r\n Meta wrap(Object o);\r\n}", "public Collection<Map<String, String>> getLinks();", "@Nonnull @NotEmpty protected String getURL(@Nonnull final AttributeResolutionContext resolutionContext,\n @Nonnull final Map<String,List<IdPAttributeValue>> dependencyAttributes) throws ResolutionException {\n throw new UnsupportedOperationException(\"getURL method not overridden by subclass\");\n }", "public ObjectNode resolvePaths();", "public org.omg.CORBA.Object resolve(String name)\n {\n NameComponent nc = new NameComponent(name, \"Object\");\n NameComponent path[] = {nc};\n org.omg.CORBA.Object objRef = null;\n try\n {\n objRef = namingContext.resolve(path);\n }\n catch (Exception e)\n {\n fatalError(\"Cound not get object with name \\\"\" + name +\n \"\\\" from NameService\", e);\n }\n return objRef;\n }", "@NonNull String getInflectionsLink() {\n return inflectionsLink;\n }", "public interface ProductRelatedResource extends RepositoryResource {\n\n /**\n * Gets the productId for the resource.\n *\n * @return the product id, or null if it has not been set\n */\n public String getProductId();\n\n /**\n * Gets the edition of the product, if applicable.\n *\n * @return the edition of the product, or null if it is not set\n */\n public String getProductEdition();\n\n /**\n * Gets the install type of the product (e.g. \"Archive\")\n *\n * @return the install type, or null if it is not set\n */\n public String getProductInstallType();\n\n /**\n * Gets the version of the product\n *\n * @return the product version, or null if it is not set\n */\n public String getProductVersion();\n\n /**\n * Gets the features included in this product\n *\n * @return the features provided by this product, or null if not set\n */\n public Collection<String> getProvideFeature();\n\n /**\n * Gets the features that this product depends on\n *\n * @return the features required by this product, or null if not set\n */\n public Collection<String> getRequireFeature();\n\n /**\n * Gets the collection of OSGi requirements this product has\n *\n * @return the collection of OSGi requirements applicable to this product, or null if not set\n */\n public Collection<Requirement> getGenericRequirements();\n\n /**\n * Gets the version information for the Java packaged with this product\n *\n * @return The Java version information, or null if this product is not packaged with Java\n */\n public String getPackagedJava();\n\n}", "public String getLinkName();", "public interface IRelationService<DependenciesBean, AssociationTreeBean> {\n\n /**\n * Method to obtain a list of dependencies.\n *\n * @param path the resource path.\n *\n * @return the list of dependencies.\n * @throws RegistryException if the operation failed.\n */\n DependenciesBean getDependencies(String path) throws RegistryException;\n\n /**\n * Method to add an association (or dependency).\n *\n * @param path the resource path.\n * @param type the type of association. If the type of association is 'depends' a\n * dependency will be created.\n * @param associationPaths the list of associations to be added.\n *\n * @throws RegistryException if the operation failed.\n */\n void addAssociation(String path, String type, String associationPaths,\n String operation) throws RegistryException;\n\n // TODO: FIXME: The operation parameter is not required. Get rid of that and fix the\n // addAssociation method on the BE service.\n\n /**\n * Method to obtain a list of associations.\n * \n * @param path the resource path.\n * @param type the type of association.\n *\n * @return the list of associations.\n * @throws RegistryException if the operation failed.\n */\n AssociationTreeBean getAssociationTree(String path, String type) throws RegistryException;\n}", "public RemoteLinkage linkageUnderXY(int x, int y)\n {\n IFigure f =\n view.getEditor().getInteractionFigure().findFigureAt(x,\n y,\n RemoteLinkage.class);\n\n if (f != null) {\n return (RemoteLinkage) f;\n }\n\n return null;\n }", "public Resolution getResolution() {\n return resolution;\n }", "public abstract String getManipulatorLinkLabel();", "@objid (\"780bebb2-6884-4789-bdef-ca10444ad5fb\")\n Link getLink();", "ResolvableStatus getResolvableStatus();", "protected String resolveURL(HttpServletRequest request, DSpaceObject dso) {\n // If no object given then just link to the whole repository,\n // since no offical handle exists so we have to use local resolution.\n if (dso == null) {\n if (baseURL == null) {\n if (request == null) {\n baseURL = configurationService.getProperty(\"dspace.ui.url\");\n } else {\n baseURL = configurationService.getProperty(\"dspace.ui.url\");\n baseURL += request.getContextPath();\n }\n }\n return baseURL;\n } else if (configurationService.getBooleanProperty(\"webui.feed.localresolve\")) {\n // return a link to handle in repository\n return resolveURL(request, null) + \"/handle/\" + dso.getHandle();\n } else {\n // link to the Handle server or other persistent URL source\n return HandleServiceFactory.getInstance().getHandleService().getCanonicalForm(dso.getHandle());\n }\n }", "public interface Resolver extends AdaptrisComponent {\r\n\r\n /**\r\n * Create facts for insertion into the Rule Engine\r\n * \r\n * @param msg the AdaptrisMessage\r\n * @return a list object which will be passed in to the rule engine.\r\n * @throws RuleException wrapping any underlying exception.\r\n */\r\n Object[] create(AdaptrisMessage msg) throws RuleException;\r\n\r\n /**\r\n * Result result of the rule engine to the AdaptrisMessage\r\n * <p>\r\n * This simply provides the objects previously created with\r\n * {@link #create(AdaptrisMessage)}, so it may have no meaning if your\r\n * concrete implementation maintains its own state.\r\n * </p>\r\n * \r\n * @param result the AdaptrisMessage\r\n * @param src the objects that were inserted into the rule engine.\r\n * @throws RuleException wrapping any underlying exception.\r\n */\r\n void resolve(Object[] src, AdaptrisMessage result) throws RuleException;\r\n}", "@Override\n\tpublic String resolve(EObject from) {\n\t\tString resolvename = super.resolve(from);\n\t\tif (null == resolvename) {\n\t\t\treturn resolvename;\n\t\t}\n\t\t\n\t\tif (!resolvename.endsWith(\".sats\") && !resolvename.endsWith(\".dats\")) {\n\t\t\t// todo didn't check whether path is valid\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// System.out.println(\"resolve: \" + resolvename);\n\t\t\n\t\tResource resource = from.eResource();\n\t\tURI importUri = URI.createURI(resolvename);\n\t\t// is already valid uri\n\t\tif (EcoreUtil2.isValidUri(resource, importUri)) {\n\t\t\treturn resolvename;\n\t\t}\n\n\t\t// get the name of the project\n\t\tString projname = null;\n\t\tString path = from.eResource().getURI().toString();\n\t\tfinal String platform = \"platform:/resource/\";\n\t\t// final String filesys = \"file://\";\n\t\tif (path.startsWith(platform)) {\n\t\t\tprojname = path.substring(platform.length()).split(\"/\")[0];\n\t\t\t// System.out.println(\"projname is \" + projname);\n\t\t resolvename = platform + projname + \"/\" + resolvename;\n\t\t}\n\n\t\treturn resolvename;\n\n\t}", "public interface IAbsolute extends IMeasurement_descriptor{\n\n\tpublic IRI iri();\n\n}", "Symbol resolve(String name);", "private static List<Map<String, Object>> parseRelsType(RelsType value) {\n\t\tList<Map<String, Object>> mapList = new ArrayList<>();\n\n\t\tfor (RelType rel : value.getRel()) {\n\t\t\tMap<String, Object> relMap = new HashMap<String, Object>();\n\t\t\tString inferenceprovenance = rel.getInferenceprovenance();\n\t\t\tString provenanceaction = rel.getProvenanceaction();\n\t\t\tString trust = rel.getTrust();\n\t\t\t// System.out.println(\"-----------------------------------------------\");\n\t\t\t// System.out.println(\"\\tREL:\");\n\t\t\t// System.out.println(\"\\tinferenceprovenance: \" + inferenceprovenance);\n\t\t\t// System.out.println(\"\\tprovenanceaction: \" + provenanceaction);\n\t\t\t// System.out.println(\"\\ttrust: \" + trust);\n\n\t\t\trelMap.put(\"inferenceprovenance\", inferenceprovenance);\n\t\t\trelMap.put(\"provenanceaction\", provenanceaction);\n\t\t\trelMap.put(\"trust\", trust);\n\n\t\t\t// List<Map<String, Object>> listElement = new ArrayList<>();\n\n\t\t\tfor (JAXBElement<?> relElement : rel.getToOrTitleOrWebsiteurl()) {\n\t\t\t\t// decide what to todo\n\t\t\t\t// System.out.println(\"\\t\\tname: \" + relElement.getName().toString() + \" value:\n\t\t\t\t// \"\n\t\t\t\t// + relElement.getValue().toString());\n\t\t\t\t// System.out.println(\"\\t\\tname: \" + relElement.getName().toString());\n\t\t\t\tString NAME = relElement.getName().toString();\n\n\t\t\t\tif (relElement.getValue() instanceof RelToType) {\n\t\t\t\t\tRelToType r = (RelToType) relElement.getValue();\n\t\t\t\t\tMap<String, Object> m = parseRelToType(r);\n\t\t\t\t\t// Map<String, Object> res = new HashMap<>();\n\t\t\t\t\trelMap.put(NAME, m);\n\t\t\t\t\t// listElement.add(res);\n\n\t\t\t\t} else if (relElement.getValue() instanceof OptionalClassedSchemedElement) {\n\t\t\t\t\tOptionalClassedSchemedElement val = (OptionalClassedSchemedElement) relElement.getValue();\n\t\t\t\t\tMap<String, Object> o = parseOptionalClassedSchemedElement(val);\n\t\t\t\t\t// Map<String, Object> res = new HashMap<>();\n\t\t\t\t\trelMap.put(NAME, o);\n\t\t\t\t\t// listElement.add(res);\n\n\t\t\t\t} else if (relElement.getValue() instanceof FundingFlatType) {\n\t\t\t\t\tFundingFlatType fund = (FundingFlatType) relElement.getValue();\n\t\t\t\t\tMap<String, Object> o = parseFundingFlatType(fund);\n\t\t\t\t\t// Map<String, Object> res = new HashMap<>();\n\t\t\t\t\trelMap.put(NAME, o);\n\t\t\t\t\t// listElement.add(res);\n\n\t\t\t\t} else if (relElement.getValue() instanceof String) {\n\t\t\t\t\tString val = (String) relElement.getValue();\n\t\t\t\t\t// Map<String, Object> res = new HashMap<>();\n\t\t\t\t\trelMap.put(NAME, val);\n\n\t\t\t\t} else if (relElement.getValue() instanceof WebresourceType) {\n\t\t\t\t\t// String val = (String) relElement.getValue();\n\n\t\t\t\t\tWebresourceType web = (WebresourceType) relElement.getValue();\n\t\t\t\t\tString url = web.getUrl();\n\t\t\t\t\t// Map<String, Object> res = new HashMap<>();\n\t\t\t\t\trelMap.put(NAME, url);\n\n\t\t\t\t} else if (relElement.getValue() instanceof ClassedSchemedElement) {\n\t\t\t\t\tClassedSchemedElement cl = (ClassedSchemedElement) relElement.getValue();\n\t\t\t\t\tMap<String, Object> o = parseClassedSchemedElement(cl);\n\t\t\t\t\t// Map<String, Object> res = new HashMap<>();\n\t\t\t\t\trelMap.put(NAME, o);\n\t\t\t\t\t// listElement.add(res);\n\n\t\t\t\t} else {\n\t\t\t\t\t// Map<String, Object> res = new HashMap<>();\n\t\t\t\t\trelMap.put(NAME, null);\n\t\t\t\t\t// listElement.add(res);\n\n\t\t\t\t}\n\n\t\t\t\t// relMap.put(\"ToOrTitleOrWebsiteurl\", listElement);\n\n\t\t\t\t// System.out.println(\"\\t\" + relElement.getValue().toString());\n\t\t\t}\n\t\t\tmapList.add(relMap);\n\n\t\t}\n\t\treturn mapList;\n\t}", "public interface ISrApplicationEnvLink {\r\n\r\n /**\r\n * Add a link between an Environment and an Application\r\n *\r\n * @param appId Id of the Application\r\n * @param appVersionId Id of the ApplicationVersion\r\n * @param appVersionInstanceId Id of the ApplicationVersionInstance\r\n * @param envId Id of the Environment\r\n */\r\n public void addApplicationEnvLink(String appId, String appVersionId, String appVersionInstanceId,\r\n String envId);\r\n\r\n /**\r\n * Remove a link between an Environment and an Application\r\n *\r\n * @param appId Id of the Application\r\n * @param appVersionId Id of the ApplicationVersion\r\n * @param appVersionInstanceId Id of the ApplicationVersionInstance\r\n */\r\n public void removeApplicationEnvLink(String appId, String appVersionId, String appVersionInstanceId);\r\n\r\n /**\r\n * Get the ApplicationVersionInstances of an Environment\r\n *\r\n * @param envId ID of the Environment\r\n * @return a list of ApplicationVersionInstances\r\n */\r\n public List<ApplicationVersionInstanceVO> findApplicationVersionInstancesByEnv(String envId);\r\n\r\n /**\r\n * Get the Environment of an ApplicationVersionInstance\r\n *\r\n * @param appId Id of the Application\r\n * @param appVersionId Id of the ApplicationVersion\r\n * @param appVersionInstanceId Id of the ApplicationVersionInstance\r\n * @return the Environment\r\n */\r\n public EnvironmentVO getEnvByApplicationVersionInstance(String appId, String appVersionId,\r\n String appVersionInstanceId);\r\n}", "Concept resolveInstance(Instance instance);", "public interface ExternalReferenced extends ObserverParameter {\n String getExternalId();\n}" ]
[ "0.6369767", "0.62164295", "0.56383216", "0.5586659", "0.5568452", "0.5400194", "0.5389639", "0.53368527", "0.53223044", "0.5290372", "0.5278367", "0.526843", "0.52618766", "0.52137434", "0.52113235", "0.5207603", "0.5199187", "0.51697373", "0.5147752", "0.5146997", "0.51014847", "0.5096155", "0.5072531", "0.5021832", "0.5021266", "0.50165814", "0.49967456", "0.49902767", "0.49743897", "0.49691418", "0.49581164", "0.49534553", "0.49481744", "0.4925394", "0.49134278", "0.49061707", "0.48994294", "0.4889879", "0.4882846", "0.48759532", "0.48566335", "0.48518017", "0.48441783", "0.48370486", "0.48148325", "0.481381", "0.4800446", "0.4794873", "0.47931665", "0.47809902", "0.47761044", "0.47637558", "0.4759147", "0.47585508", "0.4747014", "0.47468126", "0.47407356", "0.4736643", "0.4724948", "0.47136", "0.47135144", "0.4709256", "0.4704231", "0.46988627", "0.46985507", "0.4692156", "0.46854344", "0.46793127", "0.46754852", "0.4671018", "0.46659884", "0.46648255", "0.46622455", "0.46521157", "0.4649412", "0.46472344", "0.4639339", "0.4635523", "0.46327385", "0.46296883", "0.46273327", "0.46223742", "0.46120656", "0.46106282", "0.4606648", "0.4601557", "0.45984346", "0.4595076", "0.45887336", "0.45812735", "0.45791337", "0.45760542", "0.4568435", "0.45663452", "0.45484883", "0.45484316", "0.45435336", "0.4542659", "0.4538049", "0.45361084" ]
0.7092903
0
Returns the status of resolution. If completely resolved returns enum value "RESOLVED", if not returns "UNRESOLVED", in case reference of grouping/typedef is added to uses/type but it's not resolved "INTRA_FILE_RESOLVED" is returned.
ResolvableStatus getResolvableStatus();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Resolvable {\n\n /**\n * Returns the status of resolution. If completely resolved returns enum\n * value \"RESOLVED\", if not returns \"UNRESOLVED\", in case reference of\n * grouping/typedef is added to uses/type but it's not resolved\n * \"INTRA_FILE_RESOLVED\" is returned.\n *\n * @return status of resolution\n */\n ResolvableStatus getResolvableStatus();\n\n /**\n * Set the status of type/uses resolution. If completely resolved set enum\n * value \"RESOLVED\", if not set it to \"UNRESOLVED\", in case reference of\n * grouping/typedef is added to uses/type but it's not resolved\n * \"INTRA_FILE_RESOLVED\" should be set.\n *\n * @param resolvableStatus status of resolution\n */\n void setResolvableStatus(ResolvableStatus resolvableStatus);\n\n /**\n * Resolves the linking.\n *\n * @throws DataModelException data model exception\n */\n void resolve()\n throws DataModelException;\n}", "ResolutionResult getResolutionCandidates();", "SummaryStatusEnum getSummaryStatus();", "public EndpointStatusType getStatus()\n\t\t{\n\t\t\tElement statusElement = XMLUtils.findChild(endpointElement, STATUS_ELEMENT_NAME);\n\t\t\treturn statusElement == null ? null : EndpointStatusType.parseString(statusElement\n\t\t\t\t.getTextContent());\n\t\t}", "public java.lang.Object getResolution() {\n return resolution;\n }", "public net.opengis.gml.x32.StringOrRefType getStatus()\n {\n synchronized (monitor())\n {\n check_orphaned();\n net.opengis.gml.x32.StringOrRefType target = null;\n target = (net.opengis.gml.x32.StringOrRefType)get_store().find_element_user(STATUS$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "@DISPID(18)\r\n\t// = 0x12. The runtime will prefer the VTID if present\r\n\t@VTID(20)\r\n\tjava.lang.String completionStatus();", "void setResolvableStatus(ResolvableStatus resolvableStatus);", "public StatusOfCause getStatus() {\n\t\treturn StatusOfCause.valueOf(statusValue);\n\t}", "public ID getCompletionStatus() { \r\n\t\tID retVal = this.getTypedField(20, 0);\r\n\t\treturn retVal;\r\n }", "public static ConflictResolution get(int value)\n {\n switch (value)\n {\n case ROLLBACK_VALUE: return ROLLBACK;\n case ABORT_VALUE: return ABORT;\n case FAIL_VALUE: return FAIL;\n case IGNORE_VALUE: return IGNORE;\n case REPLACE_VALUE: return REPLACE;\n }\n return null;\n }", "public int getStatus()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STATUS$12, 0);\n if (target == null)\n {\n return 0;\n }\n return target.getIntValue();\n }\n }", "public String getStatus()\r\n {\n return (\"1\".equals(getField(\"ApprovalStatus\")) && \"100\".equals(getField(\"HostRespCode\")) ? \"Approved\" : \"Declined\");\r\n }", "public Enumerations.status getStatus() {\n\t\treturn status;\n\n\t}", "public int resolution()\r\n\t{\r\n\t\treturn resolution;\r\n\t}", "public java.lang.String getPatStatus() {\n java.lang.Object ref = patStatus_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n patStatus_ = s;\n }\n return s;\n }\n }", "public java.lang.String getPatStatus() {\n java.lang.Object ref = patStatus_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n patStatus_ = s;\n }\n return s;\n }\n }", "public final String getStatusAsString() {\n\t\tif ( m_status >= 0 && m_status < _fileStates.length)\n\t\t\treturn _fileStates[m_status];\n\t\treturn \"Unknown\";\n\t}", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "public ResolutionTypeElements getResolutionTypeAccess() {\n\t\treturn eResolutionType;\n\t}", "StatusItem getReconcileStatus();", "java.lang.String getPatStatus();", "java.lang.String getPatStatus();", "Integer getStatus();", "public ID getRxa20_CompletionStatus() { \r\n\t\tID retVal = this.getTypedField(20, 0);\r\n\t\treturn retVal;\r\n }", "public EnumVar getStatus() {\n return status;\n }", "private int matchLevel(QualifiedTypeReference typeRef, boolean resolve) {\n if (!resolve) {\n if (this.pkgName == null) {\n return this.needsResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;\n } else {\n switch (this.matchMode) {\n case EXACT_MATCH:\n case PREFIX_MATCH:\n if (CharOperation.prefixEquals(this.pkgName, CharOperation.concatWith(typeRef.tokens, '.'), this.isCaseSensitive)) {\n return this.needsResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;\n } else {\n return IMPOSSIBLE_MATCH; }\n case PATTERN_MATCH:\n char[] pattern = this.pkgName[this.pkgName.length-1] == '*' ? this.pkgName : CharOperation.concat(this.pkgName, \".*\".toCharArray()); //$NON-NLS-1$\n if (CharOperation.match(pattern, CharOperation.concatWith(typeRef.tokens, '.'), this.isCaseSensitive)) {\n return this.needsResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;\n } else {\n return IMPOSSIBLE_MATCH; }\n default:\n return IMPOSSIBLE_MATCH; } }\n } else {\n TypeBinding typeBinding = typeRef.binding;\n if (typeBinding == null) {\n return INACCURATE_MATCH;\n } else {\n if (typeBinding instanceof ArrayBinding) {\n typeBinding = ((ArrayBinding)typeBinding).leafComponentType; }\n if (typeBinding == null) {\n return INACCURATE_MATCH;\n } else if (typeBinding instanceof ReferenceBinding) {\n PackageBinding pkgBinding = ((ReferenceBinding)typeBinding).fPackage;\n if (this.matches(pkgBinding.compoundName)) {\n return ACCURATE_MATCH;\n } else {\n return IMPOSSIBLE_MATCH; }\n } else {\n return IMPOSSIBLE_MATCH; } } } }", "public java.lang.String getPatStatus() {\n java.lang.Object ref = patStatus_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n patStatus_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getPatStatus() {\n java.lang.Object ref = patStatus_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n patStatus_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "com.google.ads.googleads.v13.enums.FeedMappingStatusEnum.FeedMappingStatus getStatus();", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkResolution() {\n\t\tboolean flag = oTest.checkResolution();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "Optional<URI> getStatusURI() {\n return getCompensatorLink(\"status\");\n }", "@java.lang.Override\n public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override\n public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override\n public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override\n public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override\n public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override\n public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override\n public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override\n public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override\n public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override\n public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "public int getStatus();", "public int getStatus();", "public int getStatus();", "@java.lang.Override public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "@java.lang.Override public entities.Torrent.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n entities.Torrent.Status result = entities.Torrent.Status.valueOf(status_);\n return result == null ? entities.Torrent.Status.UNRECOGNIZED : result;\n }", "com.google.ads.googleads.v13.enums.AccountLinkStatusEnum.AccountLinkStatus getStatus();", "public String getDnResolvability() {\n int v4Resv = checkDomainNameResolvable(\"ipv4\");\n int v6Resv = checkDomainNameResolvable(\"ipv6\");\n if (v4Resv == DN_RESOLVABLE && v6Resv == DN_RESOLVABLE)\n return IP_TYPE_IPV4_IPV6_BOTH;\n if (v4Resv == DN_RESOLVABLE && v6Resv != DN_RESOLVABLE)\n return IP_TYPE_IPV4_ONLY;\n if (v4Resv != DN_RESOLVABLE && v6Resv == DN_RESOLVABLE)\n return IP_TYPE_IPV6_ONLY;\n if (v4Resv == DN_UNRESOLVABLE && v6Resv == DN_UNRESOLVABLE)\n return IP_TYPE_NONE;\n return IP_TYPE_UNKNOWN;\n }", "EntryStatus getStatus();", "@Override\r\n public Status getStatus() {\n if (message != null) {\r\n return Status.BROKEN;\r\n }\r\n // has the file been parsed yet\r\n if (url == null) {\r\n return Status.NOTCONNECTED;\r\n }\r\n return Status.CONNECTED;\r\n }", "java.lang.String getPatStatusCode();", "java.lang.String getPatStatusCode();", "public Status getStatus() {\n return result;\n }", "com.clarifai.grpc.api.status.Status getStatus();", "OperationStatusType status();", "public StatusEnum getStatus() {\n return status;\n }", "public TransmissionProtocol.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n TransmissionProtocol.Status result = TransmissionProtocol.Status.valueOf(status_);\n return result == null ? TransmissionProtocol.Status.UNRECOGNIZED : result;\n }", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "private static ServerStatus determineServerStatus(final @Nullable PendingChange pendingChange) {\n if (pendingChange.isCandidate()) {\n return ServerStatus.Unversioned.INSTANCE;\n }\n\n final List<ServerStatusType> types = pendingChange.getChangeTypes();\n\n // check the list of statuses for how to process the pending change\n if (types.contains(ServerStatusType.ADD)) {\n return new ServerStatus.ScheduledForAddition(pendingChange);\n } else if (types.contains(ServerStatusType.EDIT) && types.contains(ServerStatusType.RENAME)) {\n return new ServerStatus.RenamedCheckedOut(pendingChange);\n } else if (types.contains(ServerStatusType.EDIT)) {\n return new ServerStatus.CheckedOutForEdit(pendingChange);\n } else if (types.contains(ServerStatusType.RENAME)) {\n return new ServerStatus.Renamed(pendingChange);\n } else if (types.contains(ServerStatusType.DELETE)) {\n return new ServerStatus.ScheduledForDeletion(pendingChange);\n } else if (types.contains(ServerStatusType.UNDELETE)) {\n return new ServerStatus.Undeleted(pendingChange);\n } else if (types.contains(ServerStatusType.BRANCH)) {\n // treat branch like an addition\n return new ServerStatus.ScheduledForAddition(pendingChange);\n } else if (types.contains(ServerStatusType.MERGE)) {\n // treat merge like an edit unless the file is gone, then it must have been a delete\n if (Path.fileExists(pendingChange.getLocalItem())) {\n return new ServerStatus.CheckedOutForEdit(pendingChange);\n } else {\n return new ServerStatus.ScheduledForDeletion(pendingChange);\n }\n } else if (types.contains(ServerStatusType.LOCK)) {\n return new ServerStatus.Locked(pendingChange);\n } else {\n logger.error(\"Unhandled status type: \" + Arrays.toString(pendingChange.getChangeTypes().toArray()));\n return null;\n }\n }", "public StatusEnum solve()\n {\n while (status == StatusEnum.RUNNING)\n {\n step();\n }\n return status;\n }", "public String getResolution() {\n return this.resolution;\n }", "org.hl7.fhir.ObservationStatus getStatus();", "public final int getFileStatus() {\n\t return m_fileStatus;\n\t}", "public TransmissionProtocol.Status getStatus() {\n @SuppressWarnings(\"deprecation\")\n TransmissionProtocol.Status result = TransmissionProtocol.Status.valueOf(status_);\n return result == null ? TransmissionProtocol.Status.UNRECOGNIZED : result;\n }", "String getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "public StatusEnum getStatus()\n {\n return status;\n }", "public java.lang.String getStatus() {\n java.lang.Object ref = status_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n status_ = s;\n }\n return s;\n }\n }", "public java.lang.String getStatus() {\n java.lang.Object ref = status_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n status_ = s;\n }\n return s;\n }\n }", "boolean isResolvable(String name);", "public RtnStatusEnum getRtnStatus() {\n return rtnStatus;\n }", "public interface StatusCapable\n{\n /**\n * Get the status of the object.\n * @return\n * the status of the object\n */\n SummaryStatusEnum getSummaryStatus();\n}", "@DISPID(15)\n\t// = 0xf. The runtime will prefer the VTID if present\n\t@VTID(25)\n\tjava.lang.String status();", "public SearchStatus getStatus();", "public Status getStatus();" ]
[ "0.6105788", "0.546783", "0.53312576", "0.5316247", "0.5301199", "0.526688", "0.5239079", "0.51519704", "0.5109627", "0.50588953", "0.5058845", "0.5008398", "0.50041187", "0.49839336", "0.4970337", "0.49607572", "0.49607572", "0.49516982", "0.49481863", "0.49481863", "0.49481863", "0.49481863", "0.49181494", "0.4914154", "0.4896419", "0.4896419", "0.48805884", "0.48747972", "0.48499668", "0.48495328", "0.48407772", "0.48407772", "0.4839806", "0.48331776", "0.48320803", "0.4820665", "0.4820665", "0.4820665", "0.4820665", "0.4820665", "0.4820665", "0.4820665", "0.4820665", "0.4820665", "0.4818892", "0.48149386", "0.48149386", "0.48149386", "0.4812805", "0.48114684", "0.48114684", "0.48114684", "0.48114684", "0.48114684", "0.48114684", "0.48114684", "0.48114684", "0.48114684", "0.4810499", "0.48092344", "0.48080152", "0.48078272", "0.48062128", "0.48062128", "0.48011553", "0.47932714", "0.47900483", "0.47870925", "0.4785376", "0.4784811", "0.4784811", "0.4784811", "0.4784811", "0.4784811", "0.4784811", "0.4784811", "0.4784811", "0.4784811", "0.4784811", "0.4784811", "0.47846225", "0.47694895", "0.4764406", "0.4760935", "0.4760716", "0.47583237", "0.475271", "0.475271", "0.475271", "0.475271", "0.475271", "0.4752314", "0.47276202", "0.47276202", "0.472686", "0.47203374", "0.47140422", "0.47120973", "0.4711616", "0.47107893" ]
0.6889564
0
Set the status of type/uses resolution. If completely resolved set enum value "RESOLVED", if not set it to "UNRESOLVED", in case reference of grouping/typedef is added to uses/type but it's not resolved "INTRA_FILE_RESOLVED" should be set.
void setResolvableStatus(ResolvableStatus resolvableStatus);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Resolvable {\n\n /**\n * Returns the status of resolution. If completely resolved returns enum\n * value \"RESOLVED\", if not returns \"UNRESOLVED\", in case reference of\n * grouping/typedef is added to uses/type but it's not resolved\n * \"INTRA_FILE_RESOLVED\" is returned.\n *\n * @return status of resolution\n */\n ResolvableStatus getResolvableStatus();\n\n /**\n * Set the status of type/uses resolution. If completely resolved set enum\n * value \"RESOLVED\", if not set it to \"UNRESOLVED\", in case reference of\n * grouping/typedef is added to uses/type but it's not resolved\n * \"INTRA_FILE_RESOLVED\" should be set.\n *\n * @param resolvableStatus status of resolution\n */\n void setResolvableStatus(ResolvableStatus resolvableStatus);\n\n /**\n * Resolves the linking.\n *\n * @throws DataModelException data model exception\n */\n void resolve()\n throws DataModelException;\n}", "@JsonIgnore\n public void setKnownType(ResourceType knownType) {\n setType(XmlQNameEnumUtil.toURI(knownType));\n }", "ResolvableStatus getResolvableStatus();", "@Override synchronized public void resolve()\n{\n if (isResolved()) return;\n\n RebaseMain.logD(\"START RESOLVE\");\n for (RebaseJavaFile jf : file_nodes) {\n RebaseMain.logD(\"FILE: \" + jf.getFile().getFileName());\n }\n\n clearResolve();\n\n RebaseJavaTyper jt = new RebaseJavaTyper(base_context);\n RebaseJavaResolver jr = new RebaseJavaResolver(jt);\n jt.assignTypes(this);\n jr.resolveNames(this);\n\n all_types = new HashSet<RebaseJavaType>(jt.getAllTypes());\n\n setResolved(true);\n}", "public void setResolution(java.lang.Object resolution) {\n this.resolution = resolution;\n }", "private EndpointStatusType(String type)\n\t\t{\n\t\t\tthis.type = type;\n\t\t}", "public void setStatus(StatusOfCause status) {\n\t\tthis.statusValue = status.value;\n\t}", "public void setUseStatus(TIdentifiable user, TIdentifiable resource, TUseStatus status) {\r\n int row = m_users.getIndex(user);\r\n int column = m_resources.getIndex(resource);\r\n if (row >= 0 && column >= 0) m_associations[column][row] = status;\r\n }", "private void resolveOutcomeWithChecks(FileValidationReport fileValRep) {\n\t\tif (fileValRep.hasFailedChecks()) {\n\t\t\tfileValRep.setValidationOutcome(ValidationOutcome.NOT_VALID);\n\t\t} else {\n\t\t\tfileValRep.setValidationOutcome(ValidationOutcome.VALID);\n\t\t}\n\t}", "public void setType(URI type) {\n this.type = type;\n }", "void resolveTypes(SymbolTable symbolTable) {\n defs.resolveTypes(symbolTable); // resolve all the definitions\n // DO NOT resolve anything else! (ie don't call super.resolveTypes() )\n // this is just a placeholder for a group of symbols with the same name\n }", "void setValue(gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type.Value.Enum value);", "private void apply(final boolean hideOnSuccess)\r\n {\r\n if (_selectedRadio == _lookupRadio)\r\n {\r\n final String folder = _lookupEditorPanel.getContainer();\r\n final String schema = _lookupEditorPanel.getSchemaName();\r\n final String table = _lookupEditorPanel.getTableName();\r\n final String typeURI = _lookupEditorPanel.getTypeURI();\r\n PropertyType type = null == typeURI ? null : PropertyType.fromURI(typeURI);\r\n\r\n// _log(\"apply \" + folder + \" \" + schema + \" \" + table + \" \" + typeURI);\r\n\r\n if (_empty(schema) || _empty(table))\r\n {\r\n Window.alert(\"Schema name and table name must not be empty\");\r\n return;\r\n }\r\n\r\n if (!_current.isRangeEditable && null != _current.getValue())\r\n type = _current.getValue().getPropertyType();\r\n\r\n if (null == type)\r\n {\r\n Window.alert(\"Type was not set correctly\");\r\n return;\r\n }\r\n\r\n _current.setValue(new LookupConceptType(type, folder, schema, table));\r\n if (hideOnSuccess)\r\n hide();\r\n }\r\n else // !lookup\r\n {\r\n _current.setValue(_selectedRadio._type);\r\n if (hideOnSuccess)\r\n hide();\r\n }\r\n }", "public void setRelDocStatus(int v) \n {\n \n if (this.relDocStatus != v)\n {\n this.relDocStatus = v;\n setModified(true);\n }\n \n \n }", "protected void setResourceType(ResourceType resrcType) {\n\tthis.resourceType = resrcType;\n }", "@Override\n\tpublic void setType(int type) {\n\t\t_dmGtStatus.setType(type);\n\t}", "public IRoadSensor setRoadStatus(ERoadStatus s);", "public void setStatus(EnumVar status) {\n this.status = status;\n }", "public void setStatus(net.opengis.gml.x32.StringOrRefType status)\n {\n generatedSetterHelperImpl(status, STATUS$0, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "public synchronized void setComplete() {\n status = Status.COMPLETE;\n }", "public TypeBinding resolveType(ClassScope scope) {\n\tthis.constant = Constant.NotAConstant;\n\tif (this.resolvedType != null) // is a shared type reference which was already resolved\n\t\treturn this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error\n\n\tTypeBinding type = this.resolvedType = getTypeBinding(scope);\n\tif (this.resolvedType == null)\n\t\treturn null; // detected cycle while resolving hierarchy\t\n\tif (!this.resolvedType.isValidBinding()) {\n\t\treportInvalidType(scope);\n\t\treturn null;\n\t}\n\tif (isTypeUseDeprecated(this.resolvedType, scope))\n\t\treportDeprecatedType(scope);\n\ttype = scope.environment().convertToRawType(type);\n\tif (type.isRawType() \n\t\t\t&& (this.bits & IgnoreRawTypeCheck) == 0 \n\t\t\t&& scope.compilerOptions().getSeverity(CompilerOptions.RawTypeReference) != ProblemSeverities.Ignore) {\n\t\tscope.problemReporter().rawTypeReference((/*@OwnPar*/ /*@NoRep*/ TypeReference)this, type);\n\t}\t\t\t\n\treturn this.resolvedType = type;\t\n}", "public void setStatus(Status newStatus){\n status = newStatus;\n }", "@IcalProperty(pindex = PropertyInfoIndex.STATUS,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true\n )\n public void setStatus(final String val) {\n status = val;\n }", "private FileImport_RunImporter_PauseProcessing_Current_Type_ID_Enum( int v) {\n value = v;\n }", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkResolution() {\n\t\tboolean flag = oTest.checkResolution();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "public void setResolution(int value) {\n this.resolution = value;\n }", "public TypeBinding resolveType(BlockScope scope, boolean checkBounds) {\n\tthis.constant = Constant.NotAConstant;\n\tif (this.resolvedType != null) // is a shared type reference which was already resolved\n\t\treturn this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error\n\n\tTypeBinding type = this.resolvedType = getTypeBinding(scope);\n\tif (this.resolvedType == null)\n\t\treturn null; // detected cycle while resolving hierarchy\t\n\tif (!this.resolvedType.isValidBinding()) {\n\t\treportInvalidType(scope);\n\t\treturn null;\n\t}\n\tif (isTypeUseDeprecated(this.resolvedType, scope))\n\t\treportDeprecatedType(scope);\n\ttype = scope.environment().convertToRawType(type);\n\tif (type.isRawType() \n\t\t\t&& (this.bits & IgnoreRawTypeCheck) == 0 \n\t\t\t&& scope.compilerOptions().getSeverity(CompilerOptions.RawTypeReference) != ProblemSeverities.Ignore) {\t\n\t\tscope.problemReporter().rawTypeReference((/*@OwnPar*/ /*@NoRep*/ TypeReference)this, type);\n\t}\t\t\t\n\treturn this.resolvedType = type;\n}", "@Override\n\tpublic void setFileStatus(int FileStatus) {\n\t\t\n\t}", "public void setStatus(StatusEnum status) {\n this.status = status;\n }", "public void setStatus(com.redknee.util.crmapi.soap.subscriptions.xsd._2010._06.BundleStatus param){\n localStatusTracker = true;\n \n this.localStatus=param;\n \n\n }", "@Test\n public void setGetStatus() {\n final CourseType courseType = new CourseType();\n final Integer STATUS = 1;\n courseType.setStatus(STATUS);\n\n assertSame(STATUS, courseType.getStatus());\n }", "synchronized void reloadStatus(Status s) {\n result = s;\n }", "public void setRelType(String fqRelType)\r\n {\r\n if (fqRelType.startsWith(\"http://\")) {\r\n rel = fqRelType.substring(25);\r\n } else {\r\n this.rel = fqRelType;\r\n }\r\n }", "public void setTargetType(ResolvableType targetType)\n/* */ {\n/* 249 */ this.targetType = targetType;\n/* */ }", "public void setStatus(boolean stat) {\n\t\tstatus = stat;\n\t}", "public void resolve()\n {\n /* The complaint is marked as resolved */\n resolved = true;\n \n /* The deadline no longer exists */\n deadline = null;\n }", "@Override\n\tpublic void setStatus(boolean status) {\n\t\t_candidate.setStatus(status);\n\t}", "private static void setPhysicalLinkTypeEnum(final OptionSet options, final ProjectProperties props)\n {\n if (props.getProjectType() == ProjectType.PROJECT_PHYLINK)\n {\n if (options.hasArgument(OPTION_PHYS_LINK_TYPE))\n {\n final String type = (String)options.valueOf(OPTION_PHYS_LINK_TYPE);\n \n final PhysicalLinkTypeEnum plType = PhysicalLinkTypeEnum.fromValue(type);\n props.setPhysicalLinkTypeEnum(plType);\n }\n }\n }", "public void setUpdatingTaskStatusUpdatesResourceStatus(boolean flag)\r\n {\r\n m_updatingTaskStatusUpdatesResourceStatus = flag;\r\n }", "@Override\n public void setFamilyServiceStatus(String status) {\n }", "@XmlAttribute (namespace = CommonNamespaces.GEDCOMX_COMMON_NAMESPACE)\n @XmlQNameEnumRef (ResourceType.class)\n @XmlSchemaType (name = \"anyURI\", namespace = XMLConstants.W3C_XML_SCHEMA_NS_URI)\n public URI getType() {\n return type;\n }", "public void setStatus(Enumerations.status status) {\n\t\tthis.status = status;\n\t}", "@JsonIgnore\r\n public void setType(URI type) {\r\n this.type = type == null ? null : new TypeReference<AlternateIdType>(type);\r\n }", "public void setSOHStatus(SOHStatusType SOHStatus) {\r\n/* 472 */ this._SOHStatus = SOHStatus;\r\n/* */ }", "public void changeSEREnumType(UnitProtoType.Type unitType, String strFont) {\n mnExprRecogType = EXPRRECOGTYPE_ENUMTYPE;\n mType = unitType;\n mstrFont = strFont;\n mlistChildren = new LinkedList<StructExprRecog>();\n }", "@Test\n public void servlet25_status_doesntParseLocalTypes() throws Exception {\n class LocalResponse extends ServletRuntimeTest.HttpServletResponseImpl {}\n assertThat(servlet25.status(new LocalResponse())).isNull();\n }", "public void setStatus(CMnServicePatch.RequestStatus st) {\n status = st;\n }", "@JsonIgnore\r\n public void setKnownType(AlternateIdType knownType) {\r\n this.type = knownType == null ? null : new TypeReference<AlternateIdType>(knownType);\r\n }", "@Override\n public boolean isValidUse(AnnotatedDeclaredType declarationType, AnnotatedDeclaredType useType, Tree tree) {\n //TODO: this was copied from the Fenum Checker. Does this vistor need this hack??\n // The checker calls this method to compare the annotation used in a\n // type to the modifier it adds to the class declaration. As our default\n // modifier is Unqualified, this results in an error when a non-subtype\n // is used. Can we use FenumTop as default instead?\n return true;\n }", "SummaryStatusEnum getSummaryStatus();", "private FamilyStatusType(String legacyLabel) {\n this.legacyLabel = legacyLabel;\n }", "public void setAlternateStatus(java.lang.String newAlternateStatus) {\n\talternateStatus = newAlternateStatus;\n}", "public void setType(JiraType type) {\n this.type = type;\n }", "public void setStatus(String newStatus){\n\n //assigns the value of newStatus to the status field\n this.status = newStatus;\n }", "@IcalProperty(pindex = PropertyInfoIndex.PERCENT_COMPLETE,\n jname = \"percentComplete\",\n todoProperty = true)\n public void setPercentComplete(final Integer val) {\n percentComplete = val;\n }", "@JsonProperty(\"type\")\n public void setType(TypeEnum type) {\n this.type = type;\n }", "public void setgetStatus()\r\n\t{\r\n\t\tthis.status = 'S';\r\n\t}", "public void setStatus(String stat)\n {\n status = stat;\n }", "public void setResolution(String resolution) {\n this.resolution = resolution;\n }", "@JsonProperty(\"type\")\n @ApiModelProperty(value = \"How the node is processed.\")\n public TypeEnum getType() {\n return type;\n }", "public abstract void updateStatus(PresenceType presenceType);", "private int matchLevel(QualifiedTypeReference typeRef, boolean resolve) {\n if (!resolve) {\n if (this.pkgName == null) {\n return this.needsResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;\n } else {\n switch (this.matchMode) {\n case EXACT_MATCH:\n case PREFIX_MATCH:\n if (CharOperation.prefixEquals(this.pkgName, CharOperation.concatWith(typeRef.tokens, '.'), this.isCaseSensitive)) {\n return this.needsResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;\n } else {\n return IMPOSSIBLE_MATCH; }\n case PATTERN_MATCH:\n char[] pattern = this.pkgName[this.pkgName.length-1] == '*' ? this.pkgName : CharOperation.concat(this.pkgName, \".*\".toCharArray()); //$NON-NLS-1$\n if (CharOperation.match(pattern, CharOperation.concatWith(typeRef.tokens, '.'), this.isCaseSensitive)) {\n return this.needsResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;\n } else {\n return IMPOSSIBLE_MATCH; }\n default:\n return IMPOSSIBLE_MATCH; } }\n } else {\n TypeBinding typeBinding = typeRef.binding;\n if (typeBinding == null) {\n return INACCURATE_MATCH;\n } else {\n if (typeBinding instanceof ArrayBinding) {\n typeBinding = ((ArrayBinding)typeBinding).leafComponentType; }\n if (typeBinding == null) {\n return INACCURATE_MATCH;\n } else if (typeBinding instanceof ReferenceBinding) {\n PackageBinding pkgBinding = ((ReferenceBinding)typeBinding).fPackage;\n if (this.matches(pkgBinding.compoundName)) {\n return ACCURATE_MATCH;\n } else {\n return IMPOSSIBLE_MATCH; }\n } else {\n return IMPOSSIBLE_MATCH; } } } }", "@ApiModelProperty(value = \"A URI reference according to IETF RFC 3986 that identifies the problem type\")\n \n public String getType() {\n return type;\n }", "public void setStatus(String status)\n\t\t{\n\t\t\tConferenceInfoDocument.this.setStatus(mediaElement, status);\n\t\t}", "public void setNetStatus(java.lang.String param) {\r\n localNetStatusTracker = param != null;\r\n\r\n this.localNetStatus = param;\r\n }", "public void setStatus(SearchStatus status) {\n this.status = status;\n }", "public void setStatus(EPPNameVerificationStatus aStatus) {\n\t\tthis.status = aStatus;\n\t}", "public void setStatus(java.lang.Object status) {\n this.status = status;\n }", "public void setStatus(int newStatus) {\n status = newStatus;\n }", "public void setDocStatus (String DocStatus);", "public void setDocStatus (String DocStatus);", "public void setDocStatus (String DocStatus);", "public void setResolution(Resolution resolution) {\n this.resolution = resolution;\n }", "void setTypeOfFacet(TypeOfFacet typeOfFacet);", "private FileImport_RunImporter_PauseProcessing_Schedule_Type_ID_Enum( int v) {\n value = v;\n }", "public void setSiteStatus(SiteStatus value) { _siteStatus = value; }", "@NoProxy\n @IcalProperty(pindex = PropertyInfoIndex.BUSYTYPE,\n vavailabilityProperty = true)\n public void setBusyType(final int val) {\n busyType = val;\n }", "protected void setWiStatus(NbaProcessStatusProvider newWiStatus) {\t\t//SPR2992 changed method signature\n\t\twiStatus = newWiStatus;\n\t}", "public void setOdlOpenflowStatus2(String x) throws SnmpStatusException;", "private FileType(ParameterResolver resolver){\r\n\t\tthis.resolver = resolver;\r\n\t}", "public ResolutionTypeElements getResolutionTypeAccess() {\n\t\treturn eResolutionType;\n\t}", "public final void setFileStatus(int status) {\n\t m_fileStatus = status;\n\t}", "public void setComplete(boolean param){\n \n // setting primitive attribute tracker to true\n localCompleteTracker =\n true;\n \n this.localComplete=param;\n \n\n }", "public void setStatus(String Status) {\n this.Status = Status;\n }", "public void setStatus(String Status) {\n this.Status = Status;\n }", "public interface StatusCapable\n{\n /**\n * Get the status of the object.\n * @return\n * the status of the object\n */\n SummaryStatusEnum getSummaryStatus();\n}", "public void setStatus(EndpointStatusType status)\n\t\t{\n\t\t\tConferenceInfoDocument.this.setStatus(endpointElement,\n\t\t\t\tstatus == null ? null : status.toString());\n\t\t}", "public void setDone(){\n this.status = \"Done\";\n }", "public void updateStatus(String change) {\n\n\t\tif (change.equals(\"SUBMITTED\")) {\n\t\t\tstatus = Enumerations.status.SUBMITTED;\n\t\t} else if (change.equals(\"REJECTED\")) {\n\t\t\tstatus = Enumerations.status.REJECTED;\n\t\t} else if (change.equals(\"APPROVED\")) {\n\t\t\tstatus = Enumerations.status.APPROVED;\n\t\t} else if (change.equals(\"ACCEPTED\")) {\n\t\t\tstatus = Enumerations.status.ACCEPTED;\n\t\t} else if (change.equals(\"DECLINED\")) {\n\t\t\tstatus = Enumerations.status.DECLINED;\n\t\t}\n\n\t}", "@Override\n public SymbolReference<ResolvedReferenceTypeDeclaration> tryToSolveType(String name) {\n try {\n return foundTypes.get(name, () -> {\n SymbolReference<ResolvedReferenceTypeDeclaration> result = tryToSolveTypeUncached(name);\n if (result.isSolved()) {\n return SymbolReference.solved(result.getCorrespondingDeclaration());\n }\n return result;\n });\n } catch (ExecutionException e) {\n throw new RuntimeException(e);\n }\n }", "public void xsetStatus(org.apache.xmlbeans.XmlInt status)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlInt target = null;\n target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(STATUS$12, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(STATUS$12);\n }\n target.set(status);\n }\n }", "public void setStatus(boolean newStatus);", "@Option(name = \"-R\", aliases = \"--resolution\", metaVar = \"<resolution>\", usage = \"Aggregate resolution in seconds.\")\n void setResolution(Duration resolution) {\n m_resolution = resolution;\n }", "@IcalProperty(pindex = PropertyInfoIndex.REQUEST_STATUS,\n adderName = \"requestStatus\",\n jname = \"requestStatus\",\n eventProperty = true,\n todoProperty = true,\n journalProperty = true,\n freeBusyProperty = true)\n public void setRequestStatuses(final Set<BwRequestStatus> val) {\n requestStatuses = val;\n }", "@Transient\n public Status getStatusAsType() {\n return Status.valueOf(this.status);\n }", "public void setType(String val) {\n type = val;\n }", "public void setStatus(String st) {\n status = CMnServicePatch.getRequestStatus(st);\n }", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n outState.putBoolean(STATE_RESOLVING_ERROR, mResolvingError);\n }", "public void setRelocationMethod(Relocation r){\n relocationType = r;\n }", "public void setRtnStatus(RtnStatusEnum rtnStatus) {\n this.rtnStatus = rtnStatus;\n }" ]
[ "0.5955531", "0.5537551", "0.53313375", "0.518511", "0.51642275", "0.50396556", "0.5032243", "0.49195433", "0.48664746", "0.48030686", "0.48014125", "0.47994608", "0.47842595", "0.47556195", "0.47301948", "0.46871662", "0.4682394", "0.46800327", "0.46722442", "0.46721178", "0.4668298", "0.4656588", "0.46411404", "0.46407", "0.46152496", "0.4609768", "0.45909926", "0.45821893", "0.45814058", "0.45784706", "0.45731995", "0.45711848", "0.45674685", "0.45575753", "0.45425895", "0.45397437", "0.4537036", "0.45185113", "0.45171055", "0.45140716", "0.4513234", "0.4508643", "0.45075288", "0.45056462", "0.44940633", "0.4486837", "0.44823927", "0.4481763", "0.44746768", "0.44718292", "0.4468102", "0.4467987", "0.44578665", "0.44577906", "0.444725", "0.44444484", "0.44425935", "0.44288054", "0.44264907", "0.4416964", "0.44163582", "0.44101173", "0.4400813", "0.43937045", "0.43926868", "0.4392585", "0.43886736", "0.4386362", "0.4383259", "0.43784365", "0.43784365", "0.43784365", "0.43745098", "0.43725872", "0.43725032", "0.43592772", "0.43573007", "0.43550858", "0.43396068", "0.43291086", "0.43271142", "0.43234923", "0.431934", "0.4315031", "0.4315031", "0.43135053", "0.43095925", "0.43076915", "0.4304133", "0.42977566", "0.42941377", "0.4293788", "0.4290981", "0.42877832", "0.42870712", "0.42824805", "0.42735276", "0.4272578", "0.4270756", "0.42705914" ]
0.6386687
0
/ Assembled paths methods
public String getProjectPath() { return projectPath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String path(String path1, String path2);", "public abstract String getPath();", "public abstract String getPath();", "PathSegments getPath();", "public ObjectNode resolvePaths();", "public String getPath()\r\n/* 26: */ {\r\n/* 27:57 */ return this.path;\r\n/* 28: */ }", "@Override\n\tpublic void pathGenerated() {\n\n\t}", "abstract public List<S> getPath();", "public void visitPath(Path path) {\n\t\t\n\t}", "void path(String path);", "void path(String path);", "CtPath getPath();", "Path getPath();", "public abstract ScaledPathArray getPathList();", "public String getPath(String from, String to, String pathAlgo);", "public interface Paths extends Constructible, Extensible<Paths> {\n\n /**\n * Adds the given path item to this Paths and return this instance of Paths\n *\n * @param name\n * a path name in the format valid for a Paths object. The field name MUST begin with a slash.\n * @param item\n * the path item added to the list of paths. null values will be rejected (implementation will throw an\n * exception) or ignored.\n * @return the current Paths instance\n */\n Paths addPathItem(String name, PathItem item);\n\n /**\n * Removes the given path item to this Paths.\n *\n * @param name\n * a path name that will be removed.\n */\n void removePathItem(String name);\n\n /**\n * Returns a copy map (potentially immutable) of the path items.\n *\n * @return all items\n */\n Map<String, PathItem> getPathItems();\n\n /**\n * Set the path items map to this Paths\n *\n * @param items\n * a map containing the list of paths. Keys MUST begin with a slash.\n */\n void setPathItems(Map<String, PathItem> items);\n\n /**\n * Check whether a path item is present in the map. This is a convenience method for\n * <code>getPathItems().containsKey(name)</code>\n *\n * @param name\n * a path name in the format valid for a Paths object.\n * @return a boolean to indicate if the path item is present or not.\n */\n default boolean hasPathItem(String name) {\n Map<String, PathItem> map = getPathItems();\n if (map == null) {\n return false;\n }\n return map.containsKey(name);\n }\n\n /**\n * Returns a path item for a given name. This is a convenience method for <code>getPathItems().get(name)</code>\n *\n * @param name\n * a path name in the format valid for a Paths object.\n * @return the corresponding path item or null.\n */\n default PathItem getPathItem(String name) {\n Map<String, PathItem> map = getPathItems();\n if (map == null) {\n return null;\n }\n return map.get(name);\n }\n\n}", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "public abstract List<String> path();", "private void setPath(){\r\n // get the reversed path\r\n ArrayList<Grid> reversedPath = new ArrayList<>();\r\n int index = _endIndex;\r\n reversedPath.add(_map.get_grid(index));\r\n while(index != _startIndex){\r\n index = _map.get_grid(index).get_parent();\r\n reversedPath.add(_map.get_grid(index));\r\n }\r\n\r\n // get the final path in the correct order\r\n int length = reversedPath.size();\r\n for(int i=length-1;i>=0;i--){\r\n _path.add(reversedPath.get(i));\r\n }\r\n }", "public interface PathComponent\n{\n /** \n * Get the analysis bits for this path component, as defined in the WalkerFactory.\n * @return One of WalkerFactory#BIT_DESCENDANT, etc.\n */\n public int getAnalysisBits();\n\n}", "public Path getPath();", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "public abstract Shape createPath();", "Path createPath();", "public static void main(String[] args) {\n\n\t\tSystem.out.println(path(4,4));\n\t}", "@Override protected void pathInit() {\r\n\r\n // place any initialization code here\r\n\r\n }", "private LinkedList<Point> constructPath(Point a, HashMap<Point, Point> allPaths) {\n\t\tLinkedList<Point> ret = new LinkedList<Point>();\n\t\tret.addLast(a);\n\t\tPoint current = a;\n\t\twhile (allPaths.containsKey(current)) {\n\t\t\tcurrent = allPaths.get(current);\n\t\t\tret.addLast(current);\n\t\t}\n\t\treturn ret;\n\t}", "IPath getPath();", "@SuppressWarnings(\"unused\")\n\tpublic static void main(String[] args) throws URISyntaxException {\n\t\tSystem.out.println(\"Creating \\\"Path\\\" instances:\");\n\t\tSystem.out.println(\" p1 = d:/Temp/E53Z/Archives/\");\n\t\tSystem.out.println(\" p2 = /tmp/foo\");\n\t\tSystem.out.println(\" p3 = file:///Users/joe/FileTest.java\");\n\t\tPath p1 = Paths.get(\"d:/Temp/E53Z/Archives/\");\n\t\tPath p2 = Paths.get(\"/tmp/foo\");\n\t\tPath p3 = Paths.get(URI.create(\"file:///Users/joe/FileTest.java\"));\n\n\t\t/* Retrieving Information about a Path */\n\t\tSystem.out.println(\"\\nRetrieving information about a Path\");\n\t\tSystem.out.format(\" p1.toString: %s%n\", p1.toString() );\n\t\tSystem.out.format(\" p1.getFileName: %s%n\", p1.getFileName() );\n\t\tSystem.out.format(\" p1.getName(0): %s%n\", p1.getName(0) );\n\t\tSystem.out.format(\" p1.getNameCount: %d%n\", p1.getNameCount());\n\t\tSystem.out.format(\" p1.subpath(0,2): %s%n\", p1.subpath(0,2) );\n\t\tSystem.out.format(\" p1.getParent: %s%n\", p1.getParent() );\n\t\tSystem.out.format(\" p1.getRoot: %s%n\", p1.getRoot() );\n\t\t\n\t\t/* Removing Redundancies From a Path */\n\t\tSystem.out.println(\"\\nRemoving redundancies From a Path\");\n\t\tPath p4 = Paths.get(\"/home/sally/../joe/foo\");\n\t\tSystem.out.println(\" Ful path: \" + p4);\n\t\tSystem.out.println(\" Normalized path: \" + p4.normalize());\n\n\t\t/* Converting a Path */\n\t\tSystem.out.println(\"\\nConverting a Path\");\n\t\tPath p5 = Paths.get(\"/Home/logFile/\");\n\t\tSystem.out.println(\" p5.toUri: \" + p5.toUri());\n\t\tSystem.out.println(\" p5.toAbsolutePath: \" + p5.toAbsolutePath());\n\t\ttry {\n\t\t\tSystem.out.println(\" p5.toRealPath: \" + p5.toRealPath(LinkOption.NOFOLLOW_LINKS));\n\t\t} catch (NoSuchFileException x) {\n\t\t System.out.format(\" Exception: p5 = %s: no such\" + \" file or directory%n\", p5);\n\t\t // Logic for case when file doesn't exist.\n\t\t} catch (IOException x) {\n\t\t System.out.format(\" Exception: %s%n\", x);\n\t\t // Logic for other sort of file error.\n\t\t}\n\t\t\n\t\t/* Joining two paths */\n\t\tSystem.out.println(\"\\nJoining two paths\");\n\t\tPath p6 = Paths.get(\"/Home/logFile/\");\n\t\tPath p7 = Paths.get(\"log.txt\");\n\t\tSystem.out.println(\" p6 = \" + p6);\n\t\tSystem.out.println(\" p7 = \" + p7);\n\t\tSystem.out.println(\" p6.resolve(p7) = \" + p6.resolve(p7));\n\t\t\n\t\t/* Creating a path between two paths */\n\t\tSystem.out.println(\"\\nCreating a path between two paths\");\n\t\tPath p8 = Paths.get(\"D:/Home/logFileS/\");\n\t\tPath p9 = Paths.get(\"D:/Home/TextFiles/\");\n\t\tSystem.out.println(\" p8 = \" + p8);\n\t\tSystem.out.println(\" p9 = \" + p9);\n\t\tSystem.out.println(\" p8.relativize(p9) = \" + p8.relativize(p9));\n\t\tSystem.out.println(\" !!! Paths.get(\\\"\\\").toAbsolutePath().toString(); = \" + Paths.get(\"\").toAbsolutePath().toString());\n\t\tSystem.out.println(\" !!! p8.relativize(p9).toAbsolutePath() = \" + p8.relativize(p9).toAbsolutePath());\n\t\t\n\t\t/* Comparing Two Paths */\n\t\tSystem.out.println(\"\\nComparing two paths\");\n\t\tPath p10 = Paths.get(\"D:/Home/logFiles\");\n\t\tPath p11 = Paths.get(\"D:/Home\");\n\t\tPath p12 = Paths.get(\"logFiles\");\n\t\tPath p13 = Paths.get(\"D:/Home/logFiles\");\n\t\tPath p14 = Paths.get(\"D:/Home/TextFiles/../logFiles\");\n\t\tSystem.out.println(\" p10 = \" + p10);\n\t\tSystem.out.println(\" p11 = \" + p11);\n\t\tSystem.out.println(\" p12 = \" + p12);\n\t\tSystem.out.println(\" p13 = \" + p13);\n\t\tSystem.out.println(\" p14 = \" + p14);\n\t\tSystem.out.println(\" p10.equils(p13) = \" + p10.equals(p13));\n\t\tSystem.out.println(\" p10.startsWith(p11) = \" + p10.startsWith(p11));\n\t\tSystem.out.println(\" p10.endsWith(p12) = \" + p10.endsWith(p12));\n\t\tSystem.out.println(\" p10.equils(p14) = \" + p10.equals(p14));\n\t\ttry {\n\t\t\tSystem.out.println(\" Files.isSameFile(p10, p14) = \" + Files.isSameFile(p10, p14)); // It is true if both files(folders) exist.\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t/* Iterating over Path \"p10\") */\n\t\tSystem.out.print(\"\\nIterating over Path \\\"p10\\\"\\n \");\n\t\tfor(Path name: p10){\n\t\t\tSystem.out.print(\"[\" + name + \"]\");\n\t\t}\n\t\t\n\t\t\n\t}", "protected abstract int[] getPathElements();", "org.openxmlformats.schemas.drawingml.x2006.main.CTPath2D addNewPath();", "public Path getPath(String path,String nombreArchivo);", "PathKeys getPathKeys();", "public abstract String getFullPath();", "static void ex4() {\n\t\tSystem.out.println(\"subPath\");\n\t\t/*\n\t\t * this is a path within a path\n\t\t */\n\t\tString parent=\"C:/Users/noelf/OneDrive/JavaProgrammer2019-20/WorkSpace2/F9.2InteractingWithPathAndFiles\";\n\t\tString child=\"src/com/android/Examples.java\";\n\t\tPath fullPath=Paths.get(parent,child);\n\t\tSystem.out.println(fullPath);\n\t\tSystem.out.println(\"is this an absolute path \"+fullPath.isAbsolute());\n\t\t/*C:\\Users\\noelf\\OneDrive\\JavaProgrammer2019-20\\WorkSpace2\\F9.2InteractingWithPathAndFiles\n\t\t\\src\\com\\android\\Examples.java\n\t\t*/\n\t\t//this path has 10 elements, 9 folders and one file\n\t\t//the elements use array numbering, so these elements go from 0 to 9\n\t\tSystem.out.println(\"there are \"+fullPath.getNameCount()+\" elements in the path\");\n\t\t/*\n\t\t * subpath returns any relative subpath within the abseloute path\n\t\t * there are 10 elements in this path\n\t\t * so this path goes from index postion 0, up to index positiion 5, but DOES NOT include\n\t\t * index position 5, operates exact same way as the subString() method of the String\n\t\t * this creates the relative path\n\t\t * Users\\noelf\\OneDrive\\JavaProgrammer2019-20\\WorkSpace2\n\t\t * subpath returns a relative path\n\t\t */\n\t\tSystem.out.println(\"subpath from 0 to 5 but not including 5 \"+fullPath.subpath(0, 5));\n\t\t/*\n\t\t * this starts at index position 3, which is the folder \"JavaProgrammer2019-20\"\n\t\t * and up to index position 7, but not including position 7, which will be the folder \"src\"\n\t\t */\n\t\tPath relPath=fullPath.subpath(3, 7);\n\t\t//prints off\n\t\t/*\n\t\t * JavaProgrammer2019-20\\->index postion 3\n\t\t * WorkSpace2\\ -> index position 4\n\t\t * F9.2InteractingWithPathAndFiles -> index position 5\n\t\t * \\src -> index position 6\n\t\t * index position 7 is NOT included\n\t\t */\n\t\tSystem.out.println(relPath);\n\t\tSystem.out.println(relPath.isAbsolute());//false as it's a relative path\n\t\t/*\n\t\t * this will print\n\t\t * C:\\Users\\noelf\\OneDrive\\JavaProgrammer2019-20\\WorkSpace2\\F9.2InteractingWithPathAndFiles\\\n\t\t * JavaProgrammer2019-20\\WorkSpace2\\F9.2InteractingWithPathAndFiles\\src\n\t\t */\n\t\tSystem.out.println(relPath.toAbsolutePath());\n\t\ttry {\n\t\t\t/*\n\t\t\t * if you attempt to access an element in a path by subpath that does not exist\n\t\t\t * you will get an IllegalArguementException\n\t\t\t */\n\t\t\tSystem.out.println(\"subpath from 0 to 10 \"+fullPath.subpath(0, 10));//this wil compile, no exception\n\t\t\t//this will give us an illegalArugmenmt exception as this is out of bounds as only\n\t\t\t//10 elements in our path, so only goes UP TO 10, but numbering is 0 t0 9\n\t\t//\tSystem.out.println(\"subpath from 0 to 11 \"+fullPath.subpath(0, 11));\n\t\t\t/*\n\t\t\t * can't have an empty path or subpath, this is a empty path, so this will throw an\n\t\t\t * IllegalArguement exception as well\n\t\t\t */\n\t\t\tSystem.out.println(\"subpath from 2 to 2 \"+fullPath.subpath(2, 2));\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"exception is \"+e);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "@Override\r\n public void dirToPath(String[] arr) {\n\r\n }", "public static void main(String[] args) {\n\t\tPath path = Paths.get(\"F:\\\\AccentureMayBatch\\\\JSTLProject\");\r\n\r\n\t\r\n\r\n\t\tSystem.out.format(\"toString: %s%n\", path.toString());\r\n\t\tSystem.out.format(\"getFileName: %s%n\", path.getFileName());\r\n\t\tSystem.out.format(\"getName(0): %s%n\", path.getName(0));\r\n\t\tSystem.out.format(\"getNameCount: %d%n\", path.getNameCount());\r\n\t\tSystem.out.format(\"subpath(0,2): %s%n\", path.subpath(0,2));\r\n\t\tSystem.out.format(\"getParent: %s%n\", path.getParent());\r\n\t\tSystem.out.format(\"getRoot: %s%n\", path.getRoot());\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFiles.list(new File(\".\").toPath())\r\n\t\t\t .forEach(System.out::println);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tFiles.walk(new File(\".\").toPath())\r\n\t\t .filter(p -> !p.getFileName()\r\n\t\t .toString().startsWith(\".\"))\r\n\t\t .forEach(System.out::println);\r\n\t\t\t\r\n\t\t\tFiles.lines(new File(\"./src/com/polaris/utility/PathDemo.java\").toPath())\r\n\t\t .map(s -> s.trim())\r\n\t\t .filter(s -> !s.isEmpty())\r\n\t\t .forEach(System.out::println);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//finding path and sub path into string\r\n\t\t Path start = Paths.get(\".\");\r\n\t\t int maxDepth = 5;\r\n\t\t try (Stream<Path> stream = Files.find(start, maxDepth, (path2, attr) -> String.valueOf(path2).endsWith(\".java\"))) \r\n\t\t {\r\n\t\t String joined = stream\r\n\t\t .sorted()\r\n\t\t .map(String::valueOf)\r\n\t\t .collect(Collectors.joining(\"; \"));\r\n\t\t System.out.println(\"Found: \" + joined);\r\n\t\t } catch (IOException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t \r\n\t\t\r\n\t\tPath source = Paths.get(\"./src/com/polaris/utility/PathDemo.java\");\r\n\t\tPath target = Paths.get(\"F:/yatrabakup\");\r\n\t\t\r\n/*\r\n\t\ttry {\r\n\t\t // Files.copy(source, target);\r\n\t\t} catch(FileAlreadyExistsException fae) {\r\n\t\t fae.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t // something else went wrong\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\t*/\r\n\t\ttry (BufferedReader reader = Files.newBufferedReader(Paths.get(\"f:\\\\yatrabakup\\\\EmployeeData.csv\"))) {\r\n\t\t reader.lines().map(String::toLowerCase).forEach(System.out::println);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public interface Paths {\n String svg_path=\"M 1024.00,0.00\\n\"+\n \"C 1024.00,0.00 1024.00,1024.00 1024.00,1024.00\\n\"+\n \"1024.00,1024.00 0.00,1024.00 0.00,1024.00\\n\"+\n \"0.00,1024.00 0.00,0.00 0.00,0.00\\n\"+\n \"0.00,0.00 1024.00,0.00 1024.00,0.00 Z\\n\"+\n \"M 471.00,82.00\\n\"+\n \"C 471.00,82.00 436.00,86.46 436.00,86.46\\n\"+\n \"402.29,92.53 363.11,105.02 332.00,119.31\\n\"+\n \"212.66,174.10 124.94,279.73 93.13,407.00\\n\"+\n \"93.13,407.00 84.32,449.00 84.32,449.00\\n\"+\n \"84.32,449.00 83.71,459.00 83.71,459.00\\n\"+\n \"83.71,459.00 82.04,468.00 82.04,468.00\\n\"+\n \"82.04,468.00 82.04,477.00 82.04,477.00\\n\"+\n \"81.41,483.79 80.02,482.44 80.00,493.00\\n\"+\n \"80.00,493.00 80.00,531.00 80.00,531.00\\n\"+\n \"80.02,541.55 81.41,540.19 81.91,547.00\\n\"+\n \"83.59,569.87 87.15,592.72 92.74,615.00\\n\"+\n \"100.84,647.21 115.95,687.81 132.22,716.80\\n\"+\n \"132.22,716.80 151.28,747.23 151.28,747.23\\n\"+\n \"151.28,747.23 165.74,768.69 165.74,768.69\\n\"+\n \"165.74,768.69 170.22,773.74 170.22,773.74\\n\"+\n \"170.22,773.74 180.37,787.49 180.37,787.49\\n\"+\n \"180.37,787.49 189.63,797.04 189.63,797.04\\n\"+\n \"189.63,797.04 195.01,804.24 195.01,804.24\\n\"+\n \"195.01,804.24 221.76,830.99 221.76,830.99\\n\"+\n \"221.76,830.99 228.24,835.74 228.24,835.74\\n\"+\n \"228.24,835.74 235.76,842.99 235.76,842.99\\n\"+\n \"235.76,842.99 249.49,853.14 249.49,853.14\\n\"+\n \"249.49,853.14 255.31,858.26 255.31,858.26\\n\"+\n \"255.31,858.26 271.58,869.13 271.58,869.13\\n\"+\n \"291.22,882.33 311.33,894.77 333.00,904.45\\n\"+\n \"333.00,904.45 341.00,907.55 341.00,907.55\\n\"+\n \"367.84,919.54 388.74,925.41 417.00,932.47\\n\"+\n \"417.00,932.47 449.00,938.71 449.00,938.71\\n\"+\n \"449.00,938.71 457.00,939.29 457.00,939.29\\n\"+\n \"462.41,939.99 463.86,940.92 470.00,941.08\\n\"+\n \"470.00,941.08 480.00,941.08 480.00,941.08\\n\"+\n \"487.10,941.88 487.04,942.99 496.00,943.00\\n\"+\n \"496.00,943.00 532.00,943.00 532.00,943.00\\n\"+\n \"540.96,942.99 540.90,941.88 548.00,941.00\\n\"+\n \"548.00,941.00 558.00,941.00 558.00,941.00\\n\"+\n \"558.00,941.00 567.00,939.29 567.00,939.29\\n\"+\n \"567.00,939.29 575.00,938.71 575.00,938.71\\n\"+\n \"600.22,935.42 641.23,924.46 665.00,915.29\\n\"+\n \"704.92,899.89 742.59,878.10 776.69,852.26\\n\"+\n \"776.69,852.26 793.76,837.74 793.76,837.74\\n\"+\n \"793.76,837.74 800.24,832.99 800.24,832.99\\n\"+\n \"800.24,832.99 815.67,817.67 815.67,817.67\\n\"+\n \"815.67,817.67 830.99,802.24 830.99,802.24\\n\"+\n \"830.99,802.24 836.37,795.04 836.37,795.04\\n\"+\n \"836.37,795.04 843.63,787.49 843.63,787.49\\n\"+\n \"843.63,787.49 853.78,773.74 853.78,773.74\\n\"+\n \"853.78,773.74 858.80,768.26 858.80,768.26\\n\"+\n \"858.80,768.26 865.22,758.47 865.22,758.47\\n\"+\n \"865.22,758.47 883.32,731.61 883.32,731.61\\n\"+\n \"912.11,682.93 931.69,628.01 939.70,572.00\\n\"+\n \"939.70,572.00 940.29,564.00 940.29,564.00\\n\"+\n \"940.29,564.00 941.83,554.00 941.83,554.00\\n\"+\n \"941.83,554.00 943.09,532.00 943.09,532.00\\n\"+\n \"943.09,532.00 944.00,520.00 944.00,520.00\\n\"+\n \"944.09,461.78 934.76,408.42 913.76,354.00\\n\"+\n \"913.76,354.00 903.46,328.00 903.46,328.00\\n\"+\n \"903.46,328.00 888.10,299.00 888.10,299.00\\n\"+\n \"848.42,227.81 787.58,169.24 716.00,130.54\\n\"+\n \"697.75,120.67 678.43,112.81 659.00,105.63\\n\"+\n \"633.52,96.22 601.90,88.14 575.00,84.30\\n\"+\n \"575.00,84.30 567.00,83.71 567.00,83.71\\n\"+\n \"557.81,82.51 560.60,82.12 550.00,82.00\\n\"+\n \"550.00,82.00 530.00,80.14 530.00,80.14\\n\"+\n \"530.00,80.14 487.00,80.14 487.00,80.14\\n\"+\n \"478.45,81.70 480.15,81.95 471.00,82.00 Z\\n\"+\n \"M 621.75,530.91\\n\"+\n \"C 622.02,527.46 613.08,514.77 610.99,510.91\\n\"+\n \"610.99,510.91 582.50,458.00 582.50,458.00\\n\"+\n \"582.50,458.00 574.45,440.00 574.45,440.00\\n\"+\n \"574.45,440.00 562.02,415.00 562.02,415.00\\n\"+\n \"562.02,415.00 558.45,406.00 558.45,406.00\\n\"+\n \"558.45,406.00 547.55,384.00 547.55,384.00\\n\"+\n \"547.55,384.00 544.45,376.00 544.45,376.00\\n\"+\n \"544.45,376.00 537.55,362.00 537.55,362.00\\n\"+\n \"537.55,362.00 534.45,354.00 534.45,354.00\\n\"+\n \"534.45,354.00 519.54,322.00 519.54,322.00\\n\"+\n \"519.54,322.00 513.96,306.00 513.96,306.00\\n\"+\n \"513.96,306.00 490.85,254.00 490.85,254.00\\n\"+\n \"487.38,245.70 482.11,237.17 482.00,228.00\\n\"+\n \"482.00,228.00 482.00,224.00 482.00,224.00\\n\"+\n \"482.15,213.62 490.05,209.14 496.26,213.13\\n\"+\n \"504.24,218.27 512.34,230.36 517.45,238.42\\n\"+\n \"517.45,238.42 565.14,314.91 565.14,314.91\\n\"+\n \"565.14,314.91 597.99,367.28 597.99,367.28\\n\"+\n \"597.99,367.28 627.99,417.28 627.99,417.28\\n\"+\n \"627.99,417.28 633.72,427.83 633.72,427.83\\n\"+\n \"633.72,427.83 642.04,442.99 642.04,442.99\\n\"+\n \"642.04,442.99 647.01,451.09 647.01,451.09\\n\"+\n \"647.01,451.09 662.50,482.00 662.50,482.00\\n\"+\n \"665.34,487.69 671.71,498.69 670.27,504.91\\n\"+\n \"668.95,510.57 661.64,511.99 657.23,514.72\\n\"+\n \"657.23,514.72 636.00,526.23 636.00,526.23\\n\"+\n \"636.00,526.23 629.08,529.26 629.08,529.26\\n\"+\n \"624.38,531.87 623.04,535.59 618.00,538.00\\n\"+\n \"619.10,535.68 621.58,532.97 621.75,530.91 Z\\n\"+\n \"M 436.60,334.30\\n\"+\n \"C 436.60,334.30 449.66,322.96 449.66,322.96\\n\"+\n \"449.66,322.96 454.84,315.00 454.84,315.00\\n\"+\n \"458.55,309.64 464.74,303.48 471.00,301.36\\n\"+\n \"483.14,297.26 496.23,303.73 504.96,312.09\\n\"+\n \"507.66,314.67 511.26,318.44 512.30,322.09\\n\"+\n \"513.68,326.94 513.16,338.17 511.62,343.00\\n\"+\n \"511.62,343.00 508.00,352.00 508.00,352.00\\n\"+\n \"497.67,351.97 498.41,349.50 489.97,344.58\\n\"+\n \"489.97,344.58 465.96,330.58 465.96,330.58\\n\"+\n \"463.47,329.14 453.27,323.10 450.91,325.36\\n\"+\n \"449.58,326.64 451.17,328.37 452.10,329.27\\n\"+\n \"454.46,331.55 459.05,334.01 462.00,335.50\\n\"+\n \"462.00,335.50 492.91,352.99 492.91,352.99\\n\"+\n \"496.07,354.74 503.04,358.49 503.71,362.18\\n\"+\n \"504.12,364.49 503.07,371.74 501.40,373.40\\n\"+\n \"500.07,374.73 498.69,374.72 497.00,375.00\\n\"+\n \"497.00,375.00 498.00,384.00 498.00,384.00\\n\"+\n \"489.25,387.43 489.12,391.54 488.00,400.00\\n\"+\n \"488.00,400.00 484.56,402.29 484.56,402.29\\n\"+\n \"484.56,402.29 476.00,415.76 476.00,415.76\\n\"+\n \"474.01,415.99 471.15,416.11 469.28,415.76\\n\"+\n \"469.28,415.76 450.91,405.14 450.91,405.14\\n\"+\n \"450.91,405.14 431.28,393.99 431.28,393.99\\n\"+\n \"428.52,392.33 417.78,384.60 414.91,387.36\\n\"+\n \"413.58,388.64 415.17,390.37 416.10,391.27\\n\"+\n \"418.75,393.84 423.68,396.31 426.99,398.00\\n\"+\n \"426.99,398.00 436.04,403.42 436.04,403.42\\n\"+\n \"436.04,403.42 459.09,416.86 459.09,416.86\\n\"+\n \"464.58,420.20 469.84,421.09 466.87,429.00\\n\"+\n \"464.69,434.81 460.98,439.65 458.04,445.01\\n\"+\n \"458.04,445.01 434.58,486.04 434.58,486.04\\n\"+\n \"434.58,486.04 412.58,524.04 412.58,524.04\\n\"+\n \"412.58,524.04 406.75,535.74 406.75,535.74\\n\"+\n \"406.75,535.74 403.11,540.22 403.11,540.22\\n\"+\n \"403.11,540.22 399.78,546.77 399.78,546.77\\n\"+\n \"399.78,546.77 390.27,562.01 390.27,562.01\\n\"+\n \"390.27,562.01 377.78,584.77 377.78,584.77\\n\"+\n \"377.78,584.77 355.78,622.77 355.78,622.77\\n\"+\n \"352.15,628.93 347.72,634.90 346.00,642.00\\n\"+\n \"346.00,642.00 342.00,642.00 342.00,642.00\\n\"+\n \"327.89,641.76 309.68,627.91 297.00,621.34\\n\"+\n \"292.74,619.14 282.33,612.37 282.23,607.00\\n\"+\n \"282.16,602.98 286.67,598.03 288.56,594.40\\n\"+\n \"288.56,594.40 293.73,585.99 293.73,585.99\\n\"+\n \"293.73,585.99 309.28,558.77 309.28,558.77\\n\"+\n \"309.28,558.77 322.22,535.23 322.22,535.23\\n\"+\n \"322.22,535.23 331.85,522.00 331.85,522.00\\n\"+\n \"331.85,522.00 360.15,472.00 360.15,472.00\\n\"+\n \"360.15,472.00 378.42,441.00 378.42,441.00\\n\"+\n \"378.42,441.00 399.85,404.00 399.85,404.00\\n\"+\n \"399.85,404.00 404.19,396.00 404.19,396.00\\n\"+\n \"404.19,396.00 412.07,386.00 412.07,386.00\\n\"+\n \"417.87,375.86 412.46,368.80 422.00,368.00\\n\"+\n \"419.91,356.08 424.78,360.59 428.99,351.99\\n\"+\n \"432.09,345.64 427.65,342.70 436.00,342.00\\n\"+\n \"436.00,340.05 435.83,335.96 436.60,334.30 Z\\n\"+\n \"M 497.00,467.00\\n\"+\n \"C 497.00,467.00 566.00,467.00 566.00,467.00\\n\"+\n \"566.00,467.00 577.46,468.74 577.46,468.74\\n\"+\n \"577.46,468.74 589.72,489.83 589.72,489.83\\n\"+\n \"589.72,489.83 600.58,509.96 600.58,509.96\\n\"+\n \"600.58,509.96 609.14,524.91 609.14,524.91\\n\"+\n \"609.14,524.91 615.84,535.28 615.84,535.28\\n\"+\n \"615.84,535.28 618.75,542.68 618.75,542.68\\n\"+\n \"618.75,542.68 633.00,569.00 633.00,569.00\\n\"+\n \"627.03,570.70 618.38,570.00 612.00,570.00\\n\"+\n \"612.00,570.00 575.00,570.00 575.00,570.00\\n\"+\n \"575.00,570.00 454.00,570.00 454.00,570.00\\n\"+\n \"454.00,570.00 413.00,570.00 413.00,570.00\\n\"+\n \"407.25,570.00 401.16,571.61 398.00,566.00\\n\"+\n \"398.00,566.00 408.22,549.23 408.22,549.23\\n\"+\n \"408.22,549.23 411.73,543.99 411.73,543.99\\n\"+\n \"411.73,543.99 415.53,536.16 415.53,536.16\\n\"+\n \"415.53,536.16 423.49,522.17 423.49,522.17\\n\"+\n \"423.49,522.17 445.49,484.17 445.49,484.17\\n\"+\n \"445.49,484.17 454.00,468.00 454.00,468.00\\n\"+\n \"454.00,468.00 497.00,467.00 497.00,467.00 Z\\n\"+\n \"M 702.17,542.80\\n\"+\n \"C 702.17,542.80 690.97,518.40 690.97,518.40\\n\"+\n \"690.97,518.40 685.92,508.73 685.92,508.73\\n\"+\n \"685.92,508.73 681.54,501.83 681.54,501.83\\n\"+\n \"681.54,501.83 678.58,494.04 678.58,494.04\\n\"+\n \"678.58,494.04 669.98,476.71 669.98,476.71\\n\"+\n \"668.90,474.57 667.26,470.96 669.00,468.74\\n\"+\n \"670.65,466.63 675.55,467.00 678.00,467.00\\n\"+\n \"678.00,467.00 771.00,467.00 771.00,467.00\\n\"+\n \"781.99,467.02 780.02,468.61 780.00,479.00\\n\"+\n \"780.00,479.00 780.00,540.00 780.00,540.00\\n\"+\n \"780.00,547.62 780.84,564.52 779.00,571.00\\n\"+\n \"779.00,571.00 755.00,570.00 755.00,570.00\\n\"+\n \"755.00,570.00 714.00,570.00 714.00,570.00\\n\"+\n \"712.50,563.82 705.24,548.95 702.17,542.80 Z\\n\"+\n \"M 244.00,544.00\\n\"+\n \"C 244.00,544.00 244.00,491.00 244.00,491.00\\n\"+\n \"244.00,491.00 244.00,475.00 244.00,475.00\\n\"+\n \"244.00,475.00 245.60,469.02 245.60,469.02\\n\"+\n \"245.60,469.02 253.00,468.00 253.00,468.00\\n\"+\n \"253.00,468.00 316.00,468.00 316.00,468.00\\n\"+\n \"316.00,468.00 348.00,469.00 348.00,469.00\\n\"+\n \"348.00,469.00 332.15,498.00 332.15,498.00\\n\"+\n \"332.15,498.00 320.46,519.00 320.46,519.00\\n\"+\n \"320.46,519.00 313.40,533.58 313.40,533.58\\n\"+\n \"313.40,533.58 305.83,546.80 305.83,546.80\\n\"+\n \"305.83,546.80 295.75,563.57 295.75,563.57\\n\"+\n \"295.75,563.57 291.45,569.18 291.45,569.18\\n\"+\n \"291.45,569.18 284.00,570.00 284.00,570.00\\n\"+\n \"284.00,570.00 245.00,571.00 245.00,571.00\\n\"+\n \"245.00,571.00 244.00,544.00 244.00,544.00 Z\\n\"+\n \"M 661.20,520.16\\n\"+\n \"C 665.01,518.10 669.48,513.82 674.00,513.69\\n\"+\n \"681.26,513.49 682.77,525.02 684.72,529.96\\n\"+\n \"685.98,533.16 687.84,534.10 689.23,536.51\\n\"+\n \"689.23,536.51 696.79,554.00 696.79,554.00\\n\"+\n \"702.32,565.71 706.00,565.74 706.00,580.00\\n\"+\n \"702.00,581.07 691.45,588.05 687.27,590.48\\n\"+\n \"677.93,595.93 672.90,598.00 662.00,598.00\\n\"+\n \"660.73,593.28 659.36,593.20 657.39,589.19\\n\"+\n \"657.39,589.19 654.74,583.08 654.74,583.08\\n\"+\n \"654.74,583.08 650.68,577.53 650.68,577.53\\n\"+\n \"650.68,577.53 640.75,561.49 640.75,561.49\\n\"+\n \"638.20,556.85 631.85,545.01 628.00,542.00\\n\"+\n \"628.00,542.00 628.00,536.00 628.00,536.00\\n\"+\n \"638.41,533.51 651.47,525.40 661.20,520.16 Z\\n\"+\n \"M 692.01,597.78\\n\"+\n \"C 692.01,597.78 700.77,593.28 700.77,593.28\\n\"+\n \"702.28,592.35 703.63,591.04 705.32,590.24\\n\"+\n \"707.11,589.89 710.07,590.01 712.00,590.24\\n\"+\n \"713.02,593.79 722.45,606.09 725.33,610.47\\n\"+\n \"725.33,610.47 749.32,646.47 749.32,646.47\\n\"+\n \"749.32,646.47 752.72,652.77 752.72,652.77\\n\"+\n \"752.72,652.77 761.84,667.20 761.84,667.20\\n\"+\n \"767.44,677.57 774.05,684.01 772.83,697.00\\n\"+\n \"772.00,705.79 771.20,707.97 765.00,714.14\\n\"+\n \"757.05,722.05 757.74,721.35 747.00,722.09\\n\"+\n \"743.86,722.30 742.31,722.92 739.00,722.68\\n\"+\n \"736.09,722.46 727.83,722.05 725.76,720.75\\n\"+\n \"718.69,716.32 714.23,704.93 710.57,697.60\\n\"+\n \"710.57,697.60 683.66,634.91 683.66,634.91\\n\"+\n \"680.50,626.27 674.27,614.84 674.00,606.00\\n\"+\n \"682.86,604.87 685.11,601.59 692.01,597.78 Z\\n\"+\n \"M 256.13,712.00\\n\"+\n \"C 256.13,712.00 264.84,685.00 264.84,685.00\\n\"+\n \"264.84,685.00 273.95,642.00 273.95,642.00\\n\"+\n \"273.95,642.00 277.26,627.00 277.26,627.00\\n\"+\n \"277.26,627.00 278.99,620.65 278.99,620.65\\n\"+\n \"278.99,620.65 284.00,618.00 284.00,618.00\\n\"+\n \"291.29,628.23 310.06,636.13 321.09,642.80\\n\"+\n \"327.01,646.39 330.75,645.36 334.00,652.00\\n\"+\n \"334.00,652.00 320.96,664.24 320.96,664.24\\n\"+\n \"320.96,664.24 315.04,668.38 315.04,668.38\\n\"+\n \"315.04,668.38 281.67,701.67 281.67,701.67\\n\"+\n \"281.67,701.67 263.48,719.19 263.48,719.19\\n\"+\n \"263.48,719.19 256.13,720.00 256.13,720.00\\n\"+\n \"256.13,720.00 256.13,712.00 256.13,712.00 Z\";\n}", "public String getPath();", "public String getPath();", "public String getPath();", "private void generatePath(List<Coordinate> source, List<Coordinate> path) {\n for (int i = 0; i < source.size() - 1; i++) {\n Graph graph = new Graph(getEdge(map));\n Coordinate start = source.get(i);\n Coordinate end = source.get(i + 1);\n graph.dijkstra(start);\n graph.printPath(end);\n for (Graph.Node node : graph.getPathReference()) {\n path.add(node.coordinate);\n }\n }\n }", "private void computeAllPaths()\n {\n for (Station src : this.graph.stations)\n {\n List<Station> visited = new ArrayList<Station>();\n computePathsForNode(src, null, null, visited);\n }\n Print.printTripList(this.tripList);\n }", "public interface GetPath {\n //path是svn中的地址,realpath是class的路径\n public void copyFileAndFloder(String[] paths, String realPath);\n}", "protected abstract void calculateUiRootPath(StringBuilder... sbUrls);", "protected abstract void calculateUiRootPath(StringBuilder... sbUrls);", "private static void createPath(Path path) {\r\n\t\tString tempStr = \"\";\r\n\t\tint finished = 1;\r\n\t\tint tempId = -1;\r\n\t\tList<GeoCoordinate> polyline = new ArrayList<GeoCoordinate>();\r\n\t\tList<Place> placeList = new ArrayList<Place>();\r\n\t\tContainerNII pathNii = new ContainerNII();\r\n\t\tPlace place;\r\n\t\t\r\n\t\twhile (finished == 1){\r\n\t\t\t\r\n\t\t\tplace = new Place();\r\n\t\t\tcreatePlace(place);\r\n\t\t\tplaceList.add(place);\r\n\t\t\tfinished = checkContinue(\"place\");\r\n\t\t}\r\n\t\tpath.setPlaces(placeList);\r\n\t\t\r\n\t\tif ((tempId = insertInteger(\"path id: \")) != -1)\r\n\t\t\tpath.setId(tempId);\t\r\n\t\t\r\n\t\tinsertNIIValues(pathNii, \"path\");\r\n\t\tpath.setNii(pathNii);\r\n\t\t\r\n\t\tif ((tempStr = insertString(\"path length: \")) != null)\r\n\t\t\tpath.setLength(tempStr);\r\n\t\t\r\n\t\tinsertPolyline(polyline, strPath);\r\n\t\tpath.setPolyline(polyline);\r\n\t\t\r\n\t\tif ((tempStr = insertString(\"path duration: \")) != null)\r\n\t\t\tpath.setDuration(tempStr);\r\n\t\t\r\n\t}", "protected String pathBuilder(String... segments) {\n\t\t\n\t\tStringBuffer path = new StringBuffer();\n\t\tfor(String seg : segments){\n\t\t\tif(seg != null){\n\t\t\t\tpath.append(seg);\n\t\t\t\tpath.append(\"/\");\n\t\t\t}\n\t\t}\n\t\treturn path.toString();\n\t}", "private char[] getPath() {\n\t\treturn null;\n\t}", "protected abstract String childFolderPath();", "private Square[] returnPath(Vertex v, GameBoard b) {\n // because we're starting at the end point,\n // we need build the path in 'reverse'\n Stack<Square> path = new Stack<Square>();\n\n // while we're not at the start point\n while ( v.dist != 0 ) {\n path.push(vertexToSquare(v,b));\n v = v.path;\n }\n\n // place the locations in the proper order\n Square[] road = new Square[path.size()];\n for ( int i = 0; i < path.size(); i++ )\n road[i] = path.pop();\n\n return road;\n }", "public void updatePath() {\n\t\tString oldPath = this.path;\n\t\tif (materializePath()) {\n\t\t\tPageAlias.create(this, oldPath);\n\t\t\tupdateChildPaths();\n\t\t}\n\t}", "public interface PathGenerator {\n /**\n * Generates path for the given configuration.\n * @param configuration the configuration to generate path for.\n * @return the path.\n */\n String path(Configuration configuration);\n}", "public PathCode getCurPathCode() { return /*appliedTo.curPathCode*/currentpathcode;}", "public void registerContentsToPathway()\r\n\t{\n\t}", "private void addPath(final Path p) {\n\t\taddIdIfContainsSpecialPrefix();\n\t\t// TODO: Should we be doing this check? What if the evaluator expects there to be a\n\t\t// Style object?\n\t\tif (this.mProperties.svgStyle != null) {\n\t\t\taddStyle();\n\t\t}\n\n\t\t// The transform MUST be the item that goes immediately before the path in the instruction\n\t\t// code sequence, as the evaluator expects this. So the order is style, transform, path.\n\n\t\t// TODO: Previously I only added a Matrix for a Path if that Path has a transform. However,\n\t\t// this means that any transform belonging specifically to a previous path would still\n\t\t// be applied. So at the moment I have to add a Matrix for every Path, which might\n\t\t// be wasteful as most Paths might have an identity Matrix (no transform). One\n\t\t// way of optimising this could be to add an identity tranform ONLY if the previous\n\t\t// path had a non-identity transform.\n\t\t// (I think what I meant by this is when you have two path elements in parallel, not nested.)\n\t\t// (Or maintain a matrix stack in the evaluator.)\n\t\t// Note: The parser uses a Matrix stack. The evaluator uses a Matrix list.\n\n\t\t// if(this.mProperties.transformData!=null){\n\t\taddTransform();\n\t\t// }\n\n\t\tthis.pathList.add(p);\n\t\taddInstruction(INST_PATH);\n\t}", "private Route append(Map<QualifiedName, PathParamDescriptor> pathParamDescriptors, String path) throws MalformedRouteException\n {\n if (path.length() == 0 || path.charAt(0) != '/')\n {\n throw new MalformedRouteException();\n }\n\n //\n int pos = path.length();\n int level = 0;\n List<Integer> start = new ArrayList<Integer>();\n List<Integer> end = new ArrayList<Integer>();\n for (int i = 1;i < path.length();i++)\n {\n char c = path.charAt(i);\n if (c == '{')\n {\n if (level++ == 0)\n {\n start.add(i);\n }\n }\n else if (c == '}')\n {\n if (--level == 0)\n {\n end.add(i);\n }\n }\n else if (c == '/')\n {\n if (level == 0)\n {\n pos = i;\n break;\n }\n }\n }\n\n //\n Route next;\n if (start.isEmpty())\n {\n String segment = path.substring(1, pos);\n SegmentRoute route = new SegmentRoute(router, segment);\n add(route);\n next = route;\n }\n else\n {\n if (start.size() == end.size())\n {\n PatternBuilder builder = new PatternBuilder();\n builder.expr(\"^\").expr('/');\n List<String> chunks = new ArrayList<String>();\n List<PathParam> parameterPatterns = new ArrayList<PathParam>();\n\n //\n int previous = 1;\n for (int i = 0;i < start.size();i++)\n {\n builder.litteral(path, previous, start.get(i));\n chunks.add(path.substring(previous, start.get(i)));\n String parameterName = path.substring(start.get(i) + 1, end.get(i));\n\n //\n QualifiedName parameterQName = QualifiedName.parse(parameterName);\n\n // Now get path param metadata\n PathParamDescriptor parameterDescriptor = pathParamDescriptors.get(parameterQName);\n\n //\n PathParam param;\n if (parameterDescriptor != null)\n {\n param = PathParam.create(parameterDescriptor, router);\n }\n else\n {\n param = PathParam.create(parameterQName, router);\n }\n\n // Append routing regex to the route regex surrounded by a non capturing regex\n // to isolate routingRegex like a|b or a(.)b\n builder.expr(\"(?:\").expr(param.routingRegex).expr(\")\");\n\n // Add the path param with the rendering regex\n parameterPatterns.add(param);\n previous = end.get(i) + 1;\n }\n\n //\n builder.litteral(path, previous, pos);\n\n // We want to satisfy one of the following conditions\n // - the next char after the matched expression is '/'\n // - the expression matched until the end\n // - the match expression is the '/' expression\n builder.expr(\"(?:(?<=^/)|(?=/)|$)\");\n\n //\n chunks.add(path.substring(previous, pos));\n PatternRoute route = new PatternRoute(router, router.compile(builder.build()), parameterPatterns, chunks);\n\n // Wire\n add(route);\n\n //\n next = route;\n }\n else\n {\n throw new UnsupportedOperationException(\"Report error\");\n }\n }\n\n //\n if (pos < path.length())\n {\n return next.append(pathParamDescriptors, path.substring(pos));\n }\n else\n {\n return next;\n }\n }", "public abstract boolean isPath();", "public void getPath()\n {\n if(bruteForceJRadioButton.isSelected())//brute force method\n {\n methodJLabel.setText(\"Brute Force\");\n startTime = System.nanoTime();//times should be in class where brute force is found\n pathList = graph.getBruteForcePath();\n stopTime = System.nanoTime();\n timePassed = stopTime - startTime;\n }\n else if(nearestJRadioButton.isSelected())//nearest neighbor method\n {\n methodJLabel.setText(\"Nearest Neighbor\");\n startTime = System.nanoTime();\n pathList = graph.getNearestNeighbourPath();\n stopTime = System.nanoTime();\n timePassed = stopTime - startTime;\n }\n else //sorted edges method\n {\n methodJLabel.setText(\"Sorted Edges\");\n startTime = System.nanoTime();\n pathList = graph.getSortedEdgePath();\n stopTime = System.nanoTime();\n timePassed = stopTime - startTime;\n }\n displayStats();\n }", "public List<Path> getAllPaths();", "@Override\n\tpublic void getPathToMRT() {\n\n\t}", "public static void main(String[] args) {\n System.out.println(new SimplifyPath().simplifyPath(\"/...\"));\n }", "public PathExpressionIF createPathExpression();", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "public static void main(String[] args) {\n\t\tPath iP = Paths.get(\"/\", \"First.txt\");\t// C\n\t\t//Path iP = Paths.toPath(\"/First.txt\");\t// D\n\t\tSystem.out.println(iP) ;\n\t}", "public interface PathExpressionService {\n /**\n * Compile an expression.\n *\n * @param path The original path.\n * @param offset The offset of the expression being compiled in the original path.\n * @param inputString The expression to compile.\n * @return The compiled form of the expression. This value will be passed to evaluate.\n * @throws InvalidPathSyntaxException If there was a problem compiling the expression.\n */\n CompiledExpressionHolder compile(String path, int offset, String inputString)\n throws InvalidPathSyntaxException;\n\n /**\n * Evaluated a compiled expression.\n *\n * @param code The compiled form of the expression.\n * @param root The root object that is being traversed with JSON-path.\n * @param key The key when iterating over object fields or NULL if not-applicable.\n * @param value The value when iterating over an object/array.\n * @return The result of the expression.\n * @throws InvalidPathException If there was a problem executing the expression.\n */\n Object evaluate(CompiledExpressionHolder code, Object scopes, Object root, Object key, Object\n value) throws InvalidPathException;\n}", "public interface PathService {\n /**\n * Used to get list of all paths\n *\n * @return list of all paths\n */\n public List<Path> getAllPaths();\n\n /**\n * Used to get a specific path\n *\n * @return path instance\n */\n public Path getPath(Integer id) throws ResourceNotFoundException;\n\n /**\n * Used to save or update a path\n *\n * @param Path path instance to save or update\n * @return path instance\n */\n public Path saveOrUpdatePath(Path path);\n}", "public void findPaths(LinkedList<Node> path,Node caller){\n pathsToBaseStation.add(path);\n LinkedList<Node> nextPath = new LinkedList<>(path);\n nextPath.addFirst(this);\n for(Node node: neighbors){\n if(!path.contains(node)){\n node.findPaths(nextPath,this);\n }\n }\n }", "@Override\n public Path getPath() {\n throw new RuntimeException( \"Not yet implemented.\" );\n }", "public abstract List<String> getControlledPaths();", "public interface ASTPath\n{\n\tvoid debugSelf(IndentPrinter destination);\n\tvoid setParent(ASTChildList.ListKey key, ASTParent newParent);\n\tvoid compileSelf(LangCompiler compiler);\n\tASTBase getDeclaration();\n\tString getName();\n\tString getEnd();\n\tSpiritType getExpressionType();\n\n}", "@Test\n public void verifyPathsInSequence() {\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n testGetCompanyHome();\n testGetCabinetFolder();\n testGetCaseFolder();\n testGetDocumentLibraryFolder();\n testEvidenceBankFolder();\n\n }", "@Override\r\n public Set<List<String>> findAllPaths(int sourceId, int targetId, int reachability) {\r\n //all paths found\r\n Set<List<String>> allPaths = new HashSet<List<String>>();\r\n //collects path in one iteration\r\n Set<List<String>> newPathsCollector = new HashSet<List<String>>();\r\n //same as the solution but with inverted edges\r\n Set<List<String>> tmpPathsToTarget = new HashSet<List<String>>();\r\n //final solution\r\n Set<List<String>> pathsToTarget = new HashSet<List<String>>();\r\n \r\n String[] statementTokens = null; \r\n Set<Integer> allProcessedNodes = new HashSet<Integer>(); //to avoid duplicates\r\n List<String> statementsFound = new ArrayList<String>();\r\n \r\n for (int i = 0; i < reachability; i++) {\r\n if (i == 0) { \r\n Collection<String> inEdges = jungCompleteGraph.getInEdges(sourceId);\r\n for (String inEdge: inEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementTokens = inEdge.split(\"->\");\r\n int inNodeId = Integer.parseInt(statementTokens[0]);\r\n //allProcessedNodes.add(inNodeId); \r\n //Incoming nodes are reversed\r\n statementsFound.add(new StringBuilder(inEdge).reverse().toString());\r\n allPaths.add(statementsFound);\r\n if (inNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n }\r\n \r\n Collection<String> outEdges = jungCompleteGraph.getOutEdges(sourceId);\r\n \r\n for (String outEdge: outEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementTokens = outEdge.split(\"->\");\r\n int outNodeId = Integer.parseInt(statementTokens[2]);\r\n statementsFound.add(outEdge);\r\n allPaths.add(statementsFound);\r\n if (outNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n \r\n }\r\n \r\n } else {\r\n newPathsCollector = new HashSet<List<String>>();\r\n\r\n for (List<String> statements: allPaths) {\r\n allProcessedNodes = new HashSet<Integer>(); //to avoid duplicates\r\n int lastNodeInPath = 0;\r\n \r\n for (String predicate: statements) {\r\n if (predicate.contains(\">-\")) {\r\n statementTokens = predicate.split(\">-\");\r\n allProcessedNodes.add(Integer.parseInt(\r\n new StringBuilder(statementTokens[0]).reverse().toString()));\r\n allProcessedNodes.add(Integer.parseInt(\r\n new StringBuilder(statementTokens[2]).reverse().toString()));\r\n lastNodeInPath = Integer.parseInt(\r\n new StringBuilder(statementTokens[2]).reverse().toString());\r\n } else {\r\n statementTokens = predicate.split(\"->\"); \r\n allProcessedNodes.add(Integer.parseInt(statementTokens[0]));\r\n allProcessedNodes.add(Integer.parseInt(statementTokens[2]));\r\n lastNodeInPath = Integer.parseInt(statementTokens[2]);\r\n }\r\n }\r\n \r\n Collection<String> inEdges = jungCompleteGraph.getInEdges(lastNodeInPath);\r\n for (String inEdge: inEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementsFound.addAll(statements);\r\n statementTokens = inEdge.split(\"->\");\r\n int inNodeId = Integer.parseInt(statementTokens[0]);\r\n if (allProcessedNodes.contains(inNodeId)) continue;\r\n \r\n //Incoming nodes are reversed \r\n statementsFound.add(new StringBuilder(inEdge).reverse().toString());\r\n newPathsCollector.add(statementsFound);\r\n if (inNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n \r\n }\r\n \r\n Collection<String> outEdges = jungCompleteGraph.getOutEdges(lastNodeInPath);\r\n for (String outEdge: outEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementsFound.addAll(statements);\r\n statementTokens = outEdge.split(\"->\");\r\n int outNodeId = Integer.parseInt(statementTokens[2]);\r\n if (allProcessedNodes.contains(outNodeId)) continue;\r\n \r\n //Incoming nodes are reversed \r\n statementsFound.add(outEdge);\r\n newPathsCollector.add(statementsFound);\r\n if (outNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n }\r\n }\r\n allPaths.addAll(newPathsCollector);\r\n }\r\n \r\n //System.out.println(\"*****End of iteration \" + i);\r\n //System.out.println(\"#SIZE OF allPaths: \" + allPaths.size());\r\n int numItems = 0;\r\n for (List<String> currList: allPaths) {\r\n numItems = numItems + currList.size();\r\n }\r\n //System.out.println(\"#NUMBER OF ELEMS OF ALL LISTS: \" + numItems);\r\n //System.out.println(\"#SIZE OF tmpPathsToTarget : \" + tmpPathsToTarget.size());\r\n }\r\n \r\n //We need to reverse back all the predicates\r\n for (List<String> statements: tmpPathsToTarget) { \r\n List<String> fixedStatements = new ArrayList<String>(); \r\n for (int i = 0; i < statements.size(); i++) { \r\n String statement = statements.get(i); \r\n if (statement.contains(\">-\")) {\r\n fixedStatements.add(new StringBuilder(statement).reverse().toString());\r\n } else {\r\n fixedStatements.add(statement);\r\n } \r\n }\r\n pathsToTarget.add(fixedStatements);\r\n }\r\n return pathsToTarget;\r\n }", "protected Path preparePath() {\n int commandCapacity = 0;\n int dataCapacity = 0;\n\n current = read();\n \n while (current != -1) {\n skipCommaSpaces();\n switch (current) {\n case 'z':\n case 'Z':\n commandCapacity++;\n break;\n case 'm':\n case 'l':\n case 'M':\n case 'L':\n case 'h':\n case 'H':\n case 'v':\n case 'V':\n commandCapacity++;\n dataCapacity += 1;\n break;\n case 'c':\n case 'C':\n case 's':\n case 'S':\n commandCapacity++;\n dataCapacity += 3;\n break;\n case 'q':\n case 'Q':\n case 't':\n case 'T':\n commandCapacity++;\n dataCapacity += 2;\n break;\n default:\n break;\n }\n current = read();\n }\n\n return new Path(commandCapacity, dataCapacity);\n }", "private void Create_Path() {\n lines = new Line[getPoints().size()];\n for (int i = 1; i < getLines().length; i++) {\n lines[i] = new Line(getPoints().get(way[i]).getX(), getPoints().get(way[i]).getY(), getPoints().get(way[i - 1]).getX(), getPoints().get(way[i - 1]).getY());\n }\n lines[0] = new Line(getPoints().get(way[getLines().length - 1]).getX(), getPoints().get(way[getLines().length - 1]).getY(), getPoints().get(way[0]).getX(), getPoints().get(way[0]).getY());\n\n }", "public void setPath(String path)\r\n/* 21: */ {\r\n/* 22:53 */ this.path = path;\r\n/* 23: */ }", "public Paths(Graph G, int s)\n {\n ...\n }", "void addPathFromStart() {\n for (String aPathFromStart : pathFromStart) {\n newFutureTargets.push(aPathFromStart);\n }\n }", "String getPathName();", "String getPathName();", "public interface Pathable<T> {\n\n T forPath(String path);\n\n}", "private void path(Node s, Node d, HashSet<Node> visited, List<Node> currentPath, List<List<Node>> paths) {\n\t\tvisited.add(s);\n\t\tcurrentPath.add(s);\n\t\t\n\t\tif(s.value == d.value) {\n\t\t\tpaths.add(currentPath);\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t* A list of nodes accessible from the current node, both parents and children\n\t\t* */\n\t\tList<Node> proximity = new ArrayList<>();\n\t\t\n\t\tif(s.children != null)\n\t\t\tfor(Node child : s.children) {\n\t\t\t\tif(!visited.contains(child))\n\t\t\t\t\tproximity.add(child);\n\t\t\t}\n\t\t\n\t\tif(s.parents != null)\n\t\t\tfor(Node parent : s.parents) {\n\t\t\t\tif(!visited.contains(parent)) \n\t\t\t\t\tproximity.add(parent);\n\t\t\t}\n\n /*\n * Explore each possible path\n * */\n\t\tfor(Node neighbour : proximity) {\n\t\t\tArrayList<Node> newPath = new ArrayList<>(currentPath);\n\t\t\tpath(neighbour, d, visited, newPath, paths);\n\t\t}\n\t}", "@Override\r\n protected void generateControllerPaths() {\r\n\r\n controllerPaths = new HashMap<>();\r\n\r\n controllerPaths.put( \"index\", pathRoot );\r\n controllerPaths.put( \"add\", pathRoot + \"/add\" );\r\n controllerPaths.put( \"edit\", pathRoot + \"/edit?id=\" );\r\n controllerPaths.put( \"delete\", pathRoot + \"/delete?id=\" );\r\n controllerPaths.put( \"manage\", pathRoot + \"/manage\" ); \r\n \r\n \r\n \r\n }", "public void compDire(String pathDire) throws Exception;", "@Override\n\tpublic void pathFinderVisited(int x, int y) {\n\t}", "public void\n\t usePathCode(int[] numindices, final int[][] indices)\n\t //\n\t ////////////////////////////////////////////////////////////////////////\n\t {\n\t \n//\t if (appliedTo.code == AppliedCode.PATH) {\n//\t // Use \"index\" storage in instance to return next index\n//\t index = appliedTo.path.getIndex(currentpath.getFullLength());\n//\t numIndices[0] = 1;\n//\t int[] dummy = new int[1];\n//\t dummy[0] = index;\n//\t indices[0] = dummy;\n//\t }\n//\t \n//\t // Path list case\n//\t else\n//\t appliedTo.compactPathList.getChildren(numIndices, indices);\n\t \n int curlen = this.currentpath.getFullLength();\n\n while (pimpl.pathcodearray.getLength() < curlen) {\n pimpl.pathcodearray.append(new SbListInt());\n }\n\n SbListInt myarray = pimpl.pathcodearray.operator_square_bracket(curlen-1); // ptr\n myarray.truncate(0);\n\n if (this.getWhatAppliedTo() == AppliedCode.PATH_LIST) {\n if (pimpl.applieddata.pathlistdata.compactlist != null) {\n assert(pimpl.applieddata.pathlistdata.compactlist.getDepth() == this.currentpath.getLength());\n pimpl.applieddata.pathlistdata.compactlist.getChildren(numindices, indices);\n }\n else {\n // this might be very slow if the list contains a lot of\n // paths. See comment in pushCurPath(int, SoNode*) about this.\n SoPathList pl = pimpl.applieddata.pathlistdata.pathlist;\n int n = pl.getLength();\n int previdx = -1;\n myarray.truncate(0);\n for (int i = 0; i < n; i++) {\n SoPath path = (pl).operator_square_bracket(i);\n if (path.getFullLength() > curlen &&\n path.containsPath(this.currentpath)) {\n int idx = path.getIndex(curlen);\n if (idx != previdx) {\n myarray.append(idx);\n previdx = idx;\n }\n }\n }\n numindices[0] = myarray.getLength();\n indices[0] = myarray.getArrayPtr().getValues();\n }\n }\n else {\n numindices[0] = 1;\n myarray.append(pimpl.applieddata.path.getIndex(curlen));\n indices[0] = myarray.getArrayPtr().getValues();\n }\n\t }", "private List<PathMapping> computedExpandedPathForArrays(\n Object source, String srcPath, String dstPath, Configuration configuration) {\n String srcpathTrimmed = srcPath.replaceAll(\"\\\\s\", \"\");\n String dstpathTrimmed = dstPath.replaceAll(\"\\\\s\", \"\");\n /*\n\n int firstIndex = srcpathTrimmed.indexOf(\"[*]\");\n if (firstIndex == -1) {\n throw new TransformationException(\"c\");\n }\n String pathTillArray = srcpathTrimmed.substring(0, firstIndex + 3);\n //query the source document to figure out how many entries exist in the source array\n List<Object> items = JsonPath.read(source, pathTillArray);\n if (items == null) {\n throw new TransformationException(\n getStringFromBundle(NULL_QUERY_RESULT, pathTillArray));\n\n }\n int size = items.size();\n String dstpathTrimmed = dstPath.replaceAll(\"\\\\s\", \"\");\n firstIndex = dstpathTrimmed.indexOf(\"[*]\");\n if (firstIndex == -1) {\n throw new TransformationException(getStringFromBundle(INTERNAL_ERROR));\n }\n */\n\n\n List<PathMapping> result = new ArrayList<PathMapping>();\n\n /*\n for (int i = 0; i < size; i++) {\n PathMapping p = new PathMapping();\n p.setSource(srcpathTrimmed.replace(\"[*]\", \"[\" + i + \"]\"));\n p.setTarget(dstpathTrimmed.replace(\"[*]\", \"[\" + i + \"]\"));\n result.add(p);\n }*/\n\n for (int i = 0; i < 1; i++) {\n PathMapping p = new PathMapping();\n p.setSource(srcpathTrimmed);\n p.setTarget(dstpathTrimmed);\n result.add(p);\n }\n\n return result;\n }", "Map<String, PathItem> getPathItems();", "protected String path() {\n return path(getName());\n }", "private void readPaths(List<Element> pathElements,\n List<Element> pointElements,\n Model model)\n throws ObjectExistsException {\n // Add the paths.\n for (int i = 0; i < pathElements.size(); i++) {\n Element curPathElement = pathElements.get(i);\n Integer pathID;\n try {\n pathID = Integer.valueOf(curPathElement.getAttributeValue(\"id\"));\n }\n catch (NumberFormatException e) {\n pathID = null;\n }\n String srcName = curPathElement.getAttributeValue(\"sourcePoint\");\n if (srcName == null || srcName.isEmpty()) {\n srcName = \"SourcePoint\" + i + \"Unknown\";\n }\n Point srcPoint = model.getPoint(srcName);\n String destName = curPathElement.getAttributeValue(\"destinationPoint\");\n if (destName == null || destName.isEmpty()) {\n destName = \"DestinationPoint\" + i + \"Unknown\";\n }\n Point destPoint = model.getPoint(destName);\n Path curPath = model.createPath(\n pathID, srcPoint.getReference(), destPoint.getReference());\n TCSObjectReference<Path> pathRef = curPath.getReference();\n String pathName = curPathElement.getAttributeValue(\"name\");\n if (pathName == null || pathName.isEmpty()) {\n pathName = \"PathName\" + i + \"Unknown\";\n }\n model.getObjectPool().renameObject(pathRef, pathName);\n model.setPathLength(pathRef,\n Long.parseLong(curPathElement.getAttributeValue(\"length\", \"1\")));\n model.setPathRoutingCost(pathRef,\n Long.parseLong(curPathElement.getAttributeValue(\"routingCost\", \"1\")));\n model.setPathLocked(pathRef,\n Boolean.parseBoolean(curPathElement.getAttributeValue(\"locked\", \"false\")));\n int maxV;\n try {\n maxV = Integer.parseInt(curPathElement.getAttributeValue(\"maxVelocity\"));\n }\n catch (NumberFormatException e) {\n maxV = 0;\n }\n model.setPathMaxVelocity(pathRef, maxV);\n int maxRV;\n try {\n maxRV = Integer.parseInt(curPathElement.getAttributeValue(\"maxReverseVelocity\"));\n }\n catch (NumberFormatException e) {\n maxRV = 0;\n }\n model.setPathMaxReverseVelocity(pathRef, maxRV);\n List<Element> properties = curPathElement.getChildren(\"property\");\n for (int m = 0; m < properties.size(); m++) {\n Element curPropElement = properties.get(m);\n String curKey = curPropElement.getAttributeValue(\"name\");\n if (curKey == null || curKey.isEmpty()) {\n curKey = \"Key\" + m + \"Unknown\";\n }\n String curValue = curPropElement.getAttributeValue(\"value\");\n if (curValue == null || curValue.isEmpty()) {\n curValue = \"Value\" + m + \"Unknown\";\n }\n model.getObjectPool().setObjectProperty(pathRef, curKey, curValue);\n }\n }\n\n // Loop through all paths. Add the path to its source point as an outgoing\n // path and to its destination point as an incoming path.\n for (Path curPath : model.getPaths(null)) {\n model.addPointOutgoingPath(curPath.getSourcePoint(),\n curPath.getReference());\n model.addPointIncomingPath(curPath.getDestinationPoint(),\n curPath.getReference());\n }\n }", "public String getPathName();", "public interface AssignmentPath extends DebugDumpable, ShortDumpable, Cloneable {\n\n\tList<? extends AssignmentPathSegment> getSegments();\n\t\n\t/**\n\t * Returns segment specified by index. Negative indexes work in reverse direction.\n\t * @throws IndexOutOfBoundsException\n\t */\n\tAssignmentPathSegment getSegment(int index);\n\n\tAssignmentPathSegment first();\n\n\tboolean isEmpty();\n\n\tint size();\n\n//\tEvaluationOrder getEvaluationOrder();\n\n\tAssignmentPathSegment last();\n\n\t// beforeLast(0) means last()\n\t// beforeLast(1) means one before last()\n\tAssignmentPathSegment beforeLast(int n);\n\n\tint countTargetOccurrences(ObjectType target);\n\n\t/**\n\t * Returns a \"user understandable\" part of this path. I.e. only those objects that are of \"order 1\" above the focal object.\n\t * E.g. from chain of\n\t *\n\t * jack =(a)=> Engineer =(i)=> Employee =(a)=> PersonMetarole =(i2)=> Person =(i)=> Entity\n\t *\n\t * the result would be\n\t *\n\t * Engineer -> Employee -> Person -> Entity\n\t *\n\t * TODO find a better name\n\t */\n\t@NotNull\n\tList<ObjectType> getFirstOrderChain();\n\t\n\t/**\n\t * In the context of meta-roles this is the role that the currently-processed inducement \"applies to\".\n\t * I.e. the role that would contain this inducement in case that meta-roles were not used.\n\t * Technically, this is the last element in the \"first order chain\" or roles.\n\t * \n\t * Note: proto- is the opposite of meta-\n\t */\n\tObjectType getProtoRole();\n\n\t/**\n\t * Shallow clone.\n\t */\n\tAssignmentPath clone();\n\n\tAssignmentPath cloneFirst(int n);\n\n\tAssignmentPathType toAssignmentPathType(boolean includeAssignmentsContent);\n\n\tExtensionType collectExtensions(int startAt) throws SchemaException;\n\n\tstatic ExtensionType collectExtensions(AssignmentPathType path, int startAt, ModelService modelService, Task task, OperationResult result)\n\t\t\tthrows CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException,\n\t\t\tConfigurationException, ExpressionEvaluationException {\n\t\treturn AssignmentPathUtil.collectExtensions(path, startAt, modelService, task, result);\n\t}\n\t\n\t// Groovy [] operator\n\tdefault AssignmentPathSegment getAt(int index) {\n\t\treturn getSegment(index);\n\t}\n\n\t/**\n\t * Returns true if the path matches specified order constraints. All of them must match.\n\t * Although there are some defaults, it is recommended to specify constraints explicitly.\n\t * Currently not supported on empty paths.\n\t *\n\t * Not all parts of OrderConstraintsType are supported. Namely, resetOrder item has no meaning here.\n\t */\n\tboolean matches(@NotNull List<OrderConstraintsType> orderConstraints);\n\n\t/**\n\t * Preliminary (limited) implementation. To be used to compare paths pointing to the same target object. Use with care.\n\t */\n\tboolean equivalent(AssignmentPath other);\n}", "static void ex1() {\n\t\tSystem.out.println(\"various methods of NIO.2\");\n\t\tPath path=Paths.get(\"C:/JavaCode/Main.java\");//this file actually exists and this is an abseloute path\n\t\tSystem.out.println(\"the path is \"+path);\n\t\tSystem.out.println(\"getNameCount\");\n\t\t/*\n\t\t * this will get the amount of elements in the path, it does not include the drive letter (more commonly \n\t\t * called ROOT)\n\t\t * or if it's ftp or http, does not include that either\n\t\t */\n\t\tSystem.out.println(\"amount of items in this path is \"+path.getNameCount());\n\t\tPath path2=Paths.get(\"text.txt\");\n\t\tSystem.out.println(path2.toUri());\n\t\tPath path3=Paths.\n\t\t\t\tget(\"C:/Users/noelf/OneDrive/JavaProgrammer2019-20/WorkSpace2/F9.2InteractingWithPathAndFiles/text.txt\");\n\t\t/*\n\t\t * this will print off 7 as there is 7 elements in this path (excluding the drive letter)\n\t\t */\n\t\tSystem.out.println(path3.getNameCount());\n\t\tSystem.out.println(\"getting details of our path\");\n\t\tfor(int i=0;i<path3.getNameCount();i++) {\n\t\t\t/*\n\t\t\t * this will get the name of all the elements in the path, including the final elemetn which will\n\t\t\t * be text.txt\n\t\t\t */\n\t\t\tSystem.out.println(\"element name is \"+path3.getName(i));\n\t//\t\tSystem.out.println(path3.getFileName());\n\t\t}\n\t\t//this will get the final element, which is the produce of the whole path, which is \"text.txt\"\n\t\tSystem.out.println(\"the file at this location is \"+path3.getFileName());\n\t\t//this will get the final element, which will be F9.2InteractingWithPathAndFiles\n\t\tPath path4=Paths.\n\t\t\t\tget(\"C:/Users/noelf/OneDrive/JavaProgrammer2019-20/WorkSpace2/F9.2InteractingWithPathAndFiles\");\n\t\tSystem.out.println(path4.getFileName());\n\t\t/*\n\t\t * if you have a realtive path, the folders leading up to your relative path, namely in this case\n\t\t * C:/Users/noelf/OneDrive/JavaProgrammer2019-20/WorkSpace2/F9.2InteractingWithPathAndFiles\n\t\t * is not counted at all\n\t\t * so this below here only returns 4\n\t\t */\n\t\tPath relPath=Paths.get(\"src/com/android/Examples.java\");//4\n\t\tSystem.out.println(\"the relative path has \"+relPath.getNameCount()+\" elements\");//return 4\n\t\t//this will return 1 as the elements preceded this, the relative path folder, are NOT counted\n\t\trelPath=Paths.get(\"text.txt\");\n\t\tSystem.out.println(relPath.getNameCount());//return 1\n\t\t\n\t\tPath root=Paths.get(\"C:/\");//will return 0, because the root element (the drive) is not counted\n\t\tSystem.out.println(root.getNameCount());\n\t\t//does not matter that this does NOT exist, its just checking the string\n\t\troot=Paths.get(\"D:/\");//0\n\t\tSystem.out.println(root.getNameCount());\n\t\t//does not matter that this does NOT exist, it's just checking the string\n\t\troot=Paths.get(\"D:/Home/Web/myWebsite/index.html\");\n\t\tSystem.out.println(root.getNameCount());//4\n\n\t}", "public static void pathMethod (int x, int y, int rows, int columns, int startPointX, int startPointY, int endPointX, int endPointY, String [][]copyArray, String [][]realArray, int decider) throws Exception{ \r\n \r\n String up = copyArray[y-1][x];\r\n String down = copyArray[y+1][x];\r\n String right = copyArray[y][x+1]; //moves the coordinate up one, down one, right one, left one and stores it into up down left right; \r\n String left = copyArray[y][x-1];\r\n \r\n if(up.equals(\"X\")||down.equals(\"X\")||right.equals(\"X\")||left.equals(\"X\")){ //if up right left or down is equal to the endpoint, the maze is solvable, and we can now print the final array\r\n System.out.println(\"\\nThe maze is solvable!\");\r\n// printFinalArray(realArray, counter, xvalues, yvalues); //solution is found already - sends back to another method to print final solution\r\n regenerate(decider); //then sends to regenerate method where it asks if user would like to create another maze\r\n }\r\n \r\n else if(copyArray[startPointY+1][startPointX].equals(\"B\")&&copyArray[startPointY-1][startPointX].equals(\"B\")&&copyArray[startPointY][startPointX+1].equals(\"B\")&&copyArray[startPointY][startPointX-1].equals(\"B\")){\r\n \r\n System.out.println(\"\\nSorry, your maze is unsolvable.\\n\\n\"); //if at the start point we cannot go up down left or right - no possible moves - not solvable - end of maze \r\n regenerate(decider); //call the method that gives users the option to recreate the maze if it was unsolvable \r\n } \r\n \r\n else if(up.equals(\"O\")){ //if the coordinate in the up direction is O\r\n counter=counter+1; //incrementing counter so we can input it the coordinate arrays\r\n copyArray[y][x] = \"V\"; //changing the values to 'V' so we can know that we already visited it\r\n y=y-1; //moving coordinate up one \r\n xvalues[counter]=x; //storing this coordinate into the arrays with the counter\r\n yvalues[counter]=y;\r\n pathMethod(x, y, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider); //recalling method\r\n }\r\n \r\n else if(down.equals(\"O\")){ //if down = O\r\n copyArray[y][x] = \"V\";\r\n counter=counter+1;\r\n y=y+1; \r\n xvalues[counter]=x;\r\n yvalues[counter]=y;\r\n pathMethod(x, y, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider);\r\n }\r\n \r\n else if(right.equals(\"O\")){ //if right equals O\r\n copyArray[y][x] = \"V\";\r\n counter=counter+1;\r\n x=x+1;\r\n xvalues[counter]=x;\r\n yvalues[counter]=y;\r\n pathMethod(x, y, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider);\r\n }\r\n \r\n else if(left.equals(\"O\")){ //if left equals O\r\n copyArray[y][x] = \"V\";\r\n counter=counter+1;\r\n x=x-1;\r\n xvalues[counter]=x;\r\n yvalues[counter]=y;\r\n pathMethod(x, y, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider);\r\n }\r\n \r\n else { //if neither up down left or right work\r\n for(int i = 0; i<rows; i++){ //makes all the 'V's go back to O\r\n for(int j = 0; j<columns; j++){\r\n if(copyArray[i][j].equals(\"V\")){\r\n copyArray[i][j] = \"O\";\r\n }\r\n }\r\n }\r\n copyArray[y][x] = \"B\"; //make the coordinate that you cant make a move with B, so it shortens the possible path options\r\n for(int i = 0 ; i<counter; i++){\r\n xvalues[i] = 0; //resets the coordinate arrays back to 0\r\n yvalues[i] = 0;\r\n }\r\n counter=0; //resets counter back to 0;\r\n pathMethod(startPointX, startPointY, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider); //resends the startpoints instead of x and y; only thing different is that one coordinate is now marked \"B\"\r\n } \r\n }", "@Override\r\n\tpublic ArrayList<E> getPath(E src, E dst) {\r\n\t\treturn graphForWarshall.getPath(src, dst);\r\n\t}", "public String resolvePath();" ]
[ "0.6602276", "0.65348035", "0.65348035", "0.6427319", "0.63842905", "0.63536197", "0.63489383", "0.6267764", "0.62011045", "0.61972356", "0.61972356", "0.6172676", "0.6171363", "0.6159744", "0.6146036", "0.6120033", "0.6027582", "0.6027582", "0.6027582", "0.6027582", "0.6027582", "0.600496", "0.60046405", "0.5997013", "0.5996247", "0.59849244", "0.5954077", "0.59313476", "0.59286433", "0.5908115", "0.5900923", "0.5890586", "0.58766735", "0.58429307", "0.5810249", "0.5790128", "0.578082", "0.5764419", "0.57367706", "0.57210857", "0.5717276", "0.57093805", "0.570724", "0.56945866", "0.56945866", "0.56945866", "0.5683603", "0.5679967", "0.56712615", "0.5669308", "0.5669308", "0.56679344", "0.56506824", "0.56498027", "0.5606266", "0.5600529", "0.5597764", "0.559768", "0.5595026", "0.558476", "0.55724907", "0.55686474", "0.555946", "0.5559208", "0.5557147", "0.55466413", "0.5544293", "0.55404186", "0.553475", "0.5528414", "0.55223995", "0.5517562", "0.551528", "0.5512235", "0.5507225", "0.5502742", "0.5500295", "0.5496675", "0.54894394", "0.5488965", "0.5488359", "0.5480311", "0.5459025", "0.5454211", "0.5454211", "0.5453815", "0.5448377", "0.54346365", "0.5430139", "0.5424672", "0.5423388", "0.5421609", "0.5420947", "0.54196525", "0.5417993", "0.5415076", "0.54127526", "0.54119146", "0.53966534", "0.53951645", "0.5394116" ]
0.0
-1
/ Properties direct methods
private String getSimplicityProjectName() { return properties.getProperty("simplicity.starter.projectName"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ReadProperty()\r\n {\r\n\r\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "public void setupProperties() {\n // left empty for subclass to override\n }", "Property getProperty();", "Property getProperty();", "Properties getProperties();", "@Override\r\n\tpublic void setProperty(Properties prop) {\n\t}", "public Properties getProperties() { return props; }", "Object getPropertytrue();", "Properties getProps()\n {\n return props;\n }", "protected List getProperties() {\n return null;\n }", "@Override\n protected void updateProperties() {\n }", "public abstract Properties getProperties();", "EProperties getProperties();", "Object getOtherprops();", "@Override\n\tpublic void setProperties(Properties p) {\n\t\t\n\t}", "PropertyCallExp createPropertyCallExp();", "public abstract AbstractProperties getProperties();", "public Property() {\r\n\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\tscoringmethod = 0;\r\n\t\tmindistance = 0.5;\r\n\t}", "@Override\n public void updateProperties() {\n // unneeded\n }", "public Property() {}", "Property[] getProperties();", "public Properties(){\n\n }", "public void properties(){\n setChanged();\n notifyObservers(name);\n System.out.println(\"Name: \" + name);\n System.out.println(\"Formula: \" + FORMULA);\n System.out.println(\"Colour: \" + COLOUR);\n System.out.println(\"Streak: \" + STREAK);\n System.out.println(\"Luster: \" + LUSTER);\n System.out.println(\"Diaphaneity: \" + DIAPHANEITY);\n System.out.println(\"Cleavage: \" + CLEAVAGE);\n System.out.println(\"Crystal system: \" + CRYSTAL_SYSTEM);\n System.out.println(\"Hardness: \" + HARDNESS);\n System.out.println(\"Specific Gravity: \" + SPECIFIC_GRAVITY);\n }", "private DiffProperty() {\n\t\t// No implementation\n\t}", "Property createProperty();", "public Property getProperty() {\n\treturn commonproperty;\r\n}", "int getProperty2();", "public String getProperty();", "public String prop(String name);", "public interface Property extends Assignable\n{\n\t/**\n\t * Property name\n\t */\n\tString getName();\n\n\t/**\n\t * Type.\n\t * \n\t * If this is a getter, the returned value is the getter's return type.\n\t * If this is a setter, the returned value is the type of the input argument of the setter.\n\t */\n\tType getType();\n\n /**\n * [InstanceType]\n *\n * @return null if the instance type metadata is not available or if the\n * instance type is not specified.\n */\n Type getInstanceType();\n\n\t/**\n\t * Is this read only?\n\t */\n\tboolean readOnly();\n\n /**\n\t *\n\t */\n\tboolean hasPublic();\n\n // metadata\n\n\t/**\n\t * [Inspectable]\n\t */\n\tInspectable getInspectable();\n\n\t/**\n\t * [CollapseWhiteSpace]\n\t */\n\tboolean collapseWhiteSpace();\n\n /**\n * [RichTextContent]\n */\n boolean richTextContent();\n\n\t/**\n\t * [Deprecated]\n\t */\n\tDeprecated getDeprecated();\n\n\t/**\n\t * [ChangeEvent]\n\t */\n\tboolean hasChangeEvent(String name);\n\n\n\t/**\n\t * [PercentProxy]\n\t */\n\tString getPercentProxy();\n}", "public Property() {\n\t\tcity=\"\";\n\t\towner=\"\";\n\t\tpropertyName=\"\";\n\t\trentAmount=0;\n\t\tplot= new Plot(0,0,1,1);\n\t}", "public interface Property {\n\n\t/**\n\t * Returns the name of the property.\n\t * @return property name\n */\n\tString getName();\n\n\t/**\n\t * Returns the cost to buy the property if it is unowned.\n\t * @return cost in dollars\n */\n\tint getCost();\n\n\t/**\n\t * Returns true if the property is mortgaged.\n\t * @return true if mortgaged\n */\n\tboolean getMortgaged();\n\n\t/**\n\t * Controls whether the property is mortgaged or not.\n\t * @param mortgaged whether or not the property is mortgaged\n */\n\tvoid setMortgaged(boolean mortgaged);\n\n\t/**\n\t * Returns the mortgage rate of the property.\n\t * @return mortgage rate in dollars\n */\n\tint getMortgageRate();\n\n\t/**\n\t * Returns the rent the given player should pay.\n\t * @param owner player that owns the property\n\t * @param tenantDiceRoll the roll the tenant made to get to this space\n\t * @return rent cost in dollars\n */\n\tint getRent(Player owner, int tenantDiceRoll);\n\n}", "@Override\r\n\tpublic void setProperties(Properties arg0) {\n\r\n\t}", "public Properties getProperties()\n {\n return this.properties;\n }", "int getProperty0();", "@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n // #[regen=yes,id=DCE.E1700BD9-298C-DA86-4BFF-194B41A6CF5E]\n // </editor-fold> \n protected String getProperties() {\n\n return \"Size = \" + size + \", Index = \" + value;\n\n }", "String getProperty();", "String getProperty();", "String getProperty();", "public Property()\r\n {\r\n }", "java.lang.String getProperty();", "@Override\n\tProp getProp() {\n\t\treturn null;\n\t}", "@Before(order=0)\n\tpublic void getProperty() {\n\t\tconfigReader = new ConfigReaders();\n\t\tprop = configReader.init_prop();\n\t\t\n\t}", "int getProperty1();", "public Properties getProperties();", "public boolean isProperty();", "public static void prtProperties() {\n prop.list(System.out);\n }", "public void _getProperties() {\n Property[] properties = oObj.getProperties();\n IsThere = properties[0];\n tRes.tested(\"getProperties()\", ( properties != null ));\n return;\n }", "public Propuestas() {}", "@Override\r\n\tpublic void setProperties(Properties properties) \r\n\t{\n\t}", "@Override\r\n\tpublic Properties getProperties() {\n\t\treturn null;\r\n\t}", "public Property() {\n this(0, 0, 0, 0);\n }", "@Override\n\tProp getp1() {\n\t\treturn null;\n\t}", "private PropertyPagePropertyDescriptor getPropertyDescriptor() {\n \t\treturn propertyDescriptor;\n \t}", "@Override\n public void get() {}", "public Collection<ModuleProperty> getProperties();", "protected java.util.Map getProperties() {\n return properties;\n }", "PropertyRealization createPropertyRealization();", "void setMyProperty1(Integer a) {}", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "public Object getProperties() {\n return this.properties;\n }", "@Override\n public PropertyDescriptor[] getPropertyDescriptors() {\n return getPdescriptor();\n }", "@Override\n public Properties getProperties() {\n return null;\n }", "@Override\n\tpublic void addProperty(String name) {\n\t}", "@Override\r\n\tpublic void setProperties(Properties properties) {\n\t\t\r\n\t}", "public Properties getProperties() {\n return properties;\n }", "@Override\n public ConfigurablePropertyMap getProperties() {\n return properties;\n }", "PropertyInfo getPropertyInfo();", "Object getProps();", "interface PropertyInfo {}", "public native final Value property(final String name)/*-{\n\t\treturn {\n\t\t\tdatum : this.property(name)\n\t\t};\n\t}-*/;", "public Map getProperties();", "default Map<String, Object> getProperties()\r\n {\r\n return emptyMap();\r\n }", "public Object prop(String name, String type);", "@Override\n\tpublic void propertyChange(PropertyChangeEvent evt) {\n\t\t\n\t}", "protected NodeProperties() {\r\n }", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "StringMap getProperties();", "public PropertiesQDoxPropertyExpander() {\n super();\n }", "public Properties getProperties() {\n\t\treturn this.properties;\n\t}", "protected void addPropNames()\n{\n addPropNames(\"Visible\", \"X\", \"Y\", \"Width\", \"Height\", \"Roll\", \"ScaleX\", \"ScaleY\",\n \"Font\", \"TextColor\", \"FillColor\", \"StrokeColor\", \"URL\");\n}", "public java.lang.String getNewProperty_description(){\n return localNewProperty_description;\n }", "public interface PropertiesModel {\n\n /**\n * Clears all defined properties from this model, but does not modify the set of observers.\n */\n void clear();\n\n /**\n * Adds a new {@link Property} to this model.\n * <p>\n * All properties must have case insensitive unique names and aliases. If a property with the same name (or names)\n * exists, it will be replaced by this property.\n *\n * @param property The property to be added.\n */\n void add(Property property);\n\n /**\n * Sets the value bound to the identified property without notifying observers that the value has been changed. This\n * method is intended to handle cases where setting a value could cause a cycle in the notification chain or\n * otherwise produce unintended side effects.\n * <p>\n * In most situations, {@link #set(ExecutionContext, String, Value)} is more appropriate.\n *\n * @param context The execution context\n * @param propertyName The case insensitive name of the property\n * @param propertyValue The value to set the property to.\n * @throws HtUncheckedSemanticException Thrown if no such property exists.\n */\n void setQuietly(ExecutionContext context, String propertyName, Value propertyValue);\n\n /**\n * Sets the value bound to the identified property. This method is intended for WyldCard-internal (i.e., not\n * scripted) access to properties.\n *\n * @param context The execution context\n * @param propertyName The case insensitive name of the property\n * @param propertyValue The value to set the property to.\n * @throws HtUncheckedSemanticException Thrown if no such property exists.\n */\n void set(ExecutionContext context, String propertyName, Value propertyValue);\n\n /**\n * Attempts to set the value bound to the identified property, throwing an {@link HtException} when the value cannot\n * by set, either because it doesn't exist, it isn't writable, or an error occurred writing it. This method is\n * intended for use by script/programmatic-access to property values.\n *\n * @param context The execution context\n * @param propertyName The case insensitive name of the property to be set\n * @param propertyValue The value to be written into the property\n * @throws HtException Thrown if the property doesn't exist, cannot be written, or an error occurs writing to it.\n */\n void trySet(ExecutionContext context, String propertyName, Value propertyValue) throws HtException;\n\n /**\n * Gets the value bound to the identified property. This method is intended for WyldCard-internal (i.e., not\n * scripted) access to properties.\n *\n * @param context The execution context\n * @param propertyName The case insensitive name of the property (or one of its aliases).\n * @return The value bound to the property\n * @throws IllegalStateException Thrown if an error occurs while evaluating the property.\n * @throws IllegalArgumentException Thrown if the property does not exist.\n */\n Value get(ExecutionContext context, String propertyName);\n\n /**\n * Attempts to get the value bound to the identified property, throwing an {@link HtException} when the value\n * cannot be retrieved. This method is intended for use by script/programmatic-access to property values.\n *\n * @param context The execution context.\n * @param propertyName The case insensitive name of the property (or one of its aliases).\n * @return The value bound to this property.\n * @throws HtException Thrown if the property cannot be retreived, perhaps because it doesn't exist or an error\n * occurred while trying to evaluate it.\n */\n Value tryGet(ExecutionContext context, String propertyName) throws HtException;\n\n /**\n * Returns the property identified by the given name, or null, if no such property exists.\n *\n * @param propertyName The case insensitive name of the property (or one of its aliases).\n * @return The identified property, or null if it doesn't exist.\n */\n Property findProperty(String propertyName);\n\n /**\n * Determines if a property identified by a given name exists.\n *\n * @param propertyName The case insensitive name of the property (or one of its aliases).\n * @return True if the property exists, false otherwise.\n */\n boolean hasProperty(String propertyName);\n\n /**\n * Adds an observer of property value changes. Note that observers are always notified of property changes on the\n * Swing dispatch thread.\n *\n * @param observer The observer\n */\n void addPropertyChangedObserver(PropertyChangeObserver observer);\n\n /**\n * Adds an observer of property value changes and immediately fires the\n * {@link PropertyChangeObserver#onPropertyChanged(ExecutionContext, PropertiesModel, String, Value, Value)} method\n * for each property defined in the model.\n * <p>\n * This is a convenience method to use instead of {@link #addPropertyChangedObserver(PropertyChangeObserver)}\n * followed immediately by {@link #notifyPropertyChangedObserver(ExecutionContext, PropertyChangeObserver, boolean)}.\n *\n * @param context The execution context\n * @param observer The property change observer.\n */\n void addPropertyChangedObserverAndNotify(ExecutionContext context, PropertyChangeObserver observer);\n\n /**\n * Invokes the {@link PropertyChangeObserver#onPropertyChanged(ExecutionContext, PropertiesModel, String, Value, Value)} method for\n * all properties on the provided observer. Useful for listeners that wish to initialize themselves with the current\n * state of the model.\n *\n * @param context The execution context.\n * @param observer This listener to be notified; does not have to be an active listener of this model.\n * @param includeComputedGetters When false, do not notify computed/synthesized properties\n */\n void notifyPropertyChangedObserver(ExecutionContext context, PropertyChangeObserver observer, boolean includeComputedGetters);\n\n /**\n * Removes an observer of property value changes; this listener will not be notified of future changes.\n *\n * @param observer The property change observer\n */\n void removePropertyChangedObserver(PropertyChangeObserver observer);\n}", "private PropertiesUtils() {}", "public Dictionary<String, Object> getProperties();", "public\n YutilProperties()\n {\n super(new Properties());\n }", "void initProperties()\n\t{\n\t\tpropertyPut(LIST_SIZE, 10);\n\t\tpropertyPut(LIST_LINE, 1);\n\t\tpropertyPut(LIST_MODULE, 1); // default to module #1\n\t\tpropertyPut(COLUMN_WIDTH, 70);\n\t\tpropertyPut(UPDATE_DELAY, 25);\n\t\tpropertyPut(HALT_TIMEOUT, 7000);\n\t\tpropertyPut(BPNUM, 0);\t\t\t\t// set current breakpoint number as something bad\n\t\tpropertyPut(LAST_FRAME_DEPTH, 0);\t\t// used to determine how much context information should be displayed\n\t\tpropertyPut(CURRENT_FRAME_DEPTH, 0); // used to determine how much context information should be displayed\n\t\tpropertyPut(DISPLAY_FRAME_NUMBER, 0); // houses the current frame we are viewing\n\t\tpropertyPut(FILE_LIST_WRAP, 999999); // default 1 file name per line\n\t\tpropertyPut(NO_WAITING, 0);\n\t\tpropertyPut(INFO_STACK_SHOW_THIS, 1); // show this pointer for info stack\n\t}", "@SuppressWarnings({ \"static-method\", \"nls\" })\n @Test\n public final void testGetProperty()\n {\n TestEasyPropertiesObject object = new TestEasyPropertiesObject();\n Assert.assertEquals(\"1.2.3\", object.getVersion());\n }", "@Override\r\n\tpublic void copy(Property p) {\n\t\t\r\n\t}", "public HasDisplayableProperties getProperties();", "public interface Property {\n\n\t/**\n\t * <p>\n\t * Retrieves the name of the property.\n\t * </p>\n\t * \n\t * @return The property's name\n\t */\n\tPropertyName getName();\n\n\t/**\n\t * <p>\n\t * Adds the specified values to the statements of this property.\n\t * </p>\n\t * \n\t * @param value\n\t * The value to be added\n\t * @return A reference to the updated property\n\t */\n\tProperty addValue(PropertyValue<?, ?> value);\n\n\t/**\n\t * <p>\n\t * Adds the specified values to the statements of this property, after\n\t * removing all current values.\n\t * </p>\n\t * \n\t * @param value\n\t * The value to be added\n\t * @return A reference to the updated property\n\t */\n\tProperty clearAndAddValue(PropertyValue<?, ?> value);\n\n\t/**\n\t * <p>\n\t * Removes the specified value from the statements of this property.\n\t * <p>\n\t * \n\t * @param value\n\t * The value to be removed\n\t * @return A reference to the updated property\n\t */\n\tProperty removeValue(PropertyValue<?, ?> value);\n\n\t/**\n\t * <p>\n\t * Modifies a property statement changing its value.\n\t * </p>\n\t * \n\t * @param oldValue\n\t * The value that the property currently has\n\t * @param newValue\n\t * The new value that will replace the actual one\n\t * @return A reference to the updated property\n\t */\n\tProperty changeValue(PropertyValue<?, ?> oldValue,\n\t\t\tPropertyValue<?, ?> newValue);\n\n\t/**\n\t * <p>\n\t * Lists all the values associated to this property.\n\t * </p>\n\t * \n\t * @return All values that this property has\n\t */\n\tPropertyValue<?, ?>[] values();\n\n\t/**\n\t * <p>\n\t * Check if the provided value is associated to this property.\n\t * </p>\n\t * \n\t * @param value\n\t * The value to be checked\n\t * @return True if associated, false otherwise\n\t */\n\tboolean hasValue(PropertyValue<?, ?> value);\n\n\t/**\n\t * <p>\n\t * Clones this entity.\n\t * </p>\n\t * \n\t * @return The clone entity\n\t */\n\tProperty clone();\n\n\t/**\n\t * <p>\n\t * Checks if this property extends the provided one.\n\t * </p>\n\t * \n\t * @param other\n\t * Another property to be checked against\n\t * @return True if extends, false otherwise\n\t */\n\tboolean isExtensionOf(Property other);\n\n\t/**\n\t * <p>\n\t * Pattern VISITOR.\n\t * </p>\n\t * \n\t * @param visitor\n\t * The visitor\n\t */\n\tvoid accept(LSAVisitor visitor);\n\n\t/**\n\t * <p>\n\t * Checks if the property is synthetic.\n\t * </p>\n\t * <p>\n\t * Synthetic Properties cannot be modified by a user agent.\n\t * </p>\n\t * \n\t * @return True if synthetic, false otherwise\n\t */\n\tboolean isSynthetic();\n}", "public Properties() \r\n\t{\r\n\t\tsuper();\r\n\t\tthis.port = 1234;\r\n\t\tthis.ip = \"127.0.0.1\";\r\n\t}", "public Properties getProperties() {\n return properties;\n }", "ProductProperties productProperties();", "public abstract boolean isAllowCustomProperties();", "@Override\n\tprotected void getExras() {\n\n\t}", "private GetProperty(Builder builder) {\n super(builder);\n }", "public Properties getProperty() {\r\n return properties;\r\n }", "public interface Properties {\r\n\r\n\t/**\r\n\t * Returns the raw value of the key, or null if not found.\r\n\t */\r\n\tpublic Object getObject(String key);\r\n\t\r\n\t/**\r\n\t * Returns an untyped Iterable for iterating through the raw contents of an array. \r\n\t */\r\n\tpublic Iterable<Object> getObjects(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as a string, or default value if not found.\r\n\t */\r\n\tpublic String getString(String key, String defaultValue);\r\n\t\r\n\t/**\r\n\t * Returns a string Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<String> getStrings(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as a boolean, or default value if not found.\r\n\t */\r\n\tpublic Boolean getBoolean(String key, Boolean defaultValue);\r\n\t\r\n\t/**\r\n\t * Returns a boolean Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Boolean> getBooleans(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as an integer, or default value if not found.\r\n\t */\r\n\tpublic Integer getInteger(String key, Integer defaultValue);\r\n\t\r\n\t/**\r\n\t * Returns an integer Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Integer> getIntegers(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as a long, or default value if not found.\r\n\t */\r\n\tpublic Long getLong(String key, Long defaultValue);\r\n\r\n\t/**\r\n\t * Returns a long Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Long> getLongs(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as an float, or default value if not found.\r\n\t */\r\n\tpublic Float getFloat(String key, Float defaultValue);\r\n\t\r\n\t/**\r\n\t * Returns a float Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Float> getFloats(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as a double, or default value if not found.\r\n\t */\r\n\tpublic Double getDouble(String key, Double defaultValue);\r\n\r\n\t\r\n\t/**\r\n\t * Returns a double Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Double> getDoubles(String key);\r\n\t\r\n\r\n\t\r\n\t/**\r\n\t * Returns a nested set of properties for the specified key, or default value if not found.\r\n\t */\r\n\tpublic Properties getPropertiesSet(String key, Properties defaultValue);\r\n\r\n\t/**\r\n\t * Returns a Properties Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Properties> getPropertiesSets(String key);\r\n\t\r\n}", "boolean hasGetProperty();" ]
[ "0.72310716", "0.719139", "0.71327686", "0.67394", "0.67394", "0.67133844", "0.6696622", "0.66793066", "0.66739994", "0.66688955", "0.6656083", "0.66543174", "0.66290313", "0.65924406", "0.65804297", "0.65311784", "0.65171236", "0.64824796", "0.6469828", "0.6458078", "0.6412817", "0.6406413", "0.6405949", "0.64049274", "0.6390696", "0.6390239", "0.63883275", "0.6386572", "0.63603914", "0.6341131", "0.6340114", "0.63361", "0.6320793", "0.6313007", "0.6300571", "0.62982285", "0.62925583", "0.628661", "0.628661", "0.628661", "0.62837523", "0.6263295", "0.6258987", "0.6255427", "0.6248688", "0.6247192", "0.62268585", "0.62253416", "0.6224949", "0.6173142", "0.61673003", "0.61623734", "0.6135148", "0.613448", "0.61344403", "0.6126927", "0.61188215", "0.611168", "0.61015177", "0.60709184", "0.60699505", "0.60671484", "0.6065616", "0.60415787", "0.6036214", "0.60345554", "0.6021165", "0.6013838", "0.59940976", "0.5989106", "0.59880555", "0.5982765", "0.5975042", "0.5969695", "0.5969053", "0.5969047", "0.5966679", "0.59615755", "0.5948067", "0.59471816", "0.59470546", "0.5946094", "0.5945928", "0.59291065", "0.59259874", "0.5921772", "0.591054", "0.59053177", "0.5902194", "0.58972406", "0.58949304", "0.58948076", "0.5889198", "0.5882471", "0.58805096", "0.5874802", "0.58717334", "0.5871255", "0.5863064", "0.5859292", "0.58587277" ]
0.0
-1
To prevent bulk duplication
public void setStocksAtHome(List<String> stockList){ HashSet<String> hashSet = new HashSet<String>(stockList); List<String> stocksAtHome = getStocksAtHome(); hashSet.addAll(stocksAtHome); //To proceed with easy storage stockList = new ArrayList<String>(hashSet); Gson gson = new GsonBuilder().create(); String gsonStockList = gson.toJson(stockList); editor.putString(STOCK_HOME_SET, gsonStockList); editor.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean isDuplicate(ELesxUseCase useCase) {\n return false;\n }", "public boolean supportsUnique() {\n \t\treturn true;\n \t}", "public void bulkAdd(){\n employees.add(new Employee(23.0, 15000.0, \"Shayan\"));\n employees.add(new Employee(22.0, 60000.0, \"Rishabh\"));\n employees.add(new Employee(23.0, 45000.0, \"Ammar\"));\n employees.add(new Employee(25.0, 30000.0, \"Fahad\"));\n employees.add(new Employee(21.0, 50000.0, \"Ankur\"));\n }", "static SparseArray<TaskDetail> getCurrentMappingsDuplicated() {\n SparseArray<TaskDetail> toReturn = new SparseArray<>();\n for (int i = 0; i < TaskDetail.actionToTask.size(); i++) {\n TaskDetail detail = TaskDetail.actionToTask.valueAt(i);\n toReturn.put(TaskDetail.actionToTask.keyAt(i), detail.duplicate());\n }\n return toReturn;\n }", "public void onDuplicate() {\n }", "private void HaveDuplicate() {\n haveDuplicate = false;\n duplicateCounter = 0;\n try {\n query=\"SELECT * FROM category WHERE category_id = '\"+ txtCategoryNo.getText() +\"' OR category_name = '\"+\n txtCategoryName.getText() + \"'\";\n rset = connection.createStatement().executeQuery(query);\n while (rset.next()) {\n haveDuplicate = true;\n duplicateCounter++;\n }\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n }", "private List<CustStmtRecord> validateDuplicate (final List<CustStmtRecord> custStmtRecords) {\n\t\tlog.info(\"Entering {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\tfinal List<CustStmtRecord> duplicateReference = custStmtRecords\n\t\t\t\t.parallelStream()\n\t\t\t\t\t.filter(e -> Collections.frequency(custStmtRecords, e) > 1)\n\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\t\t;\n\t\t\t\n\t\tlog.info(\"duplicateReference {}\", duplicateReference);\n\t\t\t\n\t\tlog.info(\"Exiting {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\treturn duplicateReference;\n\t}", "@Override\n protected void onCreate(KeyList<Ujo> list, InnerDataStore<Ujo> innerData) throws IllegalStateException {\n final Set<String> set = new HashSet<>(list.size());\n for (Key<Ujo,?> key : list) {\n final boolean unique = set.add(key.getName());\n Assert.isTrue(unique, \"The key name is not unique: {}\", key);\n }\n }", "@Override\r\n\tpublic void uniqueUpdate() {\n\r\n\t}", "int insertSelective(Shareholder record);", "public boolean isUnique();", "public void duplicateAndInsertElements() {\n\t\t\n\t\tif (highlightedFields.isEmpty()) return;\n\t\t\n\t\t// highlighted fields change while adding. Make a copy first\n\t\tArrayList<XmlNode> tempArray = new ArrayList<XmlNode>(highlightedFields);\n\t\t\n\t\tcopyAndInsertElements(tempArray);\n\t}", "public synchronized void addUniqueMultiple(List<kelondroRow.Entry> rows) throws IOException {\n TreeMap<Integer, byte[]> indexed_result = super.addMultiple(rows);\r\n // indexed_result is a Integer/byte[] relation\r\n // that is used here to store the index\r\n Iterator<Map.Entry<Integer, byte[]>> i = indexed_result.entrySet().iterator();\r\n Map.Entry<Integer, byte[]> entry;\r\n while (i.hasNext()) {\r\n entry = i.next();\r\n index.puti(entry.getValue(), entry.getKey().intValue());\r\n }\r\n assert this.size() == index.size() : \"content.size() = \" + this.size() + \", index.size() = \" + index.size();\r\n \t\t\r\n }", "@Override\n\tpublic void test00400Add_DuplicateRecord() throws Exception\n\t{\n\t\t// This method will not fail with Generate card numbers set to Y\n\t}", "protected boolean allowsDuplicates(Class type) {\n return !Set.class.isAssignableFrom(type);\n }", "private boolean checkDuplicate(int id) {\r\n boolean x = false;\r\n for (Registration registration : studentRegList) {\r\n if (id == registration.getCourseId()) {\r\n x = true;\r\n break;\r\n }\r\n x = false;\r\n }\r\n return x;\r\n }", "private List<SuperSetterBasedBuilderField> deduplicateByName(List<SuperSetterBasedBuilderField> fields) {\n List<SuperSetterBasedBuilderField> result = new ArrayList<>();\n for (SuperSetterBasedBuilderField field : fields) {\n if (!alreadyContainsField(result, field)) {\n result.add(field);\n }\n }\n return result;\n }", "private void checkDuplicateOfFile(Iterable<FileInfo> files, DuplicateDataDTO data) {\n for(FileInfo nextFile: files) {\n for(FileInfo nextFile2: files) {\n if(nextFile.duplicate(nextFile2)) {\n LOG.info(\"Duplicate - {}\", nextFile);\n\n processDuplicate(nextFile,data);\n }\n }\n }\n }", "@Test\n public void testDuplicate() throws Exception {\n\n UploadRequest uploadRequest = createRequest();\n\n // create upload - We still care about study ID and requestedOn for reporting, as well as dupe attributes.\n DynamoUpload2 upload = (DynamoUpload2) dao.createUpload(uploadRequest, TEST_STUDY, TEST_HEALTH_CODE,\n ORIGINAL_UPLOAD_ID);\n uploadIds.add(upload.getUploadId());\n assertEquals(ORIGINAL_UPLOAD_ID, upload.getDuplicateUploadId());\n assertEquals(UploadStatus.DUPLICATE, upload.getStatus());\n assertEquals(TEST_STUDY_IDENTIFIER, upload.getStudyId());\n assertEquals(MOCK_NOW.getMillis(), upload.getRequestedOn());\n\n // We don't call Upload Complete in this scenario.\n }", "@objid (\"ef9777b4-ed2a-4341-bb22-67675cddb70a\")\n boolean isIsUnique();", "public Object _duplicate() {\n throw new NO_IMPLEMENT(reason);\n }", "private boolean isUniqueEntity(Entity newEnt, int layerId) {\n for (Entity ent: getList(layerId)){\n if (ent.get_uid().equals(newEnt.get_uid())){\n return false;\n }\n }\n return true;\n }", "static void findDuplicate()\n\t{\n\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toList = new ArrayList<String>();\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Dog\");\n\t\t\toList.add(\"Eagle\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\tSystem.out.println(oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>();\n\t\t\t\n\t\t\tString s = \"\";\n\t\t\tfor(int i=0;i<oList.size();i++)\n\t\t\t{\n\t\t\t\tif((oSet.add(oList.get(i))==false) && (!s.contains(oList.get(i))))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Duplicate: \"+oList.get(i));\n\t\t\t\t\ts+=oList.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toList = null;\n\t\t\toSet = null;\n\t\t}\n\t}", "@Test\n\tpublic void testRepeatedInsert() {\n\t\tSetADT<String> items = new JavaSet<>();\n\t\titems.insert(\"A\");\n\t\titems.insert(\"B\");\n\t\titems.insert(\"C\");\n\t\titems.insert(\"C\");\n\t\t\n\t\t// No matter what, \"C\" can't be added twice.\n\t\titems.insert(\"C\");\n\t\tassertEquals(3, items.size());\n\t\t\n\t\t//double checking - same as for loop\n\t\titems.insert(\"C\");\n\t\tassertEquals(3, items.size());\n\t\t\n\t\tassertEquals(3, items.size());\n\t\tassertEquals(true, items.contains(\"A\"));\n\t\tassertEquals(true, items.contains(\"B\"));\n\t\tassertEquals(true, items.contains(\"C\"));\n\t\t\n\t}", "@Test \r\n\t\tpublic void testinsertAll() {\n\t\t\ttestingSet = new IntegerSet();\r\n\t\t\ttestingSet.insertAll(list1);\r\n\t\t\t// create set = to unique values in list \r\n\t\t\ttestingSet2 = new IntegerSet(unique); \r\n\t\t\t// 2 set should be equal \r\n\t\t\t// assertEquals for these parameters is a deprecated method \r\n\t\t\tassertArrayEquals(testingSet.toArray(), testingSet2.toArray()); \r\n\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t}", "boolean isIsUnique();", "int insertSelective(FileSet record);", "@Override\n protected Object freshBatch(Object reuse)\n {\n throw new NotImplementedException();\n }", "protected void unique() {\n List<Double> unique = new ArrayList<Double>(size());\n for (Double f : data) {\n if (!unique.contains(f)) {\n unique.add(f);\n }\n }\n this.setData(unique);\n }", "void setDupOfSeqObj(List<SeqInfo> seqObjList) {\n\t\tboolean desc=false;\n\t\tCollections.sort(seqObjList, new SeqInfo.CompSeqEncode(desc));\n\t\t//System.out.println(\"Sorted reads: \"+seqObjList.size());\n\t\t//timeStamp=new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n\t\t//System.out.println(\"time: \"+timeStamp);\n\t \n\t\tSeqInfo seqObj;\n\t\tSeqInfo seqObj_r0 = null;\n\t\tSeqInfo currSeqObj;\n\t\tSeqInfo currSeqObj2; \n\t List<SeqInfo> querySeqObjList; \n\t\t\n\t int i=0; \n\t int r=0;\n\t //int m=1;\n\t\tfor(int s=0;s<seqObjList.size();s++){\n\t\t currSeqObj=seqObjList.get(s);\t\n\t\t if(!currSeqObj.isDup && currSeqObj.dupNum<0){\n\t\t\t /*\n\t\t\t if((s+1)/500000==m) {\n\t\t\t\ttimeStamp=new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n\t\t\t\tSystem.out.println((s+1)+\" time: \"+timeStamp);\n\t\t\t\tm++;\n\t\t\t }\t\n\t\t\t */\n\t\t\t querySeqObjList=SeqOperation.findSeqObjOfSameEncode(seqObjList,currSeqObj);\n\t\t\t if(querySeqObjList.size()==1) {\n\t\t\t\tcurrSeqObj.isDup=false;\n\t\t\t\tcurrSeqObj.dupNum=0; \n\t\t\t }else if(querySeqObjList.size()>1){\n\t\t\t currSeqObj2=currSeqObj;\n\t\t\t while(currSeqObj2!=null){\t\t \n\t\t\t currSeqObj2=null;\n\t\t\t\t r=0;\n\t\t\t\t i=0;\n\t\t\t\t while(i<querySeqObjList.size()) {\t\n\t\t\t\t seqObj=querySeqObjList.get(i);\t\t \n\t\t\t\t if(seqObj.seq.equalsIgnoreCase(currSeqObj.seq)){\t\t\t\t\n\t\t\t\t\t if(r==0) { \t\t\t\n\t\t\t\t\t seqObj_r0=seqObj;\n\t\t\t\t\t seqObj_r0.isDup=false;\n\t\t\t\t\t }if(r>0) {\t\t\t\t \n\t\t\t\t\t seqObj.isDup=true;\n\t\t\t\t\t seqObj.dupNum=r;\t\n\t\t\t\t\t }\n\t\t\t\t\t seqObj_r0.dupNum=r;\n\t\t\t\t\t querySeqObjList.remove(seqObj);\n\t\t\t\t\t r++;\n\t\t\t\t }else{\n\t\t\t\t\t currSeqObj2=seqObj;\t\n\t\t\t\t\t i++;\t\t\n\t\t\t\t } \t\t \n\t\t\t\t }// while query\n\t\t\t\t if(currSeqObj2!=null) currSeqObj=currSeqObj2;\n\t\t\t }\n\t\t\t }\n\t\t\t querySeqObjList=null;\t \n\t\t }\t \n\t\t}\n\t\t\n\t Collections.sort(seqObjList, new SeqInfo.CompSeqID(desc));\t\n }", "void addPerson(Person person) throws UniquePersonList.DuplicatePersonException;", "static boolean isDuplicated(String mac) {\n for (DeviceDetail detail : deviceDetails) {\n if (detail.macAddress.equals(mac)) {\n return true;\n }\n }\n return false;\n }", "public boolean getDuplicateSuppression() {\n return duplicate_suppression;\n }", "public static void incrDuplicates() { ++duplicates; }", "public DuplicateItemException() {\r\n super();\r\n }", "void callForBackup() {\n List<Resource> redundantList = resourceRepository.findAllByIsRedundantIsTrue();\n System.out.println(\"Invoking redundant instance from list: \" + redundantList);\n if (redundantList != null && redundantList.size() > 0) {\n Resource redundantResource = redundantList.get(0);\n redundantResource.setRedundant(false);\n resourceRepository.save(redundantResource);\n }\n }", "public abstract Instance duplicate();", "public void setDuplicateSuppression(boolean duplicate_suppression) {\n this.duplicate_suppression = duplicate_suppression;\n }", "protected void paramDuplicate(){\n List<StatementParse> parameters = this.node.getChildren().get(0).getChildren();\n for (StatementParse x: parameters){\n int count = 0;\n for (StatementParse y: parameters){\n if (x.getName().equals(y.getName())){\n count++;\n }\n }\n if (count > 1) throw new DuplicateParam();\n }\n }", "public boolean checkDuplicates() {\n List<Booking> dupbookings = new ArrayList<>();\n try {\n dupbookings = bookingHelper.checkDuplicates(b_facility.getId(), b_evdate, b_startTime, b_endTime);\n } catch (Exception e) {\n //facesMessage(\"No other bookings found for the day and time\");\n }\n return dupbookings.size() > 0;\n }", "private void addWithoutDuplicate(ArrayList<WordDocument> addTo, ArrayList<WordDocument> addFrom) {\n for (WordDocument x : addFrom)\n if (!addTo.contains(x))\n addTo.add(x);\n }", "@Test\n public void addExactDupItemTest() {\n List<Item> items = itemSrv.getAllItems();\n Assert.assertNotNull(\"List of items is null\", items);\n\n Assert.assertEquals(\"Wrong initial size of the list, should be 0\", 0, items.size());\n\n final Item item = new Item(\"item1\", \"item1 description\");\n Assert.assertEquals(\"Item adding failure\", ErrCode.ADD_SUCCESS, itemSrv.addItem(item));\n\n items = itemSrv.getAllItems();\n Assert.assertEquals(\"Total item count should be 1\", 1, items.size());\n\n // Add same exact/original/duplicate item\n Assert.assertEquals(\"Duplicate item protection fails\", ErrCode.ADD_DUPLICATE_ITEM, itemSrv.addItem(item));\n Assert.assertEquals(\"Total item count should still be 1 after adding duplicate item\", 1, itemSrv.getAllItems().size());\n Assert.assertEquals(\"Retrieved item is not the same as original\", item, items.get(0));\n }", "void scanunique() {\n\t\tint oldline, newline;\n\t\tnode psymbol;\n\n\t\tfor (newline = 1; newline <= newinfo.maxLine; newline++) {\n\t\t\tpsymbol = newinfo.symbol[newline];\n\t\t\tif (psymbol.symbolIsUnique()) { // 1 use in each file\n\t\t\t\toldline = psymbol.linenum;\n\t\t\t\tnewinfo.other[newline] = oldline; // record 1-1 map\n\t\t\t\toldinfo.other[oldline] = newline;\n\t\t\t}\n\t\t}\n\t\tnewinfo.other[0] = 0;\n\t\toldinfo.other[0] = 0;\n\t\tnewinfo.other[newinfo.maxLine + 1] = oldinfo.maxLine + 1;\n\t\toldinfo.other[oldinfo.maxLine + 1] = newinfo.maxLine + 1;\n\t}", "boolean isUnique();", "int insertSelective(Orderall record);", "@Test(expected=DuplicateKeyException.class)\n\t\tpublic void testSave3()\n\t\t{\n\n\t\t\tChObject cho = repoTest.get(\"68268301\");\n\n\t\t\trepoTest.save(cho);\t\t\t//add chObject to repo\n\t\t\trepoTest.save(cho);\t\t\t//add duplicate record (not allowed...should throw exception)\n\t\t}", "@Override\n protected int getNumRepetitions() {\n return 1;\n }", "void insertBatch(List<InspectionAgency> recordLst);", "int insertSelective(QuestionOne record);", "private void removeDuplicateUserAgents() throws Exception {\n Db db = getDb();\n try {\n db.enter();\n Map<Integer, Integer> dups = new HashMap<Integer, Integer>();\n _logger.info(\"checking duplicate user agents\");\n String sqlSelectDupUA = \"select a1.t_http_agent_id, a2.t_http_agent_id FROM http.t_http_agent a1, http.t_http_agent a2 WHERE a1.t_http_agent_id <> a2.t_http_agent_id AND a1.agent_name = a2.agent_name AND a1.version = a2.version AND a1.authorized = 'ALLOWED' ORDER BY a1.t_http_agent_id\";\n PreparedStatement pstSelDups = db.prepareStatement(sqlSelectDupUA);\n ResultSet rsDups = db.executeQuery(pstSelDups);\n if (rsDups.next()) {\n do {\n dups.put(Integer.valueOf(rsDups.getInt(1)), Integer.valueOf(rsDups.getInt(2)));\n } while (rsDups.next());\n } else {\n _logger.debug(\"removeDuplicateUserAgents 1 - no rows found.\");\n }\n _logger.debug(dups.size() + \" user agents duplicated\");\n if (dups.size() == 0) return;\n String sqlSelUAD = \"SELECT count, calc_day FROM http.t_http_agent_daily WHERE t_http_agent_id = ?\";\n String sqlUpdUAD = \"UPDATE http.t_http_agent_daily SET count = count + ? WHERE calc_day = ? AND t_http_agent_id = ?\";\n String sqlDelUAD = \"DELETE FROM http.t_http_agent_daily WHERE t_http_agent_id = ?\";\n PreparedStatement pstSelUAD = db.prepareStatement(sqlSelUAD);\n PreparedStatement pstUpdUAD = db.prepareStatement(sqlUpdUAD);\n PreparedStatement pstDelUAD = db.prepareStatement(sqlDelUAD);\n for (Iterator<Map.Entry<Integer, Integer>> it = dups.entrySet().iterator(); it.hasNext(); ) {\n try {\n db.enter();\n Map.Entry<Integer, Integer> kv = it.next();\n Integer key = kv.getKey();\n Integer dupToRemove = kv.getValue();\n pstSelUAD.setInt(1, dupToRemove.intValue());\n ResultSet rsSelUAD = db.executeQuery(pstSelUAD);\n if (rsSelUAD.next()) {\n do {\n pstUpdUAD.setInt(1, rsSelUAD.getInt(1));\n pstUpdUAD.setDate(2, rsSelUAD.getDate(2));\n pstUpdUAD.setInt(3, key.intValue());\n db.executeUpdate(pstUpdUAD);\n } while (rsSelUAD.next());\n } else {\n _logger.debug(\"removeDuplicateUserAgents 2 - no rows found.\");\n }\n pstDelUAD.setInt(1, dupToRemove.intValue());\n db.executeUpdate(pstDelUAD);\n } finally {\n db.exit();\n }\n }\n _logger.debug(\"Finished removing duplicate rows in http_agent_daily\");\n String sqlSelectUADates = \"SELECT first_occurence, last_occurence FROM http.t_http_agent WHERE t_http_agent_id = ?\";\n String sqlUpdateUA = \"UPDATE http.t_http_agent SET first_occurence = timestamp_smaller(first_occurence, ?), last_occurence = timestamp_larger(last_occurence, ?) WHERE t_http_agent_id = ?\";\n String sqlDeleteUA = \"DELETE FROM http.t_http_agent WHERE t_http_agent_id = ?\";\n PreparedStatement pstSelDates = db.prepareStatement(sqlSelectUADates);\n PreparedStatement pstUpdUA = db.prepareStatement(sqlUpdateUA);\n PreparedStatement pstDelUA = db.prepareStatement(sqlDeleteUA);\n for (Iterator<Map.Entry<Integer, Integer>> it = dups.entrySet().iterator(); it.hasNext(); ) {\n try {\n db.enter();\n Map.Entry<Integer, Integer> kv = it.next();\n Integer key = kv.getKey();\n Integer dupToRemove = kv.getValue();\n pstSelDates.setInt(1, dupToRemove.intValue());\n ResultSet rsSelUA = db.executeQuery(pstSelDates);\n if (rsSelUA.next()) {\n pstUpdUA.setTimestamp(1, rsSelUA.getTimestamp(1));\n pstUpdUA.setTimestamp(2, rsSelUA.getTimestamp(2));\n pstUpdUA.setInt(3, key.intValue());\n db.executeUpdate(pstUpdUA);\n }\n pstDelUA.setInt(1, dupToRemove.intValue());\n db.executeUpdate(pstDelUA);\n } finally {\n db.exit();\n }\n }\n _logger.debug(\"Finished removing duplicate rows in http_agent\");\n } finally {\n db.exit();\n }\n }", "private static String getUpsertBulkByUser(Context ctx, User user) {\n StringBuilder bulk = new StringBuilder();\n List<Date> dates = new UserManager().getQuestionnaireDateListByUserName(user.getName());\n if (dates != null) {\n for (Date date : dates) {\n JSONObject params = new JSONObject();\n try {\n MetaQuestionnaire meta = new MetaQuestionnaireManager().getMetaDataByCreationDate(date);\n if (meta != null) {\n params.put(\"operation-type\", meta.getOperationType());\n PsychoSocialSupportState psychoSocialSupportState = meta.getPsychoSocialSupportState();\n params.put(\"need-psychosocial-support\", psychoSocialSupportState == PsychoSocialSupportState.ACCEPTED);\n params.put(\"had-psychosocial-support\", meta.getPastPsychoSocialSupportState());\n }\n params.put(\"creation-date\", EntityDbManager.dateFormat.format(date));\n String userName = Security.getUserNameByEncryption(user);\n params.put(\"user-name\", userName);\n\n } catch (Exception e) {\n Log.e(CLASS_NAME, e.getLocalizedMessage());\n }\n\n\n DistressThermometerQuestionnaire distressThermometerQuestionnaire = new DistressThermometerQuestionnaireManager().getDistressThermometerQuestionnaireByDate(user.getName(), date);\n if (distressThermometerQuestionnaire != null) {\n if (Questionnairy.canStatisticsBeDisplayed(distressThermometerQuestionnaire.getProgressInPercent()))\n params = addAllKeyValuePairs(distressThermometerQuestionnaire.getAsJSON(), params);\n }\n\n\n QolQuestionnaire qol = new QualityOfLifeManager().getQolQuestionnaireByDate(user.getName(), date);\n if (qol != null) {\n if (Questionnairy.canStatisticsBeDisplayed(qol.getProgressInPercent())) {\n if (qol.getGlobalHealthScore() > 0) {\n params = addAllKeyValuePairs(qol.getQLQC30AsJSON(), params);\n params = addAllKeyValuePairs(qol.getBN20AsJSON(), params);\n }\n }\n }\n\n\n HADSDQuestionnaire hads = new HADSDQuestionnaireManager().getHADSDQuestionnaireByDate_PK(user.getName(), date);\n if (hads != null) {\n if (Questionnairy.canStatisticsBeDisplayed(hads.getProgressInPercent()))\n if(hads.getAnxietyScore() > 0 ){\n params = addAllKeyValuePairs(hads.getAsJSON(), params);\n }\n }\n\n\n FearOfProgressionQuestionnaire fearQuestionnaire = new FearOfProgressionManager().getQuestionnaireByDate(user.getName(), date);\n if (fearQuestionnaire != null) {\n if (Questionnairy.canStatisticsBeDisplayed(fearQuestionnaire.getProgressInPercent()))\n if (fearQuestionnaire.getScore() >= 12 && fearQuestionnaire.getScore() <=60) {\n params = addAllKeyValuePairs(fearQuestionnaire.getAsJSON(), params);\n }\n\n }\n\n\n bulk.append(ElasticQuestionnaire.getGenericBulk(date, getType(), params.toString()));\n }\n\n }\n return bulk.toString();\n }", "@Test\n public void testGetDuplicateUsers() {\n UserMapping userMapping = new UserMapping();\n userMapping.setTenancy(tenancy);\n userMapping.setNhsno(\"nhsno1\");\n userMapping.setUnitcode(\"unitcodeA\");\n userMapping.setUsername(\"usernameDuplicate1-GP\");\n\n userMappingDao.save(userMapping);\n\n // this one will show\n userMapping = new UserMapping();\n userMapping.setTenancy(tenancy);\n userMapping.setNhsno(\"nhsno1\");\n userMapping.setUnitcode(\"unitcodeA\");\n userMapping.setUsername(\"usernameDuplicate1\");\n\n userMappingDao.save(userMapping);\n\n List<UserMapping> userMappings = userMappingDao.getDuplicateUsers(\"nhsno1\", \"username1\", tenancy);\n\n // should get back 1 result\n assertEquals(\"incorrect number of duplicates found for nhsno1\", 1, userMappings.size());\n\n assertEquals(\"incorrect duplicate found for nhsno1\", \"usernameDuplicate1\", userMappings.get(0).getUsername());\n }", "public void duplicateClubEvent() {\n \n boolean modOK = modIfChanged();\n \n if (modOK) {\n ClubEvent clubEvent = position.getClubEvent();\n ClubEvent newClubEvent = clubEvent.duplicate();\n newClubEvent.setWhat(clubEvent.getWhat() + \" copy\");\n newClubEvent.setId(\"\");\n position = new ClubEventPositioned();\n position.setIndex (clubEventList.size());\n position.setClubEvent(newClubEvent);\n position.setNewClubEvent(true);\n localPath = \"\";\n display();\n }\n }", "private void checkDuplicateEntry(Long userId, String email, Boolean isBeneficiary, Boolean isFiduciary) {\n\t\tList<Contact> contactOpt = contactRepository.findByUserIdAndEmailAndIsFiduciaryAndIsBeneficiaryAndDeletedFalse(\n\t\t\t\tuserId, email, isBeneficiary, isFiduciary);\n\t\tif (!contactOpt.isEmpty()) {\n\t\t\tthrow DataAlreadyExistException.of(MessageConstant.EMAIL_ALREADY_EXISTED);\n\t\t}\n\t}", "public void testValidateSubjectPrimaryAssociationsDuplicate() throws Exception {\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n List subjectPrimaryAssociations = positionWrapperBean.getSubjectPrimaryAssociations();\n for (int i = 0; i < subjectPrimaryAssociations.size(); i++) {\n ArtefactAssociationWrapperBean artefactAssociationWrapperBean = (ArtefactAssociationWrapperBean) subjectPrimaryAssociations.get(i);\n artefactAssociationWrapperBean.setSourceId(new Long(12));\n artefactAssociationWrapperBean.setQualifierId(new Long(399));\n }\n // should produce a duplicate assocition error\n DataBinder binder = new DataBinder(positionWrapperBean, ZynapDefaultFormController.DEFAULT_COMMAND_NAME);\n Errors errors = binder.getBindingResult();\n positionValidator.validateSubjectPrimaryAssociations(positionWrapperBean, errors);\n assertEquals(1, errors.getErrorCount());\n FieldError error = errors.getFieldError(FIRST_PRIMARY_ASSOCIATION_SOURCE_FIELD);\n assertEquals(\"error.association.target.unique.required\", error.getCode());\n }", "int insertSelective(Collect record);", "boolean checkNoDuplicateFields() {\n\t if (duplicateNames == null | duplicateNames.isEmpty())\n\t return true;\n\t Iterator iter = duplicateNames.iterator();\n\t String names = \"\";\n\t while (iter.hasNext()) {\n\t names = names + iter.next(); \n\t }\n\t cat.error(loc,DUPLICATE_COLUMN_NAMES,new Object[] {names});\n\t return false;\n\t }", "public void containsNoDuplicates() {\n List<Entry<T>> duplicates = Lists.newArrayList();\n for (Multiset.Entry<T> entry : LinkedHashMultiset.create(getSubject()).entrySet()) {\n if (entry.getCount() > 1) {\n duplicates.add(entry);\n }\n }\n if (!duplicates.isEmpty()) {\n failWithRawMessage(\"%s has the following duplicates: <%s>\", getDisplaySubject(), duplicates);\n }\n }", "public void dxSingleSpeedsDuplicates(String fileName) throws IOException {\n // This method prints all the duplicated DXSingleSpeeds in the output\n // file.\n\n // concatenate the recorded DXSingleSpeeds in a string\n ArrayList<String> recordedDXSingleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXSingleSpeed> dxSingleSpeedIterator = dxSingleSpeeds.iterator(); dxSingleSpeedIterator\n .hasNext();) {\n recordedDXSingleSpeedsStrings.add(dxSingleSpeedIterator.next()\n .toMoRecordString());\n }\n\n ArrayList<String> duplicates = new ArrayList<String>();\n duplicates = saveDuplicates(recordedDXSingleSpeedsStrings);\n\n // define the header of the output file\n String fileHeader = \"There are \"\n + String.format(\"%s\", duplicates.size()) + \" duplicate(s) \"\n + \"in the input file. The duplicate(s) is(are) :\" + \"\\n\" + \"\\n\";\n\n String recordedDuplicatesStrings = \"\";\n\n // concatenate the recorded DXSingleSpeed in a string\n for (Iterator<String> it = duplicates.iterator(); it.hasNext();) {\n recordedDuplicatesStrings += it.next() + \"\\n\";\n }\n\n // print the header + DXSingleSpeed + footer in the output file\n OutputStreamWriter fw = new FileWriter(fileName);\n fw.write(fileHeader + recordedDuplicatesStrings);\n fw.close();\n }", "private void checkDuplicities(final List<Unit> units) {\n final Set<Unit> tmp = new HashSet<>();\n units.forEach(unit -> {\n if (tmp.contains(unit)) {\n throw new IllegalStateException(\"Unit was registered twice, unit: \" + unit);\n } else {\n tmp.add(unit);\n }\n });\n }", "private boolean duplicationCheck(String userName) {\n\t\tboolean ret = true;\n\t\tif(obs.isEmpty()) {\n\t\t\tret = true;\n\t\t}\n\t\telse {\n\t\t\tfor(int i=0; i<obs.size(); i++) {\n\t\t\t\tif(obs.get(i).getUserName().compareTo(userName) == 0) {\n\t\t\t\t\tret = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tret = true;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "@Override\n\tpublic void preInsert() {\n\n\t}", "@Test\n public void testMultiInsertData() throws Exception {\n String tenantId = \"5cab9a0c-b22e-4640-ac7e-7426dd9fea73\";\n List<Item> items = itemDao.getAllNotDeleteItems(tenantId);\n System.out.println(items.size());\n int pointsDataLimit = 1000;//限制条数\n int size = items.size();\n //判断是否有必要分批\n if (pointsDataLimit < size) {\n int part = size / pointsDataLimit;//分批数\n System.out.println(\"共有 : \" + size + \"条,!\" + \" 分为 :\" + part + \"批\");\n for (int i = 0; i < part; i++) {\n //1000条\n List<Item> listPage = items.subList(0, pointsDataLimit);\n String json = EsJsonUtils.generateMultiInsertItem(listPage);\n System.out.println(json);\n elasticSearchDao.bulkDealData(TENANT_ID + Constants.INDEX_SPLIT + Constants.ITEM,Constants.ITEM,json);\n //剔除\n items.subList(0, pointsDataLimit).clear();\n }\n if (!items.isEmpty()) {\n String json = EsJsonUtils.generateMultiInsertItem(items);\n System.out.println(json);\n elasticSearchDao.bulkDealData(TENANT_ID+ Constants.INDEX_SPLIT + Constants.ITEM,Constants.ITEM,json);\n }\n }\n }", "void addCopy() {\r\n numCopies++;\r\n }", "static void setCopying(){isCopying=true;}", "org.omg.CORBA.Object _duplicate();", "protected void removeDuplicates() {\n log.trace(\"Removing duplicated\");\n long startTime = System.currentTimeMillis();\n int initial = size();\n E last = null;\n int index = 0;\n while (index < size()) {\n E current = get(index);\n if (last != null && last.equals(current)) {\n if (log.isTraceEnabled()) {\n log.trace(\"Removing duplicate '\" + current + \"'\");\n }\n remove(index);\n } else {\n index++;\n }\n last = current;\n }\n log.debug(String.format(\"Removed %d duplicates from a total of %d values in %dms\",\n initial - size(), initial, System.currentTimeMillis() - startTime));\n }", "int insertSelective(Commet record);", "int insertSelective(BPBatchBean record);", "int insertSelective(NjProductTaticsRelation record);", "public void checkIfDuplicatesExist(ArrayList<ItemCategory> itemCategories) throws NewException {\n Set<Integer> idset = new HashSet<>();\n Set<String> categorySet = new HashSet<>();\n for (ItemCategory itemCategorie : itemCategories) {\n if (idset.contains(itemCategorie.getId())) {\n throw new NewException(\"Category\", itemCategorie.getLine(), \"no duplicates are allowed\");\n } else if (categorySet.contains(itemCategorie.getCategory())) {\n throw new NewException(\"Category\", itemCategorie.getLine(), \"no duplicates are allowed\");\n } else {\n categorySet.add(itemCategorie.getCategory());\n idset.add(itemCategorie.getId());\n }\n }\n }", "int insertSelective(ResultDto record);", "protected void ignoreDuplicatedAddRemoveItemRequests()\n \t{\n \t\tif (this.getItems() != null)\n \t\t{\n \t\t\tfinal List<T> removeChildren = new ArrayList<T>();\n \t\t\n \t\t\t/* on the second loop, remove any items that are marked for both add and remove is separate items */\n \t\t\tfor (int i = 0; i < this.getItems().size(); ++i)\n \t\t\t{\n \t\t\t\tfinal T child1 = this.getItems().get(i);\n \t\t\t\t\n \t\t\t\t/* at this point we know that either add1 or remove1 will be true, but not both */\n \t\t\t\tfinal boolean add1 = child1.getAddItem();\n \t\t\t\tfinal boolean remove1 = child1.getRemoveItem();\n \t\t\t\t\n \t\t\t\t/* Loop a second time, looking for duplicates */\n \t\t\t\tfor (int j = i + 1; j < this.getItems().size(); ++j)\n \t\t\t\t{\n \t\t\t\t\tfinal T child2 = this.getItems().get(j);\n \t\t\t\t\t\n \t\t\t\t\tif (child1.getId().equals(child2.getId()))\n \t\t\t\t\t{\n \t\t\t\t\t\tfinal boolean add2 = child2.getAddItem();\n \t\t\t\t\t\tfinal boolean remove2 = child2.getRemoveItem();\n \t\t\t\t\t\t\n \t\t\t\t\t\t/* check for double add, double remove, add and remove, remove and add */\n \t\t\t\t\t\tif ((add1 && add2) || (remove1 && remove2) || (add1 && remove2) || (remove1 && add2))\t\t\t\t\t\t\n \t\t\t\t\t\t\tif (!removeChildren.contains(child1))\n \t\t\t\t\t\t\t\tremoveChildren.add(child1);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n\t\t\t\n\t\t\tfor (final T removeChild : removeChildren)\n\t\t\t\tthis.getItems().remove(removeChild);\n \t\t}\n \t}", "int insertSelective(CustomReport record);", "int insertSelective(TCar record);", "int insertSelective(Product record);", "private List<Result> addAllResults(List<Result> result) {\n\n MongoCollection<Document> collection = mongoDatabase.getCollection(\"result\");\n List<Result> allResults = new LinkedList<>();\n for (Result res : result) {\n Document newResult = new Document();\n newResult.put(\"student1\", res.getStudent1());\n newResult.put(\"student2\", res.getStudent2());\n newResult.put(\"percentage\", res.getPercentage());\n newResult.put(\"snippets\", res.getSnippets());\n newResult.put(\"type\", res.getType().toString());\n collection.insertOne(newResult);\n\n\n ObjectId resultId = newResult.getObjectId(\"_id\");\n res.setObjectId(resultId);\n newResult.put(\"hexId\", resultId.toHexString());\n res.setHexId(resultId.toHexString());\n Bson updateOperationDocument = new Document(\"$set\", newResult);\n collection.updateOne(eq(\"_id\", new ObjectId(resultId.toHexString())), updateOperationDocument);\n\n allResults.add(res);\n }\n return allResults;\n }", "int insertSelective(CmsCouponBatch record);", "int insertSelective(OrderDetail record);", "@Override\n public void doRegister(RegisterData registerData) throws DuplicatedRecordException {\n }", "@Override\n @Transactional\n public void addBulkInsertsAfterExtraction() {\n List<ScrapBook> scrapBooks = new ArrayList<ScrapBook>();\n boolean jobDone = false;\n boolean pause = false;\n while (!jobDone) {\n pause = false;\n int lineCount = 0;\n while (!pause) {\n ++lineCount;\n if (lineCount % 30 == 0) {\n scrapBooks = springJdbcTemplateExtractor.getPaginationList(\"SELECT * FROM ScrapBook\", 1, 30);\n pause = true;\n }\n }\n //convert scrapbook to book and insert into db\n convertedToBookAndInsert(scrapBooks);\n // delete all inserted scrapbooks\n springJdbcTemplateExtractor.deleteCollection(scrapBooks);\n scrapBooks = null;\n if (0 == springJdbcTemplateExtractor.findTotalScrapBook()) {\n jobDone = true;\n }\n }\n }", "@Test\r\n public void testAddDuplicateRecipe() {\r\n coffeeMaker.addRecipe(recipe1);\r\n assertFalse(coffeeMaker.addRecipe(recipe1));\r\n }", "DuplicateEntryException() {\n super();\n }", "private void validateDuplicateDocuments(Noc noc) {\n\t\tif (!ObjectUtils.isEmpty(noc.getDocuments())) {\n\t\t\tList<String> documentFileStoreIds = new LinkedList<String>();\n\t\t\tnoc.getDocuments().forEach(document -> {\n\t\t\t\tif (documentFileStoreIds.contains(document.getFileStoreId()))\n\t\t\t\t\tthrow new CustomException(\"NOC_DUPLICATE_DOCUMENT\", \"Same document cannot be used multiple times\");\n\t\t\t\telse\n\t\t\t\t\tdocumentFileStoreIds.add(document.getFileStoreId());\n\t\t\t});\n\t\t}\n\t}", "int insertSelective(RecordLike record);", "int insertSelective(Storage record);", "int insertSelective(Storage record);", "int insertSelective(OrderDetails record);", "public void duplicate() {\n System.out.println(\"Je bent al in bezit van deze vragenlijst!\");\n }", "private static void test1() {\n HashSet<Contact> contacts = new HashSet<>();\n\n Contact contact1 = new Contact(123, \"Vasiliy\", \"+380681234136\");\n\n contacts.add(contact1);\n\n\n //------------------------------------------\n\n\n Contact contact2 = new Contact(123, \"Vasiliy\", \"+380689876543\");\n\n contacts.remove(contact2);\n contacts.add(contact2);\n\n printCollection(contacts);\n }", "public Multimap<String, Command> checkForDuplicateNames() {\r\n\t\tList<Command> allCommands = new ArrayList<>();\r\n\t\tallCommands.addAll(this.commands);\r\n\t\tallCommands.addAll(learnedCommands.getCommands());\r\n\r\n\t\tMultimap<String, Command> byName = ArrayListMultimap.create();\r\n\t\tfor (Command command : allCommands) {\r\n\t\t\tbyName.put(command.name().toLowerCase(), command);\r\n\t\t\tfor (String alias : command.aliases()) {\r\n\t\t\t\tbyName.put(alias.toLowerCase(), command);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tMultimap<String, Command> duplicates = ArrayListMultimap.create();\r\n\r\n\t\tbyName.asMap().entrySet().stream() //@formatter:off\r\n\t\t\t.filter(entry -> entry.getValue().size() > 1)\r\n\t\t.forEach(entry -> duplicates.putAll(entry.getKey(), entry.getValue())); //@formatter:on\r\n\r\n\t\treturn duplicates;\r\n\t}", "public boolean isExplicitUniqueCheckRequired();", "@Override\n public int hashCode() {\n return 1;\n }", "int insertSelective(ResourcePojo record);", "@SuppressWarnings({ \"unchecked\", \"static-access\" })\r\n\tpublic boolean checkArticleIsDuplicated(){\r\n\t\r\n\t\tnum_DupInDBLP = 0;\r\n\t\t\t\t\r\n\t\tCheckExist check = new CheckExist();\r\n\t\t\r\n\t\tnumberArray = (ArrayList<Integer>) check.CheckTitleSignaturePublications(dbsaPublicationCheckList).clone();\r\n\t\tduplicateNumber = numberArray.size();\r\n\t\t\r\n\t\tduplicationArtilce = false;\r\n\t\tif(numberArray.size() > 0){\r\n\t\t\tfor(int i = 0; i < numberArray.size(); i++)\r\n\t\t\t{\t\r\n\t\t\t\tmodel.setValueAt(true, numberArray.get(i), 8);\r\n\t\t\t\tresultsJTable.addRowToPaint(numberArray.get(i), Color.red);\r\n\t\t\t\tduplicationArtilce = true;\r\n\t\t\t\t\r\n\t\t\t\tnum_DupInDBLP ++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tgetFetcherInfo();\r\n\t\t//System.out.println(num_DupInDBLP);\r\n\t\tcheckDuplicateJButton.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\r\n\t\tDBSAApplication.statisticPanel.updateStatistic(num_Total);\r\n\t\treturn duplicationArtilce;\r\n\t}", "int insertSelective(Goods record);", "int insertSelective(DBPublicResources record);", "int insertSelective(DataSync record);", "static void setNotAutoCopy(){isAutoCopying=false;}", "int insertSelective(Massage record);", "int insertSelective(DashboardGoods record);" ]
[ "0.6114292", "0.5831401", "0.57417315", "0.574147", "0.57236415", "0.5716391", "0.5629886", "0.56263334", "0.56128573", "0.5548871", "0.5540779", "0.5531223", "0.55201143", "0.54702485", "0.5462569", "0.54582345", "0.5433602", "0.541158", "0.5399355", "0.53876245", "0.53828907", "0.5379173", "0.5377834", "0.537242", "0.5369382", "0.5368877", "0.5356124", "0.5355719", "0.5354984", "0.534731", "0.5346542", "0.5343664", "0.53324175", "0.5332178", "0.5330703", "0.53227746", "0.5314556", "0.5299167", "0.5293621", "0.527515", "0.52746695", "0.527079", "0.5269178", "0.5267735", "0.52647376", "0.52529025", "0.52479607", "0.52456415", "0.52385545", "0.5236195", "0.52276415", "0.5224912", "0.5220213", "0.52192837", "0.5218876", "0.5218837", "0.5218713", "0.5216654", "0.5215099", "0.521396", "0.52093774", "0.52055794", "0.5193177", "0.5190356", "0.51896816", "0.51893485", "0.5183563", "0.5178833", "0.51785535", "0.51783085", "0.51778954", "0.51767683", "0.5173069", "0.51725394", "0.5167739", "0.51665425", "0.5160549", "0.5158917", "0.51583314", "0.5150752", "0.51485324", "0.51441133", "0.51394814", "0.51371837", "0.5137126", "0.51332104", "0.51332104", "0.51330614", "0.5131841", "0.513146", "0.51309454", "0.5129301", "0.51260215", "0.5124734", "0.51241815", "0.51231396", "0.5114187", "0.5113838", "0.5099404", "0.5096304", "0.50950205" ]
0.0
-1
Map query = new HashMap(16); query.put("sort", "dept_id"); query.put("order", "asc");
@ApiOperation(value = "获取部门树形列表", notes = "") @ResponseBody @GetMapping("/treeList") @RequiresPermissions("system:sysDept:sysDept") public TreeGridDO<DeptDO> treeList(@RequestParam Map<String, Object> params) { List<DeptDO> sysDeptList = sysDeptService.list(params); return new TreeGridDO<DeptDO>(sysDeptList, null == sysDeptList ? 0L : Long.valueOf(sysDeptList.size())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Map<String, org.springframework.batch.item.database.Order> genBatchOrderByFromSort(TableFields tableFields, Sort sort);", "Sort asc(QueryParameter parameter);", "@GET\n @Produces({ \"application/json\" })\n public abstract Response get(@QueryParam(\"sort\") String sort);", "Sort desc(QueryParameter parameter);", "public void filterBy(Map<String, List<String>> queryMap) {\n }", "ZZW queryByHql(String hql,Map<String,Object> param);", "private String getOrderBy( List<Integer> listSortBy )\n {\n StringBuffer strOrderBy = new StringBuffer( );\n String strReturn = SuggestUtils.EMPTY_STRING;\n int ncpt = 0;\n\n if ( ( listSortBy != null ) && ( listSortBy.size( ) != 0 ) )\n {\n strOrderBy.append( SQL_ORDER_BY );\n\n for ( Integer sort : listSortBy )\n {\n ncpt++;\n\n switch ( sort )\n {\n case SubmitFilter.SORT_BY_DATE_RESPONSE_ASC:\n strOrderBy.append( SQL_FILTER_SORT_BY_DATE_RESPONSE_ASC );\n\n break;\n\n case SubmitFilter.SORT_BY_DATE_RESPONSE_DESC:\n strOrderBy.append( SQL_FILTER_SORT_BY_DATE_RESPONSE_DESC );\n\n break;\n\n case SubmitFilter.SORT_BY_SCORE_ASC:\n strOrderBy.append( SQL_FILTER_SORT_BY_SCORE_ASC );\n\n break;\n\n case SubmitFilter.SORT_BY_SCORE_DESC:\n strOrderBy.append( SQL_FILTER_SORT_BY_SCORE_DESC );\n\n break;\n\n case SubmitFilter.SORT_BY_NUMBER_COMMENT_ASC:\n strOrderBy.append( SQL_FILTER_SORT_BY_NUMBER_COMMENT_ENABLE_ASC );\n\n break;\n\n case SubmitFilter.SORT_BY_NUMBER_COMMENT_DESC:\n strOrderBy.append( SQL_FILTER_SORT_BY_NUMBER_COMMENT_ENABLE_DESC );\n\n break;\n\n case SubmitFilter.SORT_BY_NUMBER_VIEW_ASC:\n strOrderBy.append( SQL_FILTER_SORT_BY_NUMBER_VIEW_ASC );\n\n break;\n\n case SubmitFilter.SORT_BY_NUMBER_VIEW_DESC:\n strOrderBy.append( SQL_FILTER_SORT_BY_NUMBER_VIEW_DESC );\n\n break;\n\n case SubmitFilter.SORT_BY_NUMBER_VOTE_ASC:\n strOrderBy.append( SQL_FILTER_SORT_BY_NUMBER_VOTE_ASC );\n\n break;\n\n case SubmitFilter.SORT_BY_NUMBER_VOTE_DESC:\n strOrderBy.append( SQL_FILTER_SORT_BY_NUMBER_VOTE_DESC );\n\n break;\n\n case SubmitFilter.SORT_MANUALLY:\n strOrderBy.append( SQL_FILTER_SORT_MANUALLY );\n\n break;\n\n default:\n break;\n }\n\n if ( ncpt < listSortBy.size( ) )\n {\n strOrderBy.append( \",\" );\n }\n }\n\n strReturn = strOrderBy.toString( );\n\n if ( strReturn.endsWith( \",\" ) )\n {\n strReturn = strReturn.substring( 0, strReturn.length( ) - 1 );\n }\n }\n\n return strReturn;\n }", "protected void prepareOrderBy(String query, QueryConfig config) {\n }", "void setOrderedQueryParameter(Query query, T value);", "List<Order> findOrdersByParameters(Map<String, Object> orderParameters) throws DaoProjectException;", "private void addSortingPagination(Map params, String entity, String dir, String sort, int start, int limit,\n\t\t\tint page) {\n\n\t\tparams.put(IReportDAO.ENTITY, entity);\n\t\tparams.put(IReportDAO.DIR, dir);\n\t\tparams.put(IReportDAO.SORT_COLUMN, sort);\n\t\tparams.put(IReportDAO.START_INDEX, start);\n\t\tparams.put(IReportDAO.LIMIT, limit);\n\t\tparams.put(IReportDAO.PAGE, page);\n\t}", "OrderByClause createOrderByClause();", "Report sortGoods(Map<Goods, Integer> goodsForSorting, String storeKeeperName) throws StoreKeeperWorkException;", "public List<Orders> findOrder(Map<String, Object> params);", "void sort(OrderBy orderBy);", "OrderByClauseArgs createOrderByClauseArgs();", "@Override\n public int compare(Map<String, Object> o1, Map<String, Object> o2) {\n if(!descflag){\n return String.valueOf(o2.get(orderField)).compareTo(String.valueOf(o1.get(orderField)));\n }else {\n return String.valueOf(o1.get(orderField)).compareTo(String.valueOf(o2.get(orderField)));\n }\n // return 0;//加一个默认返回\n }", "private static void sortMap(HashMap<Integer, Integer> map) {\n\t\t\n\t}", "private DBObject buildSortSpec(final GetObjectInformationParameters params) {\n\t\tfinal DBObject sort = new BasicDBObject();\n\t\tif (params.isObjectIDFiltersOnly()) {\n\t\t\tsort.put(Fields.VER_WS_ID, 1);\n\t\t\tsort.put(Fields.VER_ID, 1);\n\t\t\tsort.put(Fields.VER_VER, -1);\n\t\t}\n\t\treturn sort;\n\t}", "List<EmpTaskInfo> queryEmpTasksByCond(Map paramMap);", "public QueryResultBuilder<T> applySort(Option<Sort> sort);", "public interface SortType {\n int ASC=1;\n int DESC=-1;\n int INFO =3;\n int POINT=4;\n int ACTIVE=5;\n}", "public Query() {\n\n// oriToRwt = new HashMap();\n// oriToRwt.put(); // TODO\n }", "Orderall selectByPrimaryKey(String orderid);", "SortComparator(Map<Integer, Integer> tFreqMap) { \n this.freqMap = tFreqMap; \n }", "java.lang.String getOrderBy();", "abstract String getSortKey();", "public void sortQueries(){\n\t\tif (queries == null || queries.isEmpty()) {\n\t\t\treturn;\n\t\t} else {\n\t\t Collections.sort(queries, new Comparator<OwnerQueryStatsDTO>() {\n @Override\n public int compare(OwnerQueryStatsDTO obj1, OwnerQueryStatsDTO obj2) {\n if(obj1.isArchived() && obj2.isArchived()) {\n return 0;\n } else if(obj1.isArchived()) {\n return 1;\n } else if(obj2.isArchived()) {\n return -1;\n } else {\n return 0;\n }\n }\n });\n\n\t }\n\t}", "public interface FindRefundPageByWhereService extends EntityService {\n public PageInfo findPageByWhere(PageInfo pageInfo, Map<String, String> map, Map<String, Boolean> sortMap)throws Exception;\n\n}", "private HashMap<String,String> createQueryMap() {\n\t\t\n\t\tHashMap<String, String> map = new HashMap<String, String>();\n\t\t\n\t\t// Only include Pages with the CenterNet Event template\n\t\tmap.put(\"type\",\"cq:Page\");\n\t\tmap.put(\"path\", Constants.EVENTS);\n\t\tmap.put(\"property\",\"jcr:content/cq:template\");\n\t map.put(\"property.value\", Constants.EVENT_TEMPLATE);\n\n\t if (tags != null) {\n\t \tmap = addTagFilter(map);\n\t }\n\n\t // Only include Events whose start time is in the future\n\t map.put(\"relativedaterange.property\", PN_QUERY_START_TIME);\n\t map.put(\"relativedaterange.lowerBound\", \"-0d\");\n\t \n\t // Include all hits\n\t //map.put(\"p.limit\", maxNum.toString());\n\t map.put(\"p.limit\", maxNum);\n\t map.put(\"p.guessTotal\", \"true\");\n\t \n\t // Order by Start Time\n\t map.put(\"orderby\", PN_QUERY_START_TIME);\n\t map.put(\"orderby.sort\", \"asc\");\n\t \n\t\treturn map;\n\t\t\n\t}", "private void sortBy(Query query, DimensionDescriptor timeDimension, DimensionDescriptor elevationDimension) {\n final List<SortBy> clauses = new ArrayList<SortBy>();\n // TODO: Check sortBy clause is supported\n if (timeDimension != null) {\n clauses.add(new SortByImpl(FeatureUtilities.DEFAULT_FILTER_FACTORY.property(timeDimension.getStartAttribute()),\n SortOrder.DESCENDING));\n }\n if (elevationDimension != null) {\n clauses.add(new SortByImpl(FeatureUtilities.DEFAULT_FILTER_FACTORY.property(elevationDimension.getStartAttribute()),\n SortOrder.ASCENDING));\n }\n final SortBy[] sb = clauses.toArray(new SortBy[] {});\n query.setSortBy(sb);\n \n }", "OrderByClauseArg createOrderByClauseArg();", "private static void DoOrderBy()\n\t{\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"n_n_nationkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"n_n_name\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"n_n_regionkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"n_n_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Int\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att4\"));\n\n\t\t// These could be more complicated expressions than simple input columns\n\t\tMap<String, String> exprsToCompute = new HashMap<String, String>();\n\t\texprsToCompute.put(\"att1\", \"n_n_nationkey\");\n\t\texprsToCompute.put(\"att2\", \"n_n_name\");\n\t\texprsToCompute.put(\"att3\", \"n_n_regionkey\");\n\t\texprsToCompute.put(\"att4\", \"n_n_comment\");\n\t\t\n\t\t// Order by region key descending then nation name ascending\n\t\tArrayList<SortKeyExpression> sortingKeys = new ArrayList<SortKeyExpression>();\n\t\tsortingKeys.add(new SortKeyExpression(\"Int\", \"n_n_regionkey\", false));\n\t\tsortingKeys.add(new SortKeyExpression(\"Str\", \"n_n_name\", true));\n\t\t\n\t\t// run the selection operation\n\t\ttry\n\t\t{\n\t\t\tnew Order(inAtts, outAtts, exprsToCompute, sortingKeys, \"nation.tbl\", \"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "@RequestMapping(\"/query.do\")\n\tpublic @ResponseBody Map<String, Object> query(@RequestParam Map reqMap) {\nList<CpzProductLevelBean> cpzproductlevelBeans=null;\ntry {\ncpzproductlevelBeans=cpzProductLevelService.get(reqMap);\n} catch (Exception e) {\n\te.printStackTrace();\n}\nMap r=new HashMap();\nr.put(\"returnData\",cpzproductlevelBeans);\n\t return CommonUtil.ReturnWarp(Constant.TRAN_SUCCESS, Constant.ERRORTYPE,\"\",r);\n\t}", "SearchResponse query(SearchRequest request, Map<SearchParam, String> params);", "@Override\n public List<PrescriptionRecord> findListByParams(Map map) {\n Map<String, Object> param = new HashMap<String, Object>(map);\n \n String sort = (String) map.get(\"sortType\");\n if(sort!=null) {\n param.put(\"sortType\", sort);\n }else {\n param.put(\"sortType\", \"DESC\");\n }\n \n List<ShardMeta> shardMetas = generateShardMetas();\n Integer pageSize = (Integer) param.get(\"pageSize\");\n boolean findRange = StringUtils.isBlank((String) param.get(\"orderNo\")) && pageSize != null;\n Integer startNum = findRange ? (Integer) param.get(\"startNum\") : 0;\n Integer subStartNum = startNum / shardMetas.size();\n \n List<PrescriptionRecord> allOrders = new ArrayList<PrescriptionRecord>();\n try {\n // 指定订单号则跳过\n if (findRange) {\n param.put(\"subStartNum\", subStartNum);\n // 提交第一次查询,查询每个分片的订单范围\n List<Future<List<Long>>> rangeTasks = submitRangeQuery(param, shardMetas, queryPool);\n long minTime = Long.MAX_VALUE;\n long maxTime = Long.MIN_VALUE;\n Iterator<ShardMeta> iterator = shardMetas.iterator();\n // 根据每个分片的订单范围计算出全局的订单范围\n for (int i = 0; i < rangeTasks.size(); i++) {\n ShardMeta shardMeta = iterator.next();\n List<Long> timestamps = rangeTasks.get(i).get();\n if (timestamps.isEmpty()) {\n continue;\n }\n \n shardMeta.setMaxTime(timestamps.get(0));\n shardMeta.setMinTime(timestamps.get(timestamps.size() - 1));\n if (maxTime < shardMeta.getMaxTime()) {\n maxTime = shardMeta.getMaxTime();\n }\n if (minTime > shardMeta.getMinTime()) {\n minTime = shardMeta.getMinTime();\n }\n }\n param.put(\"startTime\", minTime);\n param.put(\"endTime\", maxTime);\n }\n \n // 提交第二次查询,查询每个分片符合范围的订单\n List<Future<List<PrescriptionRecord>>> orderTasks = submitOrderQuery(param, shardMetas, queryPool);\n int offset = 0;\n Iterator<ShardMeta> iterator = shardMetas.iterator();\n List<ShardMeta> offsetShards = new ArrayList<ShardMeta>();\n // 合并所有分片的结果\n for (Future<List<PrescriptionRecord>> orderTask : orderTasks) {\n ShardMeta shardMeta = iterator.next();\n List<PrescriptionRecord> orderViews = orderTask.get();\n if (findRange) {\n if (shardMeta.getMaxTime() == Long.MIN_VALUE) {\n offsetShards.add(shardMeta);\n } else {\n int shardAheadCount = getAheadCount(orderViews, shardMeta.getMaxTime());\n // 累加全局偏移量\n offset += subStartNum - shardAheadCount;\n // 删除不需要后补齐查询的分片信息\n if (orderViews.size() - shardAheadCount < pageSize)\n iterator.remove();\n }\n }\n allOrders.addAll(orderViews);\n }\n \n if (!findRange || allOrders.isEmpty())\n return allOrders;\n /*\n // 进行分片偏移量查询\n if (!offsetShards.isEmpty()) {\n Object startTime = param.get(\"startTime\");\n param.put(\"startTime\", param.get(\"endTime\"));\n param.put(\"endTime\", map.get(\"endTime\"));\n \n List<Future<Long>> offsetTasks = submitOffsetQuery(param, offsetShards, queryPool);\n for (Future<Long> offsetTask : offsetTasks)\n offset += offsetTask.get();\n \n param.put(\"startTime\", startTime);\n }\n \n // 进行第三次查询\n int targetOffset = startNum - offset;\n int endIndex = targetOffset + pageSize;\n if (endIndex > allOrders.size() && !shardMetas.isEmpty()) {\n int backfill = endIndex - allOrders.size();\n param.put(\"backfill\", backfill);\n param.put(\"endTime\", param.get(\"startTime\"));\n param.put(\"startTime\", map.get(\"startTime\"));\n orderTasks = submitOrderQuery(param, shardMetas, queryPool);\n for (Future<List<PrescriptionRecord>> orderTask : orderTasks)\n allOrders.addAll(orderTask.get());\n }\n \n */\n int targetOffset = startNum;\n int endIndex = startNum + pageSize;\n \n if (allOrders.size() <= targetOffset)\n return Collections.EMPTY_LIST;\n \n \n // 对合并后的结果统一排序,并根据全局偏移量定位分页的第一条订单的偏移量,提取分页结果\n \n sortByCreateTime(allOrders);\n return allOrders.subList(targetOffset, Math.min(endIndex, allOrders.size()));\n } catch (Exception e) {\n e.printStackTrace();\n throw new SystemException(e);\n }\n }", "protected String setOrderParameterToSqlOrHql(final String hql, final PageRequest pageRequest) {\n\t\tStringBuilder builder = new StringBuilder(hql);\n\t\tbuilder.append(\" order by\");\n\t\tfor (Order order : pageRequest.getSort()) {\n\t\t\tbuilder.append(String.format(\" %s %s,\", order.getProperty(), order.getDirection().name()));\n\t\t}\n\t\tbuilder.deleteCharAt(builder.length() - 1);\n\t\treturn builder.toString();\n\t}", "protected final List<T> findSortedByQuery(String query, String sort, Object... params) {\n return this.findSortedByQuery(query, sort, (Integer) null, (Integer) null, params);\n }", "@Override\n\tpublic Map<String, String> queryOrderExpressMap(PagingDto dto) {\n\t\treturn orderMapper.queryOrderExpressMap(dto);\n\t}", "private String viewOrderBy( String orderby ) {\n if(orderby.equals(\"Name\")) {\n orderby = \"db.nama\";\n }\n else if(orderby.equals(\"Category\")) {\n orderby = \"kategori\";\n }\n else if(orderby.equals(\"Sale Price\")) {\n orderby = \"harga_jual\";\n }\n else if(orderby.equals(\"Modal Price\")) {\n orderby = \"harga_modal\";\n }\n return orderby;\n }", "public List<ViewXwZqkh> Query(String filters, String orders, Object... values);", "Page<ExamPackage> searchList(int pageNo, int pageSize, Sort sort);", "protected void doQuery2(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\n\t\tint orderNo = 0;\r\n\t\tif (null != request.getParameter(\"orderNo\")) {\r\n\t\t\torderNo = Integer.parseInt(request.getParameter(\"orderNo\"));\r\n\t\t\t// orderNo = new String(orderNo.getBytes(\"iso-8859-1\"), \"utf-8\");\r\n\t\t\tSystem.out.println(orderNo);\r\n\t\t}\r\n\t\t// List<Logistics> list = ls.queryLogisticsByOrderNo(1);\r\n\t\t// for (Logistics logistics : list) {\r\n\t\t// System.out.println(logistics);\r\n\t\t// }\r\n\t\t// System.out.println(list);\r\n\t\t// 将查询的关键字也存储起来 传递到jsp\r\n\t\t// request.setAttribute(\"logistics\", list);\r\n\r\n\t\t// 转发到页面\r\n\t\trequest.getRequestDispatcher(\"follow.jsp\").forward(request, response);\r\n\t}", "List<R_order> selectByExample(R_orderExample example);", "private static void hqlQuery(Session session) {\n\t\tint departmentId=300;\n\t\tQuery query=session.createQuery(\"from Employee e where e.dp.departmentId<=:\"+DtoConstants.DEPARTMENT_ID+\" order by e.name desc\");\n\t\tquery.setInteger(DtoConstants.DEPARTMENT_ID, departmentId);\n\t\t/**Below query properties used for pagination */\n\t\tquery.setFirstResult(0);\n\t\tquery.setMaxResults(10);\n\t\tList<Employee> empList=(List<Employee>)query.list();\n\t\tint i=1;\n\t\tfor(Employee e:empList){\n\t\t\tSystem.out.println(i+++\") Name:\"+e.getName()+\" Salary:\"+e.getSalary());\n\t\t}\n\t}", "@Override\n\tpublic List<OrderDetail> listBy(Map<String, Object> paramMap) {\n\t\tList<OrderDetail> listBy = orderDetailDao.listBy(paramMap);\n\t\treturn listBy;\n\t}", "@Query(\"SELECT p FROM Person p ORDER BY p.id\")\nList<Person> findAllSortById();", "public static void setOrderBy (String columnList){\n fetchAllOrderBy=columnList;\n }", "List<Employee> sort(Sorting selectedSortColoumn) throws SQLException;", "@Override\n public Query customizeQuery(Object anObject, PersistenceBroker broker, CollectionDescriptor cod, QueryByCriteria query) {\n boolean platformMySQL = broker.serviceSqlGenerator().getPlatform() instanceof PlatformMySQLImpl;\n\n Map<String, String> attributes = getAttributes();\n for (String attributeName : attributes.keySet()) {\n if (!attributeName.startsWith(ORDER_BY_FIELD)) {\n continue;\n }\n\n String fieldName = attributeName.substring(ORDER_BY_FIELD.length());\n ClassDescriptor itemClassDescriptor = broker.getClassDescriptor(cod.getItemClass());\n FieldDescriptor orderByFieldDescriptior = itemClassDescriptor.getFieldDescriptorByName(fieldName);\n\n // the column to sort on derived from the property name\n String orderByColumnName = orderByFieldDescriptior.getColumnName();\n\n // ascending or descending\n String fieldValue = attributes.get(attributeName);\n boolean ascending = (StringUtils.equals(fieldValue, ASCENDING));\n // throw an error if not ascending or descending\n if (!ascending && StringUtils.equals(fieldValue, DESCENDING)) {\n throw new RuntimeException(\"neither ASC nor DESC was specified in ojb file for \" + fieldName);\n }\n\n if (platformMySQL) {\n // by negating the column name in MySQL we can get nulls last (ascending or descending)\n String mysqlPrefix = (ascending) ? MYSQL_NEGATION : \"\";\n query.addOrderBy(mysqlPrefix + orderByColumnName, false);\n } else {\n query.addOrderBy(orderByColumnName, ascending);\n }\n }\n return query;\n }", "List<ShipmentInfoPODDTO> search(String query);", "ReviewService() {queryMap.put(PAGE_QUERY_PARAM, \"1\");}", "protected List<OutputWriter.OutputRecord> prepareOutput(String queryNo, Map<String, Float> map){\n\t\tList<Entry<String, Float>> sortedMapList = sortByValue(map);\n\t\tList<OutputWriter.OutputRecord> result = new LinkedList<OutputWriter.OutputRecord>();\n\t\t\n\t\tLong i = 1L;\n\t\tfor(Entry<String, Float> e : sortedMapList){\n\t\t\tresult.add(new OutputWriter.OutputRecord(queryNo, e.getKey(), i++, e.getValue()));\n\t\t\t// Limit results to max results\n\t\t\tif(i>elasticClient.getMaxResults()) break;\n\t\t}\n\t\treturn result;\n\t}", "public static Sort getSortColumnAndOrderFromRequest(Request request) {\n ParameterValue sort = request.getQueryParameter(\"sort\");\n return Arrays.stream(sort.getValues()).findFirst()\n .map(sortColumnAndOrderStr -> {\n String[] sortColumnAndOrder = sortColumnAndOrderStr.split(\",\");\n String sortColumn = sortColumnAndOrder[0];\n\n Sort.SortOrder sortOrder = Sort.SortOrder.ASC;\n if (sortColumnAndOrder.length == 2) {\n String sortOrderStr = sortColumnAndOrder[1];\n if (sortOrderStr.equals(\"ASC\") || sortOrderStr.equals(\"DESC\")) {\n sortOrder = Sort.SortOrder.valueOf(sortOrderStr);\n }\n }\n return new Sort(sortColumn, sortOrder);\n }).orElse(null);\n }", "@SuppressWarnings(\"unchecked\")\n private static Map<String, String[]> sortRequestParameters( ServletRequest request ) {\n Map<String, String[]> sortedParams = new TreeMap<String, String[]>();\n Set<Map.Entry<String, String[]>> params = request.getParameterMap().entrySet();\n for ( Map.Entry<String, String[]> entry : params ) {\n sortedParams.put( entry.getKey(), entry.getValue() );\n }\n return sortedParams;\n }", "static DbQuery createKeyQuery() {\n DbQuery query = new DbQuery();\n query.order = OrderBy.KEY;\n return query;\n }", "List<Employee> findByNameContaining(String keyword, Sort sort);", "@Override\n\tpublic JSONObject query(HashMap<String,Object> map) {\n\t\treturn queryExpress(map);\n\t}", "@Query(\"age = ? order by id asc\")\n List<PersonDocument> findByAgeSortedById(Integer age);", "public static void main(String[] args) {\n LinkedHashMap<String, Integer> capitals = new LinkedHashMap<>();\n capitals.put(\"Nepal\", 2);\n capitals.put(\"India\", 100);\n capitals.put(\"United States\", 5);\n capitals.put(\"England\", 10);\n capitals.put(\"Australia\", 50);\n capitals.put(\"India\", 100);\n\n // call the sortMap() method to sort the map\n Map<String, Integer> result = sortMap(capitals);\n\n for (Map.Entry<String, Integer> entry : result.entrySet()) {\n System.out.print(\"Key: \" + entry.getKey());\n System.out.println(\" Value: \" + entry.getValue());\n }\n }", "java.lang.String getOrderByDataItem();", "List<Orderall> selectByExample(OrderallExample example);", "private String addWhere(String hql, Map<String, Object> params) {\n\t\t\thql += \" where \";\n\t\t\tint temp=0;\n\t\t\tif (params != null && !params.isEmpty()) {\n\t\t\t\tfor (String key : params.keySet()) {\n\t\t\t\t\tif(temp!=0){\n\t\t\t\t\t\thql+=\" and \";\n\t\t\t\t\t}\n\t\t\t\t\thql += \"t.\"+key+\"=:\"+key;\n\t\t\t\t\ttemp++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn hql;\n\t}", "public void search(Map<String, String> searchParam);", "@Override\n\tprotected void generateParams(HashMap<String, String> map) {\n\t\tmap.put(\"vuid\", vUid);\n\t\tif(page>0)map.put(\"page\", \"\"+page);\n\t\tif(size>0)map.put(\"size\", \"\"+size);\n\t}", "private Collection<Object> getOrderedTestNamesByPA(String programArea,String labId)\n{\n\n ArrayList<Object> dtList = null;\n HashMap<Object,Object> ofMap = null;\n\n if(cachedProgAreaFacilityList != null)\n {\n ofMap = (HashMap<Object,Object>) cachedProgAreaFacilityList.get(programArea);\n\n if (ofMap != null)\n dtList = (ArrayList<Object> ) ofMap.get(labId);\n }\n return dtList;\n}", "public static void setSortCriteria(String method)\n \t{\n \t\tsortCriteria = method;\n \t}", "io.dstore.values.IntegerValue getSortNo();", "public String getSortCondition()\n\t{\n\t\tKey[] karray = new Key[_searchKeyList.size()] ;\n\n\t\t_searchKeyList.copyInto(karray) ;\n\t\tfor (int i = 0; i < karray.length; i++)\n\t\t{\n\t\t\tfor (int j = i; j < karray.length; j++)\n\t\t\t{\n\t\t\t\tif (karray[i].getTableOrder() > karray[j].getTableOrder())\n\t\t\t\t{\n\t\t\t\t\tKey ktmp = karray[i] ;\n\t\t\t\t\tkarray[i] = karray[j] ;\n\t\t\t\t\tkarray[j] = ktmp ;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tStringBuffer stbf = new StringBuffer(256) ;\n\t\tboolean existFlg = false ;\n\n\t\tfor (int i = 0; i < karray.length; i++)\n\t\t{\n\t\t\tif (karray[i].getTableOrder() > 0)\n\t\t\t{\n\t\t\t\tstbf.append(karray[i].getTableColumn()) ;\n\t\t\t\t//#CM708958\n\t\t\t\t// The descending key word is set for the descending order. \n\t\t\t\tif (karray[i].getTableDesc() == false)\n\t\t\t\t{\n\t\t\t\t\tstbf.append(\" DESC\") ;\n\t\t\t\t}\n\t\t\t\tstbf.append(\", \") ;\n\t\t\t\tif (existFlg == false)\n\t\t\t\t\texistFlg = true ;\n\t\t\t}\n\t\t}\n\t\t//#CM708959\n\t\t// Return null when data is not set in the key value. \n\t\tif (existFlg == false)\n\t\t\treturn null ;\n\n\t\t//#CM708960\n\t\t// The last \"\"is removed because it is extra. \n\t\tint ep = stbf.toString().lastIndexOf(\",\") ;\n\t\treturn stbf.toString().substring(0, ep) ;\n\t}", "public static String generateQueryOption(HttpServletRequest request) {\n\t\tHashMap<String, String> optionMapMap = new HashMap<String, String>();\n\t\tString reservation_Num = request.getParameter(\"reservation_Num\");\n\t\tString team_ID = request.getParameter(\"team_ID\");\n\t\tString room_ID = request.getParameter(\"room_ID\");\n\t\tString purpose = request.getParameter(\"purpose\");\n\t\tString status = request.getParameter(\"status\");\n\t\tString email = request.getParameter(\"email\");\n\t\tString tele = request.getParameter(\"tele\");\n\t\tString Applied_Start_Date = request.getParameter(\"Applied_Start_Date\");\n\t\tString Applied_End_Date = request.getParameter(\"Applied_End_Date\");\n\t\tString order_Time = request.getParameter(\"order_Time\");\n\t\tif (reservation_Num != null && reservation_Num.length() > 0) {\n\t\t\toptionMapMap.put(\"reservation_Num\", reservation_Num);\n\t\t}\n\t\tif (team_ID != null && team_ID.length() > 0) {\n\t\t\toptionMapMap.put(\"team_ID\", team_ID);\n\t\t}\n\t\tif (room_ID != null && room_ID.length() > 0) {\n\t\t\toptionMapMap.put(\"room_ID\", room_ID);\n\t\t}\n\t\tif (purpose != null && purpose.length() > 0) {\n\t\t\toptionMapMap.put(\"purpose\", purpose);\n\t\t}\n\t\tif (status != null && status.length() > 0) {\n\t\t\toptionMapMap.put(\"status\", status);\n\t\t}\n\t\tif (tele != null && tele.length() > 0) {\n\t\t\toptionMapMap.put(\"tele\", tele);\n\t\t}\n\t\tif (email != null && email.length() > 0) {\n\t\t\toptionMapMap.put(\"email\", email);\n\t\t}\n\t\tif (Applied_Start_Date != null && Applied_Start_Date.length() > 0) {\n\t\t\toptionMapMap.put(\"Applied_Start_Date\", Applied_Start_Date);\n\t\t}\n\t\tif (Applied_End_Date != null && Applied_End_Date.length() > 0) {\n\t\t\toptionMapMap.put(\"Applied_End_Date\", Applied_End_Date);\n\t\t}\n\t\tif (order_Time != null && order_Time.length() > 0) {\n\t\t\toptionMapMap.put(\"order_Time\", order_Time);\n\t\t}\n\n\t\tStringBuilder builder = new StringBuilder();\n\t\tSet<String> keys = optionMapMap.keySet();\n\t\tint i = 0;\n\t\tfor (String key : keys) {\n\t\t\tif (key.equals(\"team_ID\") || key.equals(\"room_ID\")\n\t\t\t\t\t|| key.equals(\"user_ID\") || key.equals(\"status\")) {\n\t\t\t\tbuilder.append(\"Reservation.\" + key + \"=\"\n\t\t\t\t\t\t+ optionMapMap.get(key).trim());\n\t\t\t} else if (key.equals(\"purpose\") || key.equals(\"reservation_Num\")\n\t\t\t\t\t|| key.equals(\"email\") || key.equals(\"tele\")) {\n\t\t\t\tbuilder.append(\"Reservation.\" + key + \" like \" + \"'%\"\n\t\t\t\t\t\t+ optionMapMap.get(key).toString().trim() + \"%'\");\n\t\t\t} else if (key.equals(\"Applied_Start_Date\")) {\n\t\t\t\tbuilder.append(\"Reservation.\" + key + \">='\"\n\t\t\t\t\t\t+ optionMapMap.get(key).trim() + \"'\");\n\t\t\t} else if (key.equals(\"Applied_End_Date\")) {\n\t\t\t\tbuilder.append(\"Reservation.\" + key + \"<='\"\n\t\t\t\t\t\t+ optionMapMap.get(key).trim() + \"'\");\n\t\t\t} else if (key.equals(\"order_Time\")) {\n\t\t\t\tbuilder.append(\"Reservation.\" + key + \"='\"\n\t\t\t\t\t\t+ optionMapMap.get(key).trim() + \"'\");\n\t\t\t}\n\t\t\tif ((i + 1) != keys.size()) {\n\t\t\t\tbuilder.append(\" and \");\n\t\t\t}\n\t\t\t++i;\n\t\t}\n\t\treturn builder.toString();\n\t}", "protected String sortToSql(QuestionService.FindQuestionsSort sort)\n\t{\n\t\tswitch (sort)\n\t\t{\n\t\t\tcase type_a:\n\t\t\t{\n\t\t\t\t// TODO: localized\n\t\t\t\treturn \"Q.TYPE ASC, Q.DESCRIPTION ASC, Q.CREATED_BY_DATE ASC\";\n\t\t\t}\n\t\t\tcase type_d:\n\t\t\t{\n\t\t\t\t// TODO: localized\n\t\t\t\treturn \"Q.TYPE DESC, Q.DESCRIPTION DESC, Q.CREATED_BY_DATE DESC\";\n\t\t\t}\n\t\t\tcase title_a:\n\t\t\t{\n\t\t\t\t// TODO: localized\n\t\t\t\treturn \"QT.TITLE ASC, Q.DESCRIPTION ASC, Q.CREATED_BY_DATE ASC\";\n\t\t\t}\n\t\t\tcase title_d:\n\t\t\t{\n\t\t\t\t// TODO: localized\n\t\t\t\treturn \"QT.TITLE DESC, Q.DESCRIPTION DESC, Q.CREATED_BY_DATE DESC\";\n\t\t\t}\n\t\t\tcase description_a:\n\t\t\t{\n\t\t\t\treturn \"Q.DESCRIPTION ASC, Q.CREATED_BY_DATE ASC\";\n\t\t\t}\n\t\t\tcase description_d:\n\t\t\t{\n\t\t\t\treturn \"Q.DESCRIPTION DESC, Q.CREATED_BY_DATE DESC\";\n\t\t\t}\n\t\t\tcase pool_difficulty_a:\n\t\t\t{\n\t\t\t\treturn \"P.DIFFICULTY ASC, Q.DESCRIPTION ASC, Q.CREATED_BY_DATE ASC\";\n\t\t\t}\n\t\t\tcase pool_difficulty_d:\n\t\t\t{\n\t\t\t\treturn \"P.DIFFICULTY DESC, Q.DESCRIPTION DESC, Q.CREATED_BY_DATE DESC\";\n\t\t\t}\n\t\t\tcase pool_points_a:\n\t\t\t{\n\t\t\t\treturn \"P.POINTS ASC, Q.DESCRIPTION ASC, Q.CREATED_BY_DATE ASC\";\n\t\t\t}\n\t\t\tcase pool_points_d:\n\t\t\t{\n\t\t\t\treturn \"P.POINTS DESC, Q.DESCRIPTION DESC, Q.CREATED_BY_DATE DESC\";\n\t\t\t}\n\t\t\tcase pool_title_a:\n\t\t\t{\n\t\t\t\treturn \"P.TITLE ASC, Q.DESCRIPTION ASC, Q.CREATED_BY_DATE ASC\";\n\t\t\t}\n\t\t\tcase pool_title_d:\n\t\t\t{\n\t\t\t\treturn \"P.TITLE DESC, Q.DESCRIPTION DESC, Q.CREATED_BY_DATE DESC\";\n\t\t\t}\n\t\t\tcase cdate_a:\n\t\t\t{\n\t\t\t\treturn \"Q.CREATED_BY_DATE ASC\";\n\t\t\t}\n\t\t\tcase cdate_d:\n\t\t\t{\n\t\t\t\treturn \"Q.CREATED_BY_DATE DESC\";\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "List<TSortOrder> selectByExample(TSortOrderExample example);", "protected <T extends BaseEntity> TypedQuery<T> createQuery(\n\t\t\tMap<String, Boolean> sort, Map<String, Object> filters) {\n\t\tList<Filter> listFilters = getQueryParam().createListFiltersFromMap(filters);\n//\t\tlistFilters.addAll(createListFilterForJoinFields());\n//\t\tgetQueryParam().addJoinFilters(joinFields);\t\t\n\n\t\treturn createQuery(sort, listFilters);\n\t}", "void setOrderBy(DriveRequest<?> request, String orderBy);", "public void queryOrder(){\n\t\ttry{\n\t\t\tlock.lock();\n\t\t\tSystem.out.println(Thread.currentThread().getName()+\"查询到数据:\"+System.currentTimeMillis());\n\t\t\tThread.sleep(2000);\n\t\t}catch( Exception e){\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\tlock.unlock();\n\t\t}\n\t}", "private ArrayList<WordDocument> executeAdvancedQuery(){\n ArrayList<WordDocument> documents = customDijkstrasTwoStack(this.query.split(\" \"));\n ArrayList<WordDocument> result = new ArrayList<WordDocument>();\n\n try{\n String[] orderByPart = query.substring(query.indexOf(\"ORDERBY\")).trim().toLowerCase().split(\" \");\n if(isOrderByCommand(orderByPart[0]))\n result = orderBy(documents, orderByPart[1], orderByPart[2]);\n }catch (StringIndexOutOfBoundsException ex){\n result = documents;\n }\n\n return result;\n }", "@Override\n\tpublic String queryOrderByOrderNo(String orderno) {\n\treturn null;\n\t}", "public String sortOrder();", "@Query(\"select a from Account a order by a.age\")\n List<Account> getAccountSortedByAge();", "public static String addOrder(String queryString, String propertyPath, boolean asc) {\n\n\tif (StringUtils.containsIgnoreCase(queryString, \"order by\")) {\n\t return queryString;\n\t}\n\n\tStringBuilder sb = new StringBuilder(queryString);\n\tsb.append(\" ORDER BY \");\n\tsb.append(getAlias(queryString));\n\tsb.append(\".\");\n\tsb.append(propertyPath);\n\tsb.append(\" \");\n\tsb.append(asc ? \"ASC\" : \"DESC\");\n\n\treturn sb.toString();\n }", "private String getSrhQueSortSQL() {\n String[] sortArr = { \"que_title\", \"que_create_timestamp\", \"kca_title\", \"ans_vote_total\" };\n sort_vec = cwUtils.String2vector(sortArr, false);\n String defaultSort = \"que_create_timestamp\";\n String defaultDir = \"DESC\";\n \n // popular defalut sort\n if(srhCriteriaBean != null && this.sort == null) {\n String queType = srhCriteriaBean.getSrh_tab_que_type();\n if (Know.TAB_QUE_POPULAR_LST.equalsIgnoreCase(queType)) {\n this.sort = \"ans_vote_total\";\n } else {\n this.sort = defaultSort;\n }\n this.dir = defaultDir;\n // normal deaflut sort\n } else if (this.sort == null) {\n this.sort = defaultSort;\n }\n \n String sortSQL = dbUtils.getSortSQL(sort_vec, sort, dir, defaultSort, defaultDir);\n\n return sortSQL;\n }", "public String sortBy();", "@GET(\"V1/orders/?\")\n Observable<ItemList> getOrderDetailList(@QueryMap HashMap<String, String> stringHashMap);", "public interface HrDeptRescindDao extends GenericDao<HrDeptRescind, String> {\n\tpublic JQueryPager getHrDeptRescindCriteria(final JQueryPager paginatedList,List<PropertyFilter> filters);\n\n}", "public interface SportStarMapper extends Mapper<SportStar> {\n\n public List<SportStar> findAllOrderByProperty(String property);\n}", "List<Order> selectByExample(OrderExample example);", "public String getSortOrder();", "protected abstract String createSnpSearchQueryStr(HashMap<String,String> paramMap);", "public interface IKnowledgepointService extends IService<Knowledgepoint> {\n public List<Knowledgepoint> selectTopTenByName(Map<String, Object> params);\n}", "public SortBuilder(String field) {\n if (field == null) {\n field = \"\";\n }\n switch (field) {\n case \"name\":\n this.field = \"name\";\n break;\n case \"introduced\":\n this.field = \"introduced\";\n break;\n case \"discontinued\":\n this.field = \"discontinued\";\n break;\n case \"company_id\":\n this.field = \"company\";\n break;\n case \"id\":\n default:\n this.field = \"id\";\n break;\n }\n }", "public abstract List createQuery(String query);", "List<SurveyQuestionDTO> getSortedDtos(List<SurveyQuestion> questions);", "protected void doQuery(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\n\r\n\t\tPrintWriter out = response.getWriter();\r\n\r\n\t\tint orderNo = 1;\r\n\t\t// System.out.println(\"jinlaile\");\r\n\t\t// System.out.println(request.getParameter(\"orderNo\"));\r\n\t\tString orderNoStr = request.getParameter(\"orderNo\");\r\n\r\n\t\tif (null == orderNoStr || \"\".equals(orderNoStr)) {\r\n\t\t} else {\r\n\t\t\torderNo = Integer.parseInt(orderNoStr);\r\n\t\t}\r\n\r\n\t\tList<LogisticsBean> list = ls.queryTruckRoutingByOrderNo(orderNo);\r\n\t\tfor (LogisticsBean logisticsBean : list) {\r\n\t\t\tSystem.out.println(logisticsBean);\r\n\t\t}\r\n\r\n\t\tGson gson = new Gson();\r\n\t\tString jsonString = gson.toJson(list);\r\n\r\n\t\tout.println(jsonString);\r\n\t\tout.close();\r\n\r\n\t\t// 将查询的关键字也存储起来 传递到jsp\r\n\t\t// request.setAttribute(\"logistics\", list);\r\n\r\n\t\t// 转发到页面\r\n\t\t// request.getRequestDispatcher(\"follow.jsp\").forward(request, response);\r\n\t}", "public IScapSyncSearchSortField[] getSortFields();", "public void sort() // sort according to primary key defined in RecordTemplate\n\t{\n\t\trecordList.sort((Record r1, Record r2)->r1.getValue(PRIMARY_KEY_FIELD_INDEX).compareTo(r2.getValue(PRIMARY_KEY_FIELD_INDEX))); \n //recordList.forEach((r)->System.out.println(r)); \n\t}", "OrderByColumnFull createOrderByColumnFull();", "public List<Map<String, Object>> getOrder(String id);", "List<ClOrderInfo> selectByExample(ClOrderInfoExample example);", "public List<Object> queryByWhere(String col_name, String dto, List<List<Triple>> filter, List<String> keys) {\n\t\tList<Object> res = new ArrayList<Object>();\n\t\tDBCollection dbc = db.getCollection(col_name);\n\t\t// filter\n\t\tBasicDBObject all_ref = new BasicDBObject();\n\t\tDBObject _keys = new BasicDBObject();\n\t\t\n\t\tif(keys != null)\n\t\t\tfor(String key : keys) \n\t\t\t\t_keys.put(key, true);\n\t\t\n\t\tBasicDBList list = new BasicDBList();\n\t\tfor(List<Triple> and : filter) {\n\t\t\tBasicDBObject ref = new BasicDBObject();\n\t\t\tfor(Triple tri : and) {\n\t\t\t\tif(!ref.containsField(tri.key_name)) {\n\t\t\t\t\tif(tri.condition.equals(Condition.EQUAL)) \n\t\t\t\t\t\tref.put(tri.key_name, tri.value);\n\t\t\t\t\t\n\t\t\t\t\telse \n\t\t\t\t\t\tref.put(tri.key_name, new BasicDBObject(tri.condition, tri.value));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(tri.condition.equals(Condition.EQUAL)) {\n\t\t\t\t\t\t// TODO It is impossible\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tBasicDBObject bo = (BasicDBObject)ref.get(tri.key_name);\n\t\t\t\t\t\tbo.append(tri.condition, tri.value);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // end an \"and\" query\n\t\t\tlist.add(ref);\n\t\t}\n\t\t\n\t\tall_ref.put(\"$or\", list);\n\t\t\n\t\ttry {\n\t DBCursor cur = dbc.find(all_ref, _keys);\n\t \twhile (cur.hasNext()) {\n\t \t\tDBObject doc = cur.next();\n\t \t\ttry {\n\t \t\t\tres.add(Util.deserialize(doc, dto));\n\t \t\t} catch(InvocationTargetException ite) {\n\t \t\t\tite.printStackTrace();\n\t \t\t} \t\t\n\t \t\t//System.out.println(doc);\n\t }\n\n\t\t} catch(ClassNotFoundException cnfe) {\n \tcnfe.printStackTrace();\n } catch(InstantiationException ie) {\n \tie.printStackTrace();\n } catch(IllegalAccessException iae) {\n \tiae.printStackTrace();\n }\n\n \treturn res;\n\t}", "public static void orderAction(QueryHelper qhelp, String listHeaderId, RestState pageState, String defaultOrder) {\r\n\r\n String orderBy = pageState.getEntry(Form.FLD_FORM_ORDER_BY + listHeaderId).stringValueNullIfEmpty();\r\n if (orderBy==null) {\r\n orderBy = defaultOrder;\r\n pageState.addClientEntry(Form.FLD_FORM_ORDER_BY + listHeaderId,defaultOrder);\r\n }\r\n\r\n if (JSP.ex(orderBy)){\r\n int pos = qhelp.getHqlString().toLowerCase().indexOf(\" order by \");\r\n if (pos >-1 ){\r\n String hql=qhelp.getHqlString().substring(0,pos);\r\n qhelp.setHqlString(hql);\r\n }\r\n qhelp.addToHqlString(\" order by \" + orderBy);\r\n }\r\n\r\n }", "Results sortResults(FilterSpecifier.ListBy listBy, SortSpecifier sortspec) throws SearchServiceException;" ]
[ "0.63614655", "0.619009", "0.58292776", "0.57593244", "0.5731852", "0.5714943", "0.5637198", "0.5620547", "0.56135464", "0.56050414", "0.55493546", "0.54880357", "0.5429161", "0.5423322", "0.5413038", "0.5399094", "0.53849113", "0.53741485", "0.5369638", "0.5368501", "0.53593427", "0.5355114", "0.5351948", "0.5350213", "0.5339632", "0.5325335", "0.5316142", "0.53110266", "0.5309405", "0.53071535", "0.52859694", "0.5282635", "0.5273086", "0.52680147", "0.52579606", "0.5256855", "0.52431995", "0.5242195", "0.5241311", "0.52339995", "0.52221704", "0.5221125", "0.52116716", "0.5204515", "0.52019125", "0.5193587", "0.5181563", "0.51671726", "0.51591146", "0.5157229", "0.5155983", "0.51556057", "0.5154392", "0.5148185", "0.51456946", "0.51389205", "0.51211584", "0.5117474", "0.51129735", "0.5082094", "0.5066133", "0.5051825", "0.50485855", "0.5038328", "0.5030802", "0.5030492", "0.50259924", "0.50227904", "0.50203776", "0.50203013", "0.50202584", "0.50110996", "0.4997963", "0.49969548", "0.49952343", "0.49930122", "0.49929187", "0.4976402", "0.4975571", "0.4971464", "0.49641612", "0.49631914", "0.49575552", "0.4952364", "0.49377555", "0.49327984", "0.49322253", "0.49308062", "0.49224207", "0.4913211", "0.49102536", "0.49049628", "0.4894899", "0.48861688", "0.48815528", "0.48814434", "0.48797977", "0.48791486", "0.4878962", "0.48735183", "0.4866808" ]
0.0
-1
Returns list of all the authors where firstName, lastName, address or city matched the keyword
@GetMapping(path = "/") @ResponseStatus(HttpStatus.OK) public List<Author> getAuthors(@RequestParam(name = "keyword", required = false, defaultValue = EMPTY) final String keyword) { return authorService.findAllAuthorsByKeyword(keyword); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Author> selectAllAuthors();", "private static void queryBooksByAuthor(){\n\t\tSystem.out.println(\"===Query Books By Author===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter First Name of Author to Query Books by: \");\n\t\tString author_firstname = string_input.next();\n\t\t\n\t\tSystem.out.println(\"Enter Middle Name of Author to Query Books by (Type 'null' if Author has no middlename): \");\n\t\tString author_middlename = string_input.next();\n\t\tif(author_middlename.equalsIgnoreCase(\"null\"))\n\t\t\tauthor_middlename = \"\";\n\t\t\n\t\tSystem.out.println(\"Enter Last Name of Author to Query Books by: \");\n\t\tString author_lastname = string_input.next();\n\t\t\n\t\tString author_fullname = author_firstname + \" \" + author_middlename + \" \" + author_lastname;\n\t\t\n\t\tif(ALL_AUTHORS.containsKey(author_fullname)){//if author_full_name exists in the Hashtable then print out all of the author's book titles\n\t\t\tSystem.out.println(\"Author found!\");\n\t\t\tSystem.out.println(author_fullname + \"'s list of book titles are: \"); \n\t\t\tIterator<String> iter = ALL_AUTHORS.get(author_fullname).iterator();\n\t\t\tprintAllElements(iter);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Sorry Author name entered does not exist in our records\");\n\t}", "public List<Article> searchAndFilterAuthorArticlesBy(String author, String searchString) {\n if (author == null || author.isEmpty()) {\n return searchArticlesBy(searchString);\n }\n if (searchString == null || searchString.isEmpty()) {\n return findAllArticlesForAuthor(author);\n }\n\n QueryBuilder queryBuilder = boolQuery()\n .must(multiMatchQuery(searchString, \"description\", \"title\"))\n .filter(termsQuery(\"author\", author));\n\n SearchResponse searchResponse = client.prepareSearch(INDEX_BASE).setQuery(queryBuilder).get();\n SearchHit[] hits = searchResponse.getHits().hits();\n\n return Arrays.stream(hits)\n .map(this::parseHitIntoArticle)\n .collect(Collectors.toCollection(ArrayList::new));\n }", "public List<BookData> searchBookbyAuthor (String author) throws SQLException{\n\t\tList<BookData> list = new ArrayList<>();\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tmyStmt = myConn.prepareStatement(\"select title, author_name, publisher_name, book_id from books natural join book_authors where author_name = ?\");\n\t\t\tmyStmt.setString(1, author);\n\t\t\tmyRs = myStmt.executeQuery();\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\n\t\t}\n\t\t\n\t}", "public List<Book> getByAuthor(String name );", "List<FraseEntidade> getPhrasesByAuthorName(String name);", "public java.util.List<org.jooq.test.h2.generatedclasses.tables.pojos.VAuthor> fetchByAddress(java.lang.String... values) {\n\t\treturn fetch(org.jooq.test.h2.generatedclasses.tables.VAuthor.V_AUTHOR.ADDRESS, values);\n\t}", "public Map<String, Long> findAuthors() {\n SearchResponse searchResponse = client.prepareSearch(INDEX_BASE)\n .addAggregation(terms(\"authors\").field(\"author\"))\n .setSize(0)\n .get();\n\n Terms issues = searchResponse.getAggregations().get(\"authors\");\n Map<String, Long> foundAuthors = new LinkedHashMap<>();\n\n issues.getBuckets().forEach(bucket -> {\n foundAuthors.put(bucket.getKeyAsString(), bucket.getDocCount());\n });\n\n return foundAuthors;\n }", "java.util.List<java.lang.String>\n getAuthoritiesList();", "@Override\r\n\tpublic List<Author> getAllAuthorDetails() {\n\t\treturn authorDAO.findAll();\r\n\t\t\r\n\t}", "Set<URI> getAuthors();", "public java.util.List<org.jooq.test.h2.generatedclasses.tables.pojos.VAuthor> fetchByFirstName(java.lang.String... values) {\n\t\treturn fetch(org.jooq.test.h2.generatedclasses.tables.VAuthor.V_AUTHOR.FIRST_NAME, values);\n\t}", "SearchResultCompany search(String keywords);", "protected List<AuthorNames> getAuthorNames() {\n return authors.values().stream()\n .map(a-> new AuthorNames(a.getFirstName(), a.getLastName()))\n .collect(Collectors.toList());\n }", "String getAuthorPublicationsQuery(String... varargs);", "public ArrayList<Book> listOfBooksByAuthor (Author providedAuthor){\n //Array list for storing books written by provided author\n ArrayList<Book> authorBooks = new ArrayList<>();\n\n //loops through the booklist to find books with the author in the list of authors\n for (Book book : bookList) {\n //loops through the list of authors to see if the provided author is among thelist\n for (Author author1 : book.getAuthors()) {\n if (providedAuthor.equals(author1)) {\n authorBooks.add(book);\n }\n }\n }\n return authorBooks;\n }", "String findAllPublicationsFromAuthor(final Author author) {\n\n List<Publication> publications = Stream.concat(mBooks.stream(), mMagazines.stream()).collect(Collectors.toList());\n Set<Publication> foundPublications = publications.stream()\n .filter(publication -> publication.getAuthors().contains(author.getEmail()))\n .collect(Collectors.toSet());\n\n PrintModelVisitor printVisitor = new PrintModelVisitor();\n visitPublications(foundPublications, printVisitor);\n return printVisitor.getPublications();\n }", "public List<String> getAuthors() {\n return authors;\n }", "public ArrayList<AddressEntry> searchByName(String text) {\r\n ArrayList<AddressEntry> textMatches = new ArrayList<AddressEntry>();\r\n text = text.toLowerCase();\r\n for (AddressEntry current : contacts) {\r\n String currentname = current.getName().toLowerCase();\r\n if (currentname.contains(text)) {\r\n textMatches.add(current);\r\n }\r\n }\r\n return textMatches;\r\n }", "public String[] getAuthors() {\n return authors;\n }", "String getAuthorsQuery(String wkhuskagraph, String num, Boolean mode);", "public void extractAuthorsName() {\r\n try {\r\n // gets all matched objects for Author Name.\r\n Matcher matcherObject = matcher.patternMatcher(\"AuthorsName\");\r\n\r\n // add name to outputResult\r\n while (matcherObject.find()) {\r\n format.Formatter(1, matcherObject.group(1));\r\n isValidFile = true;\r\n }\r\n\r\n } catch (Exception e) {\r\n System.out.println(\"Error has occured in extractAuthorsName method\");\r\n }\r\n }", "public List<AuthorDto> findAll() {\n return authorRepository.findAll().stream().map(authorMapper::toAuthorDto).collect(Collectors.toList());\n }", "@Query(\"FROM Author Where author_name = ?1\")\n\tList<Author> findAuthorName(String authorName);", "public java.util.List<org.jooq.test.h2.generatedclasses.tables.pojos.VAuthor> fetchByLastName(java.lang.String... values) {\n\t\treturn fetch(org.jooq.test.h2.generatedclasses.tables.VAuthor.V_AUTHOR.LAST_NAME, values);\n\t}", "public static ArrayList<Book> search(String title, ArrayList<String> authors, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(containsAllAuthors(authors, b))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public void setAuthors(String _authors) { authors = _authors; }", "java.lang.String getAuthorities(int index);", "public List<Author> fetchAllAuthors() {\n\t\tEntityManager entityManager = factory.createEntityManager();\n\t\tTypedQuery<Author> query = entityManager.createQuery(\"from Author\", Author.class);\n\t\tList<Author> authors = query.getResultList();\n\t\tentityManager.close();\n\t\treturn authors;\n\t}", "public ArrayList<AddressEntry> searchByEmail(String text) {\r\n ArrayList<AddressEntry> textMatches = new ArrayList<AddressEntry>();\r\n text = text.toLowerCase();\r\n for (AddressEntry current : contacts) {\r\n String currentname = current.getEmail().toLowerCase();\r\n if (currentname.contains(text)) {\r\n textMatches.add(current);\r\n }\r\n }\r\n return textMatches;\r\n }", "void updateFilteredPersonList(Set<String> keywords);", "public ArrayList<String> getAuthors() {\n\t\treturn authors;\n\t}", "@RestResource(path = \"search\", rel = \"search\")\n List<MonographEditors> findByFirstNameContainingAndLastNameContainingAndMiddleNameContainingAndEmailContainingAndAffiliationsContainingAllIgnoreCase(\n @Param(\"firstName\") String firstName,\n @Param(\"lastName\") String lastName,\n @Param(\"middleName\") String middleName,\n @Param(\"email\") String email,\n @Param(\"affiliations\") String affiliations);", "public String getAuthorities() {\n return authorities;\n }", "public List applyAuthorRule () {\n\t\treturn authors;\n\t}", "public ArrayList<AddressEntry> searchByPostalAddress(String text) {\r\n ArrayList<AddressEntry> textMatches = new ArrayList<AddressEntry>();\r\n text = text.toLowerCase();\r\n for (AddressEntry current : contacts) {\r\n String currentname = current.getPostalAddress().toLowerCase();\r\n if (currentname.contains(text)) {\r\n textMatches.add(current);\r\n }\r\n }\r\n return textMatches;\r\n }", "public List<String> getPatternAuthors() {\n Set<String> authors = mapAuths.keySet();\r\n //int n = authors.size();\r\n List <String> authorList = new LinkedList<String>();\r\n //iterate through set and add to list\r\n for(String author : authors) {\r\n authorList.add(author);\r\n }\r\n\r\n Collections.sort(authorList, new Comparator<String>() {\r\n public int compare(String author1, String author2) {\r\n return author1.compareToIgnoreCase(author2);\r\n }\r\n });\r\n\r\n return authorList;\r\n }", "public ArrayList<Customer> findCustomer(String searchText) {\r\n\t\tsearchText = searchText.toLowerCase();\r\n\t\tArrayList<Customer> customers = new ArrayList<Customer>();\r\n\t\ttry (ResultSet result = manager.performSql(\"SELECT id FROM Customer WHERE LOWER(first_name || ' ' || last_name) LIKE '%\" + searchText + \"%'\")) {\r\n\t\t\twhile (result.next()) {\r\n\t\t\t\tcustomers.add(manager.getCustomer(result.getInt(1)));\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customers;\r\n\t}", "String[] getAuthor();", "@GetMapping(\"/bookworm/showAllAuthors\")\n public ResponseEntity<List> showAllAuthors() {\n\n log.debug(\"Showing all the Authors whose books are present in library\");\n return ResponseEntity.ok(authorService.getAuthor());\n }", "ImmutableList<SchemaOrgType> getAuthorList();", "public void searchByCity() {\n System.out.println(\"Enter City Name : \");\n String city = sc.next();\n list.stream().filter(n -> n.getCity().equals(city)).forEach(i -> System.out.println(\"Result: \"+i.getFirstName()));\n }", "private String getAuthorStringForLookup(CitedArticle citedArticle) {\n List<CitedArticleAuthor> authors = citedArticle.getAuthors();\n return authors.size() > 0 ? authors.get(0).getSurnames() : \"\";\n }", "@Nonnull @NonnullElements @Live public Collection<String> getAuthorities() {\n return authorities;\n }", "@Override\n public List<Author> selectAuthorList(Author author)\n {\n return authorMapper.selectAuthorList(author);\n }", "private Collection<Record> getResults(SimpleSurnameAndPostcodeQuery query) {\n\t\treturn search(query);\n\t}", "public Author[] getAuthors() {\n return authors;\n }", "public Author[] getAuthors() {\n return authors;\n }", "public List<cn.edu.kmust.flst.domain.flst.tables.pojos.Article> fetchByArticleAuthor(String... values) {\n return fetch(Article.ARTICLE.ARTICLE_AUTHOR, values);\n }", "private void loopAuthors(Book book) {\n for (String s : book.getAuthors()) {\n print(s);\n }\n }", "public ArrayList<AddressEntry> searchByNote(String text) {\r\n ArrayList<AddressEntry> textMatches = new ArrayList<AddressEntry>();\r\n text = text.toLowerCase();\r\n for (AddressEntry current : contacts) {\r\n String currentname = current.getNote().toLowerCase();\r\n if (currentname.contains(text)) {\r\n textMatches.add(current);\r\n }\r\n }\r\n return textMatches;\r\n }", "public List<Article> findAllArticlesForAuthor(String author) {\n SearchResponse searchResponse = client.prepareSearch(INDEX_BASE)\n .setQuery(termsQuery(\"author\", author))\n .get();\n SearchHit[] hits = searchResponse.getHits().hits();\n\n return Arrays.stream(hits)\n .map(this::parseHitIntoArticle)\n .collect(Collectors.toCollection(ArrayList::new));\n }", "String getDocumentsAuthors(String repository, String graph);", "private void buildQueryAuthor(TermsList termsList) \n throws UnsupportedEncodingException {\n\n if (this.creatorName != null && !this.creatorName.equals(\"\")) {\n termsList.addTerm(this.creatorName);\n String searchName = this.creatorName;\n String escapedSearchName = Search.escapeQueryChars(searchName);\n String authorQuery = \"author:(\\\"\" + escapedSearchName + \"\\\")\";\n String encodedValue = URLEncoder.encode(authorQuery, \"UTF-8\");\n updateQString(encodedValue);\n }\n\n if (this.creatorOrganization != null && !this.creatorOrganization.equals(\"\")) {\n termsList.addTerm(this.creatorOrganization);\n String searchName = this.creatorOrganization;\n String escapedSearchName = Search.escapeQueryChars(searchName);\n String organizationQuery = \"organization:(\\\"\" + escapedSearchName + \"\\\")\";\n String encodedValue = URLEncoder.encode(organizationQuery, \"UTF-8\");\n updateQString(encodedValue);\n }\n \n }", "List<DataTerm> search(String searchTerm);", "@GetMapping\n public List<Author> getAllAuthors(){\n return authorService.getAllAuthors();\n }", "public java.lang.String getAuthorities(int index) {\n return authorities_.get(index);\n }", "List<String> getAuthorsList() {\r\n\t\tList<String> authorList = new ArrayList<String>() ;\r\n\t\t\r\n\t\t// Populate the list of authors\r\n\t\tfor(Collaborator c: collaborators) {\r\n\t\t\tauthorList.add(c.getAuthorName()) ;\r\n\t\t}\r\n\t\treturn authorList ;\r\n\t}", "public List<String> getAuthors() {\n return Collections.unmodifiableList(mAuthors);\n }", "ArrayList<News> findByAuthor(String author) throws DAOException, ConnectionPoolDataSourceException;", "public List<Artist> searchArtistOnly(String text) throws SQLException {\n\t\tList<Artist> artist = new ArrayList<Artist>();\n\n\t\tString sql = \"SELECT * FROM artist\" + \" WHERE Artist_Name LIKE ? ORDER BY Artist_Id\";\n\t\tDriver driver = new Driver();\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet res = null;\n\n\t\ttry {\n\n\t\t\tconn = driver.openConnection();\n\t\t\tpstmt = conn.prepareStatement(sql);\n\t\t\tpstmt.setString(1, \"%\" + text + \"%\");\n\t\t\tres = pstmt.executeQuery();\n\t\t\twhile (res.next()) {\n\t\t\t\tartist.add(new Artist(res.getInt(\"Artist_Id\"), res.getString(\"Artist_Name\"),\n\t\t\t\t\t\tres.getString(\"Start_Year_Active\"), res.getString(\"End_Year_Active\")));\n\t\t\t}\n\t\t\treturn artist;\n\t\t}\n\n\t\tfinally {\n\t\t\tDriver.closeConnection(conn);\n\t\t\tDriver.closeStatement(pstmt);\n\t\t}\n\n\t}", "@Override\n\tpublic ResultSet getAuthorsResultSet() {\n\t\treturn null;\n\t}", "public java.lang.String getAuthorities(int index) {\n return authorities_.get(index);\n }", "public void searchByName() {\n System.out.println(\"enter a name to search\");\n Scanner sc = new Scanner(System.in);\n String fName = sc.nextLine();\n Iterator itr = list.iterator();\n while (itr.hasNext()) {\n Contact person = (Contact) itr.next();\n if (fName.equals(person.getFirstName())) {\n List streamlist = list.stream().\n filter(n -> n.getFirstName().\n contains(fName)).\n collect(Collectors.toList());\n System.out.println(streamlist);\n }\n }\n }", "public Artist[] getAllArtistsMatchingQuery(String query) {\n List<Artist> results = new ArrayList<>();\n for(Artist Artist: getArtistList()){\n if(Artist.getName().toLowerCase().contains(query.toLowerCase())){\n results.add(Artist);\n }\n }\n return results.toArray(new Artist[results.size()]);\n }", "public List<Contact> searchContacts(Map<SearchTerm,String> criteria);", "DefaultListModel getAuthorsModel();", "@Override\n public ArrayList<News> findByAuthor(String foundAuthor) throws DAOException, ConnectionPoolDataSourceException {\n ArrayList<News> news = new ArrayList<>();\n PreparedStatement preparedStatement = null;\n ResultSet resultSet = null;\n Connection connection = connectionPool.takeConnection();\n try {\n preparedStatement = connection.prepareStatement(SQL_SELECT_BY_AUTHOR);\n preparedStatement.setString(1, foundAuthor);\n resultSet = preparedStatement.executeQuery();\n while (resultSet.next()) {\n String category = resultSet.getString(2);\n String title = resultSet.getString(3);\n String author = resultSet.getString(4);\n String date = resultSet.getString(5);\n news.add(new News(category, title, author, date));\n }\n if (news == null) {\n throw new DAOException(\"Error in findByAuthor.\");\n }\n connectionPool.closeConnection(connection, preparedStatement, resultSet);\n } catch (SQLException e) {\n throw new DAOException(e);\n }\n return news;\n }", "public Book booksByThreeAuthor(){\n for(Book book:bookList){\n if(book.getAuthors().size() == 3){ //checks the number of elements in the arraylist\n return book;\n }\n }\n return null;\n }", "public void setAuthors(String[] authors) {\n this.authors = authors;\n }", "@RestResource(path = \"search4\", rel = \"search\")\n List<MonographEditors> findByFirstNameContainingAndLastNameContainingAndMiddleNameContainingAndEmailContainingAndAffiliationsContainingAndMonographOfPapersIdAllIgnoreCase(\n @Param(\"firstName\") String firstName,\n @Param(\"lastName\") String lastName,\n @Param(\"middleName\") String middleName,\n @Param(\"email\") String email,\n @Param(\"affiliations\") String affiliations,\n @Param(\"monographOfPapersId\") Long monographOfPapersId);", "public ArrayList<AddressEntry> searchByPhoneNumber(String text) {\r\n ArrayList<AddressEntry> textMatches = new ArrayList<AddressEntry>();\r\n text = text.toLowerCase();\r\n for (AddressEntry current : contacts) {\r\n String currentname = current.getPhoneNumber().toLowerCase();\r\n if (currentname.contains(text)) {\r\n textMatches.add(current);\r\n }\r\n }\r\n return textMatches;\r\n }", "public static Set<String> getAllAuthors(List<Book> books) {\r\n Set<String> allAuthors = new HashSet<>();\r\n for (Book book : books) {\r\n allAuthors.add(book.getAuthor());\r\n }\r\n return allAuthors;\r\n }", "@GetMapping(\"/search-author/{titleString}\")\n public List<Author> getAllAuthorsByConsistTitleString(@PathVariable(\"titleString\") String titleString){\n System.out.println(\"Query: \" + titleString);\n return authorService.getAuthorsByBookTitle(titleString);\n }", "@Override\n\tpublic List<Movie> search(String queryText) {\n\t\tMoviesResponse moviesResponse = movieDataService.fetchAll();\n\t\tList<Movie> movieList = moviesResponse.stream()\n\t\t\t\t.filter(movieData -> Arrays.asList(movieData.getTitle().toLowerCase().split(\"\\\\s+\")).contains(queryText.toLowerCase()))\n\t\t\t\t.collect(Collectors.mapping(movieData -> mapMovieDataToMovie(movieData),Collectors.toList()));\n\t\treturn movieList;\n\t}", "public List<Customer> findAutoCompleteCustomers(String key) {\n\t\tTypedQuery<Customer> query = em.createQuery(\n\t\t\t\t\"select distinct c from Customer c \"\n\t\t\t\t\t\t+ \" where upper(concat(c.customerName1,' ', c.customerName2,' ', c.customerName3,' ', c.customerName4)) like :name\",\n\t\t\t\tCustomer.class);\n\t\tquery.setParameter(\"name\", \"%\" + key.toUpperCase() + \"%\");\n\t\tList<Customer> customers = query.setFirstResult(0).setMaxResults(10).getResultList();\n\n\t\treturn customers;\n\t}", "String getAuthorName();", "public User[] getAllAuthors() {\n\t\treturn authors.toArray(new User[authors.size()]);\n\t}", "private void searchJournals(String callNumber, String[] keywords,int startYear, int endYear) {\n\t\t/* Loop to sequentially search master list 'Reference' */\n\t\tfor (int i = 0; i < items.size(); i++)\n\t\t\tif ((callNumber.equals(\"\") || items.get(i).getCallNumber()\n\t\t\t\t\t.equalsIgnoreCase(callNumber))\n\t\t\t\t\t&& (keywords == null || matchedKeywords(keywords, items\n\t\t\t\t\t\t\t.get(i).getTitle()))\n\t\t\t\t\t&& (items.get(i).getYear() >= startYear && items.get(i)\n\t\t\t\t\t\t\t.getYear() <= endYear)) {\n\t\t\t\tReference ref = items.get(i);\n\t\t\t\t/* Checks if reference is of a 'Journal' type */\n\t\t\t\tif (ref instanceof Journal) {\n\t\t\t\t\tJournal book = (Journal) ref;\n\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\t\tSystem.out.println(book.toString());\n\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\t}\n\t\t\t}\n\t}", "public List<BookData> searchBookbyPublisher (String publisher) throws SQLException{\n\t\tList<BookData> list = new ArrayList<>();\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tmyStmt = myConn.prepareStatement(\"select title, author_name, publisher_name, book_id from books natural join book_authors where publisher_name = ?\");\n\t\t\tmyStmt.setString(1, publisher);\n\t\t\tmyRs = myStmt.executeQuery();\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\n ArrayList<String> names = new ArrayList<>();\n Scanner scanner = new Scanner(new File(\"People.csv\"));\n scanner.nextLine();\n while (scanner.hasNext()) {\n String line = scanner.nextLine();\n String[] columns = line.split(\",\");\n String name = columns[1] + \" \" + columns[2];\n names.add(name);\n }\n\n Scanner consoleScanner = new Scanner(System.in);\n System.out.println(\"Type Search Term\");\n String searchTerm = consoleScanner.nextLine();\n\n// String searchTerm = \"mur\";\n\n //solve for via loop\n for (String name: names) {\n if (name.toLowerCase().contains(searchTerm)) {\n System.out.println(name);\n }\n }\n System.out.println();\n\n //solve via stream\n names.stream()\n .map(name -> name.toLowerCase())\n .filter(name -> name.toLowerCase().contains(searchTerm.toLowerCase()))\n// .forEach(System.out::println);\n .collect(Collectors.toCollection(ArrayList<String>::new));\n System.out.println();\n }", "public List<Contact> getAllContactsByName(String searchByName);", "@Override\n public boolean onQueryTextSubmit(String query) {\n if (AfterLoginActivity.this.latestBookList != null) {\n searchBookList = new ArrayList<>();\n\n for (Book book : AfterLoginActivity.this.latestBookList) {\n //str1.toLowerCase().contains(str2.toLowerCase())\n if (book.getName().toLowerCase().contains(query.toLowerCase())) {\n //add to search book list\n searchBookList.add(book);\n }\n }\n //set books to book list view\n AfterLoginActivity.this.bookListFragment.setBooks(searchBookList);\n }\n return true;\n }", "public String getAuthor();", "@RestResource(path = \"search1\", rel = \"search1\")\n List<MonographEditors> findByNumOrderAndFirstNameContainingAndLastNameContainingAndMiddleNameContainingAndEmailContainingAndAffiliationsContainingAndPersonIdAllIgnoreCase(\n @Param(\"numOrder\") Integer numOrder,\n @Param(\"firstName\") String firstName,\n @Param(\"lastName\") String lastName,\n @Param(\"middleName\") String middleName,\n @Param(\"email\") String email,\n @Param(\"affiliations\") String affiliations,\n @Param(\"personId\") Long personId);", "String getAuthor();", "String getAuthor();", "private void filter(String text) {\n List<UserModel> filterdNames = new ArrayList<>();\n\n //looping through existing elements\n for (UserModel item : userModels) {\n //if the existing elements contains the search input\n if (item.getFirstName().toLowerCase().contains(text.toLowerCase())||item.getId().toLowerCase().contains(text.toLowerCase())||item.getEmail().toLowerCase().contains(text.toLowerCase())){\n //adding the element to filtered list\n filterdNames.add(item);\n }\n }\n userAdapter.filterList(filterdNames);\n }", "@Override\n\tpublic List<LdapGranntedAuthority> getUserAuthorities(String userName) {\n\t\tAndFilter groupFilter = new AndFilter();\n\t\tgroupFilter.and(new EqualsFilter(\"objectclass\",\"groupOfNames\"));\n\t\tgroupFilter.and(new EqualsFilter(\"member\",\"uid=\"+userName+\",ou=users,o=packtPublisher\"));\n\t\tList<LdapGranntedAuthority> userRoleLst = ldapTemplate.search(LdapQueryBuilder.query().filter(groupFilter),new LdapRoleMapper());\n\t\treturn userRoleLst;\n\t}", "public String advancedSearchBooks() {\r\n List<Books> books = new ArrayList<Books>();\r\n keywords = keywords.trim();\r\n \r\n switch (searchBy) {\r\n case \"all\":\r\n return searchBooks();\r\n case \"title\":\r\n books = findBooksByTitle(keywords);\r\n break;\r\n case \"identifier\":\r\n books = findBooksByIdentifier(keywords);\r\n break;\r\n case \"contributor\":\r\n books = findBooksByContributor(keywords);\r\n break;\r\n case \"publisher\":\r\n books = findBooksByPublisher(keywords);\r\n break;\r\n case \"year\":\r\n books = findBooksByYear(keywords);\r\n break;\r\n case \"genre\":\r\n books = findBooksByGenre(keywords);\r\n break;\r\n case \"format\":\r\n books = findBooksByFormat(keywords);\r\n break;\r\n }\r\n clearFields();\r\n\r\n if (books == null || books.isEmpty()) {\r\n books = new ArrayList<Books>();\r\n }\r\n\r\n return displayBooks(books);\r\n }", "public List<Artist> searchAlbumForArtist(String text) throws SQLException {\n\t\tList<Artist> albumsArtist = new ArrayList<Artist>();\n\t\tDriver driver = new Driver();\n\t\tString sql = \"SELECT Artist.*, Album_Name, Year_Released FROM artist,album\"\n\t\t\t\t+ \" WHERE artist.Artist_ID = album.Artist_ID AND Album_Name Like ? \"\n\t\t\t\t+ \"ORDER BY artist.Artist_ID, Year_Released\";\n\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet res = null;\n\n\t\ttry {\n\t\t\tconn = driver.openConnection();\n\t\t\tpstmt = conn.prepareStatement(sql);\n\t\t\tpstmt.setString(1, \"%\" + text + \"%\");\n\t\t\tres = pstmt.executeQuery();\n\t\t\twhile (res.next()) {\n\t\t\t\talbumsArtist.add(new Artist(res.getInt(\"Artist_Id\"), res.getString(\"Artist_Name\"),\n\t\t\t\t\t\tres.getString(\"Start_Year_Active\"), res.getString(\"End_Year_Active\")));\n\t\t\t}\n\t\t\treturn albumsArtist;\n\t\t} finally {\n\t\t\tDriver.closeConnection(conn);\n\t\t\tDriver.closeStatement(pstmt);\n\t\t}\n\t}", "public List<User> findUsersByFirstNameContainsOrLastNameContains(String firstName, String lastName);", "public void getAnAuthor() {\n System.out.println(\"Give author name: \");\n String key = input.next();\n for (Card s: cards) {\n if (s.autherOfBook.equals(key)) {\n System.out.println(s.titleOfBook + \" \" + s.autherOfBook + \" \" + s.subjectOfBook);\n } \n }\n }", "public String getAuthors() {\n return getProperty(Property.AUTHORS);\n }", "public List<String> searchByStreet(String street) {\n if (street == null)\n throw new NullPointerException();\n List<String> searchResult = new ArrayList<>();\n Set<Map.Entry<String, Address>> allAddress = addressBook.entrySet();\n for (Map.Entry<String, Address> currentAddress : allAddress) {\n String currentStreet = currentAddress.getValue().getStreet();\n if (currentStreet.equals(street))\n searchResult.add(currentAddress.getKey());\n }\n return searchResult;\n }", "List<Club> getClubAuthors(Student student) {\n return clubRepository.findByAdminsContains(student);\n }", "List<Employee> findByNameContaining(String keyword, Sort sort);", "List<Corretor> search(String query);", "Iterable<Customer> findByLastName(String lastName);", "public List<BookData> searchBookbyTitle (String name) throws SQLException{\n\t\tList<BookData> list = new ArrayList<>();\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tmyStmt = myConn.prepareStatement(\"select title, author_name, publisher_name, book_id from books natural join book_authors where title = ?\");\n\t\t\tmyStmt.setString(1, name);\n\t\t\tmyRs = myStmt.executeQuery();\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\n\t\t}\n\t\t\n\t}" ]
[ "0.6580934", "0.62566173", "0.62097216", "0.613752", "0.61322147", "0.6095668", "0.60151553", "0.6013977", "0.60068583", "0.597277", "0.5943245", "0.59379286", "0.59338987", "0.59071577", "0.5904908", "0.58828163", "0.5857446", "0.5855078", "0.58494407", "0.5827586", "0.58131766", "0.5794985", "0.57555246", "0.57501477", "0.5748827", "0.572243", "0.57096124", "0.57045734", "0.56757313", "0.56735355", "0.566856", "0.5659413", "0.5659382", "0.5648522", "0.5646194", "0.5633844", "0.5632039", "0.5628662", "0.561454", "0.5595029", "0.55920756", "0.55852383", "0.55775446", "0.55352455", "0.5534168", "0.5532149", "0.55264735", "0.55264735", "0.55238736", "0.550534", "0.5504875", "0.54931885", "0.5484095", "0.54813665", "0.5477155", "0.5449477", "0.54412234", "0.5434274", "0.54313296", "0.5400222", "0.5399646", "0.5398384", "0.5394775", "0.5392382", "0.5388839", "0.5382988", "0.5382463", "0.5381496", "0.53488797", "0.53397954", "0.53343517", "0.53191394", "0.5311816", "0.53096247", "0.5309234", "0.52964306", "0.52944887", "0.52919453", "0.52878714", "0.5286595", "0.528593", "0.52851903", "0.528375", "0.52829665", "0.52683395", "0.526799", "0.526799", "0.5262967", "0.5257016", "0.5246891", "0.52423954", "0.5236718", "0.5227664", "0.52220136", "0.5214559", "0.5212733", "0.5211428", "0.5210656", "0.5209562", "0.52009696" ]
0.66327864
0
use the for loop to find
public static void chaotic (int numbers){ for (int n = 0 ; n < numbers ; n++){ // to return a value from 0 up to, but not including 1 use the equation below int randNum = (int)(Math.random()*(5 - 1 + 1)) + 1; //use an if loop to find if the answer from the equation equals to 5 if (randNum == 5){ // the computer will print out five asterisks System.out.println("*****"); } // if the random number equals to 4 if (randNum == 4){ // the computer will print out four asterisks System.out.println("****"); } // if the random number is equal to 3 if (randNum == 3){ // the computer will print out three asterisks System.out.println("***"); } // if the random number is equal to 2 if (randNum == 2){ // the computer will print out two asterisks System.out.println("**"); } // if the random number is equal to 1 if (randNum == 1) // the computer will print out one asterisks System.out.println("*"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void findNext() {\n \tthis.find(true);\n }", "private void searchFunction() {\n\t\t\r\n\t}", "@Override\n\tpublic void find() {\n\n\t}", "void findRec () {\r\n\r\n\t\tboolean found = false;\r\n\t\tfor (int x = 0; x < total; x++) {\r\n\t\t\tif (records[x][0].equals (txtNo.getText())) {\r\n\t\t\t\tfound = true;\r\n\t\t\t\tJOptionPane.showMessageDialog (this, \"Account No. \" + txtNo.getText () + \" is Already Exist.\",\r\n\t\t\t\t\t\t\t\"BankSystem - WrongNo\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t\t\ttxtClear ();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (found == false) {\r\n\t\t\tsaveArray ();\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tint [][] input = {\r\n\t\t\t\t{1,2,3},\r\n\t\t\t\t{4,5,6},\r\n\t\t\t\t{7,8,9}\t\t\t\t\r\n\t\t};\r\n\t\tSystem.out.println(Find(input,13));\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tint[] arr = { 13, 35, 15, 11, 26, 72, 78, 13, 61, 90 };\t\t\t\t\n\t\t\n\t\t// 위에 숫자 다 출력해주는 거랑 아래 78 찾는거 ! \n\t\t// 그리고 6번째 숫자라는건 i의 값이랑 똑같으니까 따로 변수에 안담아줘도 돼용\n\t\t// 스캐너 안써도 되고 그냥 for문으로 arr[i] 전체 출력 !하고\n\t\t// 78찾고 -> i번째 \n\t\tint search = 78;\n\t\tfor (int i = 0; i < arr.length; i++) {\t\t\t\n\t\t\tif (arr[i] == search) {\n\t\t\t\tSystem.out.println(search+\"는 \"+i+\"번째 숫자 입니다.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Integer> searchPosition(Estados e) { //considerando um ponto so\n ArrayList<Integer> positions = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n if (matrix[i][j] == e) {\n positions.add(i);\n positions.add(j);\n }\n\n }\n\n }\n return positions;\n\n }", "public static void main(String[] args) {\n\t\tint n = 4;\n\t\tint index = 0;\n\t\tint a[] = { 1, 1, 2, 2 };\n\t\tString data[] = { \"hackerrank\", \"hacker\" };\n\t\tString partial = \"hak\";\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\n\t\t\tif(a[i] == 1){\n\t\t\t\tString contact = data[index++];\n\t\t\t\tadd(contact);\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Count: \"+find(partial));\n\t\t\t}\n\t\t}\n\t}", "void findMatchings(boolean isProtein) {\n\n GraphDatabaseFactory dbFactory = new GraphDatabaseFactory();\n HashSet<String > searchSpaceList = new HashSet<>();\n GraphDatabaseService databaseService = dbFactory.newEmbeddedDatabase(graphFile);\n for (int id: queryGraphNodes.keySet()) {\n if(isProtein)\n searchSpaceList.add(queryGraphNodes.get(id).label);\n else\n searchSpaceList.add(String.valueOf(queryGraphNodes.get(id).labels.get(0)));\n }\n for(String x: searchSpaceList) {\n ResourceIterator<Node> xNodes;\n try(Transaction tx = databaseService.beginTx()) {\n xNodes = databaseService.findNodes(Label.label(x));\n tx.success();\n }\n\n while (xNodes.hasNext()) {\n Node node = xNodes.next();\n if (searchSpaceProtein.containsKey(x))\n searchSpaceProtein.get(x).add(node.getId());\n else {\n HashSet<Long> set = new HashSet<>();\n set.add(node.getId());\n searchSpaceProtein.put(x, set);\n }\n }\n\n }\n\n if(isProtein)\n search(0, databaseService, true);\n else\n search(0, databaseService, false);\n databaseService.shutdown();\n }", "public void search() {\n while (!done) {\n num2 = mNums.get(cntr);\n num1 = mSum - num2;\n\n if (mKeys.contains(num1)) {\n System.out.printf(\"We found our pair!...%d and %d\\n\\n\",num1,num2);\n done = true;\n } //end if\n\n mKeys.add(num2);\n cntr++;\n\n if (cntr > mNums.size()) {\n System.out.println(\"Unable to find a matching pair of Integers. Sorry :(\\n\");\n done = true;\n }\n } //end while\n }", "public boolean foundLoop();", "private static int find(int i)\r\n{\n int ind = i;\r\n while (ind != ptrs[ind]) {\r\n ind = ptrs[ind];\r\n }\r\n // fix the link so that it is one hop only\r\n // note: this doesn't implement the full union-find update\r\n\r\n ptrs[i] = ind;\r\n\r\n return ind;\r\n}", "void findAllWords() {\n\t\tScanner in = new Scanner(textEditor.getText());\n\t\tint head = 0;\n\t\twhile (in.hasNext()) {\n\t\t\tString value = in.next();\n\t\t\tif (value.equals(findWord)) {\n\t\t\t\tint tail = value.length();\n\t\t\t\tfinder.add(new WordPosition(head, tail + head +1));\n\t\t\t}\n\t\t\thead += (value.length()+1);\n\t\t}\n\t\tin.close();\n\t}", "@Override\r\n public int locate(Copiable value) {\r\n for (int i = 0; i < count; i++) {\r\n if (list[i].equals(value)) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }", "public void iterateThroughtEachElement(){\r\n ArrayList<String> links = examineHTML.getHrefOffers();\r\n \r\n int index = 0;\r\n \r\n for(String link:links){\r\n getHTMLOffer(link, index);\r\n ++index;\r\n }\r\n /*for(int i = 0; i < 10; i++){\r\n getHTMLOffer(links.get(i), index);\r\n ++index;\r\n }*/\r\n \r\n analyzeEachOffer();\r\n }", "public Patient[] findID(String sv)\r\n\t{\r\n\t\tPatient[] foundPatients = new Patient[999];//Creates a blank array\r\n\t\tint count = 0;\r\n\r\n\t\tfor(int i=0; arrayPatients[i]!=null ;i++)//loops through the array\r\n\t\t{\r\n\t\t\tif(arrayPatients[i].forename.contains(sv)||arrayPatients[i].surname.contains(sv))//sees if either surname or firstname contain the search term allowing for partieal searching\r\n\t\t\t{\r\n\t\t\t\tfoundPatients[count] = arrayPatients[i];//if found it adds the patient to an array\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn foundPatients;//that array is then returned\r\n\t}", "void findInGoods(String str) {\n Iterator<Map.Entry<SportEquipment, Integer>> i = goods.entrySet().iterator();\n int count = 1;\n boolean flag = false; //indicates whether sequences were found or not\n\n while (i.hasNext()) {\n\n Map.Entry<SportEquipment, Integer> pair = i.next();\n SportEquipment seq = pair.getKey();\n String category = seq.getCategory().toString();\n String name = seq.getTitle();\n if (category.contains(str.toUpperCase()) || name.contains(str.toLowerCase())) {\n System.out.println(Integer.toString(count) + Strings.DROP + category + Strings.SEPARATOR2 +\n name + Strings.CURRENCY + seq.getPrice() + Strings.SEPARATOR + pair.getValue());\n flag = true;\n }\n count++;\n }\n if (!flag) System.out.println(Strings.ITEM_IS_NOT_FOUND);\n\n }", "void searchByName(String name) {\n\t\tint i=0;\n\t\t\tfor (Entity entity : Processing.nodeSet) {\n\t\t\t\t\n\t\t\t\t/* if Entity is person */\n\t\t\t\tif(entity instanceof Person) {\n\t\t\t\t\tPerson person=(Person)entity;\n\t\t\t\t\tif(person.getName().equalsIgnoreCase(name)){\n\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\tSystem.out.println(\" name : \" + person.getName());\n\t\t\t\t\tSystem.out.println(\" phone : \" + person.getPhone());\n\t\t\t\t\tSystem.out.println(\" email : \" + person.getEmail());\n\t\t\t\t\tSystem.out.println(\" school : \" + person.getSchool());\n\t\t\t\t\tSystem.out.println(\" college : \" + person.getCollege() + \"\\n\");\n\t\t\t\t\t\tfor(String interest:person.getInterests()){\n\t\t\t\t\t\t\tSystem.out.println(\" interest in : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/* If entity is organization */\n\t\t\t\telse {\n\t\t\t\t\tOrganization organization=(Organization)entity;\n\t\t\t\t\tif(organization.getName().equalsIgnoreCase(name)){\n\t\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\t\tSystem.out.println(\" name : \" + organization.getName());\n\t\t\t\t\t\tSystem.out.println(\" phone : \" + organization.getPhone());\n\t\t\t\t\t\tSystem.out.println(\" email : \" + organization.getEmail());\n\t\t\t\t\t\tfor(String interest:organization.getCourses()){\n\t\t\t\t\t\t\tSystem.out.println(\" courses are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getFaculty()){\n\t\t\t\t\t\t\tSystem.out.println(\" Faculties are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getPlacements()){\n\t\t\t\t\t\t\tSystem.out.println(\" Placements are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif(i>=Processing.nodeSet.size()) {//if no such name exist\n\t\t\t\tSystem.out.println(name+\" does not exist\");\n\t\t\t}\n\t}", "private static void iterator() {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint t = scanner.nextInt();\n\t\tfor (int i = 0; i < t; i++) {\n\t\t\tint n = scanner.nextInt();\n\t\t\tdp = new int [n+1];\n\t\t\tArrays.fill(dp, -1);\n\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\tint v = scanner.nextInt();\n\t\t\t\tfind(1, j, v);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private static void task222(int nUMS, RedBlackBST<Integer, Integer> i) {\n\t\tSystem.out.println(\"RED BLAST BST Started Search...\");\n\t double search_start = 0, search_end = 0;\n\t int totalkeymatched = 0;\n\n\t search_start = System.nanoTime();\n\t \n\t for (int z = 0; z < nUMS; z++) {\n\t \tint checker= GenerateInt.generateNumber();\n\t \t\n//\t \tSystem.out.println(GenerateStrings.getAlphaNumericString(limit));\n\t if (i.contains(checker)) {\n\t\n//\t System.out.println(\"Key Matches\");\n\t totalkeymatched++;\n\t \t }\n\t }\n\t search_end = System.nanoTime();\n\t System.out.println(\"Average time for each search: \" + (search_end - search_start) / nUMS + \" nanoseconds\");\n\t System.out.println(\"TOTAL MATCHES \" + totalkeymatched);\n\n\t}", "public ArrayList<String> store_present_element(ArrayList<String> oblist){\n\t\tArrayList<String> obj_list = new ArrayList<String>();\n\t\tint result = 0;\n\t\tint obj_index = 1;\n\t\tfor(int i=0; i<oblist.size(); i++){\n\t\t\tString xpathobj = oblist.get(i);\n\t\t\tList<WebElement> list = returnWebelements(xpathobj);\n\t\t\tif(list.size()>0){\n\t\t\t\tresult = 1;\n\t\t\t\tSystem.out.println(xpathobj+\" element is present!! \"+obj_index);\n\t\t\t\tobj_list.add(xpathobj);\n\t\t\t}\n\t\t\tobj_index++;\n\t\t}\n\t\tif(result!=1){\n\t\t\tprintlist(oblist);\n\t\t\tthrow new ObjectNotFoundException(\"none of the element is found from above pattern..\");\n\t\t}\n\t\tcheck_multiple_pattern(obj_list);\n\t\treturn obj_list;\n\t}", "public boolean find(int value) {\r\n // Write your code here\r\n for (int i = 0; i < elements.size() && elements.get(i) < value / 2 + 1; i++) {\r\n if (elements.get(i) * 2 == value && mapping.get(elements.get(i)) == 2) {\r\n return true;\r\n }\r\n if (elements.get(i) * 2 != value && mapping.containsKey(value - elements.get(i))) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "void Search_for_item(String itemname) \n\t{ \n item it=new item();\n \n for(int i=0;i<it.itemfoundWithDescription.size();i++)\n {\n if(it.itemfoundWithDescription.get(i).equals(itemname))\n \t{\n System.out.println(\"item founded\");\n\t\t\texit(0);\n \t}\n \n }\n System.out.println(\"item not founded\");\n \n\t}", "@Override\r\n\tpublic int find() {\n\t\treturn 0;\r\n\t}", "public void searchSong(String name)\n {\n for(int i=0; i<songs.size(); i++)\n if(songs.get(i).getFile().contains(name) || songs.get(i).getSinger().contains(name))\n {\n System.out.print((i+1) + \"- \");\n listSong(i);\n\n }\n }", "public static void find() {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n sc.nextLine();\n\n int[] a = new int[N];\n\n for (int i = 0; i < N; i++) {\n a[i] = sc.nextInt();\n }\n // build a map of relationships\n\n Map<Integer,Integer> map = new HashMap<Integer,Integer>();\n\n for (int i = 0; i < N; i++) {\n map.put(i+1,a[i]);\n }\n\n for (int i = 1; i <=N ; i++) {\n if(!map.containsValue(i)){\n System.out.print(i + \" \");\n }\n }\n }", "private List<FindResult> findOnPage(int page) {\n\t\t\tif (this.text == null) throw new IllegalStateException(\"text cannot be null\");\n\t\t\treturn this.parent.pdf.find(this.text, page);\n\t\t}", "public void findNext() {\n\t if (value != null) {\n\t findValue();\n\t } else {\n\t find();\n\t }\n\t}", "private void populateFoundMethods()\n \t{\n \t\t// For each non test method, find if it's invoked in each test method one by one.\n \t\t for (IMethod nonTestMethod : this.nonTestMethods)\n \t\t {\n \t\t\t FoundMethod tempFoundMethod = new FoundMethod(nonTestMethod);\n \t\t\t for (IMethod testMethod : this.testMethods)\n \t\t\t {\n \t\t\t\t IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {testMethod});\n \t\t\t\t searchFor(nonTestMethod, scope);\n \t\t\t\t \n \t\t\t\t tempFoundMethod.addMatch(testMethod, this.requestor.getCounter());\n \t\t\t\t \n \t\t\t\t // System.out.println(nonTestMethod.getElementName() + \" found in \" + testMethod.getElementName() + \": \" + this.requestor.getCounter() + \" times.\");\n \t\t\t\t this.requestor.resetCounter();\n \t\t\t }\n \t\t\t foundMethods.add(tempFoundMethod);\n \t\t }\n \t}", "private int find(ElementType element){\n for(int i=0;i<size;i++){\n if(elements[i].equals(element)){\n return i;\n }\n }\n return -1;\n }", "public HashMap<String, Integer> process(IProject project, String pattern) {\n\t\tHashMap<String, Integer> numOfOccuranceInEachFile = new HashMap<String, Integer>();\n\n\t\tSystem.out.println(\"begining a iteration for pattern \" + pattern);\n\t\tString elementName = null;\n\t\tSearchMatch[] newMatches = null;\n\t\tSearchMatch[] matches = PHPSearchEngine.findMethodCall(pattern,\n\t\t\t\tPHPSearchEngine.createProjectScope(project));\n\t\t// must distinguish between method declaration and method call!!!!\n\t\tIModelElement iModelElement;\n\t\tObject obj = null;\n\t\tSystem.out.println(\"maches size = \" + matches.length);\n\t\tif (matches.length > 0) {\n\t\t\tfor (SearchMatch match : matches) {\n\t\t\t\tobj = match.getElement();\n\t\t\t\tif (obj instanceof IModelElement) {\n\t\t\t\t\tiModelElement = (IModelElement) obj;\n\t\t\t\t\tString filePath = iModelElement.getPath().toString();\n\t\t\t\t\telementName = iModelElement.getElementName();\n\t\t\t\t\t/*\n\t\t\t\t\t * System.out.println(\"iModelElement.getElementName() = \" +\n\t\t\t\t\t * elementName + \" --path= \" + filePath);\n\t\t\t\t\t */\n\t\t\t\t\tif (Utils.isInTransactionLevel(iModelElement)) {// right\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// now, we\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// consider\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// only the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// transactional\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// level\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// occurance\n\t\t\t\t\t\tif (numOfOccuranceInEachFile.containsKey(filePath)) {\n\t\t\t\t\t\t\tnumOfOccuranceInEachFile.put(filePath,\n\t\t\t\t\t\t\t\t\tnumOfOccuranceInEachFile.get(filePath) + 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnumOfOccuranceInEachFile.put(filePath, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\t * if(iModelElement.getElementType() ==\n\t\t\t\t\t * IModelElement.METHOD){ IMethod iMethod =\n\t\t\t\t\t * (IMethod)iModelElement; iMethod. }\n\t\t\t\t\t */\n\t\t\t\t\t/*\n\t\t\t\t\t * if (!elementName.equals(pattern)) { // avoid recursive,\n\t\t\t\t\t * or // iterative method, // temp implementation, // should\n\t\t\t\t\t * be // modified!!!! pattern = elementName;\n\t\t\t\t\t * System.out.println(\"begining next iteration\");\n\t\t\t\t\t * process(project, pattern);\n\t\t\t\t\t * System.out.println(\"return from an iteration\"); } else\n\t\t\t\t\t * {// it is recursive/iterative, we regard it as the // top\n\t\t\t\t\t * level method call (temp implementation!!!!!)\n\t\t\t\t\t * System.out.println(\"Top Level(recursive reason): \" +\n\t\t\t\t\t * \"iModelElement.getElementName() = \" + elementName +\n\t\t\t\t\t * \" --path= \" + iModelElement.getPath().toString()); }\n\t\t\t\t\t */// comment out Feb. 9, 2014 temporarily\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else { // if there is no callers, then means it is the top level\n\n\t\t\t/*\n\t\t\t * System.out.println(\"Top Level(real reason): \" + \"pattern = \" +\n\t\t\t * pattern);\n\t\t\t */\n\n\t\t}\n\t\tSystem.out.println(\"end of an iteration\");\n\t\treturn numOfOccuranceInEachFile;\n\n\t}", "private int find(Account account) { \n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif(account.equals(accounts[i])) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn -1;\n\t}", "public static void main(String[] args) {\n\t\tint[] numbers = {1, 2, 3, 4, 5, 6};\r\n\t\tint index = 1; \r\n\t\tboolean indexFound = false;\r\n\t\tfor(int n = 0; n<numbers.length; n++) {\r\n\t\t\tif(index == numbers[n]) {\r\n\t\t\tSystem.out.println(index + \" is located at position \" + n + \" in the array numbers\");\r\n\t\t\tindexFound = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(indexFound == false) {\r\n\t\t\tSystem.out.println(index + \" was not found in the array numbers\");\r\n\t\t}\t\r\n\t}", "public boolean findElement(int element) {\r\n\tfor(int i = 0 ;i <myList.size();i++) {\r\n\t\tif(element == myList.get(i))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}", "@In String search();", "public boolean find(int value) {\n // Write your code here\n for(Integer i : list){\n int num = value - i;\n if((num == i && map.get(i) > 1) || (num != i && map.containsKey(num))){\n return true;\n }\n }\n return false;\n }", "public static void main(String args[]) {\r\n\t\tint[] a = {5,8,10,15,13,200,222,246,2,30,31,34,40};\r\n\t\tint find = 40;\r\n\t\tint st = 0; \r\n\t\tint lst = a.length - 1;\r\n\t\tsequenSearch(a,find, st, lst);\r\n\t}", "private int find(int p){\n while(p!=id[p]){\n p=id[p];\n eachDoUnionArrayAccessTimes+=2; //遍历读取某个元素算一次,设置值也算一次,所以加2次\n }\n eachDoUnionArrayAccessTimes++; //查询p的时候依然会读取一次\n return p;\n }", "private static void search(int arr[],int element)\n {\n for(int i=0;i<arr.length;i++)\n {\n if(arr[i]==element)\n {\n System.out.println(\"The \"+element+\" is located at the position of \"+i);\n System.exit(0);\n }\n }\n }", "private void imageSearch(ArrayList<Html> src) {\n // loop through the Html objects\n for(Html page : src) {\n\n // Temp List for improved readability\n ArrayList<Image> images = page.getImages();\n\n // loop through the corresponding images\n for(Image i : images) {\n if(i.getName().equals(this.fileName)) {\n this.numPagesDisplayed++;\n this.pageList.add(page.getLocalPath());\n }\n }\n }\n }", "public static void main(String[] args) {\n\t\tfind_arr obj = new find_arr();\r\n\t\tint[] in = new int[] {1,1,1};\r\n\t\tint[] res = obj.arr(in);\r\n\t\tfor(int i:res) {\r\n\t\t\tSystem.out.println(i);\r\n\t\t}\r\n\t}", "private Integer serialSearch() {\n int currentIndex = startIndex;\n for (int i = start; i < end; i++) {\n if (this.searchIndex == currentIndex) {\n return currentIndex;\n }\n currentIndex++;\n }\n return 0;\n }", "while (!found && index < valid.length)\n {\n if (valid[index] == number)\n found = true;\n else\n index++;\n }", "public static void main(String[] args) {\n\n for (int m =0; m<9;m++) {\n System.out.println(\"kona\");\n }\n for (int y=0; y<6; y++) {\n System.out.println(y +\"veer\");\n }\n\n //Inner for loop\n // print selenium 5 times,and for each time you print selenium,print java 2 times\n\n for (int t=0; t<5;t++) {\n System.out.println(\"selenium\");\n for (int r=0;r<2;r++) {\n System.out.println(\"java\");\n }\n }\n\n //while loop\n int w=0;\n while (w<7) {\n System.out.println(\"dear\");\n w++;\n }\n int b=0;\n while (b<2) {\n System.out.println(b + \"we\");\n b++;\n }\n\n // Do While loop\n\n int k =0;\n do {\n System.out.println(\"don't know\");\n k++;\n }\n while(k<5);\n\n // Enhance for loop\n\n int [] id ={99,66,90,55};\n\n for (int q:id) {\n System.out.println(q);\n }\n\n\n\n }", "private static void task2222(int nUMS, SplayTree<Integer> j) {\n\t\tSystem.out.println(\"SPLAY Started Search...\");\n\t double search_start = 0, search_end = 0;\n\t int totalkeymatched = 0;\n\n\t search_start = System.nanoTime();\n\t \n\t for (int z = 0; z < nUMS; z++) {\n\t \tint checker= GenerateInt.generateNumber();\n\t \t\n//\t \tSystem.out.println(GenerateStrings.getAlphaNumericString(limit));\n\t if (j.contains(checker)) {\n\t\n//\t System.out.println(\"Key Matches\");\n\t totalkeymatched++;\n\t \t }\n\t }\n\t search_end = System.nanoTime();\n\t System.out.println(\"Average time for each search: \" + (search_end - search_start) / nUMS + \" nanoseconds\");\n\t System.out.println(\"TOTAL MATCHES \" + totalkeymatched);\n\n\t}", "@Test\n public void findAll() {\n try{\n repo.save(s);\n repot.save(t);\n repon.save(n);\n Student s2 = new Student(2,221, \"Pop Ion\",\"pop.ion@gmail.com\",\"prof\");\n Tema t2 = new Tema(2, 0, 6, \"GUI\");\n Nota n2 = new Nota(2, 2, \"prof\", 9, \"Nu ai teste\");\n repo.save(s2);\n repot.save(t2);\n repon.save(n2);\n int countS=0, countT=0, countN=0;\n for(Student ignored : repo.findAll()) countS++;\n for(Tema ignored : repot.findAll()) countT++;\n for(Nota ignored : repon.findAll()) countN++;\n assert countS==2;\n assert countT==2;\n assert countN==2;\n\n }\n catch (ValidationException e){\n }\n }", "public FirstFind(int n) {\n id = new int[n];\n count = n;\n for (int i = 0; i < n; i++) id[i] = i;\n }", "private void searchCode() {\n }", "private static int search(String item, ListArrayBasedGeneric<Runway> runwayList)\r\n\t{\r\n\t\tint size = runwayList.size();\r\n\t\tString itemFromList = \"\";\r\n\r\n\t\tfor(int i = 0; i < size; i++)\r\n\t\t{\r\n\t\t\titemFromList = runwayList.get(i).getRunwayName();\r\n\r\n\t\t\tif(itemFromList.compareToIgnoreCase(item) == 0)\r\n\t\t\t{\r\n\t\t\t\treturn i;\r\n\t\t\t} // END IF\r\n\t\t} // END FOR\r\n\r\n\t\treturn -1;\r\n\t}", "public static void main(String... args) {\n SelfAdjustingList<Integer> xs = new SelfAdjustingList<>();\n for (int x = 1; x <= 10; x++)\n xs.add(x);\n for (int i = 0; i < xs.size(); i++)\n assert 10 - i == xs.get(i);\n for (int i = 0; i < xs.size(); i++) {\n int x = xs.get(i);\n assert x == xs.find(i);\n }\n for (int i = 0; i < xs.size(); i++) {\n int x = xs.find(i);\n assert x == xs.get(0);\n }\n System.out.println(\"All tests passed...\");\n }", "public static int searchref(String ref) {\n String target = ref.toUpperCase() ;\n existebis = 0;\n Cars xx = new Cars();\n for (int i = 0; i < listcars.size(); i++) {\n xx = listcars.get(i);\n String record = xx.getReference().toUpperCase() ;\n if (record.equals(target)) {\n existebis = 1;\n break;\n\n\n } else {\n existebis = 0;\n }\n }\n\n return existebis;}", "private int searchPosition(int num, int index){\n\n\t\tif(getBoxs().get(index).getNumBoxInt() == num){\n return getBoxs().indexOf(getBoxs().get(index));\n\n }else{\n return searchPosition(num, index + 1);\n\n }\n\t\t\t\n\t\t\n\t}", "@Override\n\t\tpublic boolean hasNext() {\n\t\t\treturn i > 0;\n\t\t}", "public void search() {\r\n \t\r\n }", "@Test\r\n public void testGetUsuarios() throws Exception \r\n {\r\n List<UsuarioEntity> list;\r\n list = usuarioLogic.getUsuarios();\r\n Assert.assertEquals(dataUs.size(), list.size()); \r\n for(UsuarioEntity entity : list)\r\n {\r\n boolean found = false;\r\n for(UsuarioEntity storedEntity : dataUs)\r\n {\r\n if(entity.getId().equals(storedEntity.getId()))\r\n {\r\n found=true;\r\n }\r\n }\r\n Assert.assertTrue(found);\r\n }\r\n }", "private static void searchMemo() {\n\t\t\n\t}", "public static void main(String[] args) {\n\n int[] arr = {1, 23, 34, 45, 34, 645, 6, 45};\n for (int num : arr) { // for-each loop\n if (num == 6) {\n\n }\n\n\n// boolean contains = false;\n// int [] array={1,2,3,4,5 };\n// for (int i : array) {\n//\n// if (i == 6) {\n// contains = true;\n// break;\n// } else {\n// contains = false;\n// }}\n// if (contains == true) {\n// System.out.println(\"The arrays contains 3\");\n// } else {\n// System.out.println(\"The arrays does not contain 6\");\n// }\n\n// System.out.println(s1.equals(\"Hello`\"));\n }\n System.out.println(\"I have it\");\n }", "public static void main(String[] args) {\n\t\tint a[] = {1,2,3,4};\n\t\tint sum = 0;\n\t\t\n\t\tfor (int i = 0;i<a.length;i++)\n\t\t\t\n\t\t{\n\t\t\tSystem.out.println(a[i]);\n\t\t\t//sum=sum+a[i];\n\t\t\tif (a[i] == 3)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"we found \"+ a[i] + \" at position # \"+ i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\"Sum is:\"+sum);\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tint[] arr = { 1, 2, 7, 6, 7 };\r\n\t\tint x = find(arr, 7, 0);\r\n\t\tSystem.out.print(x);\r\n\t}", "Foreach createForeach();", "private void find(int a, int b) {\n\t\t\n\t\tthis.c = a;\n\t\tthis.d = b;\n\t\t\n\t\tthis.c = this.c+1;\n\t\tthis.d = this.d+1;\n\t\tthis.c = a+1;\n\t\tthis.d = b+2;\n\t\tSystem.out.println(a+\" ==== \"+b+\" ======= \"+c+\" ==== \"+d);\n\t}", "@Override\n\tpublic int[] findAll(int pValueToFind) {\n\n\t\tint[] arr = new int[pointer];\n\t\tint tempPointer = 0;\n\t\tfor (int n = 0; n < pointer; n++) {\n\t\t\tif (values[n] == pValueToFind) {\n\t\t\t\tarr[tempPointer++] = n;\n\t\t\t}\n\t\t}\n\t\tint[] newArray = Arrays.copyOf(arr, tempPointer);\n\t\treturn newArray;\n\t\t/*\n\t\t * ArrayList way import java.util.ArrayList; ArrayList<Integer> arr = new\n\t\t * ArrayList<Integer>(); int[] arr = new int[pointer]; for (int n = 0; n <\n\t\t * pointer; n++) { if (values[n] == pValueToFind) { arr.add(n); }} int[]\n\t\t * newArray = new int[arr.size()]; int i = 0; for (int n : arr) newArray[i++] =\n\t\t * n;\n\t\t */\n\t}", "public static void main(String[] args) {\n\t\tint a[] = {2,5,4,3,6,7};\r\n\t\tint sum = 0;\r\n\t\tint b;\r\n\t\tfor(int i=0; i < a.length; i++) // Gonna loop 5 times\r\n\t\t{\r\n\t\t\t//System.out.println(a[i]);\r\n\t\t sum = sum + a[i];\r\n\t\t System.out.println(a[i]);\r\n\t\t if (a[i] == 6)\r\n\t\t {\r\n\t\t\t //System.out.println(i);\r\n\t\t\t // break;\r\n\t\t }\r\n\t\t //System.out.println(sum);\r\n\t\t}\r\n\t\t\r\n\t\t//System.out.println(sum);\r\n\r\n\t}", "public WordList find(String s) {\n \treturn index.get(s);\n }", "private int find(Account account) {\n StringTokenizer targetTokens = new StringTokenizer(account.toString(), \"*\");\n String targetAccType = targetTokens.nextToken();\n String targetProfileHolder = targetTokens.nextToken();\n for (int i = 0; i < size; i++) {\n StringTokenizer tokens = new StringTokenizer(accounts[i].toString(), \"*\");\n if (targetAccType.equals(tokens.nextToken())) {\n if (targetProfileHolder.equals(tokens.nextToken())) {\n return i;\n }\n }\n }\n return -1;\n }", "public static void main (String[] args) {\n\t\t\n\t\tint[] array = new int[] {2, 4, 1, 6, 5, 40, -1};\n\t\tint[] result = search(array);\n\t\t\n\t\tif (result != null) {\n\t\t\tfor (int i = 0; i < result.length; i++) {\n\t\t\t\tSystem.out.println(result[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"No results found\");\n\t\t}\n\t}", "public static void textQueries(List<String> sentences, List<String> queries) {\n // Write your code here\n for(String q: queries){\n boolean a = false;\n int i=0;\n for(String s: sentences){\n if(Arrays.asList(s.split(\" \")).containsAll(Arrays.asList(q.split(\" \")))){\n System.out.print(i+\" \");\n a = true;\n }\n i++;\n }\n if(!a)\n System.out.println(-1);\n else\n System.out.println(\"\");\n }\n \n }", "public void findTask(String keyword) {\n int index = 1;\n for (Task task : taskList) {\n if (task.toString().contains(keyword)) {\n if (isNoTaskYetFound(index)) {\n System.out.println(\"Here are the matching tasks in your list:\");\n }\n\n System.out.println(String.format(\"%d. %s\", index++, task.toString()));\n }\n }\n\n if (isNoTaskYetFound(index)) {\n System.out.println(\"There are no matching results\");\n }\n }", "private void searchRefrigerator() {\n\t\tboolean flag = false;\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i] instanceof Refrigerator) {\r\n\t\t\t\tSystem.out.println(products[i].toString());\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(flag == false)\r\n\t\t\tSystem.out.println(\"냉장고가 없습니다.\");\r\n\t}", "private Vector<Integer> matchCheckPoint(List<Point> a) {\t\t\t\n\t\tVector<Integer> iDS= new Vector<>();\n\t\tfor(Point p :a) {\n\t\t\tif(!getAsphalt(p.x, p.y,this.trk).isIdDefalt()) {\n\t\t\t\tiDS.add(getAsphalt(p.x, p.y,this.trk).getId());\n\t\t\t}\n\t\t}\n\t\treturn iDS;\n\t}", "private void iterateEnemyShots() {\n\t\tfor (Shot s : enemyShotList) {\n\t\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\t\tfor(Invader a : row) {\n\t\t\t\t\ta.shouldAttack(s);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tint[] arr={1,4,5,8,22};\n\t\tint findelemtn=searchElementByBinary(arr, 0, arr.length,22 );\n\t\tSystem.out.println(\"Element Position :\"+findelemtn);\n\n\t}", "int search(ICard toFind);", "private int finn(T el) {\n\t\t\n\t\t//int i = 0, \n\t\tint resultat = IKKE_FUNNET;\n\t\t\n\t\tboolean funnet = false;\n\t\tT svar = null;\n\n\t\tfor (int i = 0; ((i < bak) && (!funnet)); i++) {\n\t\t\tif (liste[i].equals(el)) {\n\t\t\t\tfunnet = true;\n\t\t\t\tsvar = liste[i];\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn resultat;\n\t}", "public int searchCard(int index){\n for(int i = 0; i < cards.size(); ++i){//loop to go through the cards\n if(cards.get(i).toString().equalsIgnoreCase(playable.get(index).toString())){//checks the index\n return i;//returns the index\n }\n }\n return index;\n }", "boolean searchValueExists(int i){\t\r\n\t\tthis.searchedNode = search(this.root, i);\r\n\t\tif(this.searchedNode != null){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static void main(String[] args) {\n\t\tint n;\n\t\tint k;\n\t\tScanner sc = new Scanner(System.in);\n\t\tn=sc.nextInt();\n\t\tk=sc.nextInt();\n\t\tint [] arr = new int [n];\n\t\t\n\t\tfor(int i=0;i<arr.length;i++){\n\t\t\tarr[i]=sc.nextInt();\n\t\t}\n\t\tint i=search(arr, 0, n-1,k);\n\t\tif(i==-1){\n\t\t\tSystem.out.println(\"key doesnt exist\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Element found at Index ----->\"+i);\n\t\t\t\n\t\t}\n\t\t\n\n\t}", "void FindLstn (int boardID, short[] addrlist, short[] results, int limit);", "public static void main(String[] args) {\n\n\t\torderArray array = new orderArray(10);\n\t\tarray.insert(50);\n\t\tarray.insert(20);\n\t\tarray.insert(30);\n\t\tarray.insert(55);\n\t\tarray.insert(45);\n\t\tint searchKey = 48;\n\n\t\tif (array.find(searchKey) != array.size())\n\t\t\tSystem.out.println(\"Found \" + searchKey);\n\t\telse\n\t\t\tSystem.out.println(\"Can't find\");\n\n\t}", "public void run(){\n\t\tif(searchHow==0){\n\t\t\tint isbnCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestIsbn = new SearchRequest(db, searchForThis, isbnCount, db.size());\n\t\t\t\t\tdb.searchByISBN(requestIsbn);\n\t\t\t\t\tisbnCount = requestIsbn.foundPos;\n\t\t\t\t\tif (requestIsbn.foundPos >= 0) {\n\t\t\t\t\t\tisbnCount++;\n\t\t\t\t\t\tString formatThis = \"Matched ISBN at position: \" + requestIsbn.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestIsbn.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==1){\n\t\t\tint titleCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestTitle = new SearchRequest(db, searchForThis, titleCount, db.size());\n\t\t\t\t\tdb.searchByTitle(requestTitle);\n\t\t\t\t\ttitleCount = requestTitle.foundPos;\n\t\t\t\t\tif (requestTitle.foundPos >= 0) {\n\t\t\t\t\t\ttitleCount++;\n\t\t\t\t\t\tString formatThis = \"Matched title at position: \" + requestTitle.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestTitle.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==2){\n\t\t\tint authorCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestAuthor = new SearchRequest(db, searchForThis, authorCount, db.size());\n\t\t\t\t\tdb.searchByAuthor(requestAuthor);\n\t\t\t\t\tauthorCount = requestAuthor.foundPos;\n\t\t\t\t\tif (requestAuthor.foundPos >= 0) {\n\t\t\t\t\t\tauthorCount++;\n\t\t\t\t\t\tString formatThis = \"Matched author at position: \" + requestAuthor.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestAuthor.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==3){\n\t\t\tint pageCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestPage = new SearchRequest(db, searchForThis, pageCount, db.size());\n\t\t\t\t\tdb.searchByNumPages(requestPage);\n\t\t\t\t\tpageCount = requestPage.foundPos;\n\t\t\t\t\tif (requestPage.foundPos >= 0) {\n\t\t\t\t\t\tpageCount++;\n\t\t\t\t\t\tString formatThis = \"Matched pages at position: \" + requestPage.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestPage.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==4){\n\t\t\tint yearCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestYear = new SearchRequest(db, searchForThis, yearCount, db.size());\n\t\t\t\t\tdb.searchByYear(requestYear);\n\t\t\t\t\tyearCount = requestYear.foundPos;\n\t\t\t\t\tif (requestYear.foundPos >= 0) {\n\t\t\t\t\t\tyearCount++;\n\t\t\t\t\t\tString formatThis = \"Matched year at position: \" + requestYear.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestYear.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic List<Factory> find(Map paraMap) {\n\t\treturn mapper.find(paraMap);\n\t}", "public void findAndClick()\n {\n String normalVal;\n String [] values = parseSrc();\n if( firstThree(values) )\n {\n return;\n }\n else\n {\n normalVal = values[0];\n }\n\n for( int i = 3; i < values.length; i++ )\n {\n if( !values[i].equals(normalVal) )\n {\n int squareIndex = i + 1;\n String squareCSS = \"#box > span:nth-child(\" + squareIndex + \")\";\n driver.findElement(By.cssSelector(squareCSS)).click();\n return;\n }\n }\n\n }", "@Test\n void find() {\n\n assertEquals(3, FindOutlier.find(ints1));\n assertEquals(1, FindOutlier.find(ints2));\n assertEquals(17, FindOutlier.find(ints3));\n assertEquals(2, FindOutlier.find(ints4));\n assertEquals(44, FindOutlier.find(ints5));\n assertEquals(1000, FindOutlier.find(ints6));\n assertEquals(-3, FindOutlier.find(ints7));\n assertEquals(-35, FindOutlier.find(ints8));\n assertEquals(-1 * Integer.MAX_VALUE, FindOutlier.find(ints9));\n assertEquals(-20, FindOutlier.find(ints10));\n assertEquals(-44, FindOutlier.find(ints11));\n assertEquals(1, FindOutlier.find(ints12));\n assertEquals(0, FindOutlier.find(ints13));\n }", "public static void consultaEleicoesPassadas() {\n\t\tArrayList<Eleicao> lista;\n\t\t\n\t\tint check = 0;\n\t\tint tries = 0;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tlista = rmiserver.getEleicoesPassadas();\n\t\t\t\tif(lista.isEmpty()) {\n\t\t\t\t\tSystem.out.println(\"Nao existem eleicoes para mostrar.\");\n\t\t\t\t}else {\n\t\t\t\t\tfor(Eleicao x: lista) {\n\t\t\t\t\t\tSystem.out.println(\"\\nEleicao \"+x.titulo);\n\t\t\t\t\t\tSystem.out.println(\"\\tID: \"+x.id);\n\t\t\t\t\t\tSystem.out.println(\"\\tDescricao: \"+x.descricao);\n\t\t\t\t\t\tSystem.out.println(\"\\tData Inicio: \"+x.dataInicio.toString());\n\t\t\t\t\t\tSystem.out.println(\"\\tData Fim: \"+x.dataInicio.toString());\n\t\t\t\t\t\tSystem.out.println(\"Resultados: \");\n\t\t\t\t\t\tif(x.tipo == 1) {\n\t\t\t\t\t\t\tif(x.registoVotos.size()>0) {\n\t\t\t\t\t\t\t\tfor(Lista y: x.listaCandidaturas) {\n\t\t\t\t\t\t\t\t\tdouble perc = y.contagem/(double)x.registoVotos.size() * 100;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tif(x.registoVotos.size()>0) {\n\t\t\t\t\t\t\t\tint alunos = 0, docentes = 0, funcs = 0;\n\t\t\t\t\t\t\t\tfor(Lista y:x.listaCandidaturas) {\n\t\t\t\t\t\t\t\t\tif(y.tipoLista.equals(\"1\")) {\n\t\t\t\t\t\t\t\t\t\talunos += y.contagem;\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"2\")) {\n\t\t\t\t\t\t\t\t\t\tfuncs += y.contagem;\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"3\")) {\n\t\t\t\t\t\t\t\t\t\tdocentes += y.contagem;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor(Lista y: x.listaCandidaturas) {\n\t\t\t\t\t\t\t\t\tif(y.tipoLista.equals(\"1\")) {\n\t\t\t\t\t\t\t\t\t\tif(alunos>0) {\n\t\t\t\t\t\t\t\t\t\t\tdouble perc = (double)y.contagem/(double)alunos * 100;\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": 0% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"2\")) {\n\t\t\t\t\t\t\t\t\t\tif(funcs>0) {\n\t\t\t\t\t\t\t\t\t\t\tdouble perc = (double)y.contagem/(double)funcs * 100;\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": 0% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"3\")) {\n\t\t\t\t\t\t\t\t\t\tif(docentes>0) {\n\t\t\t\t\t\t\t\t\t\t\tdouble perc = (double)y.contagem/(double)docentes * 100;\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": 0% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"4\")) {\n\t\t\t\t\t\t\t\t\t\tdouble perc = y.contagem/(double)x.registoVotos.size() * 100;\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% sobre Total (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcheck = 1;\n\t\t\t} catch (RemoteException e1) {\n\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\tif(tries == 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t\t\n\t\t\n\t}", "private void searchProductUsingtag(int tag) {\n\t\tboolean flag = false;\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i].getTag() == tag) {\r\n\t\t\t\tSystem.out.println(products[i].toString());\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(flag == false)\r\n\t\t\tSystem.out.println(\"해당하는 tag는 없습니다.\");\r\n\t}", "private void scanForLocations(Element elem) {\n \n String location = getLocation(elem);\n if (location != null) {\n locationToElement.put(location, elem);\n DOM.setInnerHTML(elem, \"\");\n } else {\n int len = DOM.getChildCount(elem);\n for (int i = 0; i < len; i++) {\n scanForLocations(DOM.getChild(elem, i));\n }\n }\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }" ]
[ "0.63403803", "0.5699321", "0.56150997", "0.5569769", "0.5559011", "0.55129194", "0.5431783", "0.5409478", "0.53967506", "0.53426194", "0.5331816", "0.5331041", "0.5295681", "0.5289883", "0.5282895", "0.5282887", "0.52807647", "0.52634734", "0.5227075", "0.5217344", "0.521338", "0.52076423", "0.5196743", "0.51957536", "0.5192261", "0.51913637", "0.5174035", "0.51657164", "0.51628405", "0.51627237", "0.5161787", "0.51565874", "0.51448", "0.51349", "0.512303", "0.50988096", "0.5094569", "0.50811136", "0.5079789", "0.5077769", "0.5070054", "0.5069004", "0.5060287", "0.5046572", "0.50332224", "0.50325733", "0.50308263", "0.5022373", "0.50162506", "0.5012642", "0.50113606", "0.50052977", "0.5000028", "0.4997376", "0.4997133", "0.49957284", "0.4993876", "0.4990078", "0.49873132", "0.49850953", "0.49845764", "0.49841148", "0.49783105", "0.49734977", "0.4958738", "0.49499273", "0.49495557", "0.4942684", "0.49382815", "0.49336392", "0.49265474", "0.49262372", "0.49170315", "0.49158078", "0.4911222", "0.4900766", "0.48993146", "0.48834082", "0.48821732", "0.48818484", "0.4879874", "0.48763892", "0.48730642", "0.48730427", "0.4871989", "0.48658577", "0.48646903", "0.48608357", "0.48608357", "0.48608357", "0.48608357", "0.48608357", "0.48608357", "0.48608357", "0.48608357", "0.48608357", "0.48608357", "0.48608357", "0.48608357", "0.48608357", "0.48608357" ]
0.0
-1
Utility method to copy a file from one directory to another
public static void copyFile(final String fromPath, final String toPath) throws IOException { FileUtils.copyFileToDirectory(new File(fromPath), new File(toPath)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from); // set path of source directory from parent function\r\n Path dest = Paths.get(to); // set path of destination directory from parent function\r\n Files.copy(src, dest); //inbuilt function to copy files\r\n \r\n }", "void copyFile(String sourceFile, String destinationFile) throws IOException;", "void copyFile(String sourceFile, String destinationFile, boolean overwrite) throws IOException;", "public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from);\r\n Path dest = Paths.get(to);\r\n Files.copy(src, dest, StandardCopyOption.REPLACE_EXISTING);\r\n }", "private static boolean copyDirectory(File from, File to)\n {\n return copyDirectory(from, to, (byte[])null);\n }", "public static void copyFile(File from, File to) throws IOException {\r\n FileInputStream in = new FileInputStream(from);\r\n copyFile(in, to);\r\n }", "private static void copyFile(File in, File out)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFileChannel inChannel = new\tFileInputStream(in).getChannel();\n\t\t\tFileChannel outChannel = new FileOutputStream(out).getChannel();\n\t\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\t\t\tinChannel.close();\n\t\t\toutChannel.close();\t\t\t\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.copyFile(): \" + e);\n\t\t}\n\n\t}", "public static void copyFileToDir(File src, File dst) throws IOException {\n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n File file = new File(dstAbsPath + File.separator + src.getName());\n copyFile(src, file);\n }", "public static void copyPath(Path source, Path target) {\n try {\n Files.copy(source, target);\n if (Files.isDirectory(source)) {\n try (Stream<Path> files = Files.list(source)) {\n files.forEach(p -> copyPath(p, target.resolve(p.getFileName())));\n }\n }\n } catch (IOException e) { e.printStackTrace(); }\n }", "private void copy(File src, File dst) throws IOException \r\n {\r\n InputStream in = new FileInputStream(src);\r\n OutputStream out = new FileOutputStream(dst);\r\n \r\n // Transfer bytes from in to out\r\n byte[] buf = new byte[1024];\r\n int len;\r\n while ((len = in.read(buf)) > 0) \r\n {\r\n out.write(buf, 0, len);\r\n }\r\n in.close();\r\n out.close();\r\n }", "public static void copyFile(File src, File dst) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"Source file does not exist: \" + src);\n }\n \n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n try (InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dst)) {\n\n // Transfer bytes from in to out\n byte[] buf = new byte[10240];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n } catch (IOException e) {\n logger.warn(\"Unable to copy file \" + e.getMessage(), e);\n throw new IOException(\"Unable to copy file \", e);\n }\n }", "public void copyOne(String from, String to) {\n\t\tFile source = new File(from);\n\t\tif (sourceExists(source)) {\n\t\t\tFile target = new File(to);\n\t\t\ttry{\n\t\t\t\tif(!targetExists(target)){\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath());\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName()\n\t\t\t\t\t\t\t+ \" COPIED!\");\n\t\t\t\t} else if (target.exists() && confirmReplace()) {\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath(),\n\t\t\t\t\t\t\tREPLACE_EXISTING);\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName() + \" REPLACED!\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"File WASN'T copied!\");\n\t\t\t\t}\n\t\t\t}catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private static void copyFile(File scrFile, File file) {\n\t\r\n}", "private void copyFile(String source, String destination) throws IOException {\n File inputFile = new File(source);\n File outputFile = new File(destination);\n\t\n BufferedInputStream in = new BufferedInputStream(\n\t\t\t\t new FileInputStream(inputFile));\n BufferedOutputStream out = new BufferedOutputStream(\n\t\t\t\t new FileOutputStream(outputFile));\n int c;\n\tbyte[] tmp = new byte[4096];\n\t\n while ((c = in.read(tmp, 0, 4096)) != -1)\n\t out.write(tmp, 0, c);\n\t\n in.close();\n out.close();\n }", "private static void copyFile(String from, String to)\n\t{\n\t\tFile inputFile;\n\t File outputFile;\n\t\tint fIndex = from.indexOf(\"file:\");\n\t\tint tIndex = to.indexOf(\"file:\");\n\t\tif(fIndex < 0)\n\t\t\tinputFile = new File(from);\n\t\telse\n\t\t\tinputFile = new File(from.substring(fIndex + 5, from.length()));\n\t\tif(tIndex < 0)\n\t\t\toutputFile = new File(to);\n\t\telse\n\t\t\toutputFile = new File(to.substring(tIndex + 5, to.length())); \n\t\tcopyFile(inputFile, outputFile);\t\t\n\t}", "@SuppressWarnings(\"resource\")\r\n\tpublic static synchronized void copyFile(File source, File dest)\r\n\t\t\tthrows IOException {\r\n\t\tFileChannel srcChannel = null;\r\n\t\tFileChannel dstChannel = null;\r\n\t\ttry {\r\n\t\t\tsrcChannel = new FileInputStream(source).getChannel();\r\n\t\t\tdstChannel = new FileOutputStream(dest).getChannel();\r\n\t\t\tdstChannel.transferFrom(srcChannel, 0, srcChannel.size());\r\n\t\t} finally {\r\n\t\t\tsrcChannel.close();\r\n\t\t\tdstChannel.close();\r\n\t\t}\r\n\t}", "public static void copyFile(final File from, final File toDir) throws IOException {\n if (!from.canRead()) {\n throw new IOException(\"Cannot read file '\" + from + \"'.\");\n }\n if (toDir.exists() && (!toDir.canWrite())) {\n throw new IOException(\"Cannot write to file '\" + toDir + \"'.\");\n }\n toDir.getParentFile().mkdirs();\n FileUtils.copyFile(from, toDir);\n }", "public static void copyFile(File source, File destination) throws IOException {\n\tFileChannel sourceChannel = null;\n\tFileChannel destinationChannel = null;\n\ttry {\n\t if (destination.exists()) {\n\t\tdestination.delete();\n\t }\n\t sourceChannel = new FileInputStream(source).getChannel();\n\t destinationChannel = new FileOutputStream(destination).getChannel();\n\t int maxCount = (64 * 1024 * 1024) - (32 * 1024);// magic number for Windows, 64Mb - 32Kb\n\t long size = sourceChannel.size();\n\t long position = 0;\n\t while (position < size) {\n\t\tposition += sourceChannel.transferTo(position, maxCount, destinationChannel);\n\t }\n\t} catch (IOException e) {\n\t throw e;\n\t} finally {\n\t if (null != sourceChannel) {\n\t\tsourceChannel.close();\n\t }\n\t if (null != destinationChannel) {\n\t\tdestinationChannel.close();\n\t }\n\t}\n }", "public static void copyFile(File src, File dst) throws IOException {\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(dst);\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) out.write(buf, 0, len);\n in.close();\n out.close();\n }", "private void copyFile( final File source, final File target )\n throws MojoExecutionException\n {\n if ( source.exists() == false )\n {\n throw new MojoExecutionException( \"Source file '\" + source.getAbsolutePath() + \"' does not exist!\" );\n }\n if ( target.exists() == true )\n {\n throw new MojoExecutionException( \"Target file '\" + source.getAbsolutePath() + \"' already existing!\" );\n }\n\n try\n {\n this.logger.debug( \"Copying file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'.\" );\n PtFileUtil.copyFile( source, target );\n }\n catch ( PtException e )\n {\n throw new MojoExecutionException( \"Could not copy file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'!\", e );\n }\n }", "public static void copyFiles(File src, File dest) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"copyFiles: Can not find source: \" + src.getAbsolutePath() + \".\");\n } else if (!src.canRead()) { //check to ensure we have rights to the source...\n throw new IOException(\"copyFiles: No right to source: \" + src.getAbsolutePath() + \".\");\n }\n //is this a directory copy?\n if (src.isDirectory()) {\n if (!dest.exists()) { //does the destination already exist?\n //if not we need to make it exist if possible (note this is mkdirs not mkdir)\n if (!dest.mkdirs()) {\n throw new IOException(\"copyFiles: Could not create direcotry: \" + dest.getAbsolutePath() + \".\");\n }\n }\n //get a listing of files...\n String list[] = src.list();\n //copy all the files in the list.\n for (int i = 0; i < list.length; i++) {\n File dest1 = new File(dest, list[i]);\n File src1 = new File(src, list[i]);\n copyFiles(src1, dest1);\n }\n } else {\n //This was not a directory, so lets just copy the file\n try {\n copy(new FileInputStream(src), new FileOutputStream(dest));\n } catch (IOException e) { //Error copying file...\n IOException wrapper = new IOException(\"copyFiles: Unable to copy file: \"\n + src.getAbsolutePath() + \"to\" + dest.getAbsolutePath() + \".\");\n wrapper.initCause(e);\n wrapper.setStackTrace(e.getStackTrace());\n throw wrapper;\n }\n }\n }", "private void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n //Check if sourceFolder is a directory or file\n //If sourceFolder is file; then copy the file directly to new location\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n logAppend(\"Directory created :: \" + destinationFolder);\n nothingDone=false;\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n\n long dateSrc = sourceFolder.lastModified();\n long dateDest = destinationFolder.lastModified();\n\n if (dateSrc > dateDest) {\n //Copy the file content from one place to another\n Files.copy(sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n logAppend(\"File copied :: \" + destinationFolder);\n nothingDone=false;\n }\n\n }\n }", "public static long copyFile(File source, File dest) throws IOException {\n\n\t\tif (source.isDirectory() || dest.isDirectory())\n\t\t\tthrow new IOException(\"wont copy directories\");\n\t\tInputStream i = null;\n\t\ttry {\n\t\t\ti = getInputStreamFromFile(source);\n\n\t\t\t// create parent directories\n\t\t\tif (dest.getParentFile().mkdirs()) {\n\t\t\t\t// all good\n\t\t\t} else\n\t\t\t\tthrow new IOException(\"\\\"\" + dest + \"\\\" cannot be created\");\n\t\t\treturn writeStreamToFile(i, dest);\n\n\t\t} finally {\n\t\t\tif (i != null)\n\t\t\t\ti.close();\n\t\t}\n\t}", "public static void copyFolder(File src, File dest) throws IOException {\n\n\t\tif (src.isDirectory()) {\n\n\t\t\t// if directory not exists, create it\n\t\t\tif (!dest.exists()) {\n\t\t\t\tdest.mkdir();\n\t\t\t\t// System.out.println(\"Directory copied from \" + src + \" to \" +\n\t\t\t\t// dest);\n\t\t\t}\n\n\t\t\t// list all the directory contents\n\t\t\tString files[] = src.list();\n\n\t\t\tfor (String file : files) {\n\t\t\t\t// construct the src and dest file structure\n\t\t\t\tFile srcFile = new File(src, file);\n\t\t\t\tFile destFile = new File(dest, file);\n\t\t\t\t// recursive copy\n\t\t\t\tcopyFolder(srcFile, destFile);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if file, then copy it\n\t\t\t// Use bytes stream to support all file types\n\t\t\tInputStream in = new FileInputStream(src);\n\t\t\tOutputStream out = new FileOutputStream(dest);\n\n\t\t\tbyte[] buffer = new byte[1024];\n\n\t\t\tint length;\n\t\t\t// copy the file content in bytes\n\t\t\twhile ((length = in.read(buffer)) > 0) {\n\t\t\t\tout.write(buffer, 0, length);\n\t\t\t}\n\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t// System.out.println(\"File copied from \" + src + \" to \" + dest);\n\t\t}\n\t}", "private void copyFile(String source, String destination, Environment env) throws IOException, InvalidPathException {\n\t\tPath sourcePath = Paths.get(source);\n\t\tPath destinationPath = Paths.get(destination);\n\n\t\tif (sourcePath.equals(destinationPath)) {\n\t\t\tenv.writeln(\"The source and the destination can not be equal.\");\n\t\t\treturn;\n\t\t}\n\t\tif (!Files.exists(sourcePath)) {\n\t\t\tenv.writeln(\"The specified file does not exist.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(sourcePath)) {\n\t\t\tenv.writeln(\"Copy command can not copy a directory.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(destinationPath)) {\n\t\t\tdestinationPath = Paths.get(destinationPath.toString(), sourcePath.getFileName().toString());\n\t\t}\n\t\tif (Files.exists(destinationPath)) {\n\t\t\tenv.write(\n\t\t\t\t\t\"There already is a file with the same name at the specified destination. \\nDo you want to overwrite it? [y/n] \");\n\n\t\t\twhile (true) {\n\t\t\t\tString answer;\n\t\t\t\ttry {\n\t\t\t\t\tanswer = env.readLine().trim();\n\t\t\t\t} catch (ShellIOException ex) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (answer.equals(\"n\")) {\n\t\t\t\t\tenv.writeln(\"Operation canceled.\");\n\t\t\t\t\treturn;\n\t\t\t\t} else if (answer.equals(\"y\")) {\n\t\t\t\t\tenv.writeln(\"Operation confirmed.\");\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tenv.writeln(\"Invalid answer. Answer 'y' for 'yes' or 'n' for 'no'.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tBufferedInputStream inputStream = new BufferedInputStream(Files.newInputStream(sourcePath));\n\t\tBufferedOutputStream outputStream = new BufferedOutputStream(Files.newOutputStream(destinationPath));\n\t\twhile (true) {\n\t\t\tint b = inputStream.read();\n\t\t\tif (b == -1) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\toutputStream.write(b);\n\t\t}\n\n\t\tinputStream.close();\n\t\toutputStream.close();\n\t}", "public static void copyFileOrDirectory(String source, String destination) throws KubernetesPluginException {\n File src = new File(source);\n File dst = new File(destination);\n try {\n // if source is file\n if (Files.isRegularFile(Paths.get(source))) {\n if (Files.isDirectory(dst.toPath())) {\n // if destination is directory\n FileUtils.copyFileToDirectory(src, dst);\n } else {\n // if destination is file\n FileUtils.copyFile(src, dst);\n }\n } else if (Files.isDirectory(Paths.get(source))) {\n FileUtils.copyDirectory(src, dst);\n }\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Error while copying file\", e);\n }\n }", "public void copy(String name, String oldPath, String newPath);", "public Path copie(String source, String destination) throws IOException {\n Path root = Paths.get(source);\n Path cible = Paths.get(destination);\n\n Path copy;\n copy = Files.copy(root, cible.resolve(root.getFileName()), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n\n return copy;\n }", "public static void smartCopyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] fromFiles = fromDir.listFiles();\n \t\t\tint fromSize = fromFiles.length;\n \t\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), 550);\n \t\n \t\t\tFile[] toFiles = null;\n \t\n \t\t\t// delete old files and directories from this directory\n \t\t\tif (toDir.exists() && toDir.isDirectory()) {\n \t\t\t\ttoFiles = toDir.listFiles();\n \t\t\t\tint toSize = toFiles.length;\n \t\n \t\t\t\t// check if this exact file exists in the new directory\n \t\t\t\tfor (int i = 0; i < toSize; i++) {\n \t\t\t\t\tString name = toFiles[i].getName();\n \t\t\t\t\tboolean isDir = toFiles[i].isDirectory();\n \t\t\t\t\tboolean found = false;\n \t\t\t\t\tfor (int j = 0; j < fromSize; j++) {\n \t\t\t\t\t\tif (name.equals(fromFiles[j].getName()) && isDir == fromFiles[j].isDirectory())\n \t\t\t\t\t\t\tfound = true;\n \t\t\t\t\t}\n \t\n \t\t\t\t\t// delete file if it can't be found or isn't the correct type\n \t\t\t\t\tif (!found) {\n \t\t\t\t\t\tif (isDir)\n \t\t\t\t\t\t\tPublishUtil.deleteDirectory(toFiles[i], null);\n \t\t\t\t\t\telse\n \t\t\t\t\t\t\ttoFiles[i].delete();\n \t\t\t\t\t}\n \t\t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif (toDir.isFile())\n \t\t\t\t\ttoDir.delete();\n \t\t\t\ttoDir.mkdir();\n \t\t\t}\n \t\t\tmonitor.worked(50);\n \t\n \t\t\t// cycle through files and only copy when it doesn't exist\n \t\t\t// or is newer\n \t\t\ttoFiles = toDir.listFiles();\n \t\t\tint toSize = toFiles.length;\n \t\t\tint dw = 0;\n \t\t\tif (toSize > 0)\n \t\t\t\tdw = 500 / toSize;\n \t\n \t\t\tfor (int i = 0; i < fromSize; i++) {\n \t\t\t\tFile current = fromFiles[i];\n \t\n \t\t\t\t// check if this is a new or newer file\n \t\t\t\tboolean copy = true;\n \t\t\t\tif (!current.isDirectory()) {\n \t\t\t\t\tString name = current.getName();\n \t\t\t\t\tlong mod = current.lastModified();\n \t\t\t\t\tfor (int j = 0; j < toSize; j++) {\n \t\t\t\t\t\tif (name.equals(toFiles[j].getName()) && mod <= toFiles[j].lastModified())\n \t\t\t\t\t\t\tcopy = false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\n \t\t\t\tif (copy) {\n \t\t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\t\tString toFile = to;\n \t\t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\t\ttoFile += File.separator;\n \t\t\t\t\ttoFile += current.getName();\n \t\t\t\t\tif (current.isFile()) {\n \t\t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\t\tmonitor.worked(dw);\n \t\t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\t\tsmartCopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, dw));\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.worked(500 - dw * toSize);\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error smart copying directory \" + from + \" - \" + to, e);\n \t\t}\n \t}", "public static void copyFile(InputStream in, File to) throws IOException {\r\n FileOutputStream out = new FileOutputStream(to);\r\n int len;\r\n byte[] buffer = new byte[4096];\r\n while ((len = in.read(buffer)) != -1) {\r\n out.write(buffer, 0, len);\r\n }\r\n out.close();\r\n in.close();\r\n }", "public static IStatus copyFile(String from, String to) {\n \t\ttry {\n \t\t\treturn copyFile(new FileInputStream(from), to);\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t}\n \t}", "private static void copyFiles(File source, File dest) throws IOException {\n\t\tif(!source.equals(dest))\n\t\t\tFileUtils.copyFile(source, dest);\n\t}", "public void copyFile(String src, String dst) throws IOException {\n\n\t\tFile srcFile = new File(src);\n\t\tFile dstFile = new File(dst);\n\n\t\tcopyFile(srcFile, dstFile);\n\t}", "static void copyFile(File src, File dest) throws IOException {\r\n\t\tFileInputStream fis = new FileInputStream(src);\r\n\t\tFileOutputStream fos = new FileOutputStream (dest);\r\n\t\tbyte[] bytes = new byte[4*1048576];\r\n\t\tint numRead;\r\n\t\twhile ((numRead = fis.read(bytes)) > 0) {\r\n\t\t\tfos.write(bytes, 0, numRead);\r\n\t\t}\r\n\t\tfis.close();\r\n\t\tfos.close();\r\n\t}", "void copyFile(File sourcefile, File targetfile) throws Exception {\n\t\tif(targetfile.exists()) targetfile.delete();\n\t\ttargetfile.createNewFile();\n\t\tFileChannel source = null;\n\t\tFileChannel target = null;\n\t\ttry{\n\t\t\tsource = new FileInputStream(sourcefile).getChannel();\n\t\t\ttarget = new FileOutputStream(targetfile).getChannel();\n\t\t\ttarget.transferFrom(source, 0, source.size());\n\t\t}\n\t\tfinally{\n\t\t\tif(source!=null) source.close();\n\t\t\tif(target!=null) target.close();\n\t\t}\n\t\ttargetfile.setLastModified(sourcefile.lastModified());\n\t}", "public void copyFile(File src, File dst) throws IOException {\n\t\tInputStream in = new FileInputStream(src);\n\t\tOutputStream out = new FileOutputStream(dst);\n\n\t\t// Transfer bytes from in to out\n\t\tbyte[] buf = new byte[1024];\n\t\tint len;\n\t\twhile ((len = in.read(buf)) > 0) {\n\t\t\tif(logger.isDebugEnabled())\n\t\t\t\tlogger.debug(\"Copiando fichero \" + src.getAbsolutePath() + \" a \"\n\t\t\t\t\t+ dst.getAbsolutePath());\n\t\t\tout.write(buf, 0, len);\n\t\t}\n\t\tin.close();\n\t\tout.close();\n\t}", "public static void copyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] files = fromDir.listFiles();\n \t\n \t\t\ttoDir.mkdir();\n \t\n \t\t\t// cycle through files\n \t\t\tint size = files.length;\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), size * 50);\n \t\n \t\t\tfor (int i = 0; i < size; i++) {\n \t\t\t\tFile current = files[i];\n \t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\tString toFile = to;\n \t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\ttoFile += File.separator;\n \t\t\t\ttoFile += current.getName();\n \t\t\t\tif (current.isFile()) {\n \t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\tmonitor.worked(50);\n \t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\tcopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, 50));\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying directory\", e);\n \t\t}\n \t}", "public static IStatus copyFile(URL from, String to) {\n \t\ttry {\n \t\t\treturn copyFile(from.openStream(), to);\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t}\n \t}", "public static final void copy(String source, String destination) {\n File sourceFile = new File(source);\n File destFile = new File(destination);\n\n if (destFile.exists()) {\n // Information error all ready exist the file\n }\n\n if (!sourceFile.exists()) {\n // General Server Error\n }\n\n if (sourceFile.isDirectory()) {\n copyDirectory(source, destination);\n } else {\n copyFile(source, destination);\n }\n\n //delete source folder after copy-paste\n }", "public static void copy(URL src, File dst) throws IOException {\n\n try (InputStream in = src.openStream()) {\n try (OutputStream out = new FileOutputStream(dst)) {\n dst.mkdirs();\n copy(in, out);\n }\n }\n }", "private File copyResources(String srcFileName, File sourceDir, File destinationDir) throws MojoExecutionException {\n File srcFile = new File(sourceDir.getAbsolutePath()+File.separator+srcFileName);\n if (srcFile.exists()) {\n getLog().info(\"Copying \"+srcFile.getName()+\"...\");\n try {\n File destFile = new File(destinationDir.getAbsolutePath()+File.separator+srcFile.getName());\n if (srcFile.isDirectory()) {\n FileUtils.copyDirectory(srcFile, destFile, false);\n } else {\n FileUtils.copyFile(srcFile, destFile, false);\n }\n return destFile;\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying resource '\"+srcFile.getName()+\"'\", ex);\n }\n } else {\n getLog().warn(\"No source file '\"+srcFile.getName()+\"' to copy\");\n return null;\n }\n }", "public static void copyDirectory(File sourceDir, File targetDir) throws IOException {\n File[] srcFiles = sourceDir.listFiles();\n if (srcFiles != null) {\n for (int i = 0; i < srcFiles.length; i++) {\n File dest = new File(targetDir, srcFiles[i].getName());\n if (srcFiles[i].isDirectory() && FileUtils.safeIsRealDirectory(srcFiles[i])) {\n if (!dest.exists()) {\n dest.mkdirs();\n }\n copyDirectory(srcFiles[i], dest);\n } else {\n if (!dest.exists()) {\n dest.createNewFile();\n }\n copyFile(srcFiles[i].getAbsolutePath(), new File(targetDir,\n srcFiles[i].getName()).getAbsolutePath());\n }\n }\n }\n }", "private void copyFile(InputStream ins, OutputStream outs) throws IOException {\n byte[] buffer = new byte[1024];\n int read;\n while((read = ins.read(buffer)) != -1) {\n outs.write(buffer, 0, read);\n }\n }", "final public VFile copyTo(VDir parentDir) throws VlException\n {\n //return (VFile)doCopyMoveTo(parentDir,null,false /*,options*/);\n return (VFile)this.getTransferManager().doCopyMove(this,parentDir,null,false); \n }", "public static void copyFile(final String fileName, final String fromDir, final String toDir)\n throws IOException {\n FileUtils.copyFile(new File(fromDir, fileName), new File(toDir, fileName));\n }", "public static void copy(String destdir, String pathfile) throws Exception {\r\n \t\tFile file = new File(pathfile);\r\n \t\tFile destDir = new File(destdir);\r\n \t\tcopy(destDir, file);\r\n\t}", "public static void copyFile(File sourceFile, File destFile)\n throws IOException {\n if (!destFile.exists()) {\n destFile.createNewFile();\n }\n FileChannel source = null;\n FileChannel destination = null;\n try {\n source = new FileInputStream(sourceFile).getChannel();\n destination = new FileOutputStream(destFile).getChannel();\n destination.transferFrom(source, 0, source.size());\n } catch (Exception e) {} finally {\n if (source != null) {\n source.close();\n }\n if (destination != null) {\n destination.close();\n }\n }\n }", "public static void Copy(File toCopy, File destination) throws IOException {\n\t\tInputStream in = new BufferedInputStream(new FileInputStream(toCopy));\n\t\tOutputStream out = new BufferedOutputStream(new FileOutputStream(destination));\n\n\t\tbyte[] buffer = new byte[1024];\n\t\tint lengthRead;\n\t\twhile ((lengthRead = in.read(buffer)) > 0) {\n\t\t\tout.write(buffer, 0, lengthRead);\n\t\t\tout.flush();\n\t\t}\n\t\tout.close();\n\t\tin.close();\n\t}", "public void copyFile(File src, File dst) throws IOException {\n File file = new File(dst + File.separator + src.getName());\n file.createNewFile();\n Log.i(\"pictureSelect\", \"Dest file: \" + file.getAbsolutePath());\n\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(file);\n\n // Transfer bytes from in to out\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n in.close();\n out.close();\n scanSD(file);\n }", "public void copyFile(@NonNull File sourceFile, @NonNull File destFile) throws IOException {\n if (!destFile.getParentFile().exists()) {\n if (!destFile.getParentFile().mkdirs())\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_NOT_CREATED);\n } else {\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_ALREADY_EXISTS);\n }\n\n if (!destFile.exists()) {\n if (!destFile.createNewFile())\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_NOT_CREATED);\n } else\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_ALREADY_EXISTS);\n\n try (\n FileChannel source = new FileInputStream(sourceFile).getChannel();\n FileChannel destination = new FileOutputStream(destFile).getChannel();\n ) {\n destination.transferFrom(source, 0, source.size());\n }\n }", "private void migrate (String name)\t{\n\t\ttry{\n\t\t\tFile f1 = new File( sourceDir + name);\n\t\t\t\n\t\t\tif (!f1.exists())\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tFile f2 = new File(targetDir +name);\n\t\t\t\n\t\t InputStream in = new FileInputStream(f1);\n\t\t \n\t\t OutputStream out = new FileOutputStream(f2);\n\n\t\t byte[] buf = new byte[1024];\n\t\t int len;\n\t\t while ((len = in.read(buf)) > 0){\n\t\t out.write(buf, 0, len);\n\t\t }\n\t\t in.close();\n\t\t out.close();\n\t\t System.out.println(\"File copied.\");\n\t\t }\n\t\t catch(FileNotFoundException ex){\n\t\t System.out.println(ex.getMessage() + \" in the specified directory.\");\n\t\t System.exit(0);\n\t\t }\n\t\t catch(IOException e){\n\t\t System.out.println(e.getMessage()); \n\t\t }\n\t}", "private static void copyFile(Path srcPath, Path destPath) throws IOException {\n try (FileWriter outputStream = new FileWriter(destPath.toFile().getAbsolutePath(), false);\n FileReader inputStream = new FileReader(srcPath.toFile().getAbsolutePath())) {\n int i;\n while ((i = inputStream.read()) != -1) {\n outputStream.write(toChars(i));\n }\n }\n }", "private void moveFilesToDiffDirectory(Path sourcePath, Path destinationPath) {\n try {\n Files.move(sourcePath, destinationPath,\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n //moving file failed.\n e.printStackTrace();\n }\n }", "public void copy(){\n\t\tFileInputStream is = null;\n\t\tFileOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(source);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\tif(dest.exists())\n\t\t\t\tdest.delete();\n\t\t\tint i = -1;\n\t\t\twhile((i = is.read()) != -1)\n\t\t\t\tos.write(i);\n\t\t\tsource.deleteOnExit();\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t} finally {\n\t\t\tif(is != null)\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException ignored) {}\n\t\t\tif(os != null)\n\t\t\t\ttry {\n\t\t\t\t\tos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t\t\t}\n\t\t}\n\t}", "public void copyImageFile() throws IOException {\n Path sourcePath = imageFile.toPath();\n\n String selectFileName = imageFile.getName();\n\n Path targetPath = Paths.get(\"/Users/houumeume/IdeaProjects/Assignment2/image/\" + selectFileName);\n\n //copy the file to the new directory\n Files.copy(sourcePath, targetPath, StandardCopyOption.REPLACE_EXISTING);\n\n //update the imageFile to point to the new File\n imageFile = new File(targetPath.toString());\n }", "public static void copyDirectory(File destDir, File sourceDir, boolean mkdirs) throws Exception {\r\n\t\tif (!destDir.exists() && !destDir.isDirectory()) {\r\n\t\t\tif (mkdirs) destDir.mkdirs();\r\n\t\t\telse return;\r\n\t\t}\r\n\t\tFile[] containedFiles = sourceDir.listFiles();\r\n\t\tfor (int i = 0; i < containedFiles.length; i++) {\r\n\t\t\tFile aFile = containedFiles[i];\r\n\t\t\tif (aFile.isFile()) copy(destDir, aFile);\r\n\t\t\telse {\r\n\t\t\t\tString dirName = aFile.getName();\r\n\t\t\t\tFile newDir = new File(destDir.getAbsolutePath() + File.separatorChar + dirName);\r\n\t\t\t\tcopyDirectory(newDir, aFile, mkdirs);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void copyFileSourceToDestination(File src, File dest) throws IOException {\n\t\tInputStream is = null;\n\t\tOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(src);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\t// buffer size 1K\n\t\t\tbyte[] buf = new byte[1024];\n\t\t\tint bytesRead;\n\t\t\twhile ((bytesRead = is.read(buf)) > 0) {\n\t\t\t\tos.write(buf, 0, bytesRead);\n\t\t\t}\n\t\t} finally {\n\t\t\tis.close();\n\t\t\tos.close();\n\t\t}\n\t}", "private void copyOrMoveFile(File file, File dir,boolean isCopy) throws IOException {\n File newFile = new File(dir, file.getName());\n FileChannel outChannel = null;\n FileChannel inputChannel = null;\n try {\n outChannel = new FileOutputStream(newFile).getChannel();\n inputChannel = new FileInputStream(file).getChannel();\n inputChannel.transferTo(0, inputChannel.size(), outChannel);\n inputChannel.close();\n if(!isCopy)\n file.delete();\n } finally {\n if (inputChannel != null) inputChannel.close();\n if (outChannel != null) outChannel.close();\n }\n }", "public void copyFile(String oldPath, String newPath) {\n\t\ttry {\n\t\t\tint byteread = 0;\n\t\t\tFile oldfile = new File(oldPath);\n\t\t\tif (oldfile.exists()) {\n\t\t\t\tFileInputStream oldStream = new FileInputStream(oldPath);\n\t\t\t\tFileOutputStream newStream = new FileOutputStream(newPath);\n\t\t\t\tbyte[] buffer = new byte[1024];\n\t\t\t\twhile ((byteread = oldStream.read(buffer)) != -1) {\n\t\t\t\t\tnewStream.write(buffer, 0, byteread);\n\t\t\t\t}\n\t\t\t\tnewStream.close();\n\t\t\t\toldStream.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private int copy(String from, String to, int flag) {\n\n File fromFile = new File(rootPath + from);\n if (!fromFile.exists()) {\n return ERROR_FILE_NOT_EXIST;\n }\n\n if ((flag & FLAG_FORCE) != 0) {\n delete(to);\n }\n\n if (createFile(to) < 0) {\n return ERROR_FILE_ALREADY_EXIST;\n }\n\n File toFile = new File(rootPath + to);\n if (!toFile.setWritable(true)) {\n return ERROR;\n }\n\n try {\n BufferedInputStream inputStream = new BufferedInputStream(new FileInputStream(fromFile));\n BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(toFile));\n byte[] buf = new byte[BUF_SIZE];\n // TODO : it limits file size to INTEGER!!\n int offset = 0;\n int read = 0;\n while((read = inputStream.read(buf)) >= 0) {\n outputStream.write(buf, offset, read);\n offset += read;\n }\n inputStream.close();\n outputStream.close();\n } catch (FileNotFoundException e) {\n // file not found\n return ERROR_FILE_NOT_EXIST;\n } catch (IOException e) {\n // IO Exception\n return ERROR;\n }\n\n return OK;\n }", "public void copyDirectory(String srcDirName, String dstDirName)\n\t\t\tthrows IOException {\n\t\tFile srcDir = new File(srcDirName);\n\t\tFile dstDir = new File(dstDirName);\n\t\tcopyDirectory(srcDir, dstDir);\n\t}", "public static void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n System.out.println(sourceFolder.toString());\n System.out.println(destinationFolder.toString());\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n //System.out.println(\"Directory created :: \" + destinationFolder); // debug\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n Files.copy(\n sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n //System.out.println(\"File copied :: \" + destinationFolder); // debug\n }\n }", "void moveFile(String pathToFile, String pathDirectory);", "public static void copyFolder(final String sourcePath, final String targetPath)\n\t{\n\t\tFile tfile = new File(targetPath);\n\t\ttfile.mkdirs();\n\t\tFile sfile = new File(sourcePath);\n\t\tfinal FilenameFilter ffilter = new FilenameFilter()\n\t\t{\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean accept(File dir, String name)\n\t\t\t{\n\t\t\t\tif( name.startsWith(\".svn\"))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tFile[] files = sfile.listFiles(ffilter);\n\t\t\n\t\tArrayList <File> cpFile = new ArrayList<File>();\n\t\tfor( int i=0;i<files.length;i++)\n\t\t{\n\t\t\tfinal File souFile = files[i];\n\t\t\tif( souFile.isDirectory())\n\t\t\t{\n\t\t\t\tfinal String souPath = souFile.getAbsolutePath();\n\t\t\t\tfinal String tarpath = targetPath + File.separator + souFile.getName();\n\t\t\t\ttraverseDir(souPath, ffilter, new IOnGetFileHandler()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n//\t\t\t\t\t\tcopyFile(file.getAbsolutePath(), tarpath +File.separator + file.getName());\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, new IOnGetFileHandler()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n\t\t\t\t\t\tcopyFolder(file.getAbsolutePath(), tarpath);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, null);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcpFile.add(souFile);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tcopyFiles(targetPath, cpFile);\n\t\t\n\t\t\n\t}", "public void copyFile(String inputFile, String outputFile)\r\n\t{\r\n\t\tif(new File(inputFile).exists())\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tInputStream in = new FileInputStream(inputFile);\r\n\t\t\t\tOutputStream out = new FileOutputStream(outputFile);\r\n\t\t\t\t// Transfer bytes from in to out\r\n\t\t\t\tbyte[] buf = new byte[1024];\r\n\t\t\t\tint length;\r\n\t\t\t\twhile ((length = in.read(buf)) > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tout.write(buf, 0, length);\r\n\t\t\t\t}\r\n\t\t\t\tin.close();\r\n\t\t\t\tout.close();\r\n\t\t\t\tSystem.out.println(inputFile + \" file copied to \" + outputFile);\r\n\t\t\t\tLog.info(inputFile + \" file copied.\");\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) \r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "public static void copyTree(File from, File to, FileFilter filter) throws IOException {\r\n File[] children;\r\n \r\n \tif (!from.exists()) {\r\n \t\tthrow new IOException (\"Source of copy \\'\" + from.getName() + \"\\' doesn't exist\");\r\n \t}\r\n \t\r\n \tif (to.getCanonicalPath().equals(from.getCanonicalPath())) {\r\n \t\tthrow new IOException (\"\\'\" + from.getName() + \"\\' cannot copy to itself\");\r\n \t}\r\n\r\n if (from.isDirectory()) {\r\n children = from.listFiles(filter);\r\n // just like cp command, if target exist, make a new folder into\r\n // the target, copy content into the target folder\r\n if (to.exists()) {\r\n \tif (to.isFile()) {\r\n \t\tthrow new IOException(\"Cannot overwrite non-directory \\'\" + to.getName() + \"\\' with directory \" + from.getName());\r\n \t}\r\n \t// copy into new directory name grafted after the existing one\r\n \tto = new File(to, from.getName());\r\n \tcopyTree(from, to, filter);\r\n \treturn;\r\n } else {\r\n \t// copy into new directory name\r\n \tto.mkdir(); \t\r\n for (int i = 0; i < children.length; i++) {\r\n File curto = new File(to, children[i].getName());\r\n \r\n copyTree(children[i], curto, filter);\r\n }\r\n return;\r\n }\r\n }\r\n else {\r\n \tif (to.isDirectory()) {\r\n \t\tto = new File (to, from.getName());\r\n \t}\r\n copyFile(from, to);\r\n return;\r\n }\r\n \r\n }", "public boolean copy(String path, InputStream is) throws SystemException;", "private File copyFiles(String filename, String directoryName) throws IOException { //after\n boolean success = false;\n String finalPath = this.rootLocation + \"/\" + directoryName +\"/\"+ filename;\n String tmpPath = this.tmpLocation + \"/\"+ filename;\n File finalFile = new File(finalPath);\n File directory = new File(this.rootLocation + \"/\" +directoryName);\n if (!directory.exists()) {\n directory.mkdir();\n }\n File tmpFile = new File(tmpPath);\n if(tmpFile.exists() && !tmpFile.isDirectory() && directory.exists() && directory.isDirectory()){\n if(finalFile.exists() && !finalFile.isDirectory()){\n finalFile = getNewName(finalPath);\n log.debug(\"compareToFiles -> rename to \"+ finalFile.getName());\n }\n success = copyFileUsingStream(tmpFile, finalFile);\n }\n\n log.debug(\"success copy...\"+success);\n return finalFile;\n }", "public void copyFile(String destination, String fileName, InputStream in) {\r\n try {\r\n // write the inputStream to a FileOutputStream\r\n OutputStream out = new FileOutputStream(new File(destination + fileName));\r\n int read = 0;\r\n byte[] bytes = new byte[1024];\r\n while ((read = in.read(bytes)) != -1) {\r\n out.write(bytes, 0, read);\r\n }\r\n in.close();\r\n out.flush();\r\n out.close();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "private static boolean backupAndCopyFile(File templateDir, File toDir, String filename) {\n File to = new File(toDir, filename);\n boolean rv = backupFile(to);\n File from = new File(templateDir, filename);\n boolean rv2 = WorkingDir.copyFile(from, to);\n return rv && rv2;\n }", "@Test(groups = \"Integration\")\n public void testCopyFileTo() throws Exception {\n File dest = Os.newTempFile(getClass(), \".dest.tmp\");\n File src = Os.newTempFile(getClass(), \".src.tmp\");\n try {\n Files.write(\"abc\", src, Charsets.UTF_8);\n host.copyTo(src, dest);\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n src.delete();\n dest.delete();\n }\n }", "public static IStatus copyFile(InputStream in, String to) {\n \t\tOutputStream out = null;\n \t\n \t\ttry {\n \t\t\tout = new FileOutputStream(to);\n \t\n \t\t\tint avail = in.read(buf);\n \t\t\twhile (avail > 0) {\n \t\t\t\tout.write(buf, 0, avail);\n \t\t\t\tavail = in.read(buf);\n \t\t\t}\n \t\t\treturn Status.OK_STATUS;\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t} finally {\n \t\t\ttry {\n \t\t\t\tif (in != null)\n \t\t\t\t\tin.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t\ttry {\n \t\t\t\tif (out != null)\n \t\t\t\t\tout.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t}\n \t}", "public static void copy(File destDir, File file) throws Exception {\r\n \t\tString name = file.getName();\r\n \t\tif (!destDir.exists()) destDir.mkdirs();\r\n \t\tFile oldFile = new File(destDir.getAbsolutePath() + File.separatorChar + name);\r\n \t\tif (oldFile.exists()) oldFile.delete();\r\n\t\tFile fileout = new File(destDir.getAbsolutePath() + File.separatorChar + name);\r\n\t FileInputStream fileinstr = new FileInputStream(file);\r\n\t FileOutputStream fileoutstr = new FileOutputStream(fileout);\r\n\t BufferedOutputStream bufout = new BufferedOutputStream(fileoutstr); \r\n\t byte [] b = new byte[1024];\r\n\t\tint len = 0;\r\n\t\twhile ( (len=fileinstr.read(b))!= -1 ) {\r\n\t\t bufout.write(b,0,len);\r\n\t\t}\r\n\t\tbufout.flush();\r\n\t\tbufout.close();\r\n\t\tfileinstr.close();\r\n\t}", "final public VFile copyTo(VFile targetFile) throws VlException\n {\n //return (VFile)doCopyMoveTo(parentDir,null,false /*,options*/);\n return (VFile)this.getTransferManager().doCopyMove(this,targetFile,false); \n }", "private boolean copyFile(File dest) {\n\t\tboolean result = false;\n\n\t\ttry {\n\t\t\tif (this.exists()) {\n\t\t\t\tif (!dest.exists()) dest.mkdirs();\n\t\t\t\t\n\t\t\t\tif (this.isDirectory() && dest.isDirectory()) {\n\t\t\t\t\tdest = new File(dest.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.mkdirs();\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isFile() && dest.isDirectory()) {\n\t\t\t\t\tdest = new File(dest.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.createNewFile();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isDirectory() && dest.isFile()) {\n\t\t\t\t\tdest = new File(dest.getParent().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.mkdirs();\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isFile() && dest.isFile()) {\n\t\t\t\t\tif (dest.exists()) {\n\t\t\t\t\t\tdest = new File(dest.getParent().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\t\tdest.createNewFile();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (this.getName().equals(dest.getName())) {\n\t\t\t\t\t\t//targetFile.deleteOnExit();\n\t\t\t\t\t\t//targetFile = new File(targetFile.getAbsolutePath());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tBufferedInputStream inBuff = null;\n\t\t\t\tBufferedOutputStream outBuff = null;\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tinBuff = new BufferedInputStream(new FileInputStream(this));\n\t\t\t\t\toutBuff = new BufferedOutputStream(new FileOutputStream(dest));\n\n\t\t\t\t\tbyte[] b = new byte[1024 * 5];\n\t\t\t\t\tint length;\n\t\t\t\t\twhile ((length = inBuff.read(b)) != -1) {\n\t\t\t\t\t\toutBuff.write(b, 0, length);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\toutBuff.flush();\n\t\t\t\t\t\n\t\t\t\t\tresult = true;\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}finally{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (inBuff != null) inBuff.close();\n\t\t\t\t\t\tif (outBuff != null) outBuff.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public void copyFileTo(String sourceFilename, String targetFilename)\r\n\tthrows FileNotFoundException, IOException {\r\n\t\tString theFileContent = readStringFromFile(sourceFilename);\r\n\t\toverwriteStringToFile(theFileContent, targetFilename);\r\n\t}", "public void copyDirectory(File sourceLocation, File targetLocation)\r\n\t\t\tthrows IOException {\r\n\r\n\t\tif (sourceLocation.isDirectory()) {\r\n\t\t\tif (!targetLocation.exists()) {\r\n\t\t\t\ttargetLocation.mkdir();\r\n\t\t\t}\r\n\r\n\t\t\tString[] children = sourceLocation.list();\r\n\t\t\tfor (int i = 0; i < children.length; i++) {\r\n\t\t\t\tcopyDirectory(new File(sourceLocation, children[i]), new File(\r\n\t\t\t\t\t\ttargetLocation, children[i]));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tInputStream in = new FileInputStream(sourceLocation);\r\n\t\t\tOutputStream out = new FileOutputStream(targetLocation);\r\n\t\t\t// Copy the bits from instream to outstream\r\n\t\t\tbyte[] buf = new byte[1024];\r\n\t\t\tint len;\r\n\t\t\twhile ((len = in.read(buf)) > 0) {\r\n\t\t\t\tout.write(buf, 0, len);\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tout.close();\r\n\t\t}\r\n\t}", "public static boolean copyFile(String src, String dst) {\n FileChannel inChannel = null;\n FileChannel outChannel = null;\n try {\n inChannel = new FileInputStream(new File(src)).getChannel();\n outChannel = new FileOutputStream(new File(dst)).getChannel();\n inChannel.transferTo(0, inChannel.size(), outChannel);\n } catch (FileNotFoundException e) {\n MessageGenerator.briefError(\"ERROR could not find/access file(s): \" + src + \" and/or \" + dst);\n return false;\n } catch (IOException e) {\n MessageGenerator.briefError(\"ERROR copying file: \" + src + \" to \" + dst);\n return false;\n } finally {\n try {\n if (inChannel != null)\n inChannel.close();\n if (outChannel != null)\n outChannel.close();\n } catch (IOException e) {\n MessageGenerator.briefError(\"Error closing files involved in copying: \" + src + \" and \" + dst);\n return false;\n }\n }\n return true;\n }", "@Test\n public void testCopyToTempDir() throws IOException {\n File fileA = null;\n\n try {\n fileA = File.createTempFile(\"fileA\", \"fileA\");\n System.out.println(fileA.getAbsolutePath());\n FileOutputStream fos = new FileOutputStream(fileA);\n InputStream sis = new StringInputStream(\"some content\");\n StreamUtil.copy(sis, fos);\n sis.close();\n fos.close();\n\n copyToTempDir(fileA);\n\n File fileACopy = new File(new File(getTempDirPath()), fileA.getName());\n assertTrue(fileACopy.exists());\n assertTrue(fileACopy.isFile());\n } finally {\n boolean deleted = fileA.delete();\n assertTrue(deleted);\n }\n\n File dirB = null;\n\n try {\n dirB = Files.createTempDirectory(\"dirB\").toFile();\n System.out.println(dirB.getAbsolutePath());\n\n copyToTempDir(dirB);\n\n File dirBCopy = new File(new File(getTempDirPath()), dirB.getName());\n assertTrue(dirBCopy.exists());\n assertTrue(dirBCopy.isDirectory());\n } finally {\n boolean deleted = dirB.delete();\n assertTrue(deleted);\n }\n }", "public static void copy(String owner, Path src, Path target) throws CWLException {\r\n final Path finalSrc = toFinalSrcPath(src);\r\n if (src.toFile().exists() && Files.isReadable(src)) {\r\n CopyOption[] options = new CopyOption[] {\r\n StandardCopyOption.COPY_ATTRIBUTES,\r\n StandardCopyOption.REPLACE_EXISTING\r\n };\r\n final Path finalTarget = toFinalTargetPath(src, target);\r\n if (!finalTarget.getParent().toFile().exists()) {\r\n logger.debug(\"mkdir \\\"{}\\\"\", finalTarget.getParent());\r\n mkdirs(owner, finalTarget.getParent());\r\n }\r\n logger.debug(\"copy \\\"{}\\\" to \\\"{}\\\"\", finalSrc, finalTarget);\r\n try {\r\n if (finalSrc.toFile().isDirectory()) {\r\n Files.walkFileTree(finalSrc, new FileVisitor<Path>() {\r\n @Override\r\n public FileVisitResult preVisitDirectory(Path dir,\r\n BasicFileAttributes attrs) throws IOException {\r\n Files.copy(dir, finalTarget.resolve(finalSrc.relativize(dir)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\r\n Files.copy(file, finalTarget.resolve(finalSrc.relativize(file)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\r\n throw exc;\r\n }\r\n });\r\n } else {\r\n Files.copy(finalSrc, finalTarget, options);\r\n }\r\n } catch (IOException e) {\r\n throw new CWLException(\r\n ResourceLoader.getMessage(\"cwl.io.copy.failed\",\r\n finalSrc.toString(),\r\n finalTarget.toString(),\r\n e.getMessage()),\r\n 255);\r\n }\r\n } else {\r\n throw new CWLException(ResourceLoader.getMessage(\"cwl.io.file.unaccessed\", finalSrc.toString()),\r\n 255);\r\n }\r\n }", "public static void copy(File srcDir, File relSrcFile, File destDir, File relDestFile) throws IOException {\n File finalSrcFile = (srcDir != null) ? new File(srcDir, relSrcFile.getPath()) : relSrcFile;\n File relDestDir = relDestFile.getParentFile();\n if (relDestDir != null) {\n File finalDestDir = (destDir != null) ? new File(destDir, relDestDir.getPath()) : relDestDir;\n finalDestDir.mkdirs();\n }\n File finalDestFile = new File(destDir, relDestFile.getPath());\n Files.copy(finalSrcFile.toPath(), finalDestFile.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n }", "public boolean copy(File target) {\n\t\tboolean result = false;\n\n\t\ttry{\n\t\t\tif (this.exists()) {\n\t\t\t\tif (this.isDirectory()) {\n\t\t\t\t\tthis.copyFile(target);\n\t\t\t\t\ttarget = new File(target.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tif (this.listFiles() != null) {\n\t\t\t\t\t\tfor (java.io.File file : this.listFiles()) {\n\t\t\t\t\t\t\tif (file.isDirectory()) ((File) file).copy(target);\n\t\t\t\t\t\t\telse if (file.isFile()) ((File) file).copyFile(target);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (this.isFile()) {\n\t\t\t\t\tthis.copyFile(target);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresult = true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn result;\n\t}", "public static void copyDirectory(File srcDir, File dstDir) throws IOException {\n if (srcDir.isDirectory()) {\n if (!dstDir.exists()) dstDir.mkdir();\n String[] children = srcDir.list();\n for (int i = 0; i < children.length; i++) copyDirectory(new File(srcDir, children[i]), new File(dstDir, children[i]));\n } else {\n copyFile(srcDir, dstDir);\n }\n }", "public boolean copy(File fileToLoadOrig, boolean withDuplicate, List<String> passedFiles) {\n //Let us get the current Date\n Date date = new Date();\n LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n int year = localDate.getYear();\n int month = localDate.getMonthValue();\n int day = localDate.getDayOfMonth();\n\n String destDirectoryPath = year + \"-\" + month + \"-\" + day;\n\n //check if directory is created\n\n File destDirecoty = new File(\"./testing/dest/\" + destDirectoryPath);\n System.out.println(\"the file path:\" + destDirecoty.getAbsolutePath());\n\n if (!destDirecoty.exists()) {\n System.out.println(\"creating a new directory with path:\" + destDirecoty.getAbsolutePath());\n boolean created = destDirecoty.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n System.out.println(\"Directory is created\");\n //Great, now let us check if the file already in the dirctory\n\n\n boolean duplicateFound = false;\n\n\n File[] sourceFiles = fileToLoadOrig.listFiles();\n\n for (File sourceFile : sourceFiles) {\n //let us get the file extension\n String sourceFileType = \"\";\n int location = sourceFile.getName().lastIndexOf('.');\n if (location > 0) {\n sourceFileType = sourceFile.getName().substring(location + 1);\n }\n //cool, let us go on\n String nestedDirectory;\n switch (sourceFileType) {\n case \"txt\":\n nestedDirectory = \"txt\";\n break;\n case \"pdf\":\n nestedDirectory = \"pdf\";\n break;\n case \"xls\":\n nestedDirectory = \"xls\";\n default:\n nestedDirectory = \"others\";\n }\n\n //check if the type directory is created or not\n File nestedDirecotyFile = new File(destDirecoty.getAbsolutePath()+\"/\" + nestedDirectory);\n System.out.println(\"the file path:\" + nestedDirecotyFile.getAbsolutePath());\n\n if (!nestedDirecotyFile.exists()) {\n System.out.println(\"creating a new directory with path:\" + nestedDirecotyFile.getAbsolutePath());\n boolean created = nestedDirecotyFile.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n\n\n\n File[] destinationFiles = nestedDirecotyFile.listFiles();\n\n for (File destinationFile : destinationFiles) {\n if (destinationFile.getName().equals(sourceFile.getName())) {\n if (withDuplicate) {\n int maxSeqNum = 0;\n //Let us find the last sequence of the destinationFile\n for (File fileForDuplicate : destinationFiles) {\n String[] fileParts = fileForDuplicate.getName().split(\"_\");\n if (fileParts.length == 2) {\n //got a split\n if (fileParts[0].equals(destinationFile.getName())) {\n maxSeqNum = Math.max(maxSeqNum, Integer.parseInt(fileParts[1]));\n }\n }else{\n new RuntimeException(\"Files were found with multiple _\");\n }\n }\n String newFilePath = sourceFile.getName() + \"_\" + (maxSeqNum + 1);\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + newFilePath));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n } else {\n // let us delete the destinationFile and replace it\n destinationFile.delete();\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n break;\n } else {\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n }\n\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n\n }\n return true;\n }", "static void copyFile(File srcFile, File destFile) {\n\t\ttry {\n\t\t\tLong start = System.currentTimeMillis();\n\t\t\tdestFile.createNewFile();\n\t\t\tInputStream oInStream = new FileInputStream(srcFile);\n\t\t\tOutputStream oOutStream = new FileOutputStream(destFile);\n\n\t\t\t// Transfer bytes from in to out\n\t\t\tbyte[] oBytes = new byte[1024];\n\t\t\tint nLength;\n\t\t\tBufferedInputStream oBuffInputStream = \n\t\t\t\t\tnew BufferedInputStream( oInStream );\n\t\t\twhile ((nLength = oBuffInputStream.read(oBytes)) > 0) {\n\t\t\t\toOutStream.write(oBytes, 0, nLength);\n\t\t\t}\n\t\t\toInStream.close();\n\t\t\toOutStream.close();\n\t\t\tLong end = System.currentTimeMillis();\n\t\t\tSystem.out.println((end-start));\n\t\t} catch (IOException e) {\n\t\t\tlogger.info(\"Error in creating the excels :\" +e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void copy(String file1, String file2) throws FileNotFoundException{\r\n\t\tFile original = new File(file1);\r\n\t\tFile copied = new File(file2);\r\n\t\t\r\n\t\tScanner input = new Scanner(original);\r\n\t\tPrintWriter output = new PrintWriter(copied);//writes new file\r\n\t\t\r\n\t\twhile(input.hasNextLine()){\r\n\t\t\tString next = input.nextLine();\r\n\t\t\toutput.println(next);\t\t\t\r\n\t\t}\r\n\t\toutput.close();\r\n\t\tinput.close();\r\n\t}", "public void moveDirectory(String source, String target) throws IOException{\n Path sourceFilePath = Paths.get(PWD.getPath()+\"/\"+source);\n Path targetFilePath = Paths.get(PWD.getPath()+\"/\"+target);\n //using builtin move function which uses Paths\n Files.move(sourceFilePath,targetFilePath);\n }", "final public VFile copyTo(VDir parentDir,String newName) throws VlException\n {\n return (VFile)this.getTransferManager().doCopyMove(this,parentDir,newName,false);\n //return (VFile)doCopyMoveTo(parentDir,newName,false /*,options*/);\n }", "void moveFileToDirectoryWithConvertedFiles(String pathToFile);", "final public VFile copyToDir(VRL directoryVRL) throws VlException\n {\n VRL destVRL= directoryVRL.append(getBasename()); \n return (VFile)this.getTransferManager().doCopyMove(this,destVRL,false);\n }", "public static void copyDirectories (File d1, File d2){\n //checks for the console\n System.out.println(\"->Executing copyDirectories\");\n \n if(!d1.isDirectory()){\n //We will search the files and then move them recursive\n copyFyles(d1, d2);\n }//end if directory\n else{\n //Copy d1 to d2, as they are files\n \n //Creating the directory d2 if it does not exist yet.\n if(!d2.exists()){\n d2.mkdir();\n System.out.println(\"Creating directory: \"+d2);\n }//end if creating directori\n \n /* 1. Obtein the list of the existing files in the directory\n 2. Call recursivily this method to copy each of the files \n */\n System.out.println(\"Searching in the directory: \"+d1);\n String files[] = d1.list();\n for(int i=0; i<files.length; i++)\n copyDirectories(new File(d1,files[i]), new File(d2,files[i]));\n System.out.println(\"We copied the files sucesfully\");\n }//end else files\n }", "@Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n Path targetFile = this.currentTargetDirectory.resolve(file.getFileName());\n Files.copy(file, targetFile);\n logger.output(\"Copied file: \" + targetFile);\n return FileVisitResult.CONTINUE;\n }", "public static void copyFile(File oldLocation, File newLocation) throws IOException {\n\t\tif (oldLocation.exists()) {\n\t\t\tBufferedInputStream reader = new BufferedInputStream(new FileInputStream(oldLocation));\n\t\t\tBufferedOutputStream writer = new BufferedOutputStream(new FileOutputStream(newLocation, false));\n\t\t\ttry {\n\t\t\t\tbyte[] buff = new byte[8192];\n\t\t\t\tint numChars;\n\t\t\t\twhile ((numChars = reader.read(buff, 0, buff.length)) != -1) {\n\t\t\t\t\twriter.write(buff, 0, numChars);\n\t\t\t\t}\n\t\t\t} catch (IOException ex) {\n\t\t\t\tthrow new IOException(\n\t\t\t\t\t\t\"IOException when transferring \" + oldLocation.getPath() + \" to \" + newLocation.getPath());\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (reader != null) {\n\t\t\t\t\t\twriter.close();\n\t\t\t\t\t\treader.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tSystem.out.println(\"Error closing files when transferring \" + oldLocation.getPath() + \" to \"\n\t\t\t\t\t\t\t+ newLocation.getPath());\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new IOException(\"Old location does not exist when transferring \" + oldLocation.getPath() + \" to \"\n\t\t\t\t\t+ newLocation.getPath());\n\t\t}\n\t}", "public void copyDirectory(File srcDir, File dstDir) throws IOException {\n\t\tif (srcDir.isDirectory()) {\n\t\t\tif (srcDir.getName().startsWith(\".\")) {// Si es un directorio oculto\n\t\t\t\t\t\t\t\t\t\t\t\t\t// no lo copiamos\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Si el directorio no existe\n\t\t\tif (!dstDir.exists()) {\n\t\t\t\tif(logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(\"El directorio no existe lo creamos. \" + dstDir);\n\t\t\t\tdstDir.mkdirs();\n\t\t\t}\n\n\t\t\tString[] children = srcDir.list();\n\t\t\tfor (int i = 0; i < children.length; i++) {\n\n\t\t\t\tcopyDirectory(new File(srcDir, children[i]), new File(dstDir,\n\t\t\t\t\t\tchildren[i]));\n\n\t\t\t}\n\t\t} else {\n\t\t\t// This method is implemented in e1071 Copying a File\n\t\t\tcopyFile(srcDir, dstDir);\n\t\t}\n\t}", "public static void copy(File file, File file2) {\n Throwable th;\n Throwable th2;\n Throwable th3;\n Throwable th4 = null;\n FileInputStream fileInputStream = new FileInputStream(file);\n FileOutputStream fileOutputStream = new FileOutputStream(file2);\n byte[] bArr = new byte[1024];\n while (true) {\n int read = fileInputStream.read(bArr);\n if (read > 0) {\n fileOutputStream.write(bArr, 0, read);\n } else {\n fileOutputStream.close();\n fileInputStream.close();\n return;\n }\n }\n throw th2;\n if (th4 == null) {\n }\n throw th;\n throw th;\n if (th3 != null) {\n try {\n fileOutputStream.close();\n } catch (Throwable th5) {\n }\n } else {\n fileOutputStream.close();\n }\n throw th2;\n }", "private void copyCoverageFile(String sourceResourceName, String targetFileName, WorkflowJob job) throws Exception {\n FilePath directory = ensureWorkspaceExists(job);\n\n FilePath dest = directory.child(targetFileName);\n org.apache.commons.io.IOUtils.copy(getClass().getResourceAsStream(sourceResourceName), dest.write());\n }", "@Test\n public void testCopyFile() throws Exception {\n System.out.println(\"copyFile with existing source image file\");\n String sourcePath = System.getProperty(\"user.dir\")+fSeparator+\"src\"+fSeparator+\"test\"+fSeparator+\n \"java\"+fSeparator+\"resources\"+fSeparator+\"testImg.jpg\";\n File source = new File(sourcePath);\n \n File dest = new File(folder.toString()+fSeparator+\"Images\");\n FilesDao instance = new FilesDao();\n boolean result;\n try{\n instance.copyFile(source, dest);\n File copiedFile = new File(dest+fSeparator+\"testImg.jpg\");\n if(copiedFile.exists())\n result = true;\n else\n result = false;\n }catch(Exception ex){\n result = false;\n }\n boolean expResult = true;\n assertEquals(\"Some message\",expResult,result);\n }", "public void copyFile(InputStream inputStream, OutputStream outputStream) throws IOException\n {\n byte[] buffer = new byte[1024];\n int length;\n while ((length = inputStream.read(buffer)) > 0)\n outputStream.write(buffer, 0, length);\n inputStream.close();\n outputStream.close();\n }", "public boolean copyTo (String destinationFile) {\r\n\t\tlogger.debug(\"(File)From \"+this.fullPath+ \" To \"+destinationFile);\r\n\t\ttry {\r\n\t\t\tFile source = new File(this.fullPath);\r\n\t\t\tFiles.copy(source.toPath(),Paths.get(destinationFile),NOFOLLOW_LINKS);\r\n\t\t\t// Prévoir une procédure de recréation du lien copy de lien\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public void moveFile(String url) throws IOException {\n\n\t\tSystem.out.println(\"folder_temp : \" + folder_temp);\n\t\tPath Source = Paths.get(folder_temp + url);\n\t\tPath Destination = Paths.get(folder_photo + url);\n\t\tSystem.out.println(\"folder_photo : \" + folder_photo);\n\n\t\tif (Files.exists(Source)) {\n\t\t\t// Files.move(Source, Destination,\n\t\t\t// StandardCopyOption.REPLACE_EXISTING);\n\t\t\t// cpie du fichiet au lieu de deplaacer car il est enn coiurs\n\t\t\t// d'utilisation\n\t\t\tFiles.copy(Source, Destination, StandardCopyOption.REPLACE_EXISTING);\n\t\t}\n\n\t}" ]
[ "0.78101563", "0.7596949", "0.744847", "0.7342211", "0.72486615", "0.7216806", "0.7166888", "0.71431065", "0.712895", "0.71287763", "0.7103269", "0.70823693", "0.7043945", "0.7030463", "0.70238966", "0.69759995", "0.6917639", "0.69052017", "0.6869747", "0.68616885", "0.6827708", "0.6802305", "0.68008775", "0.67806834", "0.6773081", "0.676784", "0.67663133", "0.6746121", "0.67058307", "0.66862", "0.66713536", "0.66711885", "0.6646804", "0.6644723", "0.6634024", "0.6602166", "0.65687317", "0.6505571", "0.64727783", "0.64722943", "0.64697623", "0.6442367", "0.6424455", "0.6397434", "0.63814956", "0.63703966", "0.634499", "0.6335848", "0.6325811", "0.6317969", "0.63075376", "0.6300376", "0.6291785", "0.6285172", "0.6267389", "0.62620914", "0.62608504", "0.6260776", "0.62602067", "0.6237257", "0.62276375", "0.62243354", "0.6222751", "0.6172773", "0.6158618", "0.6157803", "0.61495787", "0.61406493", "0.61343116", "0.61303633", "0.61277753", "0.61202335", "0.61057866", "0.60939014", "0.60556394", "0.600382", "0.5976995", "0.59621304", "0.59580415", "0.5922952", "0.59097993", "0.59015316", "0.5896459", "0.58866507", "0.58853716", "0.5884336", "0.58546996", "0.5853655", "0.58508193", "0.5824462", "0.5821516", "0.58026946", "0.5802489", "0.5791976", "0.5783649", "0.57701313", "0.5763896", "0.5760919", "0.57444686", "0.5744287" ]
0.7287419
4
Utility method to copy a file from one directory to another
public static void copyFile(final String fileName, final String fromDir, final String toDir) throws IOException { FileUtils.copyFile(new File(fromDir, fileName), new File(toDir, fileName)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from); // set path of source directory from parent function\r\n Path dest = Paths.get(to); // set path of destination directory from parent function\r\n Files.copy(src, dest); //inbuilt function to copy files\r\n \r\n }", "void copyFile(String sourceFile, String destinationFile) throws IOException;", "void copyFile(String sourceFile, String destinationFile, boolean overwrite) throws IOException;", "public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from);\r\n Path dest = Paths.get(to);\r\n Files.copy(src, dest, StandardCopyOption.REPLACE_EXISTING);\r\n }", "public static void copyFile(final String fromPath, final String toPath) throws IOException {\n FileUtils.copyFileToDirectory(new File(fromPath), new File(toPath));\n }", "private static boolean copyDirectory(File from, File to)\n {\n return copyDirectory(from, to, (byte[])null);\n }", "public static void copyFile(File from, File to) throws IOException {\r\n FileInputStream in = new FileInputStream(from);\r\n copyFile(in, to);\r\n }", "private static void copyFile(File in, File out)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFileChannel inChannel = new\tFileInputStream(in).getChannel();\n\t\t\tFileChannel outChannel = new FileOutputStream(out).getChannel();\n\t\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\t\t\tinChannel.close();\n\t\t\toutChannel.close();\t\t\t\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.copyFile(): \" + e);\n\t\t}\n\n\t}", "public static void copyFileToDir(File src, File dst) throws IOException {\n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n File file = new File(dstAbsPath + File.separator + src.getName());\n copyFile(src, file);\n }", "private void copy(File src, File dst) throws IOException \r\n {\r\n InputStream in = new FileInputStream(src);\r\n OutputStream out = new FileOutputStream(dst);\r\n \r\n // Transfer bytes from in to out\r\n byte[] buf = new byte[1024];\r\n int len;\r\n while ((len = in.read(buf)) > 0) \r\n {\r\n out.write(buf, 0, len);\r\n }\r\n in.close();\r\n out.close();\r\n }", "public static void copyPath(Path source, Path target) {\n try {\n Files.copy(source, target);\n if (Files.isDirectory(source)) {\n try (Stream<Path> files = Files.list(source)) {\n files.forEach(p -> copyPath(p, target.resolve(p.getFileName())));\n }\n }\n } catch (IOException e) { e.printStackTrace(); }\n }", "public static void copyFile(File src, File dst) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"Source file does not exist: \" + src);\n }\n \n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n try (InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dst)) {\n\n // Transfer bytes from in to out\n byte[] buf = new byte[10240];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n } catch (IOException e) {\n logger.warn(\"Unable to copy file \" + e.getMessage(), e);\n throw new IOException(\"Unable to copy file \", e);\n }\n }", "public void copyOne(String from, String to) {\n\t\tFile source = new File(from);\n\t\tif (sourceExists(source)) {\n\t\t\tFile target = new File(to);\n\t\t\ttry{\n\t\t\t\tif(!targetExists(target)){\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath());\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName()\n\t\t\t\t\t\t\t+ \" COPIED!\");\n\t\t\t\t} else if (target.exists() && confirmReplace()) {\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath(),\n\t\t\t\t\t\t\tREPLACE_EXISTING);\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName() + \" REPLACED!\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"File WASN'T copied!\");\n\t\t\t\t}\n\t\t\t}catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private static void copyFile(File scrFile, File file) {\n\t\r\n}", "private void copyFile(String source, String destination) throws IOException {\n File inputFile = new File(source);\n File outputFile = new File(destination);\n\t\n BufferedInputStream in = new BufferedInputStream(\n\t\t\t\t new FileInputStream(inputFile));\n BufferedOutputStream out = new BufferedOutputStream(\n\t\t\t\t new FileOutputStream(outputFile));\n int c;\n\tbyte[] tmp = new byte[4096];\n\t\n while ((c = in.read(tmp, 0, 4096)) != -1)\n\t out.write(tmp, 0, c);\n\t\n in.close();\n out.close();\n }", "private static void copyFile(String from, String to)\n\t{\n\t\tFile inputFile;\n\t File outputFile;\n\t\tint fIndex = from.indexOf(\"file:\");\n\t\tint tIndex = to.indexOf(\"file:\");\n\t\tif(fIndex < 0)\n\t\t\tinputFile = new File(from);\n\t\telse\n\t\t\tinputFile = new File(from.substring(fIndex + 5, from.length()));\n\t\tif(tIndex < 0)\n\t\t\toutputFile = new File(to);\n\t\telse\n\t\t\toutputFile = new File(to.substring(tIndex + 5, to.length())); \n\t\tcopyFile(inputFile, outputFile);\t\t\n\t}", "@SuppressWarnings(\"resource\")\r\n\tpublic static synchronized void copyFile(File source, File dest)\r\n\t\t\tthrows IOException {\r\n\t\tFileChannel srcChannel = null;\r\n\t\tFileChannel dstChannel = null;\r\n\t\ttry {\r\n\t\t\tsrcChannel = new FileInputStream(source).getChannel();\r\n\t\t\tdstChannel = new FileOutputStream(dest).getChannel();\r\n\t\t\tdstChannel.transferFrom(srcChannel, 0, srcChannel.size());\r\n\t\t} finally {\r\n\t\t\tsrcChannel.close();\r\n\t\t\tdstChannel.close();\r\n\t\t}\r\n\t}", "public static void copyFile(final File from, final File toDir) throws IOException {\n if (!from.canRead()) {\n throw new IOException(\"Cannot read file '\" + from + \"'.\");\n }\n if (toDir.exists() && (!toDir.canWrite())) {\n throw new IOException(\"Cannot write to file '\" + toDir + \"'.\");\n }\n toDir.getParentFile().mkdirs();\n FileUtils.copyFile(from, toDir);\n }", "public static void copyFile(File source, File destination) throws IOException {\n\tFileChannel sourceChannel = null;\n\tFileChannel destinationChannel = null;\n\ttry {\n\t if (destination.exists()) {\n\t\tdestination.delete();\n\t }\n\t sourceChannel = new FileInputStream(source).getChannel();\n\t destinationChannel = new FileOutputStream(destination).getChannel();\n\t int maxCount = (64 * 1024 * 1024) - (32 * 1024);// magic number for Windows, 64Mb - 32Kb\n\t long size = sourceChannel.size();\n\t long position = 0;\n\t while (position < size) {\n\t\tposition += sourceChannel.transferTo(position, maxCount, destinationChannel);\n\t }\n\t} catch (IOException e) {\n\t throw e;\n\t} finally {\n\t if (null != sourceChannel) {\n\t\tsourceChannel.close();\n\t }\n\t if (null != destinationChannel) {\n\t\tdestinationChannel.close();\n\t }\n\t}\n }", "public static void copyFile(File src, File dst) throws IOException {\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(dst);\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) out.write(buf, 0, len);\n in.close();\n out.close();\n }", "private void copyFile( final File source, final File target )\n throws MojoExecutionException\n {\n if ( source.exists() == false )\n {\n throw new MojoExecutionException( \"Source file '\" + source.getAbsolutePath() + \"' does not exist!\" );\n }\n if ( target.exists() == true )\n {\n throw new MojoExecutionException( \"Target file '\" + source.getAbsolutePath() + \"' already existing!\" );\n }\n\n try\n {\n this.logger.debug( \"Copying file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'.\" );\n PtFileUtil.copyFile( source, target );\n }\n catch ( PtException e )\n {\n throw new MojoExecutionException( \"Could not copy file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'!\", e );\n }\n }", "public static void copyFiles(File src, File dest) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"copyFiles: Can not find source: \" + src.getAbsolutePath() + \".\");\n } else if (!src.canRead()) { //check to ensure we have rights to the source...\n throw new IOException(\"copyFiles: No right to source: \" + src.getAbsolutePath() + \".\");\n }\n //is this a directory copy?\n if (src.isDirectory()) {\n if (!dest.exists()) { //does the destination already exist?\n //if not we need to make it exist if possible (note this is mkdirs not mkdir)\n if (!dest.mkdirs()) {\n throw new IOException(\"copyFiles: Could not create direcotry: \" + dest.getAbsolutePath() + \".\");\n }\n }\n //get a listing of files...\n String list[] = src.list();\n //copy all the files in the list.\n for (int i = 0; i < list.length; i++) {\n File dest1 = new File(dest, list[i]);\n File src1 = new File(src, list[i]);\n copyFiles(src1, dest1);\n }\n } else {\n //This was not a directory, so lets just copy the file\n try {\n copy(new FileInputStream(src), new FileOutputStream(dest));\n } catch (IOException e) { //Error copying file...\n IOException wrapper = new IOException(\"copyFiles: Unable to copy file: \"\n + src.getAbsolutePath() + \"to\" + dest.getAbsolutePath() + \".\");\n wrapper.initCause(e);\n wrapper.setStackTrace(e.getStackTrace());\n throw wrapper;\n }\n }\n }", "private void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n //Check if sourceFolder is a directory or file\n //If sourceFolder is file; then copy the file directly to new location\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n logAppend(\"Directory created :: \" + destinationFolder);\n nothingDone=false;\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n\n long dateSrc = sourceFolder.lastModified();\n long dateDest = destinationFolder.lastModified();\n\n if (dateSrc > dateDest) {\n //Copy the file content from one place to another\n Files.copy(sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n logAppend(\"File copied :: \" + destinationFolder);\n nothingDone=false;\n }\n\n }\n }", "public static long copyFile(File source, File dest) throws IOException {\n\n\t\tif (source.isDirectory() || dest.isDirectory())\n\t\t\tthrow new IOException(\"wont copy directories\");\n\t\tInputStream i = null;\n\t\ttry {\n\t\t\ti = getInputStreamFromFile(source);\n\n\t\t\t// create parent directories\n\t\t\tif (dest.getParentFile().mkdirs()) {\n\t\t\t\t// all good\n\t\t\t} else\n\t\t\t\tthrow new IOException(\"\\\"\" + dest + \"\\\" cannot be created\");\n\t\t\treturn writeStreamToFile(i, dest);\n\n\t\t} finally {\n\t\t\tif (i != null)\n\t\t\t\ti.close();\n\t\t}\n\t}", "public static void copyFolder(File src, File dest) throws IOException {\n\n\t\tif (src.isDirectory()) {\n\n\t\t\t// if directory not exists, create it\n\t\t\tif (!dest.exists()) {\n\t\t\t\tdest.mkdir();\n\t\t\t\t// System.out.println(\"Directory copied from \" + src + \" to \" +\n\t\t\t\t// dest);\n\t\t\t}\n\n\t\t\t// list all the directory contents\n\t\t\tString files[] = src.list();\n\n\t\t\tfor (String file : files) {\n\t\t\t\t// construct the src and dest file structure\n\t\t\t\tFile srcFile = new File(src, file);\n\t\t\t\tFile destFile = new File(dest, file);\n\t\t\t\t// recursive copy\n\t\t\t\tcopyFolder(srcFile, destFile);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if file, then copy it\n\t\t\t// Use bytes stream to support all file types\n\t\t\tInputStream in = new FileInputStream(src);\n\t\t\tOutputStream out = new FileOutputStream(dest);\n\n\t\t\tbyte[] buffer = new byte[1024];\n\n\t\t\tint length;\n\t\t\t// copy the file content in bytes\n\t\t\twhile ((length = in.read(buffer)) > 0) {\n\t\t\t\tout.write(buffer, 0, length);\n\t\t\t}\n\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t// System.out.println(\"File copied from \" + src + \" to \" + dest);\n\t\t}\n\t}", "private void copyFile(String source, String destination, Environment env) throws IOException, InvalidPathException {\n\t\tPath sourcePath = Paths.get(source);\n\t\tPath destinationPath = Paths.get(destination);\n\n\t\tif (sourcePath.equals(destinationPath)) {\n\t\t\tenv.writeln(\"The source and the destination can not be equal.\");\n\t\t\treturn;\n\t\t}\n\t\tif (!Files.exists(sourcePath)) {\n\t\t\tenv.writeln(\"The specified file does not exist.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(sourcePath)) {\n\t\t\tenv.writeln(\"Copy command can not copy a directory.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(destinationPath)) {\n\t\t\tdestinationPath = Paths.get(destinationPath.toString(), sourcePath.getFileName().toString());\n\t\t}\n\t\tif (Files.exists(destinationPath)) {\n\t\t\tenv.write(\n\t\t\t\t\t\"There already is a file with the same name at the specified destination. \\nDo you want to overwrite it? [y/n] \");\n\n\t\t\twhile (true) {\n\t\t\t\tString answer;\n\t\t\t\ttry {\n\t\t\t\t\tanswer = env.readLine().trim();\n\t\t\t\t} catch (ShellIOException ex) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (answer.equals(\"n\")) {\n\t\t\t\t\tenv.writeln(\"Operation canceled.\");\n\t\t\t\t\treturn;\n\t\t\t\t} else if (answer.equals(\"y\")) {\n\t\t\t\t\tenv.writeln(\"Operation confirmed.\");\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tenv.writeln(\"Invalid answer. Answer 'y' for 'yes' or 'n' for 'no'.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tBufferedInputStream inputStream = new BufferedInputStream(Files.newInputStream(sourcePath));\n\t\tBufferedOutputStream outputStream = new BufferedOutputStream(Files.newOutputStream(destinationPath));\n\t\twhile (true) {\n\t\t\tint b = inputStream.read();\n\t\t\tif (b == -1) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\toutputStream.write(b);\n\t\t}\n\n\t\tinputStream.close();\n\t\toutputStream.close();\n\t}", "public static void copyFileOrDirectory(String source, String destination) throws KubernetesPluginException {\n File src = new File(source);\n File dst = new File(destination);\n try {\n // if source is file\n if (Files.isRegularFile(Paths.get(source))) {\n if (Files.isDirectory(dst.toPath())) {\n // if destination is directory\n FileUtils.copyFileToDirectory(src, dst);\n } else {\n // if destination is file\n FileUtils.copyFile(src, dst);\n }\n } else if (Files.isDirectory(Paths.get(source))) {\n FileUtils.copyDirectory(src, dst);\n }\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Error while copying file\", e);\n }\n }", "public void copy(String name, String oldPath, String newPath);", "public Path copie(String source, String destination) throws IOException {\n Path root = Paths.get(source);\n Path cible = Paths.get(destination);\n\n Path copy;\n copy = Files.copy(root, cible.resolve(root.getFileName()), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n\n return copy;\n }", "public static void smartCopyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] fromFiles = fromDir.listFiles();\n \t\t\tint fromSize = fromFiles.length;\n \t\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), 550);\n \t\n \t\t\tFile[] toFiles = null;\n \t\n \t\t\t// delete old files and directories from this directory\n \t\t\tif (toDir.exists() && toDir.isDirectory()) {\n \t\t\t\ttoFiles = toDir.listFiles();\n \t\t\t\tint toSize = toFiles.length;\n \t\n \t\t\t\t// check if this exact file exists in the new directory\n \t\t\t\tfor (int i = 0; i < toSize; i++) {\n \t\t\t\t\tString name = toFiles[i].getName();\n \t\t\t\t\tboolean isDir = toFiles[i].isDirectory();\n \t\t\t\t\tboolean found = false;\n \t\t\t\t\tfor (int j = 0; j < fromSize; j++) {\n \t\t\t\t\t\tif (name.equals(fromFiles[j].getName()) && isDir == fromFiles[j].isDirectory())\n \t\t\t\t\t\t\tfound = true;\n \t\t\t\t\t}\n \t\n \t\t\t\t\t// delete file if it can't be found or isn't the correct type\n \t\t\t\t\tif (!found) {\n \t\t\t\t\t\tif (isDir)\n \t\t\t\t\t\t\tPublishUtil.deleteDirectory(toFiles[i], null);\n \t\t\t\t\t\telse\n \t\t\t\t\t\t\ttoFiles[i].delete();\n \t\t\t\t\t}\n \t\t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif (toDir.isFile())\n \t\t\t\t\ttoDir.delete();\n \t\t\t\ttoDir.mkdir();\n \t\t\t}\n \t\t\tmonitor.worked(50);\n \t\n \t\t\t// cycle through files and only copy when it doesn't exist\n \t\t\t// or is newer\n \t\t\ttoFiles = toDir.listFiles();\n \t\t\tint toSize = toFiles.length;\n \t\t\tint dw = 0;\n \t\t\tif (toSize > 0)\n \t\t\t\tdw = 500 / toSize;\n \t\n \t\t\tfor (int i = 0; i < fromSize; i++) {\n \t\t\t\tFile current = fromFiles[i];\n \t\n \t\t\t\t// check if this is a new or newer file\n \t\t\t\tboolean copy = true;\n \t\t\t\tif (!current.isDirectory()) {\n \t\t\t\t\tString name = current.getName();\n \t\t\t\t\tlong mod = current.lastModified();\n \t\t\t\t\tfor (int j = 0; j < toSize; j++) {\n \t\t\t\t\t\tif (name.equals(toFiles[j].getName()) && mod <= toFiles[j].lastModified())\n \t\t\t\t\t\t\tcopy = false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\n \t\t\t\tif (copy) {\n \t\t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\t\tString toFile = to;\n \t\t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\t\ttoFile += File.separator;\n \t\t\t\t\ttoFile += current.getName();\n \t\t\t\t\tif (current.isFile()) {\n \t\t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\t\tmonitor.worked(dw);\n \t\t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\t\tsmartCopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, dw));\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.worked(500 - dw * toSize);\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error smart copying directory \" + from + \" - \" + to, e);\n \t\t}\n \t}", "public static void copyFile(InputStream in, File to) throws IOException {\r\n FileOutputStream out = new FileOutputStream(to);\r\n int len;\r\n byte[] buffer = new byte[4096];\r\n while ((len = in.read(buffer)) != -1) {\r\n out.write(buffer, 0, len);\r\n }\r\n out.close();\r\n in.close();\r\n }", "public static IStatus copyFile(String from, String to) {\n \t\ttry {\n \t\t\treturn copyFile(new FileInputStream(from), to);\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t}\n \t}", "private static void copyFiles(File source, File dest) throws IOException {\n\t\tif(!source.equals(dest))\n\t\t\tFileUtils.copyFile(source, dest);\n\t}", "public void copyFile(String src, String dst) throws IOException {\n\n\t\tFile srcFile = new File(src);\n\t\tFile dstFile = new File(dst);\n\n\t\tcopyFile(srcFile, dstFile);\n\t}", "static void copyFile(File src, File dest) throws IOException {\r\n\t\tFileInputStream fis = new FileInputStream(src);\r\n\t\tFileOutputStream fos = new FileOutputStream (dest);\r\n\t\tbyte[] bytes = new byte[4*1048576];\r\n\t\tint numRead;\r\n\t\twhile ((numRead = fis.read(bytes)) > 0) {\r\n\t\t\tfos.write(bytes, 0, numRead);\r\n\t\t}\r\n\t\tfis.close();\r\n\t\tfos.close();\r\n\t}", "void copyFile(File sourcefile, File targetfile) throws Exception {\n\t\tif(targetfile.exists()) targetfile.delete();\n\t\ttargetfile.createNewFile();\n\t\tFileChannel source = null;\n\t\tFileChannel target = null;\n\t\ttry{\n\t\t\tsource = new FileInputStream(sourcefile).getChannel();\n\t\t\ttarget = new FileOutputStream(targetfile).getChannel();\n\t\t\ttarget.transferFrom(source, 0, source.size());\n\t\t}\n\t\tfinally{\n\t\t\tif(source!=null) source.close();\n\t\t\tif(target!=null) target.close();\n\t\t}\n\t\ttargetfile.setLastModified(sourcefile.lastModified());\n\t}", "public void copyFile(File src, File dst) throws IOException {\n\t\tInputStream in = new FileInputStream(src);\n\t\tOutputStream out = new FileOutputStream(dst);\n\n\t\t// Transfer bytes from in to out\n\t\tbyte[] buf = new byte[1024];\n\t\tint len;\n\t\twhile ((len = in.read(buf)) > 0) {\n\t\t\tif(logger.isDebugEnabled())\n\t\t\t\tlogger.debug(\"Copiando fichero \" + src.getAbsolutePath() + \" a \"\n\t\t\t\t\t+ dst.getAbsolutePath());\n\t\t\tout.write(buf, 0, len);\n\t\t}\n\t\tin.close();\n\t\tout.close();\n\t}", "public static void copyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] files = fromDir.listFiles();\n \t\n \t\t\ttoDir.mkdir();\n \t\n \t\t\t// cycle through files\n \t\t\tint size = files.length;\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), size * 50);\n \t\n \t\t\tfor (int i = 0; i < size; i++) {\n \t\t\t\tFile current = files[i];\n \t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\tString toFile = to;\n \t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\ttoFile += File.separator;\n \t\t\t\ttoFile += current.getName();\n \t\t\t\tif (current.isFile()) {\n \t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\tmonitor.worked(50);\n \t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\tcopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, 50));\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying directory\", e);\n \t\t}\n \t}", "public static IStatus copyFile(URL from, String to) {\n \t\ttry {\n \t\t\treturn copyFile(from.openStream(), to);\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t}\n \t}", "public static final void copy(String source, String destination) {\n File sourceFile = new File(source);\n File destFile = new File(destination);\n\n if (destFile.exists()) {\n // Information error all ready exist the file\n }\n\n if (!sourceFile.exists()) {\n // General Server Error\n }\n\n if (sourceFile.isDirectory()) {\n copyDirectory(source, destination);\n } else {\n copyFile(source, destination);\n }\n\n //delete source folder after copy-paste\n }", "public static void copy(URL src, File dst) throws IOException {\n\n try (InputStream in = src.openStream()) {\n try (OutputStream out = new FileOutputStream(dst)) {\n dst.mkdirs();\n copy(in, out);\n }\n }\n }", "private File copyResources(String srcFileName, File sourceDir, File destinationDir) throws MojoExecutionException {\n File srcFile = new File(sourceDir.getAbsolutePath()+File.separator+srcFileName);\n if (srcFile.exists()) {\n getLog().info(\"Copying \"+srcFile.getName()+\"...\");\n try {\n File destFile = new File(destinationDir.getAbsolutePath()+File.separator+srcFile.getName());\n if (srcFile.isDirectory()) {\n FileUtils.copyDirectory(srcFile, destFile, false);\n } else {\n FileUtils.copyFile(srcFile, destFile, false);\n }\n return destFile;\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying resource '\"+srcFile.getName()+\"'\", ex);\n }\n } else {\n getLog().warn(\"No source file '\"+srcFile.getName()+\"' to copy\");\n return null;\n }\n }", "public static void copyDirectory(File sourceDir, File targetDir) throws IOException {\n File[] srcFiles = sourceDir.listFiles();\n if (srcFiles != null) {\n for (int i = 0; i < srcFiles.length; i++) {\n File dest = new File(targetDir, srcFiles[i].getName());\n if (srcFiles[i].isDirectory() && FileUtils.safeIsRealDirectory(srcFiles[i])) {\n if (!dest.exists()) {\n dest.mkdirs();\n }\n copyDirectory(srcFiles[i], dest);\n } else {\n if (!dest.exists()) {\n dest.createNewFile();\n }\n copyFile(srcFiles[i].getAbsolutePath(), new File(targetDir,\n srcFiles[i].getName()).getAbsolutePath());\n }\n }\n }\n }", "private void copyFile(InputStream ins, OutputStream outs) throws IOException {\n byte[] buffer = new byte[1024];\n int read;\n while((read = ins.read(buffer)) != -1) {\n outs.write(buffer, 0, read);\n }\n }", "final public VFile copyTo(VDir parentDir) throws VlException\n {\n //return (VFile)doCopyMoveTo(parentDir,null,false /*,options*/);\n return (VFile)this.getTransferManager().doCopyMove(this,parentDir,null,false); \n }", "public static void copy(String destdir, String pathfile) throws Exception {\r\n \t\tFile file = new File(pathfile);\r\n \t\tFile destDir = new File(destdir);\r\n \t\tcopy(destDir, file);\r\n\t}", "public static void copyFile(File sourceFile, File destFile)\n throws IOException {\n if (!destFile.exists()) {\n destFile.createNewFile();\n }\n FileChannel source = null;\n FileChannel destination = null;\n try {\n source = new FileInputStream(sourceFile).getChannel();\n destination = new FileOutputStream(destFile).getChannel();\n destination.transferFrom(source, 0, source.size());\n } catch (Exception e) {} finally {\n if (source != null) {\n source.close();\n }\n if (destination != null) {\n destination.close();\n }\n }\n }", "public static void Copy(File toCopy, File destination) throws IOException {\n\t\tInputStream in = new BufferedInputStream(new FileInputStream(toCopy));\n\t\tOutputStream out = new BufferedOutputStream(new FileOutputStream(destination));\n\n\t\tbyte[] buffer = new byte[1024];\n\t\tint lengthRead;\n\t\twhile ((lengthRead = in.read(buffer)) > 0) {\n\t\t\tout.write(buffer, 0, lengthRead);\n\t\t\tout.flush();\n\t\t}\n\t\tout.close();\n\t\tin.close();\n\t}", "public void copyFile(File src, File dst) throws IOException {\n File file = new File(dst + File.separator + src.getName());\n file.createNewFile();\n Log.i(\"pictureSelect\", \"Dest file: \" + file.getAbsolutePath());\n\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(file);\n\n // Transfer bytes from in to out\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n in.close();\n out.close();\n scanSD(file);\n }", "public void copyFile(@NonNull File sourceFile, @NonNull File destFile) throws IOException {\n if (!destFile.getParentFile().exists()) {\n if (!destFile.getParentFile().mkdirs())\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_NOT_CREATED);\n } else {\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_ALREADY_EXISTS);\n }\n\n if (!destFile.exists()) {\n if (!destFile.createNewFile())\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_NOT_CREATED);\n } else\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_ALREADY_EXISTS);\n\n try (\n FileChannel source = new FileInputStream(sourceFile).getChannel();\n FileChannel destination = new FileOutputStream(destFile).getChannel();\n ) {\n destination.transferFrom(source, 0, source.size());\n }\n }", "private void migrate (String name)\t{\n\t\ttry{\n\t\t\tFile f1 = new File( sourceDir + name);\n\t\t\t\n\t\t\tif (!f1.exists())\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tFile f2 = new File(targetDir +name);\n\t\t\t\n\t\t InputStream in = new FileInputStream(f1);\n\t\t \n\t\t OutputStream out = new FileOutputStream(f2);\n\n\t\t byte[] buf = new byte[1024];\n\t\t int len;\n\t\t while ((len = in.read(buf)) > 0){\n\t\t out.write(buf, 0, len);\n\t\t }\n\t\t in.close();\n\t\t out.close();\n\t\t System.out.println(\"File copied.\");\n\t\t }\n\t\t catch(FileNotFoundException ex){\n\t\t System.out.println(ex.getMessage() + \" in the specified directory.\");\n\t\t System.exit(0);\n\t\t }\n\t\t catch(IOException e){\n\t\t System.out.println(e.getMessage()); \n\t\t }\n\t}", "private static void copyFile(Path srcPath, Path destPath) throws IOException {\n try (FileWriter outputStream = new FileWriter(destPath.toFile().getAbsolutePath(), false);\n FileReader inputStream = new FileReader(srcPath.toFile().getAbsolutePath())) {\n int i;\n while ((i = inputStream.read()) != -1) {\n outputStream.write(toChars(i));\n }\n }\n }", "private void moveFilesToDiffDirectory(Path sourcePath, Path destinationPath) {\n try {\n Files.move(sourcePath, destinationPath,\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n //moving file failed.\n e.printStackTrace();\n }\n }", "public void copy(){\n\t\tFileInputStream is = null;\n\t\tFileOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(source);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\tif(dest.exists())\n\t\t\t\tdest.delete();\n\t\t\tint i = -1;\n\t\t\twhile((i = is.read()) != -1)\n\t\t\t\tos.write(i);\n\t\t\tsource.deleteOnExit();\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t} finally {\n\t\t\tif(is != null)\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException ignored) {}\n\t\t\tif(os != null)\n\t\t\t\ttry {\n\t\t\t\t\tos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t\t\t}\n\t\t}\n\t}", "public void copyImageFile() throws IOException {\n Path sourcePath = imageFile.toPath();\n\n String selectFileName = imageFile.getName();\n\n Path targetPath = Paths.get(\"/Users/houumeume/IdeaProjects/Assignment2/image/\" + selectFileName);\n\n //copy the file to the new directory\n Files.copy(sourcePath, targetPath, StandardCopyOption.REPLACE_EXISTING);\n\n //update the imageFile to point to the new File\n imageFile = new File(targetPath.toString());\n }", "public static void copyDirectory(File destDir, File sourceDir, boolean mkdirs) throws Exception {\r\n\t\tif (!destDir.exists() && !destDir.isDirectory()) {\r\n\t\t\tif (mkdirs) destDir.mkdirs();\r\n\t\t\telse return;\r\n\t\t}\r\n\t\tFile[] containedFiles = sourceDir.listFiles();\r\n\t\tfor (int i = 0; i < containedFiles.length; i++) {\r\n\t\t\tFile aFile = containedFiles[i];\r\n\t\t\tif (aFile.isFile()) copy(destDir, aFile);\r\n\t\t\telse {\r\n\t\t\t\tString dirName = aFile.getName();\r\n\t\t\t\tFile newDir = new File(destDir.getAbsolutePath() + File.separatorChar + dirName);\r\n\t\t\t\tcopyDirectory(newDir, aFile, mkdirs);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void copyOrMoveFile(File file, File dir,boolean isCopy) throws IOException {\n File newFile = new File(dir, file.getName());\n FileChannel outChannel = null;\n FileChannel inputChannel = null;\n try {\n outChannel = new FileOutputStream(newFile).getChannel();\n inputChannel = new FileInputStream(file).getChannel();\n inputChannel.transferTo(0, inputChannel.size(), outChannel);\n inputChannel.close();\n if(!isCopy)\n file.delete();\n } finally {\n if (inputChannel != null) inputChannel.close();\n if (outChannel != null) outChannel.close();\n }\n }", "public void copyFile(String oldPath, String newPath) {\n\t\ttry {\n\t\t\tint byteread = 0;\n\t\t\tFile oldfile = new File(oldPath);\n\t\t\tif (oldfile.exists()) {\n\t\t\t\tFileInputStream oldStream = new FileInputStream(oldPath);\n\t\t\t\tFileOutputStream newStream = new FileOutputStream(newPath);\n\t\t\t\tbyte[] buffer = new byte[1024];\n\t\t\t\twhile ((byteread = oldStream.read(buffer)) != -1) {\n\t\t\t\t\tnewStream.write(buffer, 0, byteread);\n\t\t\t\t}\n\t\t\t\tnewStream.close();\n\t\t\t\toldStream.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void copyFileSourceToDestination(File src, File dest) throws IOException {\n\t\tInputStream is = null;\n\t\tOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(src);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\t// buffer size 1K\n\t\t\tbyte[] buf = new byte[1024];\n\t\t\tint bytesRead;\n\t\t\twhile ((bytesRead = is.read(buf)) > 0) {\n\t\t\t\tos.write(buf, 0, bytesRead);\n\t\t\t}\n\t\t} finally {\n\t\t\tis.close();\n\t\t\tos.close();\n\t\t}\n\t}", "private int copy(String from, String to, int flag) {\n\n File fromFile = new File(rootPath + from);\n if (!fromFile.exists()) {\n return ERROR_FILE_NOT_EXIST;\n }\n\n if ((flag & FLAG_FORCE) != 0) {\n delete(to);\n }\n\n if (createFile(to) < 0) {\n return ERROR_FILE_ALREADY_EXIST;\n }\n\n File toFile = new File(rootPath + to);\n if (!toFile.setWritable(true)) {\n return ERROR;\n }\n\n try {\n BufferedInputStream inputStream = new BufferedInputStream(new FileInputStream(fromFile));\n BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(toFile));\n byte[] buf = new byte[BUF_SIZE];\n // TODO : it limits file size to INTEGER!!\n int offset = 0;\n int read = 0;\n while((read = inputStream.read(buf)) >= 0) {\n outputStream.write(buf, offset, read);\n offset += read;\n }\n inputStream.close();\n outputStream.close();\n } catch (FileNotFoundException e) {\n // file not found\n return ERROR_FILE_NOT_EXIST;\n } catch (IOException e) {\n // IO Exception\n return ERROR;\n }\n\n return OK;\n }", "public void copyDirectory(String srcDirName, String dstDirName)\n\t\t\tthrows IOException {\n\t\tFile srcDir = new File(srcDirName);\n\t\tFile dstDir = new File(dstDirName);\n\t\tcopyDirectory(srcDir, dstDir);\n\t}", "public static void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n System.out.println(sourceFolder.toString());\n System.out.println(destinationFolder.toString());\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n //System.out.println(\"Directory created :: \" + destinationFolder); // debug\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n Files.copy(\n sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n //System.out.println(\"File copied :: \" + destinationFolder); // debug\n }\n }", "void moveFile(String pathToFile, String pathDirectory);", "public static void copyFolder(final String sourcePath, final String targetPath)\n\t{\n\t\tFile tfile = new File(targetPath);\n\t\ttfile.mkdirs();\n\t\tFile sfile = new File(sourcePath);\n\t\tfinal FilenameFilter ffilter = new FilenameFilter()\n\t\t{\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean accept(File dir, String name)\n\t\t\t{\n\t\t\t\tif( name.startsWith(\".svn\"))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tFile[] files = sfile.listFiles(ffilter);\n\t\t\n\t\tArrayList <File> cpFile = new ArrayList<File>();\n\t\tfor( int i=0;i<files.length;i++)\n\t\t{\n\t\t\tfinal File souFile = files[i];\n\t\t\tif( souFile.isDirectory())\n\t\t\t{\n\t\t\t\tfinal String souPath = souFile.getAbsolutePath();\n\t\t\t\tfinal String tarpath = targetPath + File.separator + souFile.getName();\n\t\t\t\ttraverseDir(souPath, ffilter, new IOnGetFileHandler()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n//\t\t\t\t\t\tcopyFile(file.getAbsolutePath(), tarpath +File.separator + file.getName());\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, new IOnGetFileHandler()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n\t\t\t\t\t\tcopyFolder(file.getAbsolutePath(), tarpath);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, null);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcpFile.add(souFile);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tcopyFiles(targetPath, cpFile);\n\t\t\n\t\t\n\t}", "public static void copyTree(File from, File to, FileFilter filter) throws IOException {\r\n File[] children;\r\n \r\n \tif (!from.exists()) {\r\n \t\tthrow new IOException (\"Source of copy \\'\" + from.getName() + \"\\' doesn't exist\");\r\n \t}\r\n \t\r\n \tif (to.getCanonicalPath().equals(from.getCanonicalPath())) {\r\n \t\tthrow new IOException (\"\\'\" + from.getName() + \"\\' cannot copy to itself\");\r\n \t}\r\n\r\n if (from.isDirectory()) {\r\n children = from.listFiles(filter);\r\n // just like cp command, if target exist, make a new folder into\r\n // the target, copy content into the target folder\r\n if (to.exists()) {\r\n \tif (to.isFile()) {\r\n \t\tthrow new IOException(\"Cannot overwrite non-directory \\'\" + to.getName() + \"\\' with directory \" + from.getName());\r\n \t}\r\n \t// copy into new directory name grafted after the existing one\r\n \tto = new File(to, from.getName());\r\n \tcopyTree(from, to, filter);\r\n \treturn;\r\n } else {\r\n \t// copy into new directory name\r\n \tto.mkdir(); \t\r\n for (int i = 0; i < children.length; i++) {\r\n File curto = new File(to, children[i].getName());\r\n \r\n copyTree(children[i], curto, filter);\r\n }\r\n return;\r\n }\r\n }\r\n else {\r\n \tif (to.isDirectory()) {\r\n \t\tto = new File (to, from.getName());\r\n \t}\r\n copyFile(from, to);\r\n return;\r\n }\r\n \r\n }", "public void copyFile(String inputFile, String outputFile)\r\n\t{\r\n\t\tif(new File(inputFile).exists())\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tInputStream in = new FileInputStream(inputFile);\r\n\t\t\t\tOutputStream out = new FileOutputStream(outputFile);\r\n\t\t\t\t// Transfer bytes from in to out\r\n\t\t\t\tbyte[] buf = new byte[1024];\r\n\t\t\t\tint length;\r\n\t\t\t\twhile ((length = in.read(buf)) > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tout.write(buf, 0, length);\r\n\t\t\t\t}\r\n\t\t\t\tin.close();\r\n\t\t\t\tout.close();\r\n\t\t\t\tSystem.out.println(inputFile + \" file copied to \" + outputFile);\r\n\t\t\t\tLog.info(inputFile + \" file copied.\");\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) \r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "public boolean copy(String path, InputStream is) throws SystemException;", "private File copyFiles(String filename, String directoryName) throws IOException { //after\n boolean success = false;\n String finalPath = this.rootLocation + \"/\" + directoryName +\"/\"+ filename;\n String tmpPath = this.tmpLocation + \"/\"+ filename;\n File finalFile = new File(finalPath);\n File directory = new File(this.rootLocation + \"/\" +directoryName);\n if (!directory.exists()) {\n directory.mkdir();\n }\n File tmpFile = new File(tmpPath);\n if(tmpFile.exists() && !tmpFile.isDirectory() && directory.exists() && directory.isDirectory()){\n if(finalFile.exists() && !finalFile.isDirectory()){\n finalFile = getNewName(finalPath);\n log.debug(\"compareToFiles -> rename to \"+ finalFile.getName());\n }\n success = copyFileUsingStream(tmpFile, finalFile);\n }\n\n log.debug(\"success copy...\"+success);\n return finalFile;\n }", "public void copyFile(String destination, String fileName, InputStream in) {\r\n try {\r\n // write the inputStream to a FileOutputStream\r\n OutputStream out = new FileOutputStream(new File(destination + fileName));\r\n int read = 0;\r\n byte[] bytes = new byte[1024];\r\n while ((read = in.read(bytes)) != -1) {\r\n out.write(bytes, 0, read);\r\n }\r\n in.close();\r\n out.flush();\r\n out.close();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "private static boolean backupAndCopyFile(File templateDir, File toDir, String filename) {\n File to = new File(toDir, filename);\n boolean rv = backupFile(to);\n File from = new File(templateDir, filename);\n boolean rv2 = WorkingDir.copyFile(from, to);\n return rv && rv2;\n }", "@Test(groups = \"Integration\")\n public void testCopyFileTo() throws Exception {\n File dest = Os.newTempFile(getClass(), \".dest.tmp\");\n File src = Os.newTempFile(getClass(), \".src.tmp\");\n try {\n Files.write(\"abc\", src, Charsets.UTF_8);\n host.copyTo(src, dest);\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n src.delete();\n dest.delete();\n }\n }", "public static IStatus copyFile(InputStream in, String to) {\n \t\tOutputStream out = null;\n \t\n \t\ttry {\n \t\t\tout = new FileOutputStream(to);\n \t\n \t\t\tint avail = in.read(buf);\n \t\t\twhile (avail > 0) {\n \t\t\t\tout.write(buf, 0, avail);\n \t\t\t\tavail = in.read(buf);\n \t\t\t}\n \t\t\treturn Status.OK_STATUS;\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t} finally {\n \t\t\ttry {\n \t\t\t\tif (in != null)\n \t\t\t\t\tin.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t\ttry {\n \t\t\t\tif (out != null)\n \t\t\t\t\tout.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t}\n \t}", "public static void copy(File destDir, File file) throws Exception {\r\n \t\tString name = file.getName();\r\n \t\tif (!destDir.exists()) destDir.mkdirs();\r\n \t\tFile oldFile = new File(destDir.getAbsolutePath() + File.separatorChar + name);\r\n \t\tif (oldFile.exists()) oldFile.delete();\r\n\t\tFile fileout = new File(destDir.getAbsolutePath() + File.separatorChar + name);\r\n\t FileInputStream fileinstr = new FileInputStream(file);\r\n\t FileOutputStream fileoutstr = new FileOutputStream(fileout);\r\n\t BufferedOutputStream bufout = new BufferedOutputStream(fileoutstr); \r\n\t byte [] b = new byte[1024];\r\n\t\tint len = 0;\r\n\t\twhile ( (len=fileinstr.read(b))!= -1 ) {\r\n\t\t bufout.write(b,0,len);\r\n\t\t}\r\n\t\tbufout.flush();\r\n\t\tbufout.close();\r\n\t\tfileinstr.close();\r\n\t}", "final public VFile copyTo(VFile targetFile) throws VlException\n {\n //return (VFile)doCopyMoveTo(parentDir,null,false /*,options*/);\n return (VFile)this.getTransferManager().doCopyMove(this,targetFile,false); \n }", "private boolean copyFile(File dest) {\n\t\tboolean result = false;\n\n\t\ttry {\n\t\t\tif (this.exists()) {\n\t\t\t\tif (!dest.exists()) dest.mkdirs();\n\t\t\t\t\n\t\t\t\tif (this.isDirectory() && dest.isDirectory()) {\n\t\t\t\t\tdest = new File(dest.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.mkdirs();\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isFile() && dest.isDirectory()) {\n\t\t\t\t\tdest = new File(dest.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.createNewFile();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isDirectory() && dest.isFile()) {\n\t\t\t\t\tdest = new File(dest.getParent().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.mkdirs();\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isFile() && dest.isFile()) {\n\t\t\t\t\tif (dest.exists()) {\n\t\t\t\t\t\tdest = new File(dest.getParent().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\t\tdest.createNewFile();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (this.getName().equals(dest.getName())) {\n\t\t\t\t\t\t//targetFile.deleteOnExit();\n\t\t\t\t\t\t//targetFile = new File(targetFile.getAbsolutePath());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tBufferedInputStream inBuff = null;\n\t\t\t\tBufferedOutputStream outBuff = null;\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tinBuff = new BufferedInputStream(new FileInputStream(this));\n\t\t\t\t\toutBuff = new BufferedOutputStream(new FileOutputStream(dest));\n\n\t\t\t\t\tbyte[] b = new byte[1024 * 5];\n\t\t\t\t\tint length;\n\t\t\t\t\twhile ((length = inBuff.read(b)) != -1) {\n\t\t\t\t\t\toutBuff.write(b, 0, length);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\toutBuff.flush();\n\t\t\t\t\t\n\t\t\t\t\tresult = true;\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}finally{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (inBuff != null) inBuff.close();\n\t\t\t\t\t\tif (outBuff != null) outBuff.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public void copyFileTo(String sourceFilename, String targetFilename)\r\n\tthrows FileNotFoundException, IOException {\r\n\t\tString theFileContent = readStringFromFile(sourceFilename);\r\n\t\toverwriteStringToFile(theFileContent, targetFilename);\r\n\t}", "public void copyDirectory(File sourceLocation, File targetLocation)\r\n\t\t\tthrows IOException {\r\n\r\n\t\tif (sourceLocation.isDirectory()) {\r\n\t\t\tif (!targetLocation.exists()) {\r\n\t\t\t\ttargetLocation.mkdir();\r\n\t\t\t}\r\n\r\n\t\t\tString[] children = sourceLocation.list();\r\n\t\t\tfor (int i = 0; i < children.length; i++) {\r\n\t\t\t\tcopyDirectory(new File(sourceLocation, children[i]), new File(\r\n\t\t\t\t\t\ttargetLocation, children[i]));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tInputStream in = new FileInputStream(sourceLocation);\r\n\t\t\tOutputStream out = new FileOutputStream(targetLocation);\r\n\t\t\t// Copy the bits from instream to outstream\r\n\t\t\tbyte[] buf = new byte[1024];\r\n\t\t\tint len;\r\n\t\t\twhile ((len = in.read(buf)) > 0) {\r\n\t\t\t\tout.write(buf, 0, len);\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tout.close();\r\n\t\t}\r\n\t}", "public static boolean copyFile(String src, String dst) {\n FileChannel inChannel = null;\n FileChannel outChannel = null;\n try {\n inChannel = new FileInputStream(new File(src)).getChannel();\n outChannel = new FileOutputStream(new File(dst)).getChannel();\n inChannel.transferTo(0, inChannel.size(), outChannel);\n } catch (FileNotFoundException e) {\n MessageGenerator.briefError(\"ERROR could not find/access file(s): \" + src + \" and/or \" + dst);\n return false;\n } catch (IOException e) {\n MessageGenerator.briefError(\"ERROR copying file: \" + src + \" to \" + dst);\n return false;\n } finally {\n try {\n if (inChannel != null)\n inChannel.close();\n if (outChannel != null)\n outChannel.close();\n } catch (IOException e) {\n MessageGenerator.briefError(\"Error closing files involved in copying: \" + src + \" and \" + dst);\n return false;\n }\n }\n return true;\n }", "@Test\n public void testCopyToTempDir() throws IOException {\n File fileA = null;\n\n try {\n fileA = File.createTempFile(\"fileA\", \"fileA\");\n System.out.println(fileA.getAbsolutePath());\n FileOutputStream fos = new FileOutputStream(fileA);\n InputStream sis = new StringInputStream(\"some content\");\n StreamUtil.copy(sis, fos);\n sis.close();\n fos.close();\n\n copyToTempDir(fileA);\n\n File fileACopy = new File(new File(getTempDirPath()), fileA.getName());\n assertTrue(fileACopy.exists());\n assertTrue(fileACopy.isFile());\n } finally {\n boolean deleted = fileA.delete();\n assertTrue(deleted);\n }\n\n File dirB = null;\n\n try {\n dirB = Files.createTempDirectory(\"dirB\").toFile();\n System.out.println(dirB.getAbsolutePath());\n\n copyToTempDir(dirB);\n\n File dirBCopy = new File(new File(getTempDirPath()), dirB.getName());\n assertTrue(dirBCopy.exists());\n assertTrue(dirBCopy.isDirectory());\n } finally {\n boolean deleted = dirB.delete();\n assertTrue(deleted);\n }\n }", "public static void copy(String owner, Path src, Path target) throws CWLException {\r\n final Path finalSrc = toFinalSrcPath(src);\r\n if (src.toFile().exists() && Files.isReadable(src)) {\r\n CopyOption[] options = new CopyOption[] {\r\n StandardCopyOption.COPY_ATTRIBUTES,\r\n StandardCopyOption.REPLACE_EXISTING\r\n };\r\n final Path finalTarget = toFinalTargetPath(src, target);\r\n if (!finalTarget.getParent().toFile().exists()) {\r\n logger.debug(\"mkdir \\\"{}\\\"\", finalTarget.getParent());\r\n mkdirs(owner, finalTarget.getParent());\r\n }\r\n logger.debug(\"copy \\\"{}\\\" to \\\"{}\\\"\", finalSrc, finalTarget);\r\n try {\r\n if (finalSrc.toFile().isDirectory()) {\r\n Files.walkFileTree(finalSrc, new FileVisitor<Path>() {\r\n @Override\r\n public FileVisitResult preVisitDirectory(Path dir,\r\n BasicFileAttributes attrs) throws IOException {\r\n Files.copy(dir, finalTarget.resolve(finalSrc.relativize(dir)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\r\n Files.copy(file, finalTarget.resolve(finalSrc.relativize(file)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\r\n throw exc;\r\n }\r\n });\r\n } else {\r\n Files.copy(finalSrc, finalTarget, options);\r\n }\r\n } catch (IOException e) {\r\n throw new CWLException(\r\n ResourceLoader.getMessage(\"cwl.io.copy.failed\",\r\n finalSrc.toString(),\r\n finalTarget.toString(),\r\n e.getMessage()),\r\n 255);\r\n }\r\n } else {\r\n throw new CWLException(ResourceLoader.getMessage(\"cwl.io.file.unaccessed\", finalSrc.toString()),\r\n 255);\r\n }\r\n }", "public static void copy(File srcDir, File relSrcFile, File destDir, File relDestFile) throws IOException {\n File finalSrcFile = (srcDir != null) ? new File(srcDir, relSrcFile.getPath()) : relSrcFile;\n File relDestDir = relDestFile.getParentFile();\n if (relDestDir != null) {\n File finalDestDir = (destDir != null) ? new File(destDir, relDestDir.getPath()) : relDestDir;\n finalDestDir.mkdirs();\n }\n File finalDestFile = new File(destDir, relDestFile.getPath());\n Files.copy(finalSrcFile.toPath(), finalDestFile.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n }", "public boolean copy(File target) {\n\t\tboolean result = false;\n\n\t\ttry{\n\t\t\tif (this.exists()) {\n\t\t\t\tif (this.isDirectory()) {\n\t\t\t\t\tthis.copyFile(target);\n\t\t\t\t\ttarget = new File(target.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tif (this.listFiles() != null) {\n\t\t\t\t\t\tfor (java.io.File file : this.listFiles()) {\n\t\t\t\t\t\t\tif (file.isDirectory()) ((File) file).copy(target);\n\t\t\t\t\t\t\telse if (file.isFile()) ((File) file).copyFile(target);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (this.isFile()) {\n\t\t\t\t\tthis.copyFile(target);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresult = true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn result;\n\t}", "public static void copyDirectory(File srcDir, File dstDir) throws IOException {\n if (srcDir.isDirectory()) {\n if (!dstDir.exists()) dstDir.mkdir();\n String[] children = srcDir.list();\n for (int i = 0; i < children.length; i++) copyDirectory(new File(srcDir, children[i]), new File(dstDir, children[i]));\n } else {\n copyFile(srcDir, dstDir);\n }\n }", "public boolean copy(File fileToLoadOrig, boolean withDuplicate, List<String> passedFiles) {\n //Let us get the current Date\n Date date = new Date();\n LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n int year = localDate.getYear();\n int month = localDate.getMonthValue();\n int day = localDate.getDayOfMonth();\n\n String destDirectoryPath = year + \"-\" + month + \"-\" + day;\n\n //check if directory is created\n\n File destDirecoty = new File(\"./testing/dest/\" + destDirectoryPath);\n System.out.println(\"the file path:\" + destDirecoty.getAbsolutePath());\n\n if (!destDirecoty.exists()) {\n System.out.println(\"creating a new directory with path:\" + destDirecoty.getAbsolutePath());\n boolean created = destDirecoty.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n System.out.println(\"Directory is created\");\n //Great, now let us check if the file already in the dirctory\n\n\n boolean duplicateFound = false;\n\n\n File[] sourceFiles = fileToLoadOrig.listFiles();\n\n for (File sourceFile : sourceFiles) {\n //let us get the file extension\n String sourceFileType = \"\";\n int location = sourceFile.getName().lastIndexOf('.');\n if (location > 0) {\n sourceFileType = sourceFile.getName().substring(location + 1);\n }\n //cool, let us go on\n String nestedDirectory;\n switch (sourceFileType) {\n case \"txt\":\n nestedDirectory = \"txt\";\n break;\n case \"pdf\":\n nestedDirectory = \"pdf\";\n break;\n case \"xls\":\n nestedDirectory = \"xls\";\n default:\n nestedDirectory = \"others\";\n }\n\n //check if the type directory is created or not\n File nestedDirecotyFile = new File(destDirecoty.getAbsolutePath()+\"/\" + nestedDirectory);\n System.out.println(\"the file path:\" + nestedDirecotyFile.getAbsolutePath());\n\n if (!nestedDirecotyFile.exists()) {\n System.out.println(\"creating a new directory with path:\" + nestedDirecotyFile.getAbsolutePath());\n boolean created = nestedDirecotyFile.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n\n\n\n File[] destinationFiles = nestedDirecotyFile.listFiles();\n\n for (File destinationFile : destinationFiles) {\n if (destinationFile.getName().equals(sourceFile.getName())) {\n if (withDuplicate) {\n int maxSeqNum = 0;\n //Let us find the last sequence of the destinationFile\n for (File fileForDuplicate : destinationFiles) {\n String[] fileParts = fileForDuplicate.getName().split(\"_\");\n if (fileParts.length == 2) {\n //got a split\n if (fileParts[0].equals(destinationFile.getName())) {\n maxSeqNum = Math.max(maxSeqNum, Integer.parseInt(fileParts[1]));\n }\n }else{\n new RuntimeException(\"Files were found with multiple _\");\n }\n }\n String newFilePath = sourceFile.getName() + \"_\" + (maxSeqNum + 1);\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + newFilePath));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n } else {\n // let us delete the destinationFile and replace it\n destinationFile.delete();\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n break;\n } else {\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n }\n\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n\n }\n return true;\n }", "static void copyFile(File srcFile, File destFile) {\n\t\ttry {\n\t\t\tLong start = System.currentTimeMillis();\n\t\t\tdestFile.createNewFile();\n\t\t\tInputStream oInStream = new FileInputStream(srcFile);\n\t\t\tOutputStream oOutStream = new FileOutputStream(destFile);\n\n\t\t\t// Transfer bytes from in to out\n\t\t\tbyte[] oBytes = new byte[1024];\n\t\t\tint nLength;\n\t\t\tBufferedInputStream oBuffInputStream = \n\t\t\t\t\tnew BufferedInputStream( oInStream );\n\t\t\twhile ((nLength = oBuffInputStream.read(oBytes)) > 0) {\n\t\t\t\toOutStream.write(oBytes, 0, nLength);\n\t\t\t}\n\t\t\toInStream.close();\n\t\t\toOutStream.close();\n\t\t\tLong end = System.currentTimeMillis();\n\t\t\tSystem.out.println((end-start));\n\t\t} catch (IOException e) {\n\t\t\tlogger.info(\"Error in creating the excels :\" +e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void copy(String file1, String file2) throws FileNotFoundException{\r\n\t\tFile original = new File(file1);\r\n\t\tFile copied = new File(file2);\r\n\t\t\r\n\t\tScanner input = new Scanner(original);\r\n\t\tPrintWriter output = new PrintWriter(copied);//writes new file\r\n\t\t\r\n\t\twhile(input.hasNextLine()){\r\n\t\t\tString next = input.nextLine();\r\n\t\t\toutput.println(next);\t\t\t\r\n\t\t}\r\n\t\toutput.close();\r\n\t\tinput.close();\r\n\t}", "final public VFile copyTo(VDir parentDir,String newName) throws VlException\n {\n return (VFile)this.getTransferManager().doCopyMove(this,parentDir,newName,false);\n //return (VFile)doCopyMoveTo(parentDir,newName,false /*,options*/);\n }", "public void moveDirectory(String source, String target) throws IOException{\n Path sourceFilePath = Paths.get(PWD.getPath()+\"/\"+source);\n Path targetFilePath = Paths.get(PWD.getPath()+\"/\"+target);\n //using builtin move function which uses Paths\n Files.move(sourceFilePath,targetFilePath);\n }", "void moveFileToDirectoryWithConvertedFiles(String pathToFile);", "final public VFile copyToDir(VRL directoryVRL) throws VlException\n {\n VRL destVRL= directoryVRL.append(getBasename()); \n return (VFile)this.getTransferManager().doCopyMove(this,destVRL,false);\n }", "public static void copyDirectories (File d1, File d2){\n //checks for the console\n System.out.println(\"->Executing copyDirectories\");\n \n if(!d1.isDirectory()){\n //We will search the files and then move them recursive\n copyFyles(d1, d2);\n }//end if directory\n else{\n //Copy d1 to d2, as they are files\n \n //Creating the directory d2 if it does not exist yet.\n if(!d2.exists()){\n d2.mkdir();\n System.out.println(\"Creating directory: \"+d2);\n }//end if creating directori\n \n /* 1. Obtein the list of the existing files in the directory\n 2. Call recursivily this method to copy each of the files \n */\n System.out.println(\"Searching in the directory: \"+d1);\n String files[] = d1.list();\n for(int i=0; i<files.length; i++)\n copyDirectories(new File(d1,files[i]), new File(d2,files[i]));\n System.out.println(\"We copied the files sucesfully\");\n }//end else files\n }", "@Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n Path targetFile = this.currentTargetDirectory.resolve(file.getFileName());\n Files.copy(file, targetFile);\n logger.output(\"Copied file: \" + targetFile);\n return FileVisitResult.CONTINUE;\n }", "public static void copyFile(File oldLocation, File newLocation) throws IOException {\n\t\tif (oldLocation.exists()) {\n\t\t\tBufferedInputStream reader = new BufferedInputStream(new FileInputStream(oldLocation));\n\t\t\tBufferedOutputStream writer = new BufferedOutputStream(new FileOutputStream(newLocation, false));\n\t\t\ttry {\n\t\t\t\tbyte[] buff = new byte[8192];\n\t\t\t\tint numChars;\n\t\t\t\twhile ((numChars = reader.read(buff, 0, buff.length)) != -1) {\n\t\t\t\t\twriter.write(buff, 0, numChars);\n\t\t\t\t}\n\t\t\t} catch (IOException ex) {\n\t\t\t\tthrow new IOException(\n\t\t\t\t\t\t\"IOException when transferring \" + oldLocation.getPath() + \" to \" + newLocation.getPath());\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (reader != null) {\n\t\t\t\t\t\twriter.close();\n\t\t\t\t\t\treader.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tSystem.out.println(\"Error closing files when transferring \" + oldLocation.getPath() + \" to \"\n\t\t\t\t\t\t\t+ newLocation.getPath());\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new IOException(\"Old location does not exist when transferring \" + oldLocation.getPath() + \" to \"\n\t\t\t\t\t+ newLocation.getPath());\n\t\t}\n\t}", "public void copyDirectory(File srcDir, File dstDir) throws IOException {\n\t\tif (srcDir.isDirectory()) {\n\t\t\tif (srcDir.getName().startsWith(\".\")) {// Si es un directorio oculto\n\t\t\t\t\t\t\t\t\t\t\t\t\t// no lo copiamos\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Si el directorio no existe\n\t\t\tif (!dstDir.exists()) {\n\t\t\t\tif(logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(\"El directorio no existe lo creamos. \" + dstDir);\n\t\t\t\tdstDir.mkdirs();\n\t\t\t}\n\n\t\t\tString[] children = srcDir.list();\n\t\t\tfor (int i = 0; i < children.length; i++) {\n\n\t\t\t\tcopyDirectory(new File(srcDir, children[i]), new File(dstDir,\n\t\t\t\t\t\tchildren[i]));\n\n\t\t\t}\n\t\t} else {\n\t\t\t// This method is implemented in e1071 Copying a File\n\t\t\tcopyFile(srcDir, dstDir);\n\t\t}\n\t}", "public static void copy(File file, File file2) {\n Throwable th;\n Throwable th2;\n Throwable th3;\n Throwable th4 = null;\n FileInputStream fileInputStream = new FileInputStream(file);\n FileOutputStream fileOutputStream = new FileOutputStream(file2);\n byte[] bArr = new byte[1024];\n while (true) {\n int read = fileInputStream.read(bArr);\n if (read > 0) {\n fileOutputStream.write(bArr, 0, read);\n } else {\n fileOutputStream.close();\n fileInputStream.close();\n return;\n }\n }\n throw th2;\n if (th4 == null) {\n }\n throw th;\n throw th;\n if (th3 != null) {\n try {\n fileOutputStream.close();\n } catch (Throwable th5) {\n }\n } else {\n fileOutputStream.close();\n }\n throw th2;\n }", "private void copyCoverageFile(String sourceResourceName, String targetFileName, WorkflowJob job) throws Exception {\n FilePath directory = ensureWorkspaceExists(job);\n\n FilePath dest = directory.child(targetFileName);\n org.apache.commons.io.IOUtils.copy(getClass().getResourceAsStream(sourceResourceName), dest.write());\n }", "@Test\n public void testCopyFile() throws Exception {\n System.out.println(\"copyFile with existing source image file\");\n String sourcePath = System.getProperty(\"user.dir\")+fSeparator+\"src\"+fSeparator+\"test\"+fSeparator+\n \"java\"+fSeparator+\"resources\"+fSeparator+\"testImg.jpg\";\n File source = new File(sourcePath);\n \n File dest = new File(folder.toString()+fSeparator+\"Images\");\n FilesDao instance = new FilesDao();\n boolean result;\n try{\n instance.copyFile(source, dest);\n File copiedFile = new File(dest+fSeparator+\"testImg.jpg\");\n if(copiedFile.exists())\n result = true;\n else\n result = false;\n }catch(Exception ex){\n result = false;\n }\n boolean expResult = true;\n assertEquals(\"Some message\",expResult,result);\n }", "public void copyFile(InputStream inputStream, OutputStream outputStream) throws IOException\n {\n byte[] buffer = new byte[1024];\n int length;\n while ((length = inputStream.read(buffer)) > 0)\n outputStream.write(buffer, 0, length);\n inputStream.close();\n outputStream.close();\n }", "public boolean copyTo (String destinationFile) {\r\n\t\tlogger.debug(\"(File)From \"+this.fullPath+ \" To \"+destinationFile);\r\n\t\ttry {\r\n\t\t\tFile source = new File(this.fullPath);\r\n\t\t\tFiles.copy(source.toPath(),Paths.get(destinationFile),NOFOLLOW_LINKS);\r\n\t\t\t// Prévoir une procédure de recréation du lien copy de lien\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public void moveFile(String url) throws IOException {\n\n\t\tSystem.out.println(\"folder_temp : \" + folder_temp);\n\t\tPath Source = Paths.get(folder_temp + url);\n\t\tPath Destination = Paths.get(folder_photo + url);\n\t\tSystem.out.println(\"folder_photo : \" + folder_photo);\n\n\t\tif (Files.exists(Source)) {\n\t\t\t// Files.move(Source, Destination,\n\t\t\t// StandardCopyOption.REPLACE_EXISTING);\n\t\t\t// cpie du fichiet au lieu de deplaacer car il est enn coiurs\n\t\t\t// d'utilisation\n\t\t\tFiles.copy(Source, Destination, StandardCopyOption.REPLACE_EXISTING);\n\t\t}\n\n\t}" ]
[ "0.78116626", "0.75970936", "0.7448341", "0.7341625", "0.7286031", "0.72503114", "0.72158486", "0.71674997", "0.71423525", "0.7129211", "0.71287", "0.71022505", "0.70832443", "0.7045123", "0.7030523", "0.70248055", "0.697663", "0.6916353", "0.6905503", "0.68689185", "0.68620497", "0.6826668", "0.6803153", "0.68017715", "0.67804503", "0.6773061", "0.676882", "0.67677766", "0.67480695", "0.6707036", "0.6685195", "0.6672526", "0.66721696", "0.66471505", "0.66448754", "0.66345656", "0.6601475", "0.6568672", "0.650673", "0.64744264", "0.6472292", "0.6470627", "0.6441051", "0.6424497", "0.64006865", "0.63706726", "0.6344325", "0.63356507", "0.6325451", "0.6317426", "0.63077414", "0.63001454", "0.6290876", "0.628698", "0.62674034", "0.6261409", "0.62613386", "0.6260469", "0.62596965", "0.62395114", "0.6227074", "0.62242526", "0.6222201", "0.6171777", "0.6158638", "0.6157886", "0.6151245", "0.6141004", "0.613387", "0.6131391", "0.6129397", "0.61207634", "0.61061287", "0.60953724", "0.6057288", "0.6002434", "0.59767896", "0.5963734", "0.59592164", "0.59241605", "0.5909449", "0.59029317", "0.5895414", "0.58880764", "0.5886005", "0.58838755", "0.5856503", "0.58545893", "0.58486307", "0.58259124", "0.58208466", "0.580381", "0.5801843", "0.5790674", "0.57843184", "0.57697815", "0.57657343", "0.57605445", "0.57457536", "0.57435155" ]
0.6380024
45
Utility method to copy a file from one directory to another
public static void copyFile(final File from, final File toDir) throws IOException { if (!from.canRead()) { throw new IOException("Cannot read file '" + from + "'."); } if (toDir.exists() && (!toDir.canWrite())) { throw new IOException("Cannot write to file '" + toDir + "'."); } toDir.getParentFile().mkdirs(); FileUtils.copyFile(from, toDir); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from); // set path of source directory from parent function\r\n Path dest = Paths.get(to); // set path of destination directory from parent function\r\n Files.copy(src, dest); //inbuilt function to copy files\r\n \r\n }", "void copyFile(String sourceFile, String destinationFile) throws IOException;", "void copyFile(String sourceFile, String destinationFile, boolean overwrite) throws IOException;", "public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from);\r\n Path dest = Paths.get(to);\r\n Files.copy(src, dest, StandardCopyOption.REPLACE_EXISTING);\r\n }", "public static void copyFile(final String fromPath, final String toPath) throws IOException {\n FileUtils.copyFileToDirectory(new File(fromPath), new File(toPath));\n }", "private static boolean copyDirectory(File from, File to)\n {\n return copyDirectory(from, to, (byte[])null);\n }", "public static void copyFile(File from, File to) throws IOException {\r\n FileInputStream in = new FileInputStream(from);\r\n copyFile(in, to);\r\n }", "private static void copyFile(File in, File out)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFileChannel inChannel = new\tFileInputStream(in).getChannel();\n\t\t\tFileChannel outChannel = new FileOutputStream(out).getChannel();\n\t\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\t\t\tinChannel.close();\n\t\t\toutChannel.close();\t\t\t\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.copyFile(): \" + e);\n\t\t}\n\n\t}", "public static void copyFileToDir(File src, File dst) throws IOException {\n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n File file = new File(dstAbsPath + File.separator + src.getName());\n copyFile(src, file);\n }", "public static void copyPath(Path source, Path target) {\n try {\n Files.copy(source, target);\n if (Files.isDirectory(source)) {\n try (Stream<Path> files = Files.list(source)) {\n files.forEach(p -> copyPath(p, target.resolve(p.getFileName())));\n }\n }\n } catch (IOException e) { e.printStackTrace(); }\n }", "private void copy(File src, File dst) throws IOException \r\n {\r\n InputStream in = new FileInputStream(src);\r\n OutputStream out = new FileOutputStream(dst);\r\n \r\n // Transfer bytes from in to out\r\n byte[] buf = new byte[1024];\r\n int len;\r\n while ((len = in.read(buf)) > 0) \r\n {\r\n out.write(buf, 0, len);\r\n }\r\n in.close();\r\n out.close();\r\n }", "public static void copyFile(File src, File dst) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"Source file does not exist: \" + src);\n }\n \n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n try (InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dst)) {\n\n // Transfer bytes from in to out\n byte[] buf = new byte[10240];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n } catch (IOException e) {\n logger.warn(\"Unable to copy file \" + e.getMessage(), e);\n throw new IOException(\"Unable to copy file \", e);\n }\n }", "public void copyOne(String from, String to) {\n\t\tFile source = new File(from);\n\t\tif (sourceExists(source)) {\n\t\t\tFile target = new File(to);\n\t\t\ttry{\n\t\t\t\tif(!targetExists(target)){\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath());\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName()\n\t\t\t\t\t\t\t+ \" COPIED!\");\n\t\t\t\t} else if (target.exists() && confirmReplace()) {\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath(),\n\t\t\t\t\t\t\tREPLACE_EXISTING);\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName() + \" REPLACED!\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"File WASN'T copied!\");\n\t\t\t\t}\n\t\t\t}catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private static void copyFile(File scrFile, File file) {\n\t\r\n}", "private void copyFile(String source, String destination) throws IOException {\n File inputFile = new File(source);\n File outputFile = new File(destination);\n\t\n BufferedInputStream in = new BufferedInputStream(\n\t\t\t\t new FileInputStream(inputFile));\n BufferedOutputStream out = new BufferedOutputStream(\n\t\t\t\t new FileOutputStream(outputFile));\n int c;\n\tbyte[] tmp = new byte[4096];\n\t\n while ((c = in.read(tmp, 0, 4096)) != -1)\n\t out.write(tmp, 0, c);\n\t\n in.close();\n out.close();\n }", "private static void copyFile(String from, String to)\n\t{\n\t\tFile inputFile;\n\t File outputFile;\n\t\tint fIndex = from.indexOf(\"file:\");\n\t\tint tIndex = to.indexOf(\"file:\");\n\t\tif(fIndex < 0)\n\t\t\tinputFile = new File(from);\n\t\telse\n\t\t\tinputFile = new File(from.substring(fIndex + 5, from.length()));\n\t\tif(tIndex < 0)\n\t\t\toutputFile = new File(to);\n\t\telse\n\t\t\toutputFile = new File(to.substring(tIndex + 5, to.length())); \n\t\tcopyFile(inputFile, outputFile);\t\t\n\t}", "@SuppressWarnings(\"resource\")\r\n\tpublic static synchronized void copyFile(File source, File dest)\r\n\t\t\tthrows IOException {\r\n\t\tFileChannel srcChannel = null;\r\n\t\tFileChannel dstChannel = null;\r\n\t\ttry {\r\n\t\t\tsrcChannel = new FileInputStream(source).getChannel();\r\n\t\t\tdstChannel = new FileOutputStream(dest).getChannel();\r\n\t\t\tdstChannel.transferFrom(srcChannel, 0, srcChannel.size());\r\n\t\t} finally {\r\n\t\t\tsrcChannel.close();\r\n\t\t\tdstChannel.close();\r\n\t\t}\r\n\t}", "public static void copyFile(File source, File destination) throws IOException {\n\tFileChannel sourceChannel = null;\n\tFileChannel destinationChannel = null;\n\ttry {\n\t if (destination.exists()) {\n\t\tdestination.delete();\n\t }\n\t sourceChannel = new FileInputStream(source).getChannel();\n\t destinationChannel = new FileOutputStream(destination).getChannel();\n\t int maxCount = (64 * 1024 * 1024) - (32 * 1024);// magic number for Windows, 64Mb - 32Kb\n\t long size = sourceChannel.size();\n\t long position = 0;\n\t while (position < size) {\n\t\tposition += sourceChannel.transferTo(position, maxCount, destinationChannel);\n\t }\n\t} catch (IOException e) {\n\t throw e;\n\t} finally {\n\t if (null != sourceChannel) {\n\t\tsourceChannel.close();\n\t }\n\t if (null != destinationChannel) {\n\t\tdestinationChannel.close();\n\t }\n\t}\n }", "public static void copyFile(File src, File dst) throws IOException {\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(dst);\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) out.write(buf, 0, len);\n in.close();\n out.close();\n }", "private void copyFile( final File source, final File target )\n throws MojoExecutionException\n {\n if ( source.exists() == false )\n {\n throw new MojoExecutionException( \"Source file '\" + source.getAbsolutePath() + \"' does not exist!\" );\n }\n if ( target.exists() == true )\n {\n throw new MojoExecutionException( \"Target file '\" + source.getAbsolutePath() + \"' already existing!\" );\n }\n\n try\n {\n this.logger.debug( \"Copying file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'.\" );\n PtFileUtil.copyFile( source, target );\n }\n catch ( PtException e )\n {\n throw new MojoExecutionException( \"Could not copy file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'!\", e );\n }\n }", "public static void copyFiles(File src, File dest) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"copyFiles: Can not find source: \" + src.getAbsolutePath() + \".\");\n } else if (!src.canRead()) { //check to ensure we have rights to the source...\n throw new IOException(\"copyFiles: No right to source: \" + src.getAbsolutePath() + \".\");\n }\n //is this a directory copy?\n if (src.isDirectory()) {\n if (!dest.exists()) { //does the destination already exist?\n //if not we need to make it exist if possible (note this is mkdirs not mkdir)\n if (!dest.mkdirs()) {\n throw new IOException(\"copyFiles: Could not create direcotry: \" + dest.getAbsolutePath() + \".\");\n }\n }\n //get a listing of files...\n String list[] = src.list();\n //copy all the files in the list.\n for (int i = 0; i < list.length; i++) {\n File dest1 = new File(dest, list[i]);\n File src1 = new File(src, list[i]);\n copyFiles(src1, dest1);\n }\n } else {\n //This was not a directory, so lets just copy the file\n try {\n copy(new FileInputStream(src), new FileOutputStream(dest));\n } catch (IOException e) { //Error copying file...\n IOException wrapper = new IOException(\"copyFiles: Unable to copy file: \"\n + src.getAbsolutePath() + \"to\" + dest.getAbsolutePath() + \".\");\n wrapper.initCause(e);\n wrapper.setStackTrace(e.getStackTrace());\n throw wrapper;\n }\n }\n }", "private void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n //Check if sourceFolder is a directory or file\n //If sourceFolder is file; then copy the file directly to new location\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n logAppend(\"Directory created :: \" + destinationFolder);\n nothingDone=false;\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n\n long dateSrc = sourceFolder.lastModified();\n long dateDest = destinationFolder.lastModified();\n\n if (dateSrc > dateDest) {\n //Copy the file content from one place to another\n Files.copy(sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n logAppend(\"File copied :: \" + destinationFolder);\n nothingDone=false;\n }\n\n }\n }", "public static long copyFile(File source, File dest) throws IOException {\n\n\t\tif (source.isDirectory() || dest.isDirectory())\n\t\t\tthrow new IOException(\"wont copy directories\");\n\t\tInputStream i = null;\n\t\ttry {\n\t\t\ti = getInputStreamFromFile(source);\n\n\t\t\t// create parent directories\n\t\t\tif (dest.getParentFile().mkdirs()) {\n\t\t\t\t// all good\n\t\t\t} else\n\t\t\t\tthrow new IOException(\"\\\"\" + dest + \"\\\" cannot be created\");\n\t\t\treturn writeStreamToFile(i, dest);\n\n\t\t} finally {\n\t\t\tif (i != null)\n\t\t\t\ti.close();\n\t\t}\n\t}", "public static void copyFolder(File src, File dest) throws IOException {\n\n\t\tif (src.isDirectory()) {\n\n\t\t\t// if directory not exists, create it\n\t\t\tif (!dest.exists()) {\n\t\t\t\tdest.mkdir();\n\t\t\t\t// System.out.println(\"Directory copied from \" + src + \" to \" +\n\t\t\t\t// dest);\n\t\t\t}\n\n\t\t\t// list all the directory contents\n\t\t\tString files[] = src.list();\n\n\t\t\tfor (String file : files) {\n\t\t\t\t// construct the src and dest file structure\n\t\t\t\tFile srcFile = new File(src, file);\n\t\t\t\tFile destFile = new File(dest, file);\n\t\t\t\t// recursive copy\n\t\t\t\tcopyFolder(srcFile, destFile);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if file, then copy it\n\t\t\t// Use bytes stream to support all file types\n\t\t\tInputStream in = new FileInputStream(src);\n\t\t\tOutputStream out = new FileOutputStream(dest);\n\n\t\t\tbyte[] buffer = new byte[1024];\n\n\t\t\tint length;\n\t\t\t// copy the file content in bytes\n\t\t\twhile ((length = in.read(buffer)) > 0) {\n\t\t\t\tout.write(buffer, 0, length);\n\t\t\t}\n\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t// System.out.println(\"File copied from \" + src + \" to \" + dest);\n\t\t}\n\t}", "private void copyFile(String source, String destination, Environment env) throws IOException, InvalidPathException {\n\t\tPath sourcePath = Paths.get(source);\n\t\tPath destinationPath = Paths.get(destination);\n\n\t\tif (sourcePath.equals(destinationPath)) {\n\t\t\tenv.writeln(\"The source and the destination can not be equal.\");\n\t\t\treturn;\n\t\t}\n\t\tif (!Files.exists(sourcePath)) {\n\t\t\tenv.writeln(\"The specified file does not exist.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(sourcePath)) {\n\t\t\tenv.writeln(\"Copy command can not copy a directory.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(destinationPath)) {\n\t\t\tdestinationPath = Paths.get(destinationPath.toString(), sourcePath.getFileName().toString());\n\t\t}\n\t\tif (Files.exists(destinationPath)) {\n\t\t\tenv.write(\n\t\t\t\t\t\"There already is a file with the same name at the specified destination. \\nDo you want to overwrite it? [y/n] \");\n\n\t\t\twhile (true) {\n\t\t\t\tString answer;\n\t\t\t\ttry {\n\t\t\t\t\tanswer = env.readLine().trim();\n\t\t\t\t} catch (ShellIOException ex) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (answer.equals(\"n\")) {\n\t\t\t\t\tenv.writeln(\"Operation canceled.\");\n\t\t\t\t\treturn;\n\t\t\t\t} else if (answer.equals(\"y\")) {\n\t\t\t\t\tenv.writeln(\"Operation confirmed.\");\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tenv.writeln(\"Invalid answer. Answer 'y' for 'yes' or 'n' for 'no'.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tBufferedInputStream inputStream = new BufferedInputStream(Files.newInputStream(sourcePath));\n\t\tBufferedOutputStream outputStream = new BufferedOutputStream(Files.newOutputStream(destinationPath));\n\t\twhile (true) {\n\t\t\tint b = inputStream.read();\n\t\t\tif (b == -1) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\toutputStream.write(b);\n\t\t}\n\n\t\tinputStream.close();\n\t\toutputStream.close();\n\t}", "public static void copyFileOrDirectory(String source, String destination) throws KubernetesPluginException {\n File src = new File(source);\n File dst = new File(destination);\n try {\n // if source is file\n if (Files.isRegularFile(Paths.get(source))) {\n if (Files.isDirectory(dst.toPath())) {\n // if destination is directory\n FileUtils.copyFileToDirectory(src, dst);\n } else {\n // if destination is file\n FileUtils.copyFile(src, dst);\n }\n } else if (Files.isDirectory(Paths.get(source))) {\n FileUtils.copyDirectory(src, dst);\n }\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Error while copying file\", e);\n }\n }", "public void copy(String name, String oldPath, String newPath);", "public Path copie(String source, String destination) throws IOException {\n Path root = Paths.get(source);\n Path cible = Paths.get(destination);\n\n Path copy;\n copy = Files.copy(root, cible.resolve(root.getFileName()), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n\n return copy;\n }", "public static void smartCopyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] fromFiles = fromDir.listFiles();\n \t\t\tint fromSize = fromFiles.length;\n \t\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), 550);\n \t\n \t\t\tFile[] toFiles = null;\n \t\n \t\t\t// delete old files and directories from this directory\n \t\t\tif (toDir.exists() && toDir.isDirectory()) {\n \t\t\t\ttoFiles = toDir.listFiles();\n \t\t\t\tint toSize = toFiles.length;\n \t\n \t\t\t\t// check if this exact file exists in the new directory\n \t\t\t\tfor (int i = 0; i < toSize; i++) {\n \t\t\t\t\tString name = toFiles[i].getName();\n \t\t\t\t\tboolean isDir = toFiles[i].isDirectory();\n \t\t\t\t\tboolean found = false;\n \t\t\t\t\tfor (int j = 0; j < fromSize; j++) {\n \t\t\t\t\t\tif (name.equals(fromFiles[j].getName()) && isDir == fromFiles[j].isDirectory())\n \t\t\t\t\t\t\tfound = true;\n \t\t\t\t\t}\n \t\n \t\t\t\t\t// delete file if it can't be found or isn't the correct type\n \t\t\t\t\tif (!found) {\n \t\t\t\t\t\tif (isDir)\n \t\t\t\t\t\t\tPublishUtil.deleteDirectory(toFiles[i], null);\n \t\t\t\t\t\telse\n \t\t\t\t\t\t\ttoFiles[i].delete();\n \t\t\t\t\t}\n \t\t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif (toDir.isFile())\n \t\t\t\t\ttoDir.delete();\n \t\t\t\ttoDir.mkdir();\n \t\t\t}\n \t\t\tmonitor.worked(50);\n \t\n \t\t\t// cycle through files and only copy when it doesn't exist\n \t\t\t// or is newer\n \t\t\ttoFiles = toDir.listFiles();\n \t\t\tint toSize = toFiles.length;\n \t\t\tint dw = 0;\n \t\t\tif (toSize > 0)\n \t\t\t\tdw = 500 / toSize;\n \t\n \t\t\tfor (int i = 0; i < fromSize; i++) {\n \t\t\t\tFile current = fromFiles[i];\n \t\n \t\t\t\t// check if this is a new or newer file\n \t\t\t\tboolean copy = true;\n \t\t\t\tif (!current.isDirectory()) {\n \t\t\t\t\tString name = current.getName();\n \t\t\t\t\tlong mod = current.lastModified();\n \t\t\t\t\tfor (int j = 0; j < toSize; j++) {\n \t\t\t\t\t\tif (name.equals(toFiles[j].getName()) && mod <= toFiles[j].lastModified())\n \t\t\t\t\t\t\tcopy = false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\n \t\t\t\tif (copy) {\n \t\t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\t\tString toFile = to;\n \t\t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\t\ttoFile += File.separator;\n \t\t\t\t\ttoFile += current.getName();\n \t\t\t\t\tif (current.isFile()) {\n \t\t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\t\tmonitor.worked(dw);\n \t\t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\t\tsmartCopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, dw));\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.worked(500 - dw * toSize);\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error smart copying directory \" + from + \" - \" + to, e);\n \t\t}\n \t}", "public static void copyFile(InputStream in, File to) throws IOException {\r\n FileOutputStream out = new FileOutputStream(to);\r\n int len;\r\n byte[] buffer = new byte[4096];\r\n while ((len = in.read(buffer)) != -1) {\r\n out.write(buffer, 0, len);\r\n }\r\n out.close();\r\n in.close();\r\n }", "private static void copyFiles(File source, File dest) throws IOException {\n\t\tif(!source.equals(dest))\n\t\t\tFileUtils.copyFile(source, dest);\n\t}", "public static IStatus copyFile(String from, String to) {\n \t\ttry {\n \t\t\treturn copyFile(new FileInputStream(from), to);\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t}\n \t}", "public void copyFile(String src, String dst) throws IOException {\n\n\t\tFile srcFile = new File(src);\n\t\tFile dstFile = new File(dst);\n\n\t\tcopyFile(srcFile, dstFile);\n\t}", "static void copyFile(File src, File dest) throws IOException {\r\n\t\tFileInputStream fis = new FileInputStream(src);\r\n\t\tFileOutputStream fos = new FileOutputStream (dest);\r\n\t\tbyte[] bytes = new byte[4*1048576];\r\n\t\tint numRead;\r\n\t\twhile ((numRead = fis.read(bytes)) > 0) {\r\n\t\t\tfos.write(bytes, 0, numRead);\r\n\t\t}\r\n\t\tfis.close();\r\n\t\tfos.close();\r\n\t}", "void copyFile(File sourcefile, File targetfile) throws Exception {\n\t\tif(targetfile.exists()) targetfile.delete();\n\t\ttargetfile.createNewFile();\n\t\tFileChannel source = null;\n\t\tFileChannel target = null;\n\t\ttry{\n\t\t\tsource = new FileInputStream(sourcefile).getChannel();\n\t\t\ttarget = new FileOutputStream(targetfile).getChannel();\n\t\t\ttarget.transferFrom(source, 0, source.size());\n\t\t}\n\t\tfinally{\n\t\t\tif(source!=null) source.close();\n\t\t\tif(target!=null) target.close();\n\t\t}\n\t\ttargetfile.setLastModified(sourcefile.lastModified());\n\t}", "public void copyFile(File src, File dst) throws IOException {\n\t\tInputStream in = new FileInputStream(src);\n\t\tOutputStream out = new FileOutputStream(dst);\n\n\t\t// Transfer bytes from in to out\n\t\tbyte[] buf = new byte[1024];\n\t\tint len;\n\t\twhile ((len = in.read(buf)) > 0) {\n\t\t\tif(logger.isDebugEnabled())\n\t\t\t\tlogger.debug(\"Copiando fichero \" + src.getAbsolutePath() + \" a \"\n\t\t\t\t\t+ dst.getAbsolutePath());\n\t\t\tout.write(buf, 0, len);\n\t\t}\n\t\tin.close();\n\t\tout.close();\n\t}", "public static void copyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] files = fromDir.listFiles();\n \t\n \t\t\ttoDir.mkdir();\n \t\n \t\t\t// cycle through files\n \t\t\tint size = files.length;\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), size * 50);\n \t\n \t\t\tfor (int i = 0; i < size; i++) {\n \t\t\t\tFile current = files[i];\n \t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\tString toFile = to;\n \t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\ttoFile += File.separator;\n \t\t\t\ttoFile += current.getName();\n \t\t\t\tif (current.isFile()) {\n \t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\tmonitor.worked(50);\n \t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\tcopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, 50));\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying directory\", e);\n \t\t}\n \t}", "public static IStatus copyFile(URL from, String to) {\n \t\ttry {\n \t\t\treturn copyFile(from.openStream(), to);\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t}\n \t}", "public static final void copy(String source, String destination) {\n File sourceFile = new File(source);\n File destFile = new File(destination);\n\n if (destFile.exists()) {\n // Information error all ready exist the file\n }\n\n if (!sourceFile.exists()) {\n // General Server Error\n }\n\n if (sourceFile.isDirectory()) {\n copyDirectory(source, destination);\n } else {\n copyFile(source, destination);\n }\n\n //delete source folder after copy-paste\n }", "public static void copy(URL src, File dst) throws IOException {\n\n try (InputStream in = src.openStream()) {\n try (OutputStream out = new FileOutputStream(dst)) {\n dst.mkdirs();\n copy(in, out);\n }\n }\n }", "private File copyResources(String srcFileName, File sourceDir, File destinationDir) throws MojoExecutionException {\n File srcFile = new File(sourceDir.getAbsolutePath()+File.separator+srcFileName);\n if (srcFile.exists()) {\n getLog().info(\"Copying \"+srcFile.getName()+\"...\");\n try {\n File destFile = new File(destinationDir.getAbsolutePath()+File.separator+srcFile.getName());\n if (srcFile.isDirectory()) {\n FileUtils.copyDirectory(srcFile, destFile, false);\n } else {\n FileUtils.copyFile(srcFile, destFile, false);\n }\n return destFile;\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying resource '\"+srcFile.getName()+\"'\", ex);\n }\n } else {\n getLog().warn(\"No source file '\"+srcFile.getName()+\"' to copy\");\n return null;\n }\n }", "public static void copyDirectory(File sourceDir, File targetDir) throws IOException {\n File[] srcFiles = sourceDir.listFiles();\n if (srcFiles != null) {\n for (int i = 0; i < srcFiles.length; i++) {\n File dest = new File(targetDir, srcFiles[i].getName());\n if (srcFiles[i].isDirectory() && FileUtils.safeIsRealDirectory(srcFiles[i])) {\n if (!dest.exists()) {\n dest.mkdirs();\n }\n copyDirectory(srcFiles[i], dest);\n } else {\n if (!dest.exists()) {\n dest.createNewFile();\n }\n copyFile(srcFiles[i].getAbsolutePath(), new File(targetDir,\n srcFiles[i].getName()).getAbsolutePath());\n }\n }\n }\n }", "private void copyFile(InputStream ins, OutputStream outs) throws IOException {\n byte[] buffer = new byte[1024];\n int read;\n while((read = ins.read(buffer)) != -1) {\n outs.write(buffer, 0, read);\n }\n }", "final public VFile copyTo(VDir parentDir) throws VlException\n {\n //return (VFile)doCopyMoveTo(parentDir,null,false /*,options*/);\n return (VFile)this.getTransferManager().doCopyMove(this,parentDir,null,false); \n }", "public static void copyFile(final String fileName, final String fromDir, final String toDir)\n throws IOException {\n FileUtils.copyFile(new File(fromDir, fileName), new File(toDir, fileName));\n }", "public static void copy(String destdir, String pathfile) throws Exception {\r\n \t\tFile file = new File(pathfile);\r\n \t\tFile destDir = new File(destdir);\r\n \t\tcopy(destDir, file);\r\n\t}", "public static void copyFile(File sourceFile, File destFile)\n throws IOException {\n if (!destFile.exists()) {\n destFile.createNewFile();\n }\n FileChannel source = null;\n FileChannel destination = null;\n try {\n source = new FileInputStream(sourceFile).getChannel();\n destination = new FileOutputStream(destFile).getChannel();\n destination.transferFrom(source, 0, source.size());\n } catch (Exception e) {} finally {\n if (source != null) {\n source.close();\n }\n if (destination != null) {\n destination.close();\n }\n }\n }", "public static void Copy(File toCopy, File destination) throws IOException {\n\t\tInputStream in = new BufferedInputStream(new FileInputStream(toCopy));\n\t\tOutputStream out = new BufferedOutputStream(new FileOutputStream(destination));\n\n\t\tbyte[] buffer = new byte[1024];\n\t\tint lengthRead;\n\t\twhile ((lengthRead = in.read(buffer)) > 0) {\n\t\t\tout.write(buffer, 0, lengthRead);\n\t\t\tout.flush();\n\t\t}\n\t\tout.close();\n\t\tin.close();\n\t}", "public void copyFile(File src, File dst) throws IOException {\n File file = new File(dst + File.separator + src.getName());\n file.createNewFile();\n Log.i(\"pictureSelect\", \"Dest file: \" + file.getAbsolutePath());\n\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(file);\n\n // Transfer bytes from in to out\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n in.close();\n out.close();\n scanSD(file);\n }", "public void copyFile(@NonNull File sourceFile, @NonNull File destFile) throws IOException {\n if (!destFile.getParentFile().exists()) {\n if (!destFile.getParentFile().mkdirs())\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_NOT_CREATED);\n } else {\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_ALREADY_EXISTS);\n }\n\n if (!destFile.exists()) {\n if (!destFile.createNewFile())\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_NOT_CREATED);\n } else\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_ALREADY_EXISTS);\n\n try (\n FileChannel source = new FileInputStream(sourceFile).getChannel();\n FileChannel destination = new FileOutputStream(destFile).getChannel();\n ) {\n destination.transferFrom(source, 0, source.size());\n }\n }", "private void migrate (String name)\t{\n\t\ttry{\n\t\t\tFile f1 = new File( sourceDir + name);\n\t\t\t\n\t\t\tif (!f1.exists())\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tFile f2 = new File(targetDir +name);\n\t\t\t\n\t\t InputStream in = new FileInputStream(f1);\n\t\t \n\t\t OutputStream out = new FileOutputStream(f2);\n\n\t\t byte[] buf = new byte[1024];\n\t\t int len;\n\t\t while ((len = in.read(buf)) > 0){\n\t\t out.write(buf, 0, len);\n\t\t }\n\t\t in.close();\n\t\t out.close();\n\t\t System.out.println(\"File copied.\");\n\t\t }\n\t\t catch(FileNotFoundException ex){\n\t\t System.out.println(ex.getMessage() + \" in the specified directory.\");\n\t\t System.exit(0);\n\t\t }\n\t\t catch(IOException e){\n\t\t System.out.println(e.getMessage()); \n\t\t }\n\t}", "private static void copyFile(Path srcPath, Path destPath) throws IOException {\n try (FileWriter outputStream = new FileWriter(destPath.toFile().getAbsolutePath(), false);\n FileReader inputStream = new FileReader(srcPath.toFile().getAbsolutePath())) {\n int i;\n while ((i = inputStream.read()) != -1) {\n outputStream.write(toChars(i));\n }\n }\n }", "private void moveFilesToDiffDirectory(Path sourcePath, Path destinationPath) {\n try {\n Files.move(sourcePath, destinationPath,\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n //moving file failed.\n e.printStackTrace();\n }\n }", "public void copy(){\n\t\tFileInputStream is = null;\n\t\tFileOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(source);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\tif(dest.exists())\n\t\t\t\tdest.delete();\n\t\t\tint i = -1;\n\t\t\twhile((i = is.read()) != -1)\n\t\t\t\tos.write(i);\n\t\t\tsource.deleteOnExit();\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t} finally {\n\t\t\tif(is != null)\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException ignored) {}\n\t\t\tif(os != null)\n\t\t\t\ttry {\n\t\t\t\t\tos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t\t\t}\n\t\t}\n\t}", "public void copyImageFile() throws IOException {\n Path sourcePath = imageFile.toPath();\n\n String selectFileName = imageFile.getName();\n\n Path targetPath = Paths.get(\"/Users/houumeume/IdeaProjects/Assignment2/image/\" + selectFileName);\n\n //copy the file to the new directory\n Files.copy(sourcePath, targetPath, StandardCopyOption.REPLACE_EXISTING);\n\n //update the imageFile to point to the new File\n imageFile = new File(targetPath.toString());\n }", "public static void copyDirectory(File destDir, File sourceDir, boolean mkdirs) throws Exception {\r\n\t\tif (!destDir.exists() && !destDir.isDirectory()) {\r\n\t\t\tif (mkdirs) destDir.mkdirs();\r\n\t\t\telse return;\r\n\t\t}\r\n\t\tFile[] containedFiles = sourceDir.listFiles();\r\n\t\tfor (int i = 0; i < containedFiles.length; i++) {\r\n\t\t\tFile aFile = containedFiles[i];\r\n\t\t\tif (aFile.isFile()) copy(destDir, aFile);\r\n\t\t\telse {\r\n\t\t\t\tString dirName = aFile.getName();\r\n\t\t\t\tFile newDir = new File(destDir.getAbsolutePath() + File.separatorChar + dirName);\r\n\t\t\t\tcopyDirectory(newDir, aFile, mkdirs);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void copyOrMoveFile(File file, File dir,boolean isCopy) throws IOException {\n File newFile = new File(dir, file.getName());\n FileChannel outChannel = null;\n FileChannel inputChannel = null;\n try {\n outChannel = new FileOutputStream(newFile).getChannel();\n inputChannel = new FileInputStream(file).getChannel();\n inputChannel.transferTo(0, inputChannel.size(), outChannel);\n inputChannel.close();\n if(!isCopy)\n file.delete();\n } finally {\n if (inputChannel != null) inputChannel.close();\n if (outChannel != null) outChannel.close();\n }\n }", "public static void copyFileSourceToDestination(File src, File dest) throws IOException {\n\t\tInputStream is = null;\n\t\tOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(src);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\t// buffer size 1K\n\t\t\tbyte[] buf = new byte[1024];\n\t\t\tint bytesRead;\n\t\t\twhile ((bytesRead = is.read(buf)) > 0) {\n\t\t\t\tos.write(buf, 0, bytesRead);\n\t\t\t}\n\t\t} finally {\n\t\t\tis.close();\n\t\t\tos.close();\n\t\t}\n\t}", "public void copyFile(String oldPath, String newPath) {\n\t\ttry {\n\t\t\tint byteread = 0;\n\t\t\tFile oldfile = new File(oldPath);\n\t\t\tif (oldfile.exists()) {\n\t\t\t\tFileInputStream oldStream = new FileInputStream(oldPath);\n\t\t\t\tFileOutputStream newStream = new FileOutputStream(newPath);\n\t\t\t\tbyte[] buffer = new byte[1024];\n\t\t\t\twhile ((byteread = oldStream.read(buffer)) != -1) {\n\t\t\t\t\tnewStream.write(buffer, 0, byteread);\n\t\t\t\t}\n\t\t\t\tnewStream.close();\n\t\t\t\toldStream.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private int copy(String from, String to, int flag) {\n\n File fromFile = new File(rootPath + from);\n if (!fromFile.exists()) {\n return ERROR_FILE_NOT_EXIST;\n }\n\n if ((flag & FLAG_FORCE) != 0) {\n delete(to);\n }\n\n if (createFile(to) < 0) {\n return ERROR_FILE_ALREADY_EXIST;\n }\n\n File toFile = new File(rootPath + to);\n if (!toFile.setWritable(true)) {\n return ERROR;\n }\n\n try {\n BufferedInputStream inputStream = new BufferedInputStream(new FileInputStream(fromFile));\n BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(toFile));\n byte[] buf = new byte[BUF_SIZE];\n // TODO : it limits file size to INTEGER!!\n int offset = 0;\n int read = 0;\n while((read = inputStream.read(buf)) >= 0) {\n outputStream.write(buf, offset, read);\n offset += read;\n }\n inputStream.close();\n outputStream.close();\n } catch (FileNotFoundException e) {\n // file not found\n return ERROR_FILE_NOT_EXIST;\n } catch (IOException e) {\n // IO Exception\n return ERROR;\n }\n\n return OK;\n }", "public void copyDirectory(String srcDirName, String dstDirName)\n\t\t\tthrows IOException {\n\t\tFile srcDir = new File(srcDirName);\n\t\tFile dstDir = new File(dstDirName);\n\t\tcopyDirectory(srcDir, dstDir);\n\t}", "public static void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n System.out.println(sourceFolder.toString());\n System.out.println(destinationFolder.toString());\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n //System.out.println(\"Directory created :: \" + destinationFolder); // debug\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n Files.copy(\n sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n //System.out.println(\"File copied :: \" + destinationFolder); // debug\n }\n }", "void moveFile(String pathToFile, String pathDirectory);", "public static void copyFolder(final String sourcePath, final String targetPath)\n\t{\n\t\tFile tfile = new File(targetPath);\n\t\ttfile.mkdirs();\n\t\tFile sfile = new File(sourcePath);\n\t\tfinal FilenameFilter ffilter = new FilenameFilter()\n\t\t{\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean accept(File dir, String name)\n\t\t\t{\n\t\t\t\tif( name.startsWith(\".svn\"))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tFile[] files = sfile.listFiles(ffilter);\n\t\t\n\t\tArrayList <File> cpFile = new ArrayList<File>();\n\t\tfor( int i=0;i<files.length;i++)\n\t\t{\n\t\t\tfinal File souFile = files[i];\n\t\t\tif( souFile.isDirectory())\n\t\t\t{\n\t\t\t\tfinal String souPath = souFile.getAbsolutePath();\n\t\t\t\tfinal String tarpath = targetPath + File.separator + souFile.getName();\n\t\t\t\ttraverseDir(souPath, ffilter, new IOnGetFileHandler()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n//\t\t\t\t\t\tcopyFile(file.getAbsolutePath(), tarpath +File.separator + file.getName());\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, new IOnGetFileHandler()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n\t\t\t\t\t\tcopyFolder(file.getAbsolutePath(), tarpath);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, null);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcpFile.add(souFile);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tcopyFiles(targetPath, cpFile);\n\t\t\n\t\t\n\t}", "public static void copyTree(File from, File to, FileFilter filter) throws IOException {\r\n File[] children;\r\n \r\n \tif (!from.exists()) {\r\n \t\tthrow new IOException (\"Source of copy \\'\" + from.getName() + \"\\' doesn't exist\");\r\n \t}\r\n \t\r\n \tif (to.getCanonicalPath().equals(from.getCanonicalPath())) {\r\n \t\tthrow new IOException (\"\\'\" + from.getName() + \"\\' cannot copy to itself\");\r\n \t}\r\n\r\n if (from.isDirectory()) {\r\n children = from.listFiles(filter);\r\n // just like cp command, if target exist, make a new folder into\r\n // the target, copy content into the target folder\r\n if (to.exists()) {\r\n \tif (to.isFile()) {\r\n \t\tthrow new IOException(\"Cannot overwrite non-directory \\'\" + to.getName() + \"\\' with directory \" + from.getName());\r\n \t}\r\n \t// copy into new directory name grafted after the existing one\r\n \tto = new File(to, from.getName());\r\n \tcopyTree(from, to, filter);\r\n \treturn;\r\n } else {\r\n \t// copy into new directory name\r\n \tto.mkdir(); \t\r\n for (int i = 0; i < children.length; i++) {\r\n File curto = new File(to, children[i].getName());\r\n \r\n copyTree(children[i], curto, filter);\r\n }\r\n return;\r\n }\r\n }\r\n else {\r\n \tif (to.isDirectory()) {\r\n \t\tto = new File (to, from.getName());\r\n \t}\r\n copyFile(from, to);\r\n return;\r\n }\r\n \r\n }", "public void copyFile(String inputFile, String outputFile)\r\n\t{\r\n\t\tif(new File(inputFile).exists())\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tInputStream in = new FileInputStream(inputFile);\r\n\t\t\t\tOutputStream out = new FileOutputStream(outputFile);\r\n\t\t\t\t// Transfer bytes from in to out\r\n\t\t\t\tbyte[] buf = new byte[1024];\r\n\t\t\t\tint length;\r\n\t\t\t\twhile ((length = in.read(buf)) > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tout.write(buf, 0, length);\r\n\t\t\t\t}\r\n\t\t\t\tin.close();\r\n\t\t\t\tout.close();\r\n\t\t\t\tSystem.out.println(inputFile + \" file copied to \" + outputFile);\r\n\t\t\t\tLog.info(inputFile + \" file copied.\");\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) \r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "public boolean copy(String path, InputStream is) throws SystemException;", "private File copyFiles(String filename, String directoryName) throws IOException { //after\n boolean success = false;\n String finalPath = this.rootLocation + \"/\" + directoryName +\"/\"+ filename;\n String tmpPath = this.tmpLocation + \"/\"+ filename;\n File finalFile = new File(finalPath);\n File directory = new File(this.rootLocation + \"/\" +directoryName);\n if (!directory.exists()) {\n directory.mkdir();\n }\n File tmpFile = new File(tmpPath);\n if(tmpFile.exists() && !tmpFile.isDirectory() && directory.exists() && directory.isDirectory()){\n if(finalFile.exists() && !finalFile.isDirectory()){\n finalFile = getNewName(finalPath);\n log.debug(\"compareToFiles -> rename to \"+ finalFile.getName());\n }\n success = copyFileUsingStream(tmpFile, finalFile);\n }\n\n log.debug(\"success copy...\"+success);\n return finalFile;\n }", "public void copyFile(String destination, String fileName, InputStream in) {\r\n try {\r\n // write the inputStream to a FileOutputStream\r\n OutputStream out = new FileOutputStream(new File(destination + fileName));\r\n int read = 0;\r\n byte[] bytes = new byte[1024];\r\n while ((read = in.read(bytes)) != -1) {\r\n out.write(bytes, 0, read);\r\n }\r\n in.close();\r\n out.flush();\r\n out.close();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "private static boolean backupAndCopyFile(File templateDir, File toDir, String filename) {\n File to = new File(toDir, filename);\n boolean rv = backupFile(to);\n File from = new File(templateDir, filename);\n boolean rv2 = WorkingDir.copyFile(from, to);\n return rv && rv2;\n }", "@Test(groups = \"Integration\")\n public void testCopyFileTo() throws Exception {\n File dest = Os.newTempFile(getClass(), \".dest.tmp\");\n File src = Os.newTempFile(getClass(), \".src.tmp\");\n try {\n Files.write(\"abc\", src, Charsets.UTF_8);\n host.copyTo(src, dest);\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n src.delete();\n dest.delete();\n }\n }", "public static IStatus copyFile(InputStream in, String to) {\n \t\tOutputStream out = null;\n \t\n \t\ttry {\n \t\t\tout = new FileOutputStream(to);\n \t\n \t\t\tint avail = in.read(buf);\n \t\t\twhile (avail > 0) {\n \t\t\t\tout.write(buf, 0, avail);\n \t\t\t\tavail = in.read(buf);\n \t\t\t}\n \t\t\treturn Status.OK_STATUS;\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t} finally {\n \t\t\ttry {\n \t\t\t\tif (in != null)\n \t\t\t\t\tin.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t\ttry {\n \t\t\t\tif (out != null)\n \t\t\t\t\tout.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t}\n \t}", "public static void copy(File destDir, File file) throws Exception {\r\n \t\tString name = file.getName();\r\n \t\tif (!destDir.exists()) destDir.mkdirs();\r\n \t\tFile oldFile = new File(destDir.getAbsolutePath() + File.separatorChar + name);\r\n \t\tif (oldFile.exists()) oldFile.delete();\r\n\t\tFile fileout = new File(destDir.getAbsolutePath() + File.separatorChar + name);\r\n\t FileInputStream fileinstr = new FileInputStream(file);\r\n\t FileOutputStream fileoutstr = new FileOutputStream(fileout);\r\n\t BufferedOutputStream bufout = new BufferedOutputStream(fileoutstr); \r\n\t byte [] b = new byte[1024];\r\n\t\tint len = 0;\r\n\t\twhile ( (len=fileinstr.read(b))!= -1 ) {\r\n\t\t bufout.write(b,0,len);\r\n\t\t}\r\n\t\tbufout.flush();\r\n\t\tbufout.close();\r\n\t\tfileinstr.close();\r\n\t}", "final public VFile copyTo(VFile targetFile) throws VlException\n {\n //return (VFile)doCopyMoveTo(parentDir,null,false /*,options*/);\n return (VFile)this.getTransferManager().doCopyMove(this,targetFile,false); \n }", "private boolean copyFile(File dest) {\n\t\tboolean result = false;\n\n\t\ttry {\n\t\t\tif (this.exists()) {\n\t\t\t\tif (!dest.exists()) dest.mkdirs();\n\t\t\t\t\n\t\t\t\tif (this.isDirectory() && dest.isDirectory()) {\n\t\t\t\t\tdest = new File(dest.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.mkdirs();\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isFile() && dest.isDirectory()) {\n\t\t\t\t\tdest = new File(dest.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.createNewFile();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isDirectory() && dest.isFile()) {\n\t\t\t\t\tdest = new File(dest.getParent().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.mkdirs();\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isFile() && dest.isFile()) {\n\t\t\t\t\tif (dest.exists()) {\n\t\t\t\t\t\tdest = new File(dest.getParent().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\t\tdest.createNewFile();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (this.getName().equals(dest.getName())) {\n\t\t\t\t\t\t//targetFile.deleteOnExit();\n\t\t\t\t\t\t//targetFile = new File(targetFile.getAbsolutePath());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tBufferedInputStream inBuff = null;\n\t\t\t\tBufferedOutputStream outBuff = null;\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tinBuff = new BufferedInputStream(new FileInputStream(this));\n\t\t\t\t\toutBuff = new BufferedOutputStream(new FileOutputStream(dest));\n\n\t\t\t\t\tbyte[] b = new byte[1024 * 5];\n\t\t\t\t\tint length;\n\t\t\t\t\twhile ((length = inBuff.read(b)) != -1) {\n\t\t\t\t\t\toutBuff.write(b, 0, length);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\toutBuff.flush();\n\t\t\t\t\t\n\t\t\t\t\tresult = true;\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}finally{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (inBuff != null) inBuff.close();\n\t\t\t\t\t\tif (outBuff != null) outBuff.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public void copyFileTo(String sourceFilename, String targetFilename)\r\n\tthrows FileNotFoundException, IOException {\r\n\t\tString theFileContent = readStringFromFile(sourceFilename);\r\n\t\toverwriteStringToFile(theFileContent, targetFilename);\r\n\t}", "public void copyDirectory(File sourceLocation, File targetLocation)\r\n\t\t\tthrows IOException {\r\n\r\n\t\tif (sourceLocation.isDirectory()) {\r\n\t\t\tif (!targetLocation.exists()) {\r\n\t\t\t\ttargetLocation.mkdir();\r\n\t\t\t}\r\n\r\n\t\t\tString[] children = sourceLocation.list();\r\n\t\t\tfor (int i = 0; i < children.length; i++) {\r\n\t\t\t\tcopyDirectory(new File(sourceLocation, children[i]), new File(\r\n\t\t\t\t\t\ttargetLocation, children[i]));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tInputStream in = new FileInputStream(sourceLocation);\r\n\t\t\tOutputStream out = new FileOutputStream(targetLocation);\r\n\t\t\t// Copy the bits from instream to outstream\r\n\t\t\tbyte[] buf = new byte[1024];\r\n\t\t\tint len;\r\n\t\t\twhile ((len = in.read(buf)) > 0) {\r\n\t\t\t\tout.write(buf, 0, len);\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tout.close();\r\n\t\t}\r\n\t}", "public static boolean copyFile(String src, String dst) {\n FileChannel inChannel = null;\n FileChannel outChannel = null;\n try {\n inChannel = new FileInputStream(new File(src)).getChannel();\n outChannel = new FileOutputStream(new File(dst)).getChannel();\n inChannel.transferTo(0, inChannel.size(), outChannel);\n } catch (FileNotFoundException e) {\n MessageGenerator.briefError(\"ERROR could not find/access file(s): \" + src + \" and/or \" + dst);\n return false;\n } catch (IOException e) {\n MessageGenerator.briefError(\"ERROR copying file: \" + src + \" to \" + dst);\n return false;\n } finally {\n try {\n if (inChannel != null)\n inChannel.close();\n if (outChannel != null)\n outChannel.close();\n } catch (IOException e) {\n MessageGenerator.briefError(\"Error closing files involved in copying: \" + src + \" and \" + dst);\n return false;\n }\n }\n return true;\n }", "@Test\n public void testCopyToTempDir() throws IOException {\n File fileA = null;\n\n try {\n fileA = File.createTempFile(\"fileA\", \"fileA\");\n System.out.println(fileA.getAbsolutePath());\n FileOutputStream fos = new FileOutputStream(fileA);\n InputStream sis = new StringInputStream(\"some content\");\n StreamUtil.copy(sis, fos);\n sis.close();\n fos.close();\n\n copyToTempDir(fileA);\n\n File fileACopy = new File(new File(getTempDirPath()), fileA.getName());\n assertTrue(fileACopy.exists());\n assertTrue(fileACopy.isFile());\n } finally {\n boolean deleted = fileA.delete();\n assertTrue(deleted);\n }\n\n File dirB = null;\n\n try {\n dirB = Files.createTempDirectory(\"dirB\").toFile();\n System.out.println(dirB.getAbsolutePath());\n\n copyToTempDir(dirB);\n\n File dirBCopy = new File(new File(getTempDirPath()), dirB.getName());\n assertTrue(dirBCopy.exists());\n assertTrue(dirBCopy.isDirectory());\n } finally {\n boolean deleted = dirB.delete();\n assertTrue(deleted);\n }\n }", "public static void copy(String owner, Path src, Path target) throws CWLException {\r\n final Path finalSrc = toFinalSrcPath(src);\r\n if (src.toFile().exists() && Files.isReadable(src)) {\r\n CopyOption[] options = new CopyOption[] {\r\n StandardCopyOption.COPY_ATTRIBUTES,\r\n StandardCopyOption.REPLACE_EXISTING\r\n };\r\n final Path finalTarget = toFinalTargetPath(src, target);\r\n if (!finalTarget.getParent().toFile().exists()) {\r\n logger.debug(\"mkdir \\\"{}\\\"\", finalTarget.getParent());\r\n mkdirs(owner, finalTarget.getParent());\r\n }\r\n logger.debug(\"copy \\\"{}\\\" to \\\"{}\\\"\", finalSrc, finalTarget);\r\n try {\r\n if (finalSrc.toFile().isDirectory()) {\r\n Files.walkFileTree(finalSrc, new FileVisitor<Path>() {\r\n @Override\r\n public FileVisitResult preVisitDirectory(Path dir,\r\n BasicFileAttributes attrs) throws IOException {\r\n Files.copy(dir, finalTarget.resolve(finalSrc.relativize(dir)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\r\n Files.copy(file, finalTarget.resolve(finalSrc.relativize(file)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\r\n throw exc;\r\n }\r\n });\r\n } else {\r\n Files.copy(finalSrc, finalTarget, options);\r\n }\r\n } catch (IOException e) {\r\n throw new CWLException(\r\n ResourceLoader.getMessage(\"cwl.io.copy.failed\",\r\n finalSrc.toString(),\r\n finalTarget.toString(),\r\n e.getMessage()),\r\n 255);\r\n }\r\n } else {\r\n throw new CWLException(ResourceLoader.getMessage(\"cwl.io.file.unaccessed\", finalSrc.toString()),\r\n 255);\r\n }\r\n }", "public static void copy(File srcDir, File relSrcFile, File destDir, File relDestFile) throws IOException {\n File finalSrcFile = (srcDir != null) ? new File(srcDir, relSrcFile.getPath()) : relSrcFile;\n File relDestDir = relDestFile.getParentFile();\n if (relDestDir != null) {\n File finalDestDir = (destDir != null) ? new File(destDir, relDestDir.getPath()) : relDestDir;\n finalDestDir.mkdirs();\n }\n File finalDestFile = new File(destDir, relDestFile.getPath());\n Files.copy(finalSrcFile.toPath(), finalDestFile.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n }", "public boolean copy(File target) {\n\t\tboolean result = false;\n\n\t\ttry{\n\t\t\tif (this.exists()) {\n\t\t\t\tif (this.isDirectory()) {\n\t\t\t\t\tthis.copyFile(target);\n\t\t\t\t\ttarget = new File(target.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tif (this.listFiles() != null) {\n\t\t\t\t\t\tfor (java.io.File file : this.listFiles()) {\n\t\t\t\t\t\t\tif (file.isDirectory()) ((File) file).copy(target);\n\t\t\t\t\t\t\telse if (file.isFile()) ((File) file).copyFile(target);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (this.isFile()) {\n\t\t\t\t\tthis.copyFile(target);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresult = true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn result;\n\t}", "public static void copyDirectory(File srcDir, File dstDir) throws IOException {\n if (srcDir.isDirectory()) {\n if (!dstDir.exists()) dstDir.mkdir();\n String[] children = srcDir.list();\n for (int i = 0; i < children.length; i++) copyDirectory(new File(srcDir, children[i]), new File(dstDir, children[i]));\n } else {\n copyFile(srcDir, dstDir);\n }\n }", "public boolean copy(File fileToLoadOrig, boolean withDuplicate, List<String> passedFiles) {\n //Let us get the current Date\n Date date = new Date();\n LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n int year = localDate.getYear();\n int month = localDate.getMonthValue();\n int day = localDate.getDayOfMonth();\n\n String destDirectoryPath = year + \"-\" + month + \"-\" + day;\n\n //check if directory is created\n\n File destDirecoty = new File(\"./testing/dest/\" + destDirectoryPath);\n System.out.println(\"the file path:\" + destDirecoty.getAbsolutePath());\n\n if (!destDirecoty.exists()) {\n System.out.println(\"creating a new directory with path:\" + destDirecoty.getAbsolutePath());\n boolean created = destDirecoty.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n System.out.println(\"Directory is created\");\n //Great, now let us check if the file already in the dirctory\n\n\n boolean duplicateFound = false;\n\n\n File[] sourceFiles = fileToLoadOrig.listFiles();\n\n for (File sourceFile : sourceFiles) {\n //let us get the file extension\n String sourceFileType = \"\";\n int location = sourceFile.getName().lastIndexOf('.');\n if (location > 0) {\n sourceFileType = sourceFile.getName().substring(location + 1);\n }\n //cool, let us go on\n String nestedDirectory;\n switch (sourceFileType) {\n case \"txt\":\n nestedDirectory = \"txt\";\n break;\n case \"pdf\":\n nestedDirectory = \"pdf\";\n break;\n case \"xls\":\n nestedDirectory = \"xls\";\n default:\n nestedDirectory = \"others\";\n }\n\n //check if the type directory is created or not\n File nestedDirecotyFile = new File(destDirecoty.getAbsolutePath()+\"/\" + nestedDirectory);\n System.out.println(\"the file path:\" + nestedDirecotyFile.getAbsolutePath());\n\n if (!nestedDirecotyFile.exists()) {\n System.out.println(\"creating a new directory with path:\" + nestedDirecotyFile.getAbsolutePath());\n boolean created = nestedDirecotyFile.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n\n\n\n File[] destinationFiles = nestedDirecotyFile.listFiles();\n\n for (File destinationFile : destinationFiles) {\n if (destinationFile.getName().equals(sourceFile.getName())) {\n if (withDuplicate) {\n int maxSeqNum = 0;\n //Let us find the last sequence of the destinationFile\n for (File fileForDuplicate : destinationFiles) {\n String[] fileParts = fileForDuplicate.getName().split(\"_\");\n if (fileParts.length == 2) {\n //got a split\n if (fileParts[0].equals(destinationFile.getName())) {\n maxSeqNum = Math.max(maxSeqNum, Integer.parseInt(fileParts[1]));\n }\n }else{\n new RuntimeException(\"Files were found with multiple _\");\n }\n }\n String newFilePath = sourceFile.getName() + \"_\" + (maxSeqNum + 1);\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + newFilePath));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n } else {\n // let us delete the destinationFile and replace it\n destinationFile.delete();\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n break;\n } else {\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n }\n\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n\n }\n return true;\n }", "static void copyFile(File srcFile, File destFile) {\n\t\ttry {\n\t\t\tLong start = System.currentTimeMillis();\n\t\t\tdestFile.createNewFile();\n\t\t\tInputStream oInStream = new FileInputStream(srcFile);\n\t\t\tOutputStream oOutStream = new FileOutputStream(destFile);\n\n\t\t\t// Transfer bytes from in to out\n\t\t\tbyte[] oBytes = new byte[1024];\n\t\t\tint nLength;\n\t\t\tBufferedInputStream oBuffInputStream = \n\t\t\t\t\tnew BufferedInputStream( oInStream );\n\t\t\twhile ((nLength = oBuffInputStream.read(oBytes)) > 0) {\n\t\t\t\toOutStream.write(oBytes, 0, nLength);\n\t\t\t}\n\t\t\toInStream.close();\n\t\t\toOutStream.close();\n\t\t\tLong end = System.currentTimeMillis();\n\t\t\tSystem.out.println((end-start));\n\t\t} catch (IOException e) {\n\t\t\tlogger.info(\"Error in creating the excels :\" +e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void copy(String file1, String file2) throws FileNotFoundException{\r\n\t\tFile original = new File(file1);\r\n\t\tFile copied = new File(file2);\r\n\t\t\r\n\t\tScanner input = new Scanner(original);\r\n\t\tPrintWriter output = new PrintWriter(copied);//writes new file\r\n\t\t\r\n\t\twhile(input.hasNextLine()){\r\n\t\t\tString next = input.nextLine();\r\n\t\t\toutput.println(next);\t\t\t\r\n\t\t}\r\n\t\toutput.close();\r\n\t\tinput.close();\r\n\t}", "public void moveDirectory(String source, String target) throws IOException{\n Path sourceFilePath = Paths.get(PWD.getPath()+\"/\"+source);\n Path targetFilePath = Paths.get(PWD.getPath()+\"/\"+target);\n //using builtin move function which uses Paths\n Files.move(sourceFilePath,targetFilePath);\n }", "final public VFile copyTo(VDir parentDir,String newName) throws VlException\n {\n return (VFile)this.getTransferManager().doCopyMove(this,parentDir,newName,false);\n //return (VFile)doCopyMoveTo(parentDir,newName,false /*,options*/);\n }", "void moveFileToDirectoryWithConvertedFiles(String pathToFile);", "final public VFile copyToDir(VRL directoryVRL) throws VlException\n {\n VRL destVRL= directoryVRL.append(getBasename()); \n return (VFile)this.getTransferManager().doCopyMove(this,destVRL,false);\n }", "public static void copyDirectories (File d1, File d2){\n //checks for the console\n System.out.println(\"->Executing copyDirectories\");\n \n if(!d1.isDirectory()){\n //We will search the files and then move them recursive\n copyFyles(d1, d2);\n }//end if directory\n else{\n //Copy d1 to d2, as they are files\n \n //Creating the directory d2 if it does not exist yet.\n if(!d2.exists()){\n d2.mkdir();\n System.out.println(\"Creating directory: \"+d2);\n }//end if creating directori\n \n /* 1. Obtein the list of the existing files in the directory\n 2. Call recursivily this method to copy each of the files \n */\n System.out.println(\"Searching in the directory: \"+d1);\n String files[] = d1.list();\n for(int i=0; i<files.length; i++)\n copyDirectories(new File(d1,files[i]), new File(d2,files[i]));\n System.out.println(\"We copied the files sucesfully\");\n }//end else files\n }", "public static void copyFile(File oldLocation, File newLocation) throws IOException {\n\t\tif (oldLocation.exists()) {\n\t\t\tBufferedInputStream reader = new BufferedInputStream(new FileInputStream(oldLocation));\n\t\t\tBufferedOutputStream writer = new BufferedOutputStream(new FileOutputStream(newLocation, false));\n\t\t\ttry {\n\t\t\t\tbyte[] buff = new byte[8192];\n\t\t\t\tint numChars;\n\t\t\t\twhile ((numChars = reader.read(buff, 0, buff.length)) != -1) {\n\t\t\t\t\twriter.write(buff, 0, numChars);\n\t\t\t\t}\n\t\t\t} catch (IOException ex) {\n\t\t\t\tthrow new IOException(\n\t\t\t\t\t\t\"IOException when transferring \" + oldLocation.getPath() + \" to \" + newLocation.getPath());\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (reader != null) {\n\t\t\t\t\t\twriter.close();\n\t\t\t\t\t\treader.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tSystem.out.println(\"Error closing files when transferring \" + oldLocation.getPath() + \" to \"\n\t\t\t\t\t\t\t+ newLocation.getPath());\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new IOException(\"Old location does not exist when transferring \" + oldLocation.getPath() + \" to \"\n\t\t\t\t\t+ newLocation.getPath());\n\t\t}\n\t}", "@Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n Path targetFile = this.currentTargetDirectory.resolve(file.getFileName());\n Files.copy(file, targetFile);\n logger.output(\"Copied file: \" + targetFile);\n return FileVisitResult.CONTINUE;\n }", "public void copyDirectory(File srcDir, File dstDir) throws IOException {\n\t\tif (srcDir.isDirectory()) {\n\t\t\tif (srcDir.getName().startsWith(\".\")) {// Si es un directorio oculto\n\t\t\t\t\t\t\t\t\t\t\t\t\t// no lo copiamos\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Si el directorio no existe\n\t\t\tif (!dstDir.exists()) {\n\t\t\t\tif(logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(\"El directorio no existe lo creamos. \" + dstDir);\n\t\t\t\tdstDir.mkdirs();\n\t\t\t}\n\n\t\t\tString[] children = srcDir.list();\n\t\t\tfor (int i = 0; i < children.length; i++) {\n\n\t\t\t\tcopyDirectory(new File(srcDir, children[i]), new File(dstDir,\n\t\t\t\t\t\tchildren[i]));\n\n\t\t\t}\n\t\t} else {\n\t\t\t// This method is implemented in e1071 Copying a File\n\t\t\tcopyFile(srcDir, dstDir);\n\t\t}\n\t}", "public static void copy(File file, File file2) {\n Throwable th;\n Throwable th2;\n Throwable th3;\n Throwable th4 = null;\n FileInputStream fileInputStream = new FileInputStream(file);\n FileOutputStream fileOutputStream = new FileOutputStream(file2);\n byte[] bArr = new byte[1024];\n while (true) {\n int read = fileInputStream.read(bArr);\n if (read > 0) {\n fileOutputStream.write(bArr, 0, read);\n } else {\n fileOutputStream.close();\n fileInputStream.close();\n return;\n }\n }\n throw th2;\n if (th4 == null) {\n }\n throw th;\n throw th;\n if (th3 != null) {\n try {\n fileOutputStream.close();\n } catch (Throwable th5) {\n }\n } else {\n fileOutputStream.close();\n }\n throw th2;\n }", "private void copyCoverageFile(String sourceResourceName, String targetFileName, WorkflowJob job) throws Exception {\n FilePath directory = ensureWorkspaceExists(job);\n\n FilePath dest = directory.child(targetFileName);\n org.apache.commons.io.IOUtils.copy(getClass().getResourceAsStream(sourceResourceName), dest.write());\n }", "@Test\n public void testCopyFile() throws Exception {\n System.out.println(\"copyFile with existing source image file\");\n String sourcePath = System.getProperty(\"user.dir\")+fSeparator+\"src\"+fSeparator+\"test\"+fSeparator+\n \"java\"+fSeparator+\"resources\"+fSeparator+\"testImg.jpg\";\n File source = new File(sourcePath);\n \n File dest = new File(folder.toString()+fSeparator+\"Images\");\n FilesDao instance = new FilesDao();\n boolean result;\n try{\n instance.copyFile(source, dest);\n File copiedFile = new File(dest+fSeparator+\"testImg.jpg\");\n if(copiedFile.exists())\n result = true;\n else\n result = false;\n }catch(Exception ex){\n result = false;\n }\n boolean expResult = true;\n assertEquals(\"Some message\",expResult,result);\n }", "public void copyFile(InputStream inputStream, OutputStream outputStream) throws IOException\n {\n byte[] buffer = new byte[1024];\n int length;\n while ((length = inputStream.read(buffer)) > 0)\n outputStream.write(buffer, 0, length);\n inputStream.close();\n outputStream.close();\n }", "public static void copyPaths (Path path1, Path path2){\n // Creating files\n File d1 = path1.toFile();\n File d2 = path2.toFile();\n \n //checks for the console\n System.out.println(\"->Executing copyDirectories\");\n \n if(!d1.isDirectory()){\n //We will search the files and then move them recursive\n copyFyles(d1, d2);\n }//end if directory\n else{\n //Copy d1 to d2, as they are files\n \n //Creating the directory d2 if it does not exist yet.\n if(!d2.exists()){\n d2.mkdir();\n System.out.println(\"Creating directory: \"+d2);\n }//end if creating directori\n \n /* 1. Obtein the list of the existing files in the directory\n 2. Call recursivily this method to copy each of the files \n */\n System.out.println(\"Searching in the directory: \"+d1);\n String files[] = d1.list();\n for(int i=0; i<files.length; i++)\n copyDirectories(new File(d1,files[i]), new File(d2,files[i]));\n System.out.println(\"We copied the files sucesfully\");\n }//end else files\n }", "public void moveFile(String url) throws IOException {\n\n\t\tSystem.out.println(\"folder_temp : \" + folder_temp);\n\t\tPath Source = Paths.get(folder_temp + url);\n\t\tPath Destination = Paths.get(folder_photo + url);\n\t\tSystem.out.println(\"folder_photo : \" + folder_photo);\n\n\t\tif (Files.exists(Source)) {\n\t\t\t// Files.move(Source, Destination,\n\t\t\t// StandardCopyOption.REPLACE_EXISTING);\n\t\t\t// cpie du fichiet au lieu de deplaacer car il est enn coiurs\n\t\t\t// d'utilisation\n\t\t\tFiles.copy(Source, Destination, StandardCopyOption.REPLACE_EXISTING);\n\t\t}\n\n\t}" ]
[ "0.7810096", "0.75946903", "0.7446452", "0.7340955", "0.72868854", "0.725045", "0.72156507", "0.71652037", "0.71434945", "0.71300334", "0.7127376", "0.7101864", "0.7081261", "0.7041158", "0.7028677", "0.7022495", "0.6974205", "0.6904065", "0.68679106", "0.6860213", "0.68281794", "0.68036914", "0.6801092", "0.67824286", "0.67715806", "0.6768072", "0.6765665", "0.6746333", "0.6707569", "0.66844803", "0.6671056", "0.6670475", "0.6645129", "0.6643458", "0.66318905", "0.6600635", "0.65706354", "0.65047634", "0.64725256", "0.6471357", "0.64694315", "0.64443016", "0.64220166", "0.6399068", "0.63805705", "0.6368041", "0.63427657", "0.63352567", "0.6323654", "0.63161457", "0.63067925", "0.629802", "0.629242", "0.62838143", "0.6266143", "0.62634254", "0.626047", "0.62591285", "0.62590235", "0.62380487", "0.6229164", "0.62259185", "0.62219983", "0.6174256", "0.6159811", "0.61559314", "0.6147745", "0.6141368", "0.613204", "0.61301774", "0.61269814", "0.6118787", "0.610281", "0.60937613", "0.6055662", "0.6001221", "0.59781927", "0.59613055", "0.59592", "0.5923467", "0.5908538", "0.5902802", "0.5898361", "0.58866155", "0.5883621", "0.5881501", "0.58564854", "0.58547616", "0.5850555", "0.5825557", "0.58229244", "0.58011836", "0.58009225", "0.5793799", "0.5780135", "0.5768142", "0.5763703", "0.57591915", "0.5743783", "0.5743774" ]
0.691723
17
Utility method to get extension of a file return empty String if
public static String getExtension(final File file) throws IOException { return FilenameUtils.getExtension(file.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getFileExtension();", "public String getFileExtension();", "public String getExtension() {\r\n\t\t\tfinal String filename = path.getName();\r\n\t\t\tfinal int dotIndex = filename.lastIndexOf('.');\r\n\t\t\tif (dotIndex >= 0) {\r\n\t\t\t\tif (dotIndex == filename.length() - 1) {\r\n\t\t\t\t\treturn \"\"; // dot is the last char in filename\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn filename.substring(dotIndex + 1);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn \"\"; // no dot in filename\r\n\t\t\t}\r\n\t\t}", "private String getExtension(java.io.File file){\n String name = file.getName();\n int idx = name.lastIndexOf(\".\");\n if (idx > -1) return name.substring(idx+1);\n else return \"\";\n }", "public String getFileExtension() {\n return toString().toLowerCase();\n }", "private String getTypeFromExtension()\n {\n String filename = getFileName();\n String ext = \"\";\n\n if (filename != null && filename.length() > 0)\n {\n int index = filename.lastIndexOf('.');\n if (index >= 0)\n {\n ext = filename.substring(index + 1);\n }\n }\n\n return ext;\n }", "public String extension() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n return fullPath.substring(dot + 1);\n }", "public static String getFileExtension(String f) {\n\t\tif (f == null) return \"\";\n\t\tint lastIndex = f.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? f.substring(lastIndex + 1) : \"\";\n\t}", "String getExtension();", "@Override\r\n public String getExtension() {\r\n if (extension == null) {\r\n getBaseName();\r\n final int pos = baseName.lastIndexOf('.');\r\n // if ((pos == -1) || (pos == baseName.length() - 1))\r\n // imario@ops.co.at: Review of patch from adagoubard@chello.nl\r\n // do not treat file names like\r\n // .bashrc c:\\windows\\.java c:\\windows\\.javaws c:\\windows\\.jedit c:\\windows\\.appletviewer\r\n // as extension\r\n if (pos < 1 || pos == baseName.length() - 1) {\r\n // No extension\r\n extension = \"\";\r\n } else {\r\n extension = baseName.substring(pos + 1).intern();\r\n }\r\n }\r\n return extension;\r\n }", "private static String getFileExtension(String fileName) {\r\n\t\tString ext = IConstants.emptyString;\r\n\t\tint mid = fileName.lastIndexOf(\".\");\r\n\t\text = fileName.substring(mid + 1, fileName.length());\r\n\t\tSystem.out.println(\"File Extension --\" + ext);\r\n\t\treturn ext;\r\n\t}", "public String getFileExtension(File file) {\n String name = file.getName();\n try {\n return name.substring(name.lastIndexOf(\".\") + 1);\n } catch (Exception e) {\n return \"\";\n }\n }", "private static char getFileExt(String file) {\r\n \treturn file.charAt(file.indexOf('.')+1);\r\n }", "String getFileExtensionByFileString(String name);", "protected abstract String getFileExtension();", "public String getExtension() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.get(this.lenght - 1).contains(\".\"))\n\t\t{\n\t\t\tString temp = this.get(this.lenght - 1);\n\t\t\t\n\t\t\tString[] parts = temp.split(\"\\\\.\");\n\t\t\t\n\t\t\tresult = parts[parts.length - 1];\n\t\t}\n\t\telse\n\t\t\tresult = \"\";\n\t\t\n\n\t\treturn result;\n\t}", "public String getExt() {\n\t\treturn IpmemsFile.getFileExtension(file);\n\t}", "public String fileExtension() {\r\n return getContent().fileExtension();\r\n }", "public abstract String getFileExtension();", "public static String getFileExtension(String filePath) {\n if (filePath == null || filePath.isEmpty()) {\n return \"\";\n }\n\n int extenPosi = filePath.lastIndexOf(\".\");\n int filePosi = filePath.lastIndexOf(File.separator);\n if (extenPosi == -1) {\n return \"\";\n }\n return (filePosi >= extenPosi) ? \"\" : filePath.substring(extenPosi + 1);\n }", "public static String getFileExtension(URL url) {\n\t\tString fileName = url.getFile();\n\t\tint lastIndex = fileName.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? fileName.substring(lastIndex + 1) : \"\";\n\t}", "public static String getFileExtension(File f) {\n\t\tString fileName = f.getName();\n\t\tint lastIndex = fileName.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? fileName.substring(lastIndex + 1) : \"\";\n\t}", "public static String getFileExtension(File f) {\r\n\tfinal int idx = f.getName().indexOf(\".\");\r\n\tif (idx == -1)\r\n\t return \"\";\r\n\telse\r\n\t return f.getName().substring(idx + 1);\r\n }", "public static String getExtension(File file) {\r\n String ext = null;\r\n String s = file.getName();\r\n int i = s.lastIndexOf('.');\r\n if(i > 0 && i < s.length() - 1) {\r\n ext = s.substring(i + 1).toLowerCase();\r\n }\r\n return ext;\r\n }", "public static String getExtension(final String file) throws IOException {\n return FilenameUtils.getExtension(file);\n }", "private String getExtension(File aFile) {\n String ext = null;\n String s = aFile.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i + 1).toLowerCase();\n }\n\n return ext;\n }", "private String getFileExtension(String fileName) {\n return fileName.substring(fileName.lastIndexOf('.') + 1);\n }", "public static String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i + 1).toLowerCase();\n }\n\n return ext;\n }", "public static String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf(\".\");\n ext = s.substring(i+1).toLowerCase();\n return ext;\n }", "public static String getExtn(String fileName)\r\n\t{\r\n\t\tString res=\"\";\r\n\t\tfor(int i=fileName.length()-1;i>=0;i--)\r\n\t\t{\r\n\t\t\tif(fileName.charAt(i)!='.')\r\n\t\t\t\tres=fileName.charAt(i)+res;\r\n\t\t\telse \r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "private String getExtension(File f) {\n\t\tString e = null;\n\t\tString s = f.getName();\n\t\tint i = s.lastIndexOf('.');\n\n\t\tif (i > 0 && i < s.length() - 1) {\n\t\t\te = s.substring(i + 1).toLowerCase();\n\t\t}\n\t\treturn e;\n\t}", "public static String getExt(File song)\n\t{\n\t\treturn song.getName().substring(song.getName().lastIndexOf('.') + 1);\n\t}", "public static String getFileExtension() {\n return fileExtension;\n }", "@CheckForNull\n String getPreferredExtension();", "private String getFileExtension(String mimeType) {\n mimeType = mimeType.toLowerCase();\n if (mimeType.equals(\"application/msword\")) {\n return \".doc\";\n }\n if (mimeType.equals(\"application/vnd.ms-excel\")) {\n return \".xls\";\n }\n if (mimeType.equals(\"application/pdf\")) {\n return \".pdf\";\n }\n if (mimeType.equals(\"text/plain\")) {\n return \".txt\";\n }\n\n return \"\";\n }", "public static String getExtension(File file) {\n\t\tString ext = null;\n\t\tString fileName = file.getName();\n\t\tint i = fileName.lastIndexOf('.');\n\n\t\tif (i > 0 && i < fileName.length() - 1) {\n\t\t\text = fileName.substring(i+1).toLowerCase();\n\t\t}\n\t\treturn ext;\n\t}", "public final String getExtension(File f) {\n\t String ext = null;\n\t String s = f.getName();\n\t int i = s.lastIndexOf('.');\n\n\t if (i > 0 && i < s.length() - 1) {\n\t ext = s.substring(i+1).toLowerCase();\n\t }\n\t return ext;\n\t }", "private String getFileExtension(File f) {\n String fileName = f.getName();\n return getFileExtension(fileName);\n }", "private String retrieveFileExtension(String targetFile)\r\n\t{\r\n\t\tString result = \"\";\r\n\t\tfor (int index = targetFile.length(); index > 0; index--)\r\n\t\t{\r\n\t\t\tif (targetFile.charAt(index - 1) == '.')\r\n\t\t\t{\r\n\t\t\t\tresult = targetFile.substring(index, targetFile.length());\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (result.equals(targetFile))\r\n\t\t\treturn \"\";\r\n\t\treturn result;\r\n\t}", "public static String getFileExtension(String filename) {\n\t\t\n\t\tint periodIndex = filename.lastIndexOf(\".\");\n\t\t\n\t\tif(periodIndex == -1) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(periodIndex == filename.length() - 1) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn filename.substring(periodIndex + 1, filename.length());\n\t}", "public final String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i+1).toLowerCase();\n }\n return ext;\n }", "public static String getFileExtension(String filename) {\n\t\tif(filename.indexOf(\".\") == -1)\n\t\t\treturn \"\";\n\t\t\n\t\treturn \".\"+filename.substring(filename.lastIndexOf(\".\")+1);\n\t}", "public String getExtension(File f) {\n\t\t\tString ext = null;\n\t\t\tString s = f.getName();\n\t\t\tint i = s.lastIndexOf('.');\n\n\t\t\tif (i > 0 && i < s.length() - 1)\n\t\t\t\text = s.substring(i + 1).toLowerCase();\n\t\t\treturn ext;\n\t\t}", "public static String GetFileExtension(String filePath) {\n\n\t\tint index = filePath.lastIndexOf('.');\n\t\tif (index > 0) {\n\t\t\treturn filePath.substring(index + 1);\n\t\t}\n\n\t\treturn \"\";\n\t}", "public static String getFileExtension(File file) {\r\n String fileName = file.getName();\r\n if(fileName.lastIndexOf(\".\") != -1 && fileName.lastIndexOf(\".\") != 0)\r\n return fileName.substring(fileName.lastIndexOf(\".\")+1).toLowerCase();\r\n else return \"\";\r\n }", "public final String getCurrentExt() {\n FileFilter filter = this.getFileFilter();\n if (filter instanceof ExtensionFileFilter) {\n return ((ExtensionFileFilter)filter).getExt();\n }\n return null;\n }", "private static String getFileExtension(File cFile) {\n\t\tString oldname = cFile.getName();\r\n\t\tString extension = oldname.substring(oldname.lastIndexOf(\".\"));\r\n\t\treturn extension;\r\n\t}", "java.lang.String getExtensionText();", "protected String getExtension() {\n\t\treturn \"\";\n\t}", "public static String getFileExtension(File f) {\n String name = f.getName();\n int index = name.lastIndexOf(\".\");\n if(index == -1) return null;\n \n // the file must have a name other than the extension\n if(index == 0) return null;\n \n // if the last character of the string is the \".\", then there's\n // no extension\n if(index == (name.length()-1)) return null;\n \n return name.substring(index+1);\n }", "public String getFileExtension(File objFile) {\n\n String sFileName = null;\n String sExtension = null;\n\n try {\n\n if (!objFile.exists()) {\n throw new Exception(\"File does not exists\");\n }\n\n sFileName = objFile.getName();\n int i = sFileName.lastIndexOf('.');\n if (i > 0) {\n sExtension = sFileName.substring(i + 1).trim();\n }\n\n } catch (Exception e) {\n println(\"Methods.getFileExtension : \" + e.toString());\n sExtension = \"\";\n } finally {\n return sExtension;\n }\n }", "final public String getExtension()\n\t{\n\t\treturn this.getLocation().getExtension(); \n\t}", "public String getFileExt(File fileName) {\n return fileName.getName()\n .substring(fileName.getName().lastIndexOf('.'));\n }", "public static String getSafeFileExtension(IPath path) {\r\n\t\tString fileExtension = \"\"; //$NON-NLS-1$\r\n\t\tif (path != null) {\r\n\t\t\tString temp = path.getFileExtension();\r\n\t\t\tif (temp != null)\r\n\t\t\t\tfileExtension = temp;\r\n\t\t}\r\n\t\t\r\n\t\treturn fileExtension;\r\n\t}", "public static String getFileExtension(String fileName) {\n return fileName.trim().substring(fileName.indexOf('.'));\n }", "private String extensions() {\n return Arrays.stream(f.getName().split(\"\\\\.\")).skip(1).collect(Collectors.joining(\".\"));\n }", "public String getExtension(File f) {\n\t if(f != null) {\n\t String filename = f.getName();\n\t int i = filename.lastIndexOf('.');\n\t if(i>0 && i<filename.length()-1) {\n\t\t return filename.substring(i+1).toLowerCase();\n\t }\n\t }\n\t return null;\n }", "public static String getFileExtention(String file_path)\n {\n String file_name = getFileName(file_path);\n int index = file_name.lastIndexOf(46);\n\n if (index >= 0)\n return file_name.substring(index + 1);\n\n return \"\";\n }", "private String getExtension(String path){\n System.out.println(\"Начато получение расширения: \");\n if (path.contains(\".\")){\n int dot = path.lastIndexOf(\".\");\n System.out.println(\"return \"+path.substring(dot, path.length()));\n return path.substring(dot, path.length());\n } else {\n// System.out.println(\"return \\\"\\\"\");\n return \"\";\n }\n }", "String getOutputExtension();", "public static String getFileExtension(File aFile) {\n\t\tString returnMe = aFile.getName().substring(\n\t\t\t\taFile.getName().lastIndexOf('.') + 1);\n\t\treturn returnMe;\n\t}", "public static String GetFileExtension(String hint) {\n int dotIndex = hint.lastIndexOf(\".\");\n if (dotIndex > 0) {\n return hint.substring(dotIndex + 1).toLowerCase();\n }\n return \"\";\n }", "public static String getExtension(String uri) {\n if (uri == null) {\n return null;\n }\n\n int dot = uri.lastIndexOf(\".\");\n if (dot >= 0) {\n return uri.substring(dot);\n } else {\n // No extension.\n return \"\";\n }\n }", "public static String getExtension(String img) {\n String[] arr = img.split(\"\\\\.\");\n return arr[arr.length - 1];\n }", "public String getFileExtension() {\r\n\t\treturn this.fileExtension;\r\n\t}", "public static String getExt(String name) {\n\t\tif (name == null) return null;\n\t\tint s = name.lastIndexOf('.');\n\t\treturn s == -1 ? null : s == 0 ? name : name.substring(s);\n\t}", "public String getExtension(String url) {\n\t\tint dotIndex = url.lastIndexOf('.');\n\t\tString extension = null;\n\t\tif (dotIndex > 0) {\n\t\t\textension = url.substring(dotIndex + 1);\n\t\t}\n\t\treturn extension;\n\t}", "public static String getExtension(String uri) {\n if (uri == null) {\n return null;\n }\n\n int dot = uri.lastIndexOf('.');\n if (dot >= 0) {\n return uri.substring(dot);\n } else {\n // No extension.\n return \"\";\n }\n }", "public static String extractExtension(String filename)\n\t{\n\t\treturn ImageWriterFilter.extractExtension(filename);\n\t}", "public static String sourceExtension()\n {\n read_if_needed_();\n \n return _ext; \n }", "String getContentType(String fileExtension);", "String validateAllowedExtensions(File fileNamePath) {\n\t\tString fileName = fileNamePath.getName();\r\n\t\t\r\n\t\t//Get the index based on the extension into the string\r\n\t\tint lastIndex = fileName.lastIndexOf(\".\");\r\n\t\t\r\n\t\t//Get substring/extension from the string\r\n\t\tString extension = fileName.substring(lastIndex).toUpperCase();\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"GIF\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"JPG\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"TXT\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\t// There is no extension for the file\r\n\t\tif (lastIndex == -1) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t\r\n\t\t// No valid extension\r\n\t\treturn \"\";\r\n\t\t\r\n\t}", "private static String getExtensionOrFileName(String filename, boolean extension) {\n\n\t\tString fileWithExt = new File(filename).getName();\n\t\tStringTokenizer s = new StringTokenizer(fileWithExt, \".\");\n\t\tif (extension) {\n\t\t\ts.nextToken();\n\t\t\treturn s.nextToken();\n\t\t} else\n\t\t\treturn s.nextToken();\n\t}", "public static String GetExtension(String mimeType) {\n if (mimeType == null || mimeType.length() ==0) {\n return null;\n }\n return mimeTypeToExtensionMap.get(mimeType);\n }", "public String getOutputExtension(String inputExtension);", "public String getFirstExtension() {\n List<String> ext = this.getExtensions();\n \n if (ext == null || ext.isEmpty()) {\n return null;\n }\n \n return ext.get(0);\n }", "public String getFileExtension() {\r\n return Generator.ANIMALSCRIPT_FORMAT_EXTENSION;\r\n }", "private String retrieveFileNameWithOutExt(String targetFile)\r\n\t{\r\n\t\tfor (int index = targetFile.length(); index > 0; index--)\r\n\t\t{\r\n\t\t\tif (targetFile.charAt(index - 1) == '.')\r\n\t\t\t{\r\n\t\t\t\ttargetFile = targetFile.substring(0, index - 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn targetFile;\r\n\t}", "private String getWithoutExtension(String withExtension){\n if (withExtension.contains(\".\")){\n int dot = withExtension.lastIndexOf(\".\");\n return withExtension.substring(0, dot);\n } else {\n return withExtension;\n }\n }", "java.lang.String getFilename();", "java.lang.String getFilename();", "public String getFileNoPath() {\n if (fileType == HTTP) {\n return fileName.substring(fileName.lastIndexOf(\"/\") + 1);\n } else {\n return fileName.substring(fileName.lastIndexOf(File.separator) + 1);\n }\n }", "public String getExtension() {\n return extension;\n }", "public String getExtension() {\n return extension;\n }", "private static String getFileNameWithoutExtension(File file) {\n String fileName = \"\";\n \n try {\n if (file != null && file.exists()) {\n String name = file.getName();\n fileName = name.replaceFirst(\"[.][^.]+$\", \"\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n fileName = \"\";\n }\n return fileName;\n }", "public String GetFileExtension(Uri uri) {\n\n ContentResolver contentResolver = getContentResolver();\n\n MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();\n\n // Returning the file Extension.\n return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri)) ;\n\n }", "String getSkipExtension();", "public static String getSlideFileExtension(String slideRef) {\n\t\t// Determine the file extension for this slide\n\t\treturn FilenameUtils.getExtension(slideRef);\n\t}", "@XmlElement\n @Nullable\n public String getFileExtension() {\n return this.fileExtension;\n }", "private String getFileExtension(Uri uri) {\n ContentResolver contentResolver = getApplicationContext().getContentResolver();\n MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();\n return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri));\n }", "public static String getExtension(URI uri) {\n\t\tif (uri != null) {\n\t\t\tString location = uri.getSchemeSpecificPart();\n\t\t\tif (location != null) {\n\t\t\t\tString name = location;\n\t\t\t\tint index = location.lastIndexOf('.');\n\t\t\t\tif (index != -1) {\n\t\t\t\t\tname = name.substring(index + 1, name.length());\n\t\t\t\t}\n\t\t\t\treturn name;\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "public String getExtension() {\n return extension;\n }", "public String getDefaultExtension() {\n return \"ino\";\n }", "public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }", "private static String getFileTagsBasedOnExt(String fileExt) {\n String fileType = new Tika().detect(fileExt).replaceAll(\"/.*\", \"\");\n return Arrays.asList(EXPECTED_TYPES).contains(fileType) ? fileType : null;\n }", "public String getWriteFileExtension(int formatIndex);", "public static String defaultFileExtension() {\n return \"dot\";\n }", "String noExt(String name) {\r\n int last=name.lastIndexOf(\".\");\r\n if(last>0)\r\n return name.substring(0, last);\r\n\r\n return name;\r\n }", "public String getExtension(String filename, String extensionSymbol) {\n\t\tif (filename == null) {\n\n\t\t\treturn null;\n\n\t\t}\n\t\tint extensionPos = filename.lastIndexOf(extensionSymbol);\n\t\treturn filename.substring(extensionPos + 1);\n\t}", "public String getReadFileExtension(int formatIndex);" ]
[ "0.8567105", "0.84099877", "0.83829993", "0.8236604", "0.8227642", "0.8177552", "0.8139361", "0.8058116", "0.80480283", "0.8017973", "0.79816383", "0.7980229", "0.79486203", "0.7937094", "0.785605", "0.78233075", "0.7812318", "0.78119516", "0.77921486", "0.77916807", "0.7776198", "0.77469254", "0.7739249", "0.7729695", "0.7721715", "0.7714724", "0.7704677", "0.770414", "0.76961595", "0.7689135", "0.767523", "0.76732415", "0.7672022", "0.76670414", "0.76527596", "0.7652554", "0.7650206", "0.76300186", "0.7602761", "0.7593019", "0.7582393", "0.7575462", "0.75640726", "0.75540334", "0.7542842", "0.75382805", "0.7488281", "0.7484739", "0.74643326", "0.74613935", "0.7452737", "0.74221784", "0.7417397", "0.74125457", "0.739811", "0.73833877", "0.73734945", "0.7371121", "0.73509234", "0.732315", "0.7311237", "0.72696394", "0.72665715", "0.7258302", "0.72564054", "0.724605", "0.72293866", "0.7225596", "0.7186711", "0.7124897", "0.7100872", "0.7087796", "0.7056402", "0.70456314", "0.7037672", "0.7010324", "0.69656044", "0.69650835", "0.69577044", "0.69521767", "0.69521767", "0.69456303", "0.6911044", "0.6911044", "0.6909768", "0.69031686", "0.686919", "0.68586725", "0.68453735", "0.6822791", "0.68007", "0.67908573", "0.678222", "0.67798954", "0.6744343", "0.673517", "0.6724423", "0.6721053", "0.6699694", "0.6682737" ]
0.74619067
49
Utility method to get extension of a file return empty String if
public static String getExtension(final String file) throws IOException { return FilenameUtils.getExtension(file); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getFileExtension();", "public String getFileExtension();", "public String getExtension() {\r\n\t\t\tfinal String filename = path.getName();\r\n\t\t\tfinal int dotIndex = filename.lastIndexOf('.');\r\n\t\t\tif (dotIndex >= 0) {\r\n\t\t\t\tif (dotIndex == filename.length() - 1) {\r\n\t\t\t\t\treturn \"\"; // dot is the last char in filename\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn filename.substring(dotIndex + 1);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn \"\"; // no dot in filename\r\n\t\t\t}\r\n\t\t}", "private String getExtension(java.io.File file){\n String name = file.getName();\n int idx = name.lastIndexOf(\".\");\n if (idx > -1) return name.substring(idx+1);\n else return \"\";\n }", "public String getFileExtension() {\n return toString().toLowerCase();\n }", "private String getTypeFromExtension()\n {\n String filename = getFileName();\n String ext = \"\";\n\n if (filename != null && filename.length() > 0)\n {\n int index = filename.lastIndexOf('.');\n if (index >= 0)\n {\n ext = filename.substring(index + 1);\n }\n }\n\n return ext;\n }", "public String extension() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n return fullPath.substring(dot + 1);\n }", "public static String getFileExtension(String f) {\n\t\tif (f == null) return \"\";\n\t\tint lastIndex = f.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? f.substring(lastIndex + 1) : \"\";\n\t}", "String getExtension();", "@Override\r\n public String getExtension() {\r\n if (extension == null) {\r\n getBaseName();\r\n final int pos = baseName.lastIndexOf('.');\r\n // if ((pos == -1) || (pos == baseName.length() - 1))\r\n // imario@ops.co.at: Review of patch from adagoubard@chello.nl\r\n // do not treat file names like\r\n // .bashrc c:\\windows\\.java c:\\windows\\.javaws c:\\windows\\.jedit c:\\windows\\.appletviewer\r\n // as extension\r\n if (pos < 1 || pos == baseName.length() - 1) {\r\n // No extension\r\n extension = \"\";\r\n } else {\r\n extension = baseName.substring(pos + 1).intern();\r\n }\r\n }\r\n return extension;\r\n }", "private static String getFileExtension(String fileName) {\r\n\t\tString ext = IConstants.emptyString;\r\n\t\tint mid = fileName.lastIndexOf(\".\");\r\n\t\text = fileName.substring(mid + 1, fileName.length());\r\n\t\tSystem.out.println(\"File Extension --\" + ext);\r\n\t\treturn ext;\r\n\t}", "public String getFileExtension(File file) {\n String name = file.getName();\n try {\n return name.substring(name.lastIndexOf(\".\") + 1);\n } catch (Exception e) {\n return \"\";\n }\n }", "private static char getFileExt(String file) {\r\n \treturn file.charAt(file.indexOf('.')+1);\r\n }", "String getFileExtensionByFileString(String name);", "protected abstract String getFileExtension();", "public String getExtension() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.get(this.lenght - 1).contains(\".\"))\n\t\t{\n\t\t\tString temp = this.get(this.lenght - 1);\n\t\t\t\n\t\t\tString[] parts = temp.split(\"\\\\.\");\n\t\t\t\n\t\t\tresult = parts[parts.length - 1];\n\t\t}\n\t\telse\n\t\t\tresult = \"\";\n\t\t\n\n\t\treturn result;\n\t}", "public String getExt() {\n\t\treturn IpmemsFile.getFileExtension(file);\n\t}", "public String fileExtension() {\r\n return getContent().fileExtension();\r\n }", "public abstract String getFileExtension();", "public static String getFileExtension(String filePath) {\n if (filePath == null || filePath.isEmpty()) {\n return \"\";\n }\n\n int extenPosi = filePath.lastIndexOf(\".\");\n int filePosi = filePath.lastIndexOf(File.separator);\n if (extenPosi == -1) {\n return \"\";\n }\n return (filePosi >= extenPosi) ? \"\" : filePath.substring(extenPosi + 1);\n }", "public static String getFileExtension(URL url) {\n\t\tString fileName = url.getFile();\n\t\tint lastIndex = fileName.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? fileName.substring(lastIndex + 1) : \"\";\n\t}", "public static String getFileExtension(File f) {\n\t\tString fileName = f.getName();\n\t\tint lastIndex = fileName.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? fileName.substring(lastIndex + 1) : \"\";\n\t}", "public static String getFileExtension(File f) {\r\n\tfinal int idx = f.getName().indexOf(\".\");\r\n\tif (idx == -1)\r\n\t return \"\";\r\n\telse\r\n\t return f.getName().substring(idx + 1);\r\n }", "public static String getExtension(File file) {\r\n String ext = null;\r\n String s = file.getName();\r\n int i = s.lastIndexOf('.');\r\n if(i > 0 && i < s.length() - 1) {\r\n ext = s.substring(i + 1).toLowerCase();\r\n }\r\n return ext;\r\n }", "private String getExtension(File aFile) {\n String ext = null;\n String s = aFile.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i + 1).toLowerCase();\n }\n\n return ext;\n }", "private String getFileExtension(String fileName) {\n return fileName.substring(fileName.lastIndexOf('.') + 1);\n }", "public static String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i + 1).toLowerCase();\n }\n\n return ext;\n }", "public static String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf(\".\");\n ext = s.substring(i+1).toLowerCase();\n return ext;\n }", "public static String getExtn(String fileName)\r\n\t{\r\n\t\tString res=\"\";\r\n\t\tfor(int i=fileName.length()-1;i>=0;i--)\r\n\t\t{\r\n\t\t\tif(fileName.charAt(i)!='.')\r\n\t\t\t\tres=fileName.charAt(i)+res;\r\n\t\t\telse \r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "private String getExtension(File f) {\n\t\tString e = null;\n\t\tString s = f.getName();\n\t\tint i = s.lastIndexOf('.');\n\n\t\tif (i > 0 && i < s.length() - 1) {\n\t\t\te = s.substring(i + 1).toLowerCase();\n\t\t}\n\t\treturn e;\n\t}", "public static String getExt(File song)\n\t{\n\t\treturn song.getName().substring(song.getName().lastIndexOf('.') + 1);\n\t}", "public static String getFileExtension() {\n return fileExtension;\n }", "@CheckForNull\n String getPreferredExtension();", "public static String getExtension(File file) {\n\t\tString ext = null;\n\t\tString fileName = file.getName();\n\t\tint i = fileName.lastIndexOf('.');\n\n\t\tif (i > 0 && i < fileName.length() - 1) {\n\t\t\text = fileName.substring(i+1).toLowerCase();\n\t\t}\n\t\treturn ext;\n\t}", "private String getFileExtension(String mimeType) {\n mimeType = mimeType.toLowerCase();\n if (mimeType.equals(\"application/msword\")) {\n return \".doc\";\n }\n if (mimeType.equals(\"application/vnd.ms-excel\")) {\n return \".xls\";\n }\n if (mimeType.equals(\"application/pdf\")) {\n return \".pdf\";\n }\n if (mimeType.equals(\"text/plain\")) {\n return \".txt\";\n }\n\n return \"\";\n }", "public final String getExtension(File f) {\n\t String ext = null;\n\t String s = f.getName();\n\t int i = s.lastIndexOf('.');\n\n\t if (i > 0 && i < s.length() - 1) {\n\t ext = s.substring(i+1).toLowerCase();\n\t }\n\t return ext;\n\t }", "private String getFileExtension(File f) {\n String fileName = f.getName();\n return getFileExtension(fileName);\n }", "private String retrieveFileExtension(String targetFile)\r\n\t{\r\n\t\tString result = \"\";\r\n\t\tfor (int index = targetFile.length(); index > 0; index--)\r\n\t\t{\r\n\t\t\tif (targetFile.charAt(index - 1) == '.')\r\n\t\t\t{\r\n\t\t\t\tresult = targetFile.substring(index, targetFile.length());\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (result.equals(targetFile))\r\n\t\t\treturn \"\";\r\n\t\treturn result;\r\n\t}", "public static String getFileExtension(String filename) {\n\t\t\n\t\tint periodIndex = filename.lastIndexOf(\".\");\n\t\t\n\t\tif(periodIndex == -1) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(periodIndex == filename.length() - 1) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn filename.substring(periodIndex + 1, filename.length());\n\t}", "public final String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i+1).toLowerCase();\n }\n return ext;\n }", "public static String getFileExtension(String filename) {\n\t\tif(filename.indexOf(\".\") == -1)\n\t\t\treturn \"\";\n\t\t\n\t\treturn \".\"+filename.substring(filename.lastIndexOf(\".\")+1);\n\t}", "public String getExtension(File f) {\n\t\t\tString ext = null;\n\t\t\tString s = f.getName();\n\t\t\tint i = s.lastIndexOf('.');\n\n\t\t\tif (i > 0 && i < s.length() - 1)\n\t\t\t\text = s.substring(i + 1).toLowerCase();\n\t\t\treturn ext;\n\t\t}", "public static String GetFileExtension(String filePath) {\n\n\t\tint index = filePath.lastIndexOf('.');\n\t\tif (index > 0) {\n\t\t\treturn filePath.substring(index + 1);\n\t\t}\n\n\t\treturn \"\";\n\t}", "public static String getFileExtension(File file) {\r\n String fileName = file.getName();\r\n if(fileName.lastIndexOf(\".\") != -1 && fileName.lastIndexOf(\".\") != 0)\r\n return fileName.substring(fileName.lastIndexOf(\".\")+1).toLowerCase();\r\n else return \"\";\r\n }", "public final String getCurrentExt() {\n FileFilter filter = this.getFileFilter();\n if (filter instanceof ExtensionFileFilter) {\n return ((ExtensionFileFilter)filter).getExt();\n }\n return null;\n }", "private static String getFileExtension(File cFile) {\n\t\tString oldname = cFile.getName();\r\n\t\tString extension = oldname.substring(oldname.lastIndexOf(\".\"));\r\n\t\treturn extension;\r\n\t}", "java.lang.String getExtensionText();", "protected String getExtension() {\n\t\treturn \"\";\n\t}", "public static String getExtension(final File file) throws IOException {\n return FilenameUtils.getExtension(file.getName());\n }", "public static String getFileExtension(File f) {\n String name = f.getName();\n int index = name.lastIndexOf(\".\");\n if(index == -1) return null;\n \n // the file must have a name other than the extension\n if(index == 0) return null;\n \n // if the last character of the string is the \".\", then there's\n // no extension\n if(index == (name.length()-1)) return null;\n \n return name.substring(index+1);\n }", "public String getFileExtension(File objFile) {\n\n String sFileName = null;\n String sExtension = null;\n\n try {\n\n if (!objFile.exists()) {\n throw new Exception(\"File does not exists\");\n }\n\n sFileName = objFile.getName();\n int i = sFileName.lastIndexOf('.');\n if (i > 0) {\n sExtension = sFileName.substring(i + 1).trim();\n }\n\n } catch (Exception e) {\n println(\"Methods.getFileExtension : \" + e.toString());\n sExtension = \"\";\n } finally {\n return sExtension;\n }\n }", "final public String getExtension()\n\t{\n\t\treturn this.getLocation().getExtension(); \n\t}", "public String getFileExt(File fileName) {\n return fileName.getName()\n .substring(fileName.getName().lastIndexOf('.'));\n }", "public static String getSafeFileExtension(IPath path) {\r\n\t\tString fileExtension = \"\"; //$NON-NLS-1$\r\n\t\tif (path != null) {\r\n\t\t\tString temp = path.getFileExtension();\r\n\t\t\tif (temp != null)\r\n\t\t\t\tfileExtension = temp;\r\n\t\t}\r\n\t\t\r\n\t\treturn fileExtension;\r\n\t}", "public static String getFileExtension(String fileName) {\n return fileName.trim().substring(fileName.indexOf('.'));\n }", "private String extensions() {\n return Arrays.stream(f.getName().split(\"\\\\.\")).skip(1).collect(Collectors.joining(\".\"));\n }", "public String getExtension(File f) {\n\t if(f != null) {\n\t String filename = f.getName();\n\t int i = filename.lastIndexOf('.');\n\t if(i>0 && i<filename.length()-1) {\n\t\t return filename.substring(i+1).toLowerCase();\n\t }\n\t }\n\t return null;\n }", "public static String getFileExtention(String file_path)\n {\n String file_name = getFileName(file_path);\n int index = file_name.lastIndexOf(46);\n\n if (index >= 0)\n return file_name.substring(index + 1);\n\n return \"\";\n }", "private String getExtension(String path){\n System.out.println(\"Начато получение расширения: \");\n if (path.contains(\".\")){\n int dot = path.lastIndexOf(\".\");\n System.out.println(\"return \"+path.substring(dot, path.length()));\n return path.substring(dot, path.length());\n } else {\n// System.out.println(\"return \\\"\\\"\");\n return \"\";\n }\n }", "String getOutputExtension();", "public static String getFileExtension(File aFile) {\n\t\tString returnMe = aFile.getName().substring(\n\t\t\t\taFile.getName().lastIndexOf('.') + 1);\n\t\treturn returnMe;\n\t}", "public static String GetFileExtension(String hint) {\n int dotIndex = hint.lastIndexOf(\".\");\n if (dotIndex > 0) {\n return hint.substring(dotIndex + 1).toLowerCase();\n }\n return \"\";\n }", "public static String getExtension(String uri) {\n if (uri == null) {\n return null;\n }\n\n int dot = uri.lastIndexOf(\".\");\n if (dot >= 0) {\n return uri.substring(dot);\n } else {\n // No extension.\n return \"\";\n }\n }", "public static String getExtension(String img) {\n String[] arr = img.split(\"\\\\.\");\n return arr[arr.length - 1];\n }", "public String getFileExtension() {\r\n\t\treturn this.fileExtension;\r\n\t}", "public static String getExt(String name) {\n\t\tif (name == null) return null;\n\t\tint s = name.lastIndexOf('.');\n\t\treturn s == -1 ? null : s == 0 ? name : name.substring(s);\n\t}", "public String getExtension(String url) {\n\t\tint dotIndex = url.lastIndexOf('.');\n\t\tString extension = null;\n\t\tif (dotIndex > 0) {\n\t\t\textension = url.substring(dotIndex + 1);\n\t\t}\n\t\treturn extension;\n\t}", "public static String getExtension(String uri) {\n if (uri == null) {\n return null;\n }\n\n int dot = uri.lastIndexOf('.');\n if (dot >= 0) {\n return uri.substring(dot);\n } else {\n // No extension.\n return \"\";\n }\n }", "public static String extractExtension(String filename)\n\t{\n\t\treturn ImageWriterFilter.extractExtension(filename);\n\t}", "public static String sourceExtension()\n {\n read_if_needed_();\n \n return _ext; \n }", "String getContentType(String fileExtension);", "String validateAllowedExtensions(File fileNamePath) {\n\t\tString fileName = fileNamePath.getName();\r\n\t\t\r\n\t\t//Get the index based on the extension into the string\r\n\t\tint lastIndex = fileName.lastIndexOf(\".\");\r\n\t\t\r\n\t\t//Get substring/extension from the string\r\n\t\tString extension = fileName.substring(lastIndex).toUpperCase();\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"GIF\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"JPG\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"TXT\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\t// There is no extension for the file\r\n\t\tif (lastIndex == -1) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t\r\n\t\t// No valid extension\r\n\t\treturn \"\";\r\n\t\t\r\n\t}", "private static String getExtensionOrFileName(String filename, boolean extension) {\n\n\t\tString fileWithExt = new File(filename).getName();\n\t\tStringTokenizer s = new StringTokenizer(fileWithExt, \".\");\n\t\tif (extension) {\n\t\t\ts.nextToken();\n\t\t\treturn s.nextToken();\n\t\t} else\n\t\t\treturn s.nextToken();\n\t}", "public static String GetExtension(String mimeType) {\n if (mimeType == null || mimeType.length() ==0) {\n return null;\n }\n return mimeTypeToExtensionMap.get(mimeType);\n }", "public String getOutputExtension(String inputExtension);", "public String getFirstExtension() {\n List<String> ext = this.getExtensions();\n \n if (ext == null || ext.isEmpty()) {\n return null;\n }\n \n return ext.get(0);\n }", "public String getFileExtension() {\r\n return Generator.ANIMALSCRIPT_FORMAT_EXTENSION;\r\n }", "private String retrieveFileNameWithOutExt(String targetFile)\r\n\t{\r\n\t\tfor (int index = targetFile.length(); index > 0; index--)\r\n\t\t{\r\n\t\t\tif (targetFile.charAt(index - 1) == '.')\r\n\t\t\t{\r\n\t\t\t\ttargetFile = targetFile.substring(0, index - 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn targetFile;\r\n\t}", "private String getWithoutExtension(String withExtension){\n if (withExtension.contains(\".\")){\n int dot = withExtension.lastIndexOf(\".\");\n return withExtension.substring(0, dot);\n } else {\n return withExtension;\n }\n }", "java.lang.String getFilename();", "java.lang.String getFilename();", "public String getFileNoPath() {\n if (fileType == HTTP) {\n return fileName.substring(fileName.lastIndexOf(\"/\") + 1);\n } else {\n return fileName.substring(fileName.lastIndexOf(File.separator) + 1);\n }\n }", "private static String getFileNameWithoutExtension(File file) {\n String fileName = \"\";\n \n try {\n if (file != null && file.exists()) {\n String name = file.getName();\n fileName = name.replaceFirst(\"[.][^.]+$\", \"\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n fileName = \"\";\n }\n return fileName;\n }", "public String getExtension() {\n return extension;\n }", "public String getExtension() {\n return extension;\n }", "public String GetFileExtension(Uri uri) {\n\n ContentResolver contentResolver = getContentResolver();\n\n MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();\n\n // Returning the file Extension.\n return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri)) ;\n\n }", "String getSkipExtension();", "public static String getSlideFileExtension(String slideRef) {\n\t\t// Determine the file extension for this slide\n\t\treturn FilenameUtils.getExtension(slideRef);\n\t}", "@XmlElement\n @Nullable\n public String getFileExtension() {\n return this.fileExtension;\n }", "private String getFileExtension(Uri uri) {\n ContentResolver contentResolver = getApplicationContext().getContentResolver();\n MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();\n return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri));\n }", "public static String getExtension(URI uri) {\n\t\tif (uri != null) {\n\t\t\tString location = uri.getSchemeSpecificPart();\n\t\t\tif (location != null) {\n\t\t\t\tString name = location;\n\t\t\t\tint index = location.lastIndexOf('.');\n\t\t\t\tif (index != -1) {\n\t\t\t\t\tname = name.substring(index + 1, name.length());\n\t\t\t\t}\n\t\t\t\treturn name;\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "public String getExtension() {\n return extension;\n }", "public String getDefaultExtension() {\n return \"ino\";\n }", "public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }", "private static String getFileTagsBasedOnExt(String fileExt) {\n String fileType = new Tika().detect(fileExt).replaceAll(\"/.*\", \"\");\n return Arrays.asList(EXPECTED_TYPES).contains(fileType) ? fileType : null;\n }", "public String getWriteFileExtension(int formatIndex);", "public static String defaultFileExtension() {\n return \"dot\";\n }", "String noExt(String name) {\r\n int last=name.lastIndexOf(\".\");\r\n if(last>0)\r\n return name.substring(0, last);\r\n\r\n return name;\r\n }", "public String getExtension(String filename, String extensionSymbol) {\n\t\tif (filename == null) {\n\n\t\t\treturn null;\n\n\t\t}\n\t\tint extensionPos = filename.lastIndexOf(extensionSymbol);\n\t\treturn filename.substring(extensionPos + 1);\n\t}", "public String getReadFileExtension(int formatIndex);" ]
[ "0.8566764", "0.8409623", "0.8381615", "0.8237232", "0.82277197", "0.81767726", "0.8139299", "0.80581844", "0.8047136", "0.8017554", "0.79817176", "0.79810244", "0.7949693", "0.79373634", "0.785643", "0.78218526", "0.7811448", "0.7811292", "0.7792374", "0.7791945", "0.7775175", "0.7747022", "0.77394533", "0.773068", "0.7715784", "0.77051985", "0.7704579", "0.76964456", "0.7688807", "0.7675798", "0.7672723", "0.7671833", "0.76673496", "0.7653341", "0.76514286", "0.7650494", "0.7630231", "0.7603013", "0.7593125", "0.7582749", "0.7575225", "0.7564244", "0.75543237", "0.75439817", "0.75375164", "0.7489076", "0.74835855", "0.74644023", "0.74621266", "0.7461814", "0.7453333", "0.74217135", "0.74170583", "0.74125254", "0.73986816", "0.7382682", "0.7374233", "0.73715997", "0.73505324", "0.7322018", "0.7312039", "0.7269568", "0.72662157", "0.7257051", "0.72561383", "0.724513", "0.7228055", "0.72252524", "0.71870303", "0.7125229", "0.7101061", "0.7088309", "0.7055827", "0.7044843", "0.7036235", "0.70115095", "0.6965826", "0.69652724", "0.6958096", "0.69527763", "0.69527763", "0.6947627", "0.69118774", "0.69101685", "0.69101685", "0.69025356", "0.68700004", "0.6858145", "0.6845849", "0.68224734", "0.6800001", "0.6789939", "0.6782359", "0.6781021", "0.674525", "0.67348176", "0.6724339", "0.67219394", "0.67001224", "0.66828865" ]
0.7721947
24
Deleting the children recursively
public static void deleteFiles(final String _file) throws IOException { final File file = new File(_file); FileUtils.forceDelete(file); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeChildren() {\r\n this.children.clear();\r\n childNum = 0;\r\n }", "@objid (\"808c0839-1dec-11e2-8cad-001ec947c8cc\")\n @Override\n public void delete() {\n // List children from the end to avoid reordering of the other GMs\n for (int i = this.children.size() - 1; i >= 0; i--) {\n GmNodeModel child = this.children.get(i);\n child.delete();\n \n // When several elements have been deleted consecutively, fix the next index\n if (i > this.children.size()) {\n i = this.children.size();\n }\n }\n \n assert (this.children.isEmpty()) : \"All children should have been deleted:\" + this.children;\n \n super.delete();\n }", "@Override\n public void removeChildren()\n {\n children.clear();\n }", "public void clearChildren() {\r\n this.children = null;\r\n }", "private static void delTree(BoardTree root) {\n if (root.children == null) return;\n for (BoardTree child : root.children) {\n delTree(child);\n }\n root.children.clear();\n root = null;\n }", "public void clearChildren() throws RemoteException;", "public void clearChildren() {\n //View parent = getParent();\n //children.forEach(child -> child.setParent(parent));\n children.clear();\n this.invalidate();\n }", "public void destroyAll() {\n children.destroyAll();\n }", "public void clear() {\n\t\t\tfor (AbstractTreeNode node : children) {\n\t\t\t\tnode.setParent(null);\n\t\t\t}\n\t\t\t\n\t\t\t// clear children\n\t\t\tchildren.clear();\n\t\t}", "public void clear()\n\t\t{ while (!children.isEmpty()) remove(children.get(0)); }", "public void delete() {\n this.root = null;\n }", "@Override\n public void markChildrenDeleted() throws DtoStatusException {\n if (polymorphismSite != null) {\n for (com.poesys.db.dto.IDbDto dto : polymorphismSite) {\n dto.cascadeDelete();\n }\n }\n }", "public final void clear(boolean cleanup) {\n for (val chapter : children) {\n chapter.parent = null;\n if (cleanup) {\n chapter.cleanup();\n }\n }\n children.clear();\n }", "public void removeChildren(QueryNode childNode);", "public void clearChildren() {\n internalGroup.clearChildren();\n }", "public void clear() {\n\t\t// If settingActive is true, clear will be called for all children anyway. No need to loop.\n\t\tif (children != null) {\n\t\t\tfor (BusinessObject child : children.values()) {\n\t\t\t\tchild.clear();\n\t\t\t}\n\t\t}\n\t}", "public void updateChildNodes() {\n\t\tList<FTNonLeafNode> nodesToRemove = new ArrayList<FTNonLeafNode>();\n\t\tfor (FTNonLeafNode intermediateNode : intermediateNodes.values()) {\n\t\t\tList<FTNode> childNodesToRemove = new ArrayList<FTNode>();\n\t\t\tfor (String childName : intermediateNode.childNodes.keySet()) {\n\t\t\t\tif (intermediateNodes.containsKey(childName)) {\n\t\t\t\t\t// update child node if it has child node\n\t\t\t\t\tFTNonLeafNode childNode = intermediateNodes.get(childName);\n\t\t\t\t\tif ((childNode instanceof FTOrNode) || (childNode instanceof FTAndNode)) {\n\t\t\t\t\t\tintermediateNode.addChildNode(childName, intermediateNodes.get(childName));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// if parent node is an OR node\n\t\t\t\t\t\t// remove this child\n\t\t\t\t\t\tif (intermediateNode instanceof FTOrNode) {\n\t\t\t\t\t\t\tchildNodesToRemove.add(childNode);\n\t\t\t\t\t\t\tnodesToRemove.add(childNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// if parent node is an AND node\n\t\t\t\t\t\t// remove the parent node and child node\n\t\t\t\t\t\t// and set their values to false in case they are referenced by other nodes\n\t\t\t\t\t\telse if (intermediateNode instanceof FTAndNode) {\n\t\t\t\t\t\t\tnodesToRemove.add(intermediateNode);\n\t\t\t\t\t\t\tnodesToRemove.add(childNode);\n\t\t\t\t\t\t\t// mark the nodes as they are not getting removed till after the loop\n\t\t\t\t\t\t\tintermediateNode.resolved = true;\n\t\t\t\t\t\t\tintermediateNode.nodeValue = false;\n\t\t\t\t\t\t\tchildNode.resolved = true;\n\t\t\t\t\t\t\tchildNode.nodeValue = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tintermediateNode.removeChildNodes(childNodesToRemove);\n\t\t\t// if no child node left for this intermediate node,\n\t\t\t// then its parent node should remove this intermediate node as well\n\t\t}\n\t\t// remove the no child nodes\n\t\tfor (FTNonLeafNode node : nodesToRemove) {\n\t\t\tintermediateNodes.remove(node.nodeName);\n\t\t}\n\t}", "void deleteTree(TreeNode node) \n {\n root = null; \n }", "private void deleteHierarchyData(TreePath[] selRows) {\r\n SponsorHierarchyBean delBean;\r\n CoeusVector delData = new CoeusVector();\r\n TreePath treePath=selRows[selRows.length-1];\r\n DefaultMutableTreeNode selNode = (DefaultMutableTreeNode)treePath.getLastPathComponent();\r\n int selRow=sponsorHierarchyTree.getRowForPath(treePath);\r\n String optionPaneMsg=EMPTY_STRING;\r\n if(selNode.isRoot()) return;\r\n if(!selNode.getAllowsChildren()) {\r\n if(selRows.length > 1) {\r\n optionPaneMsg = coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1252\");\r\n }else {\r\n optionPaneMsg = \"Do you want to remove the sponsor \"+selNode.toString()+\" from the hierarchy?\";\r\n }\r\n int optionSelected = CoeusOptionPane.showQuestionDialog(optionPaneMsg,CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n if(optionSelected == CoeusOptionPane.SELECTION_YES) {\r\n for (int index=selRows.length-1; index>=0; index--) {\r\n treePath = selRows[index];\r\n selRow = sponsorHierarchyTree.getRowForPath(treePath);\r\n selNode = (DefaultMutableTreeNode)treePath.getLastPathComponent();\r\n int endIndex = selNode.toString().indexOf(\":\");\r\n Equals getRowData = new Equals(\"sponsorCode\",selNode.toString().substring(0,endIndex == -1 ? selNode.toString().length():endIndex));\r\n CoeusVector cvFilteredData = getDeleteData(cvHierarchyData.filter(getRowData));\r\n delBean = (SponsorHierarchyBean)cvFilteredData.get(0);\r\n delBean.setAcType(TypeConstants.DELETE_RECORD);\r\n flushBean(delBean);//Added for bug fix Start #1830\r\n model.removeNodeFromParent(selNode);\r\n delData.addAll(cvFilteredData);\r\n saveRequired = true;\r\n }\r\n }\r\n } else {\r\n \r\n// int optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the Group \"+selNode.toString()+\" all its children from the hierarchy.\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_YES);\r\n int optionSelected = -1;\r\n try{\r\n if(selNode != null && selNode.getLevel() == 1 && isPrintingHierarchy && isFormsExistInGroup(selNode.toString())){\r\n optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the group \"+selNode.toString()+\" , all its children and associated sponsor forms from the hierarchy?\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n }else{\r\n optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the Group \"+selNode.toString()+\" , all its children from the hierarchy.\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n }\r\n }catch(CoeusUIException coeusUIException){\r\n CoeusOptionPane.showDialog(coeusUIException);\r\n return ;\r\n }\r\n if(optionSelected == CoeusOptionPane.SELECTION_YES) {\r\n //Case#2445 - proposal development print forms linked to indiv sponsor, should link to sponsor hierarchy - Start\r\n if(isPrintingHierarchy && selectedNode.getLevel() == 1){\r\n TreeNode root = (TreeNode)sponsorHierarchyTree.getModel().getRoot();\r\n TreePath result = findEmptyGroup(sponsorHierarchyTree, new TreePath(root));\r\n if( result == null){\r\n try{\r\n deleteForms(selNode.toString());\r\n }catch(CoeusUIException coeusUIException){\r\n CoeusOptionPane.showDialog(coeusUIException);\r\n return ;\r\n }\r\n }\r\n }\r\n Equals getRowData = new Equals(fieldName[selNode.getLevel()],selNode.toString());\r\n CoeusVector cvFilteredData = getDeleteData(cvHierarchyData.filter(getRowData));//Modified for bug fix Start #1830\r\n model.removeNodeFromParent(selNode);\r\n for (int i=0; i<cvFilteredData.size(); i++) {\r\n delBean = (SponsorHierarchyBean)cvFilteredData.get(i);\r\n delBean.setAcType(TypeConstants.DELETE_RECORD);\r\n flushBean(delBean);//Added for bug fix Start #1830\r\n saveRequired = true;\r\n }\r\n delData.addAll(cvFilteredData);\r\n }\r\n }\r\n if(selRow < sponsorHierarchyTree.getRowCount() && \r\n ((DefaultMutableTreeNode)sponsorHierarchyTree.getPathForRow(selRow).getLastPathComponent()).getAllowsChildren() && !selNode.getAllowsChildren())\r\n sponsorHierarchyTree.setSelectionPath(treePath.getParentPath());\r\n else\r\n if(selRow >= sponsorHierarchyTree.getRowCount())\r\n selRow = 0;\r\n sponsorHierarchyTree.setSelectionRow(selRow);\r\n \r\n groupsController.refreshTableData(delData);\r\n }", "public void prune() {\n this.getTree().prune();\n }", "public void finalizeChildren() {\n finalizeAllNestedChildren(this);\n }", "public void resetParents() {\r\n }", "public void removeChild(int index)\n/* */ {\n/* 457 */ this.children.removeElementAt(index);\n/* */ }", "private void deleteTree(tnode root){\n if (root != null)\n root = null;\n }", "public void releaseChildren() {\n if (children != null) {\n unloadChildren();\n\n children.unload();\n children = null;\n }\n }", "public abstract boolean deleteOrphans();", "public boolean Delete(int num) {\r\n\t\t//initialize boolean field, set to true if value found in tree\r\n\t\tboolean found;\r\n\t\t//initialize the parent node using the TreeNodeWrapper\r\n\t\tTreeNodeWrapper p = new TreeNodeWrapper();\r\n\t\t//initialize the child node using the TreeNodeWrapper\r\n\t\tTreeNodeWrapper c = new TreeNodeWrapper();\r\n\t\t//initialize largest field to re-allocate parent/child nodes\r\n\t\tTreeNode largest;\r\n\t\t//initialize nextLargest field to re-allocate parent/child nodes\r\n\t\tTreeNode nextLargest;\r\n\t\t//found set to true if FindNode methods locates value in the tree\r\n\t\tfound = FindNode(num, p, c);\r\n\t\t//if node not found return false\r\n\t\tif(found == false)\r\n\t\t\treturn false;\r\n\t\telse //identify the case number\r\n\t\t{\r\n\t\t\t//case 1: deleted node has no children\r\n\t\t\t//if left and right child nodes of value are both null node has no children\r\n\t\t\tif(c.Get().Left == null && c.Get().Right == null)\r\n\t\t\t\t//if parent left node is equal to child node then deleted node is a left child\r\n\t\t\t\tif(p.Get().Left == c.Get())\r\n\t\t\t\t\tp.Get().Left = null;\r\n\t\t\t\telse //deleted node is a right child\r\n\t\t\t\t\tp.Get().Right = null;\r\n\t\t\t//case 2: deleted node has 1 child\r\n\t\t\t//if deleted node only has 1 child node\r\n\t\t\telse if(c.Get().Left == null || c.Get().Right == null)\r\n\t\t\t{\r\n\t\t\t\t//if parent left node is equal to child node then deleted node is a left child\r\n\t\t\t\tif(p.Get().Left == c.Get())\r\n\t\t\t\t{\r\n\t\t\t\t\t//if deleted node is a left child then set deleted node child node as child to parent node\r\n\t\t\t\t\tif(c.Get().Left != null) //deleted node has a left child\r\n\t\t\t\t\t\tp.Get().Left = c.Get().Left;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tp.Get().Left = c.Get().Right;\r\n\t\t\t\t}\r\n\t\t\t\telse //if deleted node is a right child then set deleted node child node as child to parent node\r\n\t\t\t\t{\r\n\t\t\t\t\tif(c.Get().Left != null) //deleted node has a left child\r\n\t\t\t\t\t\tp.Get().Right = c.Get().Left;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tp.Get().Right = c.Get().Right;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//case 3: deleted node has two children\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//set the nextLargest as the left child of deleted node\r\n\t\t\t\tnextLargest = c.Get().Left;\r\n\t\t\t\t//set the largest as the right node of the nextLargest node\r\n\t\t\t\tlargest = nextLargest.Right;\r\n\t\t\t\t//if right node is not null then left child has a right subtree\r\n\t\t\t\tif(largest != null) \r\n\t\t\t\t{\r\n\t\t\t\t\t//while loop to move down the right subtree and re-allocate after node is deleted\r\n\t\t\t\t\twhile(largest.Right != null) //move down right subtree\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tnextLargest = largest;\r\n\t\t\t\t\t\tlargest = largest.Right;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//overwrite the deleted node\r\n\t\t\t\t\tc.Get().Data = largest.Data; \r\n\t\t\t\t\t// save the left subtree\r\n\t\t\t\t\tnextLargest.Right = largest.Left; \r\n\t\t\t\t}\r\n\t\t\t\telse //left child does not have a right subtree\r\n\t\t\t\t{\r\n\t\t\t\t\t//save the right subtree\r\n\t\t\t\t\tnextLargest.Right = c.Get().Right; \r\n\t\t\t\t\t//deleted node is a left child\r\n\t\t\t\t\tif(p.Get().Left == c.Get()) \r\n\t\t\t\t\t\t//jump around deleted node\r\n\t\t\t\t\t\tp.Get().Left = nextLargest; \r\n\t\t\t\t\telse //deleted node is a right child\r\n\t\t\t\t\t\tp.Get().Right = nextLargest; //jump around deleted node\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//return true is delete is successful\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public Boolean DeleteAllChild(Node node) {\n\t\tnode.setLeftChild(null);//\n\n\t\tif (node.getParent() == null) {\n\t\t\tSystem.out.println(\"error in delete root node!\");\n\t\t\treturn false;\n\t\t}\n\t\tif (node.getParent().getLeftChild() == node) {\n\t\t\tnode.getParent().setLeftChild(node.getRightChild());\n\t\t} else {\n\t\t\tNode tNode = node.getParent().getLeftChild();\n\t\t\tfor (;;) {\n\t\t\t\tif (tNode.getRightChild() == node)\n\t\t\t\t\tbreak;\n\t\t\t\ttNode = tNode.getRightChild();\n\t\t\t}\n\t\t\ttNode.setRightChild(node.getRightChild());\n\t\t}\n\t\treturn true;\n\t}", "public void clear()\n\t{\n\t\tthis.getChildren().clear();\n\t}", "public void rebuild() {\n\t\tif (!divided) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint totalChildren = 0;\n\t\tfor (QuadTreeNode<E> q : nodes) {\n\t\t\t// If there is a divided child then we cant do anything\n\t\t\tif (q.isDivided()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\ttotalChildren += q.numPoints();\n\t\t}\n\t\t\n\t\t// If the sum of all the children contained in the sub nodes\n\t\t// is greater than allowed then we cant do anything\n\t\tif (totalChildren > QUADTREE_NODE_CAPACITY) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Add all the nodes from the children to this node then remvoe the nodes\n\t\tpoints = new HashMap<Point, E>();\n\t\tfor (QuadTreeNode<E> q : nodes) {\n\t\t\tpoints.putAll(q.points);\n\t\t}\n\t\t\n\t\tnodes.clear();\n\t\tdivided = false;\n\t}", "public void deleteElements(boolean saveChildren) {\n\t\tfor (XmlNode node: highlightedFields) {\n\t\t\t\n\t\t\tif (saveChildren) promoteAllChildrenToSiblings(node);\n\n\t\t\tXmlNode parentNode = node.getParentNode();\n\t\t\tparentNode.removeChild(node);\n\t\t}\n\t\thighlightedFields.clear();\n\t}", "public void delete(Item<K,V> i) {\n if (i.getL() == null && i.getR() == null) {\n if (i.getP() != null) {\n declineChild(i, null);\n } else {\n root = null;\n }\n } else if (i.getL() != null && i.getR() != null) {\n Item<K,V> s = successor(i);\n declineChild(s, s.getR());\n i.setK(s.getK());\n i.setV(s.getV());\n } else {\n Item<K,V> x = i.getL();\n if (x == null) {\n x = i.getR();\n }\n if (i.getP() != null) {\n declineChild(i, x);\n } else {\n root = x;\n x.setP(null);\n }\n }\n size -= 1;\n }", "void deleteAll(Node N){\n if( N != null ){\n deleteAll(N.left);\n deleteAll(N.right);\n }\n }", "public void unmemoize() {\n\t\tif (children != null) {\t\n\t\t\tfor (Item i : children) {\n\t\t\t\t((TreeItem)i).unmemoize();\n\t\t\t}\n\t\t}\n\t\ttreeLeaves = null;\n\t\tleaves = null;\n\t}", "public void removeFromParent();", "private boolean cleanLockedObjects(ITransaction transaction,\n SimpleLockedObject lo, boolean temporary) {\n \n if (lo._children == null) {\n if (lo._owner == null) {\n if (temporary) {\n lo.removeTempLockedObject();\n } else {\n lo.removeLockedObject();\n }\n \n return true;\n } else {\n return false;\n }\n } else {\n boolean canDelete = true;\n int limit = lo._children.length;\n for (int i = 0; i < limit; i++) {\n if (!cleanLockedObjects(transaction, lo._children[i], temporary)) {\n canDelete = false;\n } else {\n \n // because the deleting shifts the array\n i--;\n limit--;\n }\n }\n if (canDelete) {\n if (lo._owner == null) {\n if (temporary) {\n lo.removeTempLockedObject();\n } else {\n lo.removeLockedObject();\n }\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }\n }", "public void removeChildAt(int index) {children.removeElementAt(index);}", "public synchronized void cleanupSimple() {\n\t\tfinal int maxNumFiles = 1000;\n\t\tfinal int numFilesToDelete = 50;\n\n\t\tString[] children = mStorageDirectory.list();\n\t\tif (children != null) {\n\t\t\tif (children.length > maxNumFiles) {\n\t\t\t\tfor (int i = children.length - 1, m = i - numFilesToDelete; i > m; i--) {\n\t\t\t\t\tFile child = new File(mStorageDirectory, children[i]);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private List<MutateOperation> removeDescendantsAndFilter(String resourceName) {\n List<MutateOperation> operations = new ArrayList<>();\n\n if (this.parentsToChildren.containsKey(resourceName)) {\n Set<String> children = parentsToChildren.get(resourceName);\n for (String child : children) {\n // Recursively adds operations to the return value that remove each of the child nodes of\n // the current node from the tree.\n operations.addAll(removeDescendantsAndFilter(child));\n }\n }\n\n // Creates and adds an operation to the return value that will remove the current node from\n // the tree.\n AssetGroupListingGroupFilterOperation operation =\n AssetGroupListingGroupFilterOperation.newBuilder().setRemove(resourceName).build();\n operations.add(\n MutateOperation.newBuilder().setAssetGroupListingGroupFilterOperation(operation).build());\n return operations;\n }", "public void removeChild(WSLNode node) {children.removeElement(node);}", "public List<PlanNode> removeAllChildren() {\n if (this.children.isEmpty()) {\n return new ArrayList<PlanNode>(0);\n }\n List<PlanNode> copyOfChildren = new ArrayList<PlanNode>(this.children);\n for (Iterator<PlanNode> childIter = this.children.iterator(); childIter.hasNext();) {\n PlanNode child = childIter.next();\n childIter.remove();\n child.parent = null;\n }\n return copyOfChildren;\n }", "protected void removeAllChildren() {\n if (mRecycleBin != null) {\n int childCount = getChildCount();\n for (int i = 0; i < childCount; i++) {\n View child = getChildAt(i);\n mRecycleBin.addScrapView(child);\n }\n }\n detachAllViewsFromParent();\n }", "public void delete(Integer data) {\n ArrayList<Node> parents = new ArrayList<>();\n Node nodeDel = this.root;\n Node parent = this.root;\n Node imBalance;\n Integer balanceFactor;\n boolean isLeftChild = false;\n if (nodeDel == null) {\n return;\n }\n while (nodeDel != null && !nodeDel.getData().equals(data)) {\n parent = nodeDel;\n if (data < nodeDel.getData()) {\n nodeDel = nodeDel.getLeftChild();\n isLeftChild = true;\n } else {\n nodeDel = nodeDel.getRightChild();\n isLeftChild = false;\n }\n parents.add(nodeDel);\n }\n\n if (nodeDel == null) {\n return;\n// delete a leaf node\n } else if (nodeDel.getLeftChild() == null && nodeDel.getRightChild() == null) {\n if (nodeDel == root) {\n root = null;\n } else {\n if (isLeftChild) {\n parent.setLeftChild(null);\n } else {\n parent.setRightChild(null);\n }\n }\n }\n// deleting a node with degree of one\n else if (nodeDel.getRightChild() == null) {\n if (nodeDel == root) {\n root = nodeDel.getLeftChild();\n } else if (isLeftChild) {\n parent.setLeftChild(nodeDel.getLeftChild());\n } else {\n parent.setRightChild(nodeDel.getLeftChild());\n }\n } else if (nodeDel.getLeftChild() == null) {\n if (nodeDel == root) {\n root = nodeDel.getRightChild();\n } else if (isLeftChild) {\n parent.setLeftChild(nodeDel.getRightChild());\n } else {\n parent.setRightChild(nodeDel.getRightChild());\n }\n }\n // deleting a node with degree of two\n else {\n Integer minimumData = minimumData(nodeDel.getRightChild());\n delete(minimumData);\n nodeDel.setData(minimumData);\n }\n parent.setHeight(maximum(height(parent.getLeftChild()), height(parent.getRightChild())));\n balanceFactor = getBalance(parent);\n if (balanceFactor <= 1 && balanceFactor >= -1) {\n for (int i = parents.size() - 1; i >= 0; i--) {\n imBalance = parents.get(i);\n balanceFactor = getBalance(imBalance);\n if (balanceFactor > 1 || balanceFactor < -1) {\n if (imBalance.getData() > parent.getData()) {\n parent.setRightChild(rotateCase(imBalance, data, balanceFactor));\n } else\n parent.setLeftChild(rotateCase(imBalance, data, balanceFactor));\n break;\n }\n }\n }\n }", "private static void finalizeAllNestedChildren(SapODataColumnMetadata children) {\n if (children.containsChild()) {\n children.getChildList().forEach(SapODataColumnMetadata::finalizeAllNestedChildren);\n }\n\n children.isChildListComplete = true;\n }", "void deleteTreeRef(Node nodeRef) {\n\t\tSystem.out.println(\"\\nSize of given Tree before delete : \" + sizeOfTreeWithRecursion(nodeRef));\n\t\tdeleteTree(nodeRef);\n\t\tnodeRef = null;\n\n\t\tSystem.out.println(\"\\nSize of given Tree after delete : \" + sizeOfTreeWithRecursion(nodeRef));\n\t}", "private Node caseNoChildren(Node deleteThis) {\r\n\r\n Node parent = deleteThis.getParent();\r\n\r\n if (parent == null) {\r\n this.root = null; // Kyseessä on juuri\r\n return deleteThis;\r\n }\r\n if (deleteThis == parent.getLeft()) {\r\n parent.setLeft(null);\r\n } else {\r\n parent.setRight(null);\r\n }\r\n return deleteThis;\r\n }", "public void deleteNode() {\n TreeNode pNode = this.getParentNode();\n int id = this.getSelfId();\n\n if (pNode != null) {\n pNode.deleteChildNode(id);\n }\n }", "private Node removeChildNodes(Node node) throws TransformerException {\r\n\r\n NodeList children = node.getChildNodes();\r\n int index = 0;\r\n int length = children.getLength();\r\n\r\n for (index = 0; index < length; index++) {\r\n Node n = children.item(index);\r\n String nString = nodeToString(n);\r\n\r\n // for(Node n : node.getChildNodes()){\r\n if (n != null) {\r\n if (n.hasChildNodes()) {// edit to remove children of children\r\n removeChildNodes(n);\r\n node.removeChild(n);\r\n } else\r\n node.removeChild(n);\r\n }\r\n }\r\n String nodeString = nodeToString(node);\r\n return node;\r\n }", "protected void deleteNested(Datastore store) {\n Field[] fields = this.getClass().getFields();\n for(Field field : fields) {\n try {\n Object value = field.get(this);\n \n if(value == null)\n continue;\n \n if(value instanceof Base) {\n if(!((Base)value).shallow)\n ((Base) value).delete(store, true);\n } else if (value instanceof Base[]) {\n for(Base b : (Base[]) value)\n if(!b.shallow)\n b.delete(store, true);\n } else if (value instanceof Collection) {\n Collection l = (Collection) value;\n\n if (l.size() > 0 && Base.class.isAssignableFrom(l.iterator().next().getClass())) {\n for(Base b : (Collection<Base>) l)\n if(!b.shallow)\n b.delete(store, true);\n }\n } else if (value instanceof Map) {\n Map m = (Map) value;\n\n if(m.size() > 0 && m.keySet().iterator().next() instanceof String &&\n Base.class.isAssignableFrom(m.values().iterator().next().getClass())) {\n\n for(Base b : ((Map<String, Base>)m).values())\n if(!b.shallow)\n b.delete(store, true);\n }\n }\n } catch (IllegalAccessException | IllegalArgumentException ex) {\n throw new MongomanException(ex);\n }\n }\n }", "void removeChild(Object child);", "public boolean deleteOrphans() {\n\t\t\treturn true;\n\t\t}", "public boolean deleteOrphans() {\n\t\t\treturn true;\n\t\t}", "public void deleteAll(Key k) {\n\t\tNode temp = getFirstNode(); // this does not work because Java is pass by value, not pass by reference\n\t\tfor (int i = 0; i < size-1; i++) {\n\t\t\tif(temp.next.key==k){\n\t\t\t\ttemp.next = temp.next.next;\n\t\t\t}\n\t\t}\n\t\tif (lastNode.key == k)\n\t\t\tlastNode = null;\n\t}", "public static void testTreeDelete()\n {\n ArrayList<Tree<String>> treelist = new ArrayList<Tree<String>>();\n treelist.add(new BinaryTree<String>());\n treelist.add(new AVLTree<String>());\n treelist.add(new RBTree<String>());\n treelist.add(new SplayTree<String>());\n\n System.out.println(\"Start TreeDelete test\");\n for(Tree<String> t : treelist)\n {\n\n try\n {\n RobotRunner.loadDictionaryIntoTree(\"newDutch.dic\", t);\n// RobotRunner.loadDictionaryIntoTree(\"smallDutch.dic\", t);\n// RobotRunner.loadDictionaryIntoTree(\"Dutch.dic\", t); //Won't work with BinaryTree and SplayTree, too many items == StackOverflow\n// RobotRunner.loadDictionaryIntoTree(\"dict.txt\", t); //Won't work with BinaryTree and SplayTree, too many items == StackOverflow\n }\n catch(IOException e)\n {\n System.out.println(e);\n }\n System.out.println(\"\\nStart Testcase\");\n\n SystemAnalyser.start();\n t.delete(\"aanklotsten\");\n SystemAnalyser.stop();\n\n SystemAnalyser.printPerformance();\n\n System.out.println(\"Stop Testcase\\n\");\n }\n System.out.println(\"Values after test.\");\n SystemAnalyser.printSomeTestValues();\n }", "public void deleteMax() {\n root = deleteMax(root);\n }", "public void deleteMax() {\n root = deleteMax(root);\n }", "public boolean delete(int m) {\r\n \r\n System.out.println(\"We are deleting \" + m);\r\n\tbtNode current = root;\r\n btNode parent = root;\r\n boolean LeftChild = true;\r\n\r\n while(current.getData() != m) \r\n {\r\n parent = current;\r\n if(m < current.getData()) \r\n {\r\n LeftChild = true;\r\n current = current.left;\r\n }\r\n else { \r\n LeftChild = false;\r\n current = current.right;\r\n }\r\n if(current == null) \r\n return false; \r\n } // end while\r\n // found node to delete\r\n\r\n // if no children, simply delete it\r\n if(current.left==null && current.right==null)\r\n {\r\n if(current == root) // if root,\r\n root = null; // tree is empty\r\n else if(LeftChild)\r\n parent.left = null; // disconnect\r\n else // from parent\r\n parent.right = null;\r\n }\r\n\r\n // if no right child, replace with left subtree\r\n else if(current.right==null)\r\n if(current == root)\r\n root = current.left;\r\n else if(LeftChild)\r\n parent.left = current.left;\r\n else\r\n parent.right = current.left;\r\n\r\n // if no left child, replace with right subtree\r\n else if(current.left==null)\r\n if(current == root)\r\n root = current.right;\r\n else if(LeftChild)\r\n parent.left = current.right;\r\n else\r\n parent.right = current.right;\r\n\r\n else // two children, so replace with inorder successor\r\n {\r\n // get successor of node to delete (current)\r\n btNode successor = getNext(current);\r\n\r\n // connect parent of current to successor instead\r\n if(current == root)\r\n root = successor;\r\n else if(LeftChild)\r\n parent.left = successor;\r\n else\r\n parent.right = successor;\r\n\r\n // connect successor to current's left child\r\n successor.left = current.left;\r\n } // end else two children\r\n // (successor cannot have a left child)\r\n return true; // success\r\n }", "public void reloadChildren() {\n // clear children list. If later none get created, then there shouldn't be any\n clearChildren();\n // check if budgetAccount has sub budgets\n List<BudgetAccountBE> subBudgets = refAcc.getDirectSubBudgets();\n int childCount = subBudgets.size();\n // only act, if referenceAccount has sub budgets\n if (childCount > 0) {\n int newLevel = hierarchyLevel + 1;\n // differentiate isLast for children\n for (int index = 0; index < childCount; index++) {\n BudgetAccountTableRow newRow = BudgetAccountTableRow.getInstance(parentActivity);\n children.add(newRow);\n newRow.init(budgetListener, subBudgets.get(index), (index == childCount -1), newLevel);\n }\n }\n }", "public void delete(int index) {\n\t\tNode node = getNode(index+1);\n\t\tNode parentOfLast = getNode(size >> 1);\n\t\tnode.data = parentOfLast.right != null ? parentOfLast.right.data : parentOfLast.left.data;\n\t\tif (parentOfLast.right != null) {\n\t\t\tparentOfLast.right = null;\n\t\t}\n\t\telse {\n\t\t\tparentOfLast.left = null;\n\t\t}\n\t}", "public boolean deleteOrphans() {\n\t\t\treturn false;\n\t\t}", "public boolean deleteOrphans() {\n\t\t\treturn false;\n\t\t}", "public boolean deleteOrphans() {\n\t\t\treturn false;\n\t\t}", "public boolean deleteOrphans() {\n\t\t\treturn false;\n\t\t}", "public void delete(E e) {\n\t\tNode node = getNode(root, e);\n\t\tif (node == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tNode parentOfLast = getNode(size >> 1);\n\t\tif (parentOfLast.right != null) {\n\t\t\tnode.data = parentOfLast.right.data;\n\t\t\tparentOfLast.right = null;\n\t\t}\n\t\telse {\n\t\t\tnode.data = parentOfLast.left.data;\n\t\t\tparentOfLast.left = null;\n\t\t}\n\t\tsize--;\n\t}", "private void removeNodeAndChildren(Node node) {\n Pane container = node.getContainerPane();\n\n if (container.getChildren().size() < 2) {\n return;\n }\n\n Iterator<javafx.scene.Node> iterator = container.getChildren().iterator();\n while (iterator.hasNext()) {\n javafx.scene.Node nextNode = iterator.next();\n if (nextNode instanceof Edge) {\n edges.remove(nextNode);\n iterator.remove();\n }\n }\n\n for (javafx.scene.Node genericNode : node.getChildrenVBox().getChildren()) {\n Pane containerPane = (Pane) genericNode;\n Node childNode = (Node) containerPane.getChildren().get(0);\n nodes.remove(childNode);\n removeNodeAndChildren(childNode);\n }\n node.getChildrenVBox().getChildren().clear();\n clearEdgeLinks();\n }", "public abstract void removeChild(Node node);", "@Test\n public void remove_BST_0_CaseRootOneChildren()\n {\n BinarySearchTree bst = new BinarySearchTree();\n No root = new No(20);\n bst.insert(null, root);\n bst.insert(root, new No(10));\n //bst.printTree();\n //System.err.println(); // Print[ERR] Devido a prioridade do buffer de impressao (out, err)\n \n assertEquals(root, bst.remove(root));\n assertEquals(new Integer(1), bst.size());\n //bst.printTree();\n }", "public void dumpChildren ()\r\n {\r\n dumpChildren(0);\r\n }", "public void delRelations();", "public void deleteChildNode(int childId) {\n List<TreeNode> cList = this.getChildList();\n int childNumber = cList.size();\n for (int i = 0; i < childNumber; i++) {\n TreeNode child = cList.get(i);\n if (child.getSelfId() == childId) {\n cList.remove(i);\n return;\n }\n }\n }", "public void makeEmpty(){\n deleteAll(root);\n root = null;\n numItems = 0;\n }", "private void deleteNode(Cat valueToDelete, Node root){\n Node temp = findNode(valueToDelete, root);\n if(temp.getRight()==null){\n Node parent = temp.getParent();\n if(temp.getLeft()==null){\n temp.setParent(null);\n if(temp==parent.getRight()){\n parent.setRight(null);\n fixBalanceValues(parent,-1);\n }\n else{\n parent.setLeft(null);\n fixBalanceValues(parent,1);\n }\n \n }\n else{\n //copy value of leftchild into the node to deletes data and delete it's leftchild\n temp.setData(temp.getLeft().getData());\n temp.setLeft(null);\n fixBalanceValues(temp, 1);\n }\n }\n Node nodeToDelete = temp.getRight();\n if(nodeToDelete.getLeft()==null){\n temp.setData(nodeToDelete.getData());\n temp.setRight(null);\n nodeToDelete.setParent(null);\n fixBalanceValues(temp,-1);\n }\n else{\n while(nodeToDelete.getLeft()!=null){\n nodeToDelete=nodeToDelete.getLeft(); \n } \n temp.setData(nodeToDelete.getData());\n Node parent = nodeToDelete.getParent();\n parent.setLeft(null);\n nodeToDelete.setParent(null);\n fixBalanceValues(parent,1);\n }\n \n \n }", "private void pruneTree(QuadNode node){\n int i;\n while(node.parent != null && node.quads[0] == null && node.quads[1] == null && node.quads[2] == null && node.quads[3] == null){\n i=0;\n if(node.x != node.parent.x){\n i++;\n }\n if(node.z != node.parent.z){\n i+=2;\n }\n node = node.parent;\n node.quads[i] = null;\n }\n }", "public static native void deleteTreesBelow(String dir) throws IOException;", "private void removeOpRecursive(Operator<?> operator) {\n List<Operator<?>> parentOperators = new ArrayList<Operator<?>>();\n for (Operator<?> op : operator.getParentOperators()) {\n parentOperators.add(op);\n }\n for (Operator<?> parentOperator : parentOperators) {\n Preconditions.checkArgument(parentOperator.getChildOperators().contains(operator),\n \"AssertionError: parent of \" + operator.getName() + \" doesn't have it as child.\");\n parentOperator.removeChild(operator);\n if (parentOperator.getNumChild() == 0) {\n removeOpRecursive(parentOperator);\n }\n }\n }", "void forceRemoveNodesAndExit(Collection<Node> nodesToRemove) throws Exception;", "@Override\n\tpublic void delete(BaseTreeObject treeObject, String appes) {\n\t\tList deleteList=this.queryChildListByParentId(treeObject.getId(), treeObject.getCreateId(), appes);\n\t\tthis.deleteAndSaveAndUpdate(deleteList, null, null);\n\t}", "public void decreaseCurrentDepth(){\n currentDepth--;\n if (this.children == null) generateChildren();\n else {\n for (Node child : this.children) child.decreaseCurrentDepth();\n }\n }", "public void clear() {\n tree.clear();\n }", "default void removeContextChildren(\n com.google.cloud.aiplatform.v1.RemoveContextChildrenRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.RemoveContextChildrenResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getRemoveContextChildrenMethod(), responseObserver);\n }", "private void deleteNode(Node<K> p) {\n // If strictly internal, copy successor's element to p and then make p\n // point to successor.\n if (p.left != null && p.right != null) {\n Node<K> s = successor(p); // 节点有 2 个子节点时,找到实际删除的后继节点\n p.key = s.key; // 将后继节点的值复制到原来节点上,原来的节点只是值被删除,节点本身不删除\n p = s; // 将实际要删除的节点位置指向后继节点位置\n } // p has 2 children //\n // //////////////////////////////////////////////////////////////////\n // Start fixup at replacement node, if it exists. //\n Node<K> replacement = (p.left != null ? p.left : p.right); // 实际删除的节点最多只有一个子节点,并且一定是红色子节点\n if (replacement != null) { // 如果有一个红色子节点\n // Link replacement to parent //\n replacement.parent = p.parent; // 将此节点上移\n if (p.parent == null) //\n root = replacement; //\n else if (p == p.parent.left) // 实际被删除的节点 p 为左子\n p.parent.left = replacement; //\n else // 实际被删除的节点 p 为右子\n p.parent.right = replacement; //\n // //\n // Null out links so they are OK to use by fixAfterDeletion. //\n p.left = p.right = p.parent = null; //\n // //\n // Fix replacement //////////////////////////////////////////////////////////////////\n if (p.color == BLACK) // 删除情形 5. 因为 replacement 是红节点,所以这里 p 的颜色一定是黑色的\n fixAfterDeletion(replacement); // 修复只要将此红节点上移并置黑就完成了\n } else if (p.parent == null) { // return if we are the only node. //////////////////////////////////////////////////////////////////\n root = null; // 根节点被删除\n } else { // No children. Use self as phantom replacement and unlink. // 被删除的节点没有子节点时\n if (p.color == BLACK) // 如果是红色的节点,直接删除就完成\n fixAfterDeletion(p); // 如果被删除的是黑色节点,则会破坏红黑树性质 5,需要修复红黑树\n\n if (p.parent != null) {\n if (p == p.parent.left)\n p.parent.left = null;\n else if (p == p.parent.right)\n p.parent.right = null;\n p.parent = null;\n }\n }\n }", "private void deleteNode(TSTNode<E> nodeToDelete) {\n if(nodeToDelete == null) return;\n nodeToDelete.data = null;\n \n while(nodeToDelete != null) {\n nodeToDelete = deleteNodeRecursion(nodeToDelete);\n }\n }", "@Test\n public void normal_recursive_delete_OData_collection() {\n String collectionName = \"deleteOdata\";\n String entityType = \"deleteEntType\";\n String accept = \"application/xml\";\n String complexTypeName = \"deleteComplexType\";\n String complexTypePropertyName = \"deleteComplexTypeProperty\";\n\n try {\n // Create collection.\n DavResourceUtils.createODataCollection(TOKEN, HttpStatus.SC_CREATED, Setup.TEST_CELL1, Setup.TEST_BOX1,\n collectionName);\n // Create entity type.\n Http.request(\"box/entitySet-post.txt\")\n .with(\"cellPath\", Setup.TEST_CELL1)\n .with(\"boxPath\", Setup.TEST_BOX1)\n .with(\"odataSvcPath\", collectionName)\n .with(\"token\", \"Bearer \" + TOKEN)\n .with(\"accept\", accept)\n .with(\"Name\", entityType)\n .returns()\n .statusCode(HttpStatus.SC_CREATED);\n // Create complex type.\n ComplexTypeUtils.create(Setup.TEST_CELL1, Setup.TEST_BOX1,\n collectionName, complexTypeName, HttpStatus.SC_CREATED);\n // Create complex type property.\n ComplexTypePropertyUtils.create(Setup.TEST_CELL1, Setup.TEST_BOX1, collectionName, complexTypePropertyName,\n complexTypeName, \"Edm.String\", HttpStatus.SC_CREATED);\n\n // Recursive delete collection.\n deleteRecursive(collectionName, \"true\", HttpStatus.SC_NO_CONTENT);\n } finally {\n deleteRecursive(collectionName, \"true\", -1);\n }\n }", "@Override\r\n public void clear(){\r\n root = null;\r\n }", "public void deleteNode(BinaryTreeNode node) // Only leaf nodes and nodes with degree 1 can be deleted. If a degree 1 node is deleted, it is replaced by its subtree.\r\n {\n if(!node.hasRightChild() && !node.hasLeftChild()){\r\n if(node.mActualNode.mParent.mRightChild == node.mActualNode) {\r\n\r\n node.mActualNode.mParent.mRightChild = null;\r\n }\r\n else if(node.mActualNode.mParent.mLeftChild == node.mActualNode) {\r\n\r\n node.mActualNode.mParent.mLeftChild = null;\r\n }\r\n //node.mActualNode = null;\r\n\r\n }\r\n //if deleted node has degree 1 and has only left child\r\n else if(node.hasLeftChild() && !node.hasRightChild()){\r\n node.mActualNode.mLeftChild.mParent = node.mActualNode.mParent;\r\n //if deleted node is left child of his father\r\n if(node.mActualNode.mParent.mLeftChild == node.mActualNode)\r\n node.mActualNode.mParent.mLeftChild = node.mActualNode.mLeftChild;\r\n //if deleted node is right child of his father\r\n else {\r\n\r\n node.mActualNode.mParent.mRightChild = node.mActualNode.mLeftChild;\r\n }\r\n }\r\n // if deleted node has degree 1 and has only right child\r\n else if(node.hasRightChild() && !node.hasLeftChild()){\r\n node.mActualNode.mRightChild.mParent = node.mActualNode.mParent;\r\n\r\n //if node is left child of his father\r\n if(node.mActualNode.mParent.mLeftChild == node.mActualNode) {\r\n\r\n\r\n node.mActualNode.mParent.mLeftChild = node.mActualNode.mRightChild;\r\n\r\n }\r\n //if node is right child of his father\r\n else\r\n node.mActualNode.mParent.mRightChild = node.mActualNode.mRightChild;\r\n\r\n\r\n }\r\n else\r\n System.out.println(\"Error : node has two child\");\r\n\r\n }", "public void removeChild(int index)\n {\n children.remove(index);\n }", "void unsetFurtherRelations();", "public void delContextNodes();", "void deleteTreeRef(TreeNode nodeRef) \n { \n \tif(nodeRef == null) return;\n \t\n \t\n \tdeleteTreeRef(nodeRef.left);\n\n \tdeleteTreeRef(nodeRef.right);\n \t\n \t\n \t System.out.println(\"Deleting node:\" + nodeRef.val);\n \t deleteTree(nodeRef); \n \n nodeRef=null; \n }", "@Test(dependsOnMethods = {\"createThingChild\"})\n public void deleteThingChildByDeleteButton() {\n mainPage.newThingChild();\n\n // count childs before delete\n int before = mainPage.countThingChilds();\n\n // delete child\n mainPage.delThingChildByDelete();\n\n // count childs after delete\n int after = mainPage.countThingChilds();\n\n Assert.assertTrue(mainPage.isChildDeleted(before, after));\n }", "private TSTNode<E> deleteNodeRecursion(TSTNode<E> currentNode) {\n \n if(currentNode == null) return null;\n if(currentNode.relatives[TSTNode.EQKID] != null || currentNode.data != null) return null; // can't delete this node if it has a non-null eq kid or data\n\n TSTNode<E> currentParent = currentNode.relatives[TSTNode.PARENT];\n\n // if we've made it this far, then we know the currentNode isn't null, but its data and equal kid are null, so we can delete the current node\n // (before deleting the current node, we'll move any lower nodes higher in the tree)\n boolean lokidNull = currentNode.relatives[TSTNode.LOKID] == null;\n boolean hikidNull = currentNode.relatives[TSTNode.HIKID] == null;\n\n ////////////////////////////////////////////////////////////////////////\n // Add by Cheok. To resolve java.lang.NullPointerException\n // I am not sure this is the correct solution, as I have not gone\n // through this sourc code in detail.\n if (currentParent == null && currentNode == this.rootNode) {\n // if this executes, then current node is root node\n rootNode = null;\n return null;\n }\n // Add by Cheok. To resolve java.lang.NullPointerException\n ////////////////////////////////////////////////////////////////////////\n\n // now find out what kind of child current node is\n int childType;\n if(currentParent.relatives[TSTNode.LOKID] == currentNode) {\n childType = TSTNode.LOKID;\n } else if(currentParent.relatives[TSTNode.EQKID] == currentNode) {\n childType = TSTNode.EQKID;\n } else if(currentParent.relatives[TSTNode.HIKID] == currentNode) {\n childType = TSTNode.HIKID;\n } else {\n // if this executes, then current node is root node\n rootNode = null;\n return null;\n }\n\n if(lokidNull && hikidNull) {\n // if we make it to here, all three kids are null and we can just delete this node\n currentParent.relatives[childType] = null;\n return currentParent;\n }\n\n // if we make it this far, we know that EQKID is null, and either HIKID or LOKID is null, or both HIKID and LOKID are NON-null\n if(lokidNull) {\n currentParent.relatives[childType] = currentNode.relatives[TSTNode.HIKID];\n currentNode.relatives[TSTNode.HIKID].relatives[TSTNode.PARENT] = currentParent;\n return currentParent;\n }\n\n if(hikidNull) {\n currentParent.relatives[childType] = currentNode.relatives[TSTNode.LOKID];\n currentNode.relatives[TSTNode.LOKID].relatives[TSTNode.PARENT] = currentParent;\n return currentParent;\n }\n\n int deltaHi = currentNode.relatives[TSTNode.HIKID].splitchar - currentNode.splitchar;\n int deltaLo = currentNode.splitchar - currentNode.relatives[TSTNode.LOKID].splitchar;\n int movingKid;\n TSTNode<E> targetNode;\n \n // if deltaHi is equal to deltaLo, then choose one of them at random, and make it \"further away\" from the current node's splitchar\n if(deltaHi == deltaLo) {\n if(Math.random() < 0.5) {\n deltaHi++;\n } else {\n deltaLo++;\n }\n }\n\n\tif(deltaHi > deltaLo) {\n movingKid = TSTNode.HIKID;\n targetNode = currentNode.relatives[TSTNode.LOKID];\n } else {\n movingKid = TSTNode.LOKID;\n targetNode = currentNode.relatives[TSTNode.HIKID];\n }\n\n while(targetNode.relatives[movingKid] != null) targetNode = targetNode.relatives[movingKid];\n \n // now targetNode.relatives[movingKid] is null, and we can put the moving kid into it.\n targetNode.relatives[movingKid] = currentNode.relatives[movingKid];\n\n // now we need to put the target node where the current node used to be\n currentParent.relatives[childType] = targetNode;\n targetNode.relatives[TSTNode.PARENT] = currentParent;\n\n if(!lokidNull) currentNode.relatives[TSTNode.LOKID] = null;\n if(!hikidNull) currentNode.relatives[TSTNode.HIKID] = null;\n\n // note that the statements above ensure currentNode is completely dereferenced, and so it will be garbage collected\n return currentParent;\n }", "private static BstDeleteReturn deleteHelper(BinarySearchTreeNode<Integer> root, int x) {\n if (root == null) {\n return new BstDeleteReturn(null, false);\n }\n\n if (root.data < x) {\n BstDeleteReturn outputRight = deleteHelper(root.right, x);\n root.right = outputRight.root;\n outputRight.root = root;\n return outputRight;\n }\n\n if (root.data > x) {\n BstDeleteReturn outputLeft = deleteHelper(root.left, x);\n root.left = outputLeft.root;\n outputLeft.root = root;\n return outputLeft;\n }\n\n // 0 children\n if (root.left == null && root.right == null) {\n return new BstDeleteReturn(null, true);\n }\n\n // only left child\n if (root.left != null && root.right == null) {\n return new BstDeleteReturn(root.left, true);\n }\n\n // only right child\n if (root.right != null && root.left == null) {\n return new BstDeleteReturn(root.right, true);\n }\n\n // both children are present\n int minRight = minimum(root.right);\n root.data = minRight;\n BstDeleteReturn output = deleteHelper(root.right, minRight);\n root.right = output.root;\n return new BstDeleteReturn(root, true);\n }", "void deleteChains() {\n\t\tif (!params.isDebug()) {\n\t\t\tfor (File deleteCandidate : toDelete) {\n\t\t\t\tdeleteCandidate.delete();\n\t\t\t\t\n\t\t\t\ttry (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(deleteCandidate.toPath())) {\n\t\t\t\t\tfor (Path path : directoryStream) {\n\t\t\t\t\t\tif (!path.getFileName().toString().endsWith(\"_SCWRLed.pdb\")) {\n\t\t\t\t\t\t\tpath.toFile().delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private synchronized static void deleteParents(File file) {\n if (file == null) {\n return;\n }\n\n File tmp = file;\n\n for (int i = 0; i < directoryLevels; i++) {\n File directory = tmp.getParentFile();\n File[] files = directory.listFiles();\n\n // Only delete empty directories\n if (files.length != 0) {\n break;\n }\n\n directory.delete();\n tmp = directory;\n }\n }", "public void removeFromParent(){\n\t\tif(getParent() != null){\n\t\t\tif(getParent().childList != null){\n\t\t\t\tgetParent().childList.remove(this);\n\t\t\t}\n\t\t\tbound.setParent(null);\n\t\t\tfor(Scene s:sceneList){\n\t\t\t\ts.rootEntityList.add(this);\n\t\t\t}\n\t\t}\n\t}", "private void clean() {\n // TODO: Your code here.\n for (Long id : vertices()) {\n if (adj.get(id).size() == 1) {\n adj.remove(id);\n }\n }\n }", "public int delete(int k)\r\n\t{\r\n\t\tIAVLNode node = searchFor(this.root, k);\r\n\t\tIAVLNode parent;\r\n\t\tif(node==root)\r\n\t\t\tparent=new AVLNode(null);\r\n\t\telse\r\n\t\t\tparent=node.getParent();\r\n\t\t\r\n\t\tIAVLNode startHieghtUpdate = parent; // this will be the node from which we'll start updating the nodes' hieghts\r\n\t\t\r\n\t\tif (!node.isRealNode())\r\n\t\t\treturn -1;\r\n\t\t\r\n\t\t//updating the maximum and minimum fields\r\n\t\tif (node == this.maximum)\r\n\t\t\tthis.maximum = findPredecessor(node);\r\n\t\telse\r\n\t\t\tif (node == this.minimum)\r\n\t\t\t\tthis.minimum = findSuccessor(node); \r\n\t\t\r\n\t\t//if the node we wish to delete is a leaf\r\n\t\tif (!node.getLeft().isRealNode()&&!node.getRight().isRealNode())\r\n\t\t{\r\n\t\t\tif (node == parent.getLeft())\r\n\t\t\t\tparent.setLeft(node.getRight());\r\n\t\t\telse\r\n\t\t\t\tparent.setRight(node.getRight());\r\n\t\t\tnode.getRight().setParent(parent);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t //if the node we wish to delete is unary:\r\n\t\t\tif (node.getLeft().isRealNode()&&!node.getRight().isRealNode()) //only left child\r\n\t\t\t{\r\n\t\t\t\tif (node == parent.getLeft())\r\n\t\t\t\t\tparent.setLeft(node.getLeft());\r\n\t\t\t\telse\r\n\t\t\t\t\tparent.setRight(node.getLeft());\r\n\t\t\t\tnode.getLeft().setParent(parent);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tif (node.getRight().isRealNode()&&!node.getLeft().isRealNode()) //only right child\r\n\t\t\t\t\t{\r\n\t\t\t\t\tif (node == parent.getLeft())\r\n\t\t\t\t\t\tparent.setLeft(node.getRight());\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tparent.setRight(node.getRight());\r\n\t\t\t\t\tnode.getRight().setParent(parent);\r\n\t\t\t\t\t}\r\n\t\t\t\t//if the node we wish to delete is a father of two\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t\tIAVLNode suc = findSuccessor(node);\r\n\t\t\t\t\t\tIAVLNode sucsParent = suc.getParent();\r\n\t\t\t\t\t\t//deleting the successor of the node we wish to delete\r\n\t\t\t\t\t\tif (suc == sucsParent.getLeft())\r\n\t\t\t\t\t\t\tsucsParent.setLeft(suc.getRight());\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tsucsParent.setRight(suc.getRight());\r\n\t\t\t\t\t\tsuc.getRight().setParent(sucsParent);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//inserting the successor in it's new place (the previous place of the node we deleted)\r\n\t\t\t\t\t\tif (node == parent.getLeft())\r\n\t\t\t\t\t\t\tparent.setLeft(suc);\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tparent.setRight(suc);\r\n\t\t\t\t\t\tsuc.setParent(parent);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// node's children are now his scuccessor's children\r\n\t\t\t\t\t\tsuc.setRight(node.getRight());\r\n\t\t\t\t\t\tsuc.setLeft(node.getLeft());\r\n\t\t\t\t\t\tsuc.getRight().setParent(suc);\r\n\t\t\t\t\t\tsuc.getLeft().setParent(suc);\r\n\t\t\t\t\t\t//now we check if the successor of the node we wanted to delete was his son\r\n\t\t\t\t\t\tif (node != sucsParent) // the successor's parent was the deleted node (which is no longer part of the tree)\r\n\t\t\t\t\t\t\tstartHieghtUpdate = sucsParent;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tstartHieghtUpdate = suc;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//if we wish to delete the tree's root, then we need to update the tree's root to a new node\r\n\t\tif (node == this.root) \r\n\t\t{\r\n\t\t\tthis.root = parent.getRight();\r\n\t\t\tthis.root.setParent(null);\r\n\t\t}\r\n\t\t\r\n\t\tint moneRot = HieghtsUpdating(startHieghtUpdate);\r\n\t\treturn moneRot;\r\n\t}", "@DISPID(1611006076) //= 0x6006007c. The runtime will prefer the VTID if present\n @VTID(151)\n boolean alsoDeleteExclusiveParents();", "private void delete(Node curr, int ID, AtomicReference<Node> rootRef) {\n\t\tif(curr == null || curr.isNull) {\n return;\n }\n if(curr.ID == ID) {\n if(curr.right.isNull || curr.left.isNull) {\n deleteDegreeOneChild(curr, rootRef);\n } else {\n Node n = findSmallest(curr.right);\n \tcurr.ID = n.ID;\n curr.count = n.count;\n delete(curr.right, n.ID, rootRef);\n }\n }\n if(curr.ID < ID) {\n delete(curr.right, ID, rootRef);\n } else {\n delete(curr.left, ID, rootRef);\n }\n\t}", "@DISPID(1611006076) //= 0x6006007c. The runtime will prefer the VTID if present\n @VTID(152)\n void alsoDeleteExclusiveParents(\n boolean oDeleted);", "@Override\r\n\tpublic void redo() \r\n\t\t{\n\t\twasRemoved = parent.removeChild(child);\r\n\t\tif (wasRemoved) \r\n\t\t\t{\r\n\t\t\tremoveArcs(sourceArcs);\r\n\t\t\tremoveArcs(targetArcs);\r\n\t\t\t}\r\n\t\t}" ]
[ "0.76028603", "0.7388697", "0.73860425", "0.7152122", "0.7063642", "0.7024625", "0.6900388", "0.6831797", "0.6650884", "0.6616517", "0.6597496", "0.64729273", "0.6470072", "0.6334418", "0.6305335", "0.6212054", "0.61283344", "0.6124206", "0.61175984", "0.6106881", "0.60962826", "0.60910654", "0.60636723", "0.6053471", "0.6044755", "0.60393226", "0.60324055", "0.6020839", "0.60171753", "0.60027194", "0.5983709", "0.5962843", "0.5960862", "0.59548384", "0.59538823", "0.5952729", "0.5948017", "0.5940934", "0.5936752", "0.5919401", "0.59113955", "0.5906044", "0.58907187", "0.58804685", "0.58689296", "0.58674717", "0.58478415", "0.58425903", "0.5835855", "0.58301675", "0.58245087", "0.58245087", "0.58201", "0.581655", "0.57919866", "0.57919866", "0.5774199", "0.5771255", "0.5766246", "0.57585263", "0.57585263", "0.57585263", "0.57585263", "0.5756013", "0.57541037", "0.57256347", "0.57249874", "0.5688834", "0.5686383", "0.5685553", "0.56811136", "0.56714714", "0.56708914", "0.56678915", "0.56609064", "0.5653532", "0.56528544", "0.5651197", "0.56324846", "0.56268394", "0.56106764", "0.56096464", "0.5603409", "0.55944186", "0.5576157", "0.55724007", "0.5572012", "0.5569803", "0.55686593", "0.5563664", "0.5562985", "0.55607754", "0.55567086", "0.5551334", "0.5547413", "0.55333287", "0.5514057", "0.55114293", "0.5509294", "0.55002815", "0.5497637" ]
0.0
-1
Deleting the children recursively
public static void deleteFilesOnExit(final String _file) throws IOException { final File file = new File(_file); FileUtils.forceDeleteOnExit(file); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeChildren() {\r\n this.children.clear();\r\n childNum = 0;\r\n }", "@objid (\"808c0839-1dec-11e2-8cad-001ec947c8cc\")\n @Override\n public void delete() {\n // List children from the end to avoid reordering of the other GMs\n for (int i = this.children.size() - 1; i >= 0; i--) {\n GmNodeModel child = this.children.get(i);\n child.delete();\n \n // When several elements have been deleted consecutively, fix the next index\n if (i > this.children.size()) {\n i = this.children.size();\n }\n }\n \n assert (this.children.isEmpty()) : \"All children should have been deleted:\" + this.children;\n \n super.delete();\n }", "@Override\n public void removeChildren()\n {\n children.clear();\n }", "public void clearChildren() {\r\n this.children = null;\r\n }", "private static void delTree(BoardTree root) {\n if (root.children == null) return;\n for (BoardTree child : root.children) {\n delTree(child);\n }\n root.children.clear();\n root = null;\n }", "public void clearChildren() throws RemoteException;", "public void clearChildren() {\n //View parent = getParent();\n //children.forEach(child -> child.setParent(parent));\n children.clear();\n this.invalidate();\n }", "public void destroyAll() {\n children.destroyAll();\n }", "public void clear() {\n\t\t\tfor (AbstractTreeNode node : children) {\n\t\t\t\tnode.setParent(null);\n\t\t\t}\n\t\t\t\n\t\t\t// clear children\n\t\t\tchildren.clear();\n\t\t}", "public void clear()\n\t\t{ while (!children.isEmpty()) remove(children.get(0)); }", "public void delete() {\n this.root = null;\n }", "@Override\n public void markChildrenDeleted() throws DtoStatusException {\n if (polymorphismSite != null) {\n for (com.poesys.db.dto.IDbDto dto : polymorphismSite) {\n dto.cascadeDelete();\n }\n }\n }", "public final void clear(boolean cleanup) {\n for (val chapter : children) {\n chapter.parent = null;\n if (cleanup) {\n chapter.cleanup();\n }\n }\n children.clear();\n }", "public void removeChildren(QueryNode childNode);", "public void clearChildren() {\n internalGroup.clearChildren();\n }", "public void clear() {\n\t\t// If settingActive is true, clear will be called for all children anyway. No need to loop.\n\t\tif (children != null) {\n\t\t\tfor (BusinessObject child : children.values()) {\n\t\t\t\tchild.clear();\n\t\t\t}\n\t\t}\n\t}", "public void updateChildNodes() {\n\t\tList<FTNonLeafNode> nodesToRemove = new ArrayList<FTNonLeafNode>();\n\t\tfor (FTNonLeafNode intermediateNode : intermediateNodes.values()) {\n\t\t\tList<FTNode> childNodesToRemove = new ArrayList<FTNode>();\n\t\t\tfor (String childName : intermediateNode.childNodes.keySet()) {\n\t\t\t\tif (intermediateNodes.containsKey(childName)) {\n\t\t\t\t\t// update child node if it has child node\n\t\t\t\t\tFTNonLeafNode childNode = intermediateNodes.get(childName);\n\t\t\t\t\tif ((childNode instanceof FTOrNode) || (childNode instanceof FTAndNode)) {\n\t\t\t\t\t\tintermediateNode.addChildNode(childName, intermediateNodes.get(childName));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// if parent node is an OR node\n\t\t\t\t\t\t// remove this child\n\t\t\t\t\t\tif (intermediateNode instanceof FTOrNode) {\n\t\t\t\t\t\t\tchildNodesToRemove.add(childNode);\n\t\t\t\t\t\t\tnodesToRemove.add(childNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// if parent node is an AND node\n\t\t\t\t\t\t// remove the parent node and child node\n\t\t\t\t\t\t// and set their values to false in case they are referenced by other nodes\n\t\t\t\t\t\telse if (intermediateNode instanceof FTAndNode) {\n\t\t\t\t\t\t\tnodesToRemove.add(intermediateNode);\n\t\t\t\t\t\t\tnodesToRemove.add(childNode);\n\t\t\t\t\t\t\t// mark the nodes as they are not getting removed till after the loop\n\t\t\t\t\t\t\tintermediateNode.resolved = true;\n\t\t\t\t\t\t\tintermediateNode.nodeValue = false;\n\t\t\t\t\t\t\tchildNode.resolved = true;\n\t\t\t\t\t\t\tchildNode.nodeValue = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tintermediateNode.removeChildNodes(childNodesToRemove);\n\t\t\t// if no child node left for this intermediate node,\n\t\t\t// then its parent node should remove this intermediate node as well\n\t\t}\n\t\t// remove the no child nodes\n\t\tfor (FTNonLeafNode node : nodesToRemove) {\n\t\t\tintermediateNodes.remove(node.nodeName);\n\t\t}\n\t}", "void deleteTree(TreeNode node) \n {\n root = null; \n }", "private void deleteHierarchyData(TreePath[] selRows) {\r\n SponsorHierarchyBean delBean;\r\n CoeusVector delData = new CoeusVector();\r\n TreePath treePath=selRows[selRows.length-1];\r\n DefaultMutableTreeNode selNode = (DefaultMutableTreeNode)treePath.getLastPathComponent();\r\n int selRow=sponsorHierarchyTree.getRowForPath(treePath);\r\n String optionPaneMsg=EMPTY_STRING;\r\n if(selNode.isRoot()) return;\r\n if(!selNode.getAllowsChildren()) {\r\n if(selRows.length > 1) {\r\n optionPaneMsg = coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1252\");\r\n }else {\r\n optionPaneMsg = \"Do you want to remove the sponsor \"+selNode.toString()+\" from the hierarchy?\";\r\n }\r\n int optionSelected = CoeusOptionPane.showQuestionDialog(optionPaneMsg,CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n if(optionSelected == CoeusOptionPane.SELECTION_YES) {\r\n for (int index=selRows.length-1; index>=0; index--) {\r\n treePath = selRows[index];\r\n selRow = sponsorHierarchyTree.getRowForPath(treePath);\r\n selNode = (DefaultMutableTreeNode)treePath.getLastPathComponent();\r\n int endIndex = selNode.toString().indexOf(\":\");\r\n Equals getRowData = new Equals(\"sponsorCode\",selNode.toString().substring(0,endIndex == -1 ? selNode.toString().length():endIndex));\r\n CoeusVector cvFilteredData = getDeleteData(cvHierarchyData.filter(getRowData));\r\n delBean = (SponsorHierarchyBean)cvFilteredData.get(0);\r\n delBean.setAcType(TypeConstants.DELETE_RECORD);\r\n flushBean(delBean);//Added for bug fix Start #1830\r\n model.removeNodeFromParent(selNode);\r\n delData.addAll(cvFilteredData);\r\n saveRequired = true;\r\n }\r\n }\r\n } else {\r\n \r\n// int optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the Group \"+selNode.toString()+\" all its children from the hierarchy.\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_YES);\r\n int optionSelected = -1;\r\n try{\r\n if(selNode != null && selNode.getLevel() == 1 && isPrintingHierarchy && isFormsExistInGroup(selNode.toString())){\r\n optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the group \"+selNode.toString()+\" , all its children and associated sponsor forms from the hierarchy?\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n }else{\r\n optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the Group \"+selNode.toString()+\" , all its children from the hierarchy.\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n }\r\n }catch(CoeusUIException coeusUIException){\r\n CoeusOptionPane.showDialog(coeusUIException);\r\n return ;\r\n }\r\n if(optionSelected == CoeusOptionPane.SELECTION_YES) {\r\n //Case#2445 - proposal development print forms linked to indiv sponsor, should link to sponsor hierarchy - Start\r\n if(isPrintingHierarchy && selectedNode.getLevel() == 1){\r\n TreeNode root = (TreeNode)sponsorHierarchyTree.getModel().getRoot();\r\n TreePath result = findEmptyGroup(sponsorHierarchyTree, new TreePath(root));\r\n if( result == null){\r\n try{\r\n deleteForms(selNode.toString());\r\n }catch(CoeusUIException coeusUIException){\r\n CoeusOptionPane.showDialog(coeusUIException);\r\n return ;\r\n }\r\n }\r\n }\r\n Equals getRowData = new Equals(fieldName[selNode.getLevel()],selNode.toString());\r\n CoeusVector cvFilteredData = getDeleteData(cvHierarchyData.filter(getRowData));//Modified for bug fix Start #1830\r\n model.removeNodeFromParent(selNode);\r\n for (int i=0; i<cvFilteredData.size(); i++) {\r\n delBean = (SponsorHierarchyBean)cvFilteredData.get(i);\r\n delBean.setAcType(TypeConstants.DELETE_RECORD);\r\n flushBean(delBean);//Added for bug fix Start #1830\r\n saveRequired = true;\r\n }\r\n delData.addAll(cvFilteredData);\r\n }\r\n }\r\n if(selRow < sponsorHierarchyTree.getRowCount() && \r\n ((DefaultMutableTreeNode)sponsorHierarchyTree.getPathForRow(selRow).getLastPathComponent()).getAllowsChildren() && !selNode.getAllowsChildren())\r\n sponsorHierarchyTree.setSelectionPath(treePath.getParentPath());\r\n else\r\n if(selRow >= sponsorHierarchyTree.getRowCount())\r\n selRow = 0;\r\n sponsorHierarchyTree.setSelectionRow(selRow);\r\n \r\n groupsController.refreshTableData(delData);\r\n }", "public void prune() {\n this.getTree().prune();\n }", "public void finalizeChildren() {\n finalizeAllNestedChildren(this);\n }", "public void resetParents() {\r\n }", "public void removeChild(int index)\n/* */ {\n/* 457 */ this.children.removeElementAt(index);\n/* */ }", "private void deleteTree(tnode root){\n if (root != null)\n root = null;\n }", "public void releaseChildren() {\n if (children != null) {\n unloadChildren();\n\n children.unload();\n children = null;\n }\n }", "public abstract boolean deleteOrphans();", "public boolean Delete(int num) {\r\n\t\t//initialize boolean field, set to true if value found in tree\r\n\t\tboolean found;\r\n\t\t//initialize the parent node using the TreeNodeWrapper\r\n\t\tTreeNodeWrapper p = new TreeNodeWrapper();\r\n\t\t//initialize the child node using the TreeNodeWrapper\r\n\t\tTreeNodeWrapper c = new TreeNodeWrapper();\r\n\t\t//initialize largest field to re-allocate parent/child nodes\r\n\t\tTreeNode largest;\r\n\t\t//initialize nextLargest field to re-allocate parent/child nodes\r\n\t\tTreeNode nextLargest;\r\n\t\t//found set to true if FindNode methods locates value in the tree\r\n\t\tfound = FindNode(num, p, c);\r\n\t\t//if node not found return false\r\n\t\tif(found == false)\r\n\t\t\treturn false;\r\n\t\telse //identify the case number\r\n\t\t{\r\n\t\t\t//case 1: deleted node has no children\r\n\t\t\t//if left and right child nodes of value are both null node has no children\r\n\t\t\tif(c.Get().Left == null && c.Get().Right == null)\r\n\t\t\t\t//if parent left node is equal to child node then deleted node is a left child\r\n\t\t\t\tif(p.Get().Left == c.Get())\r\n\t\t\t\t\tp.Get().Left = null;\r\n\t\t\t\telse //deleted node is a right child\r\n\t\t\t\t\tp.Get().Right = null;\r\n\t\t\t//case 2: deleted node has 1 child\r\n\t\t\t//if deleted node only has 1 child node\r\n\t\t\telse if(c.Get().Left == null || c.Get().Right == null)\r\n\t\t\t{\r\n\t\t\t\t//if parent left node is equal to child node then deleted node is a left child\r\n\t\t\t\tif(p.Get().Left == c.Get())\r\n\t\t\t\t{\r\n\t\t\t\t\t//if deleted node is a left child then set deleted node child node as child to parent node\r\n\t\t\t\t\tif(c.Get().Left != null) //deleted node has a left child\r\n\t\t\t\t\t\tp.Get().Left = c.Get().Left;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tp.Get().Left = c.Get().Right;\r\n\t\t\t\t}\r\n\t\t\t\telse //if deleted node is a right child then set deleted node child node as child to parent node\r\n\t\t\t\t{\r\n\t\t\t\t\tif(c.Get().Left != null) //deleted node has a left child\r\n\t\t\t\t\t\tp.Get().Right = c.Get().Left;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tp.Get().Right = c.Get().Right;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//case 3: deleted node has two children\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//set the nextLargest as the left child of deleted node\r\n\t\t\t\tnextLargest = c.Get().Left;\r\n\t\t\t\t//set the largest as the right node of the nextLargest node\r\n\t\t\t\tlargest = nextLargest.Right;\r\n\t\t\t\t//if right node is not null then left child has a right subtree\r\n\t\t\t\tif(largest != null) \r\n\t\t\t\t{\r\n\t\t\t\t\t//while loop to move down the right subtree and re-allocate after node is deleted\r\n\t\t\t\t\twhile(largest.Right != null) //move down right subtree\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tnextLargest = largest;\r\n\t\t\t\t\t\tlargest = largest.Right;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//overwrite the deleted node\r\n\t\t\t\t\tc.Get().Data = largest.Data; \r\n\t\t\t\t\t// save the left subtree\r\n\t\t\t\t\tnextLargest.Right = largest.Left; \r\n\t\t\t\t}\r\n\t\t\t\telse //left child does not have a right subtree\r\n\t\t\t\t{\r\n\t\t\t\t\t//save the right subtree\r\n\t\t\t\t\tnextLargest.Right = c.Get().Right; \r\n\t\t\t\t\t//deleted node is a left child\r\n\t\t\t\t\tif(p.Get().Left == c.Get()) \r\n\t\t\t\t\t\t//jump around deleted node\r\n\t\t\t\t\t\tp.Get().Left = nextLargest; \r\n\t\t\t\t\telse //deleted node is a right child\r\n\t\t\t\t\t\tp.Get().Right = nextLargest; //jump around deleted node\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//return true is delete is successful\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public void clear()\n\t{\n\t\tthis.getChildren().clear();\n\t}", "public Boolean DeleteAllChild(Node node) {\n\t\tnode.setLeftChild(null);//\n\n\t\tif (node.getParent() == null) {\n\t\t\tSystem.out.println(\"error in delete root node!\");\n\t\t\treturn false;\n\t\t}\n\t\tif (node.getParent().getLeftChild() == node) {\n\t\t\tnode.getParent().setLeftChild(node.getRightChild());\n\t\t} else {\n\t\t\tNode tNode = node.getParent().getLeftChild();\n\t\t\tfor (;;) {\n\t\t\t\tif (tNode.getRightChild() == node)\n\t\t\t\t\tbreak;\n\t\t\t\ttNode = tNode.getRightChild();\n\t\t\t}\n\t\t\ttNode.setRightChild(node.getRightChild());\n\t\t}\n\t\treturn true;\n\t}", "public void rebuild() {\n\t\tif (!divided) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint totalChildren = 0;\n\t\tfor (QuadTreeNode<E> q : nodes) {\n\t\t\t// If there is a divided child then we cant do anything\n\t\t\tif (q.isDivided()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\ttotalChildren += q.numPoints();\n\t\t}\n\t\t\n\t\t// If the sum of all the children contained in the sub nodes\n\t\t// is greater than allowed then we cant do anything\n\t\tif (totalChildren > QUADTREE_NODE_CAPACITY) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Add all the nodes from the children to this node then remvoe the nodes\n\t\tpoints = new HashMap<Point, E>();\n\t\tfor (QuadTreeNode<E> q : nodes) {\n\t\t\tpoints.putAll(q.points);\n\t\t}\n\t\t\n\t\tnodes.clear();\n\t\tdivided = false;\n\t}", "public void deleteElements(boolean saveChildren) {\n\t\tfor (XmlNode node: highlightedFields) {\n\t\t\t\n\t\t\tif (saveChildren) promoteAllChildrenToSiblings(node);\n\n\t\t\tXmlNode parentNode = node.getParentNode();\n\t\t\tparentNode.removeChild(node);\n\t\t}\n\t\thighlightedFields.clear();\n\t}", "public void delete(Item<K,V> i) {\n if (i.getL() == null && i.getR() == null) {\n if (i.getP() != null) {\n declineChild(i, null);\n } else {\n root = null;\n }\n } else if (i.getL() != null && i.getR() != null) {\n Item<K,V> s = successor(i);\n declineChild(s, s.getR());\n i.setK(s.getK());\n i.setV(s.getV());\n } else {\n Item<K,V> x = i.getL();\n if (x == null) {\n x = i.getR();\n }\n if (i.getP() != null) {\n declineChild(i, x);\n } else {\n root = x;\n x.setP(null);\n }\n }\n size -= 1;\n }", "void deleteAll(Node N){\n if( N != null ){\n deleteAll(N.left);\n deleteAll(N.right);\n }\n }", "public void removeFromParent();", "public void unmemoize() {\n\t\tif (children != null) {\t\n\t\t\tfor (Item i : children) {\n\t\t\t\t((TreeItem)i).unmemoize();\n\t\t\t}\n\t\t}\n\t\ttreeLeaves = null;\n\t\tleaves = null;\n\t}", "private boolean cleanLockedObjects(ITransaction transaction,\n SimpleLockedObject lo, boolean temporary) {\n \n if (lo._children == null) {\n if (lo._owner == null) {\n if (temporary) {\n lo.removeTempLockedObject();\n } else {\n lo.removeLockedObject();\n }\n \n return true;\n } else {\n return false;\n }\n } else {\n boolean canDelete = true;\n int limit = lo._children.length;\n for (int i = 0; i < limit; i++) {\n if (!cleanLockedObjects(transaction, lo._children[i], temporary)) {\n canDelete = false;\n } else {\n \n // because the deleting shifts the array\n i--;\n limit--;\n }\n }\n if (canDelete) {\n if (lo._owner == null) {\n if (temporary) {\n lo.removeTempLockedObject();\n } else {\n lo.removeLockedObject();\n }\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }\n }", "public void removeChildAt(int index) {children.removeElementAt(index);}", "public synchronized void cleanupSimple() {\n\t\tfinal int maxNumFiles = 1000;\n\t\tfinal int numFilesToDelete = 50;\n\n\t\tString[] children = mStorageDirectory.list();\n\t\tif (children != null) {\n\t\t\tif (children.length > maxNumFiles) {\n\t\t\t\tfor (int i = children.length - 1, m = i - numFilesToDelete; i > m; i--) {\n\t\t\t\t\tFile child = new File(mStorageDirectory, children[i]);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private List<MutateOperation> removeDescendantsAndFilter(String resourceName) {\n List<MutateOperation> operations = new ArrayList<>();\n\n if (this.parentsToChildren.containsKey(resourceName)) {\n Set<String> children = parentsToChildren.get(resourceName);\n for (String child : children) {\n // Recursively adds operations to the return value that remove each of the child nodes of\n // the current node from the tree.\n operations.addAll(removeDescendantsAndFilter(child));\n }\n }\n\n // Creates and adds an operation to the return value that will remove the current node from\n // the tree.\n AssetGroupListingGroupFilterOperation operation =\n AssetGroupListingGroupFilterOperation.newBuilder().setRemove(resourceName).build();\n operations.add(\n MutateOperation.newBuilder().setAssetGroupListingGroupFilterOperation(operation).build());\n return operations;\n }", "public void removeChild(WSLNode node) {children.removeElement(node);}", "public List<PlanNode> removeAllChildren() {\n if (this.children.isEmpty()) {\n return new ArrayList<PlanNode>(0);\n }\n List<PlanNode> copyOfChildren = new ArrayList<PlanNode>(this.children);\n for (Iterator<PlanNode> childIter = this.children.iterator(); childIter.hasNext();) {\n PlanNode child = childIter.next();\n childIter.remove();\n child.parent = null;\n }\n return copyOfChildren;\n }", "protected void removeAllChildren() {\n if (mRecycleBin != null) {\n int childCount = getChildCount();\n for (int i = 0; i < childCount; i++) {\n View child = getChildAt(i);\n mRecycleBin.addScrapView(child);\n }\n }\n detachAllViewsFromParent();\n }", "public void delete(Integer data) {\n ArrayList<Node> parents = new ArrayList<>();\n Node nodeDel = this.root;\n Node parent = this.root;\n Node imBalance;\n Integer balanceFactor;\n boolean isLeftChild = false;\n if (nodeDel == null) {\n return;\n }\n while (nodeDel != null && !nodeDel.getData().equals(data)) {\n parent = nodeDel;\n if (data < nodeDel.getData()) {\n nodeDel = nodeDel.getLeftChild();\n isLeftChild = true;\n } else {\n nodeDel = nodeDel.getRightChild();\n isLeftChild = false;\n }\n parents.add(nodeDel);\n }\n\n if (nodeDel == null) {\n return;\n// delete a leaf node\n } else if (nodeDel.getLeftChild() == null && nodeDel.getRightChild() == null) {\n if (nodeDel == root) {\n root = null;\n } else {\n if (isLeftChild) {\n parent.setLeftChild(null);\n } else {\n parent.setRightChild(null);\n }\n }\n }\n// deleting a node with degree of one\n else if (nodeDel.getRightChild() == null) {\n if (nodeDel == root) {\n root = nodeDel.getLeftChild();\n } else if (isLeftChild) {\n parent.setLeftChild(nodeDel.getLeftChild());\n } else {\n parent.setRightChild(nodeDel.getLeftChild());\n }\n } else if (nodeDel.getLeftChild() == null) {\n if (nodeDel == root) {\n root = nodeDel.getRightChild();\n } else if (isLeftChild) {\n parent.setLeftChild(nodeDel.getRightChild());\n } else {\n parent.setRightChild(nodeDel.getRightChild());\n }\n }\n // deleting a node with degree of two\n else {\n Integer minimumData = minimumData(nodeDel.getRightChild());\n delete(minimumData);\n nodeDel.setData(minimumData);\n }\n parent.setHeight(maximum(height(parent.getLeftChild()), height(parent.getRightChild())));\n balanceFactor = getBalance(parent);\n if (balanceFactor <= 1 && balanceFactor >= -1) {\n for (int i = parents.size() - 1; i >= 0; i--) {\n imBalance = parents.get(i);\n balanceFactor = getBalance(imBalance);\n if (balanceFactor > 1 || balanceFactor < -1) {\n if (imBalance.getData() > parent.getData()) {\n parent.setRightChild(rotateCase(imBalance, data, balanceFactor));\n } else\n parent.setLeftChild(rotateCase(imBalance, data, balanceFactor));\n break;\n }\n }\n }\n }", "private static void finalizeAllNestedChildren(SapODataColumnMetadata children) {\n if (children.containsChild()) {\n children.getChildList().forEach(SapODataColumnMetadata::finalizeAllNestedChildren);\n }\n\n children.isChildListComplete = true;\n }", "void deleteTreeRef(Node nodeRef) {\n\t\tSystem.out.println(\"\\nSize of given Tree before delete : \" + sizeOfTreeWithRecursion(nodeRef));\n\t\tdeleteTree(nodeRef);\n\t\tnodeRef = null;\n\n\t\tSystem.out.println(\"\\nSize of given Tree after delete : \" + sizeOfTreeWithRecursion(nodeRef));\n\t}", "private Node caseNoChildren(Node deleteThis) {\r\n\r\n Node parent = deleteThis.getParent();\r\n\r\n if (parent == null) {\r\n this.root = null; // Kyseessä on juuri\r\n return deleteThis;\r\n }\r\n if (deleteThis == parent.getLeft()) {\r\n parent.setLeft(null);\r\n } else {\r\n parent.setRight(null);\r\n }\r\n return deleteThis;\r\n }", "public void deleteNode() {\n TreeNode pNode = this.getParentNode();\n int id = this.getSelfId();\n\n if (pNode != null) {\n pNode.deleteChildNode(id);\n }\n }", "private Node removeChildNodes(Node node) throws TransformerException {\r\n\r\n NodeList children = node.getChildNodes();\r\n int index = 0;\r\n int length = children.getLength();\r\n\r\n for (index = 0; index < length; index++) {\r\n Node n = children.item(index);\r\n String nString = nodeToString(n);\r\n\r\n // for(Node n : node.getChildNodes()){\r\n if (n != null) {\r\n if (n.hasChildNodes()) {// edit to remove children of children\r\n removeChildNodes(n);\r\n node.removeChild(n);\r\n } else\r\n node.removeChild(n);\r\n }\r\n }\r\n String nodeString = nodeToString(node);\r\n return node;\r\n }", "protected void deleteNested(Datastore store) {\n Field[] fields = this.getClass().getFields();\n for(Field field : fields) {\n try {\n Object value = field.get(this);\n \n if(value == null)\n continue;\n \n if(value instanceof Base) {\n if(!((Base)value).shallow)\n ((Base) value).delete(store, true);\n } else if (value instanceof Base[]) {\n for(Base b : (Base[]) value)\n if(!b.shallow)\n b.delete(store, true);\n } else if (value instanceof Collection) {\n Collection l = (Collection) value;\n\n if (l.size() > 0 && Base.class.isAssignableFrom(l.iterator().next().getClass())) {\n for(Base b : (Collection<Base>) l)\n if(!b.shallow)\n b.delete(store, true);\n }\n } else if (value instanceof Map) {\n Map m = (Map) value;\n\n if(m.size() > 0 && m.keySet().iterator().next() instanceof String &&\n Base.class.isAssignableFrom(m.values().iterator().next().getClass())) {\n\n for(Base b : ((Map<String, Base>)m).values())\n if(!b.shallow)\n b.delete(store, true);\n }\n }\n } catch (IllegalAccessException | IllegalArgumentException ex) {\n throw new MongomanException(ex);\n }\n }\n }", "void removeChild(Object child);", "public boolean deleteOrphans() {\n\t\t\treturn true;\n\t\t}", "public boolean deleteOrphans() {\n\t\t\treturn true;\n\t\t}", "public void deleteAll(Key k) {\n\t\tNode temp = getFirstNode(); // this does not work because Java is pass by value, not pass by reference\n\t\tfor (int i = 0; i < size-1; i++) {\n\t\t\tif(temp.next.key==k){\n\t\t\t\ttemp.next = temp.next.next;\n\t\t\t}\n\t\t}\n\t\tif (lastNode.key == k)\n\t\t\tlastNode = null;\n\t}", "public static void testTreeDelete()\n {\n ArrayList<Tree<String>> treelist = new ArrayList<Tree<String>>();\n treelist.add(new BinaryTree<String>());\n treelist.add(new AVLTree<String>());\n treelist.add(new RBTree<String>());\n treelist.add(new SplayTree<String>());\n\n System.out.println(\"Start TreeDelete test\");\n for(Tree<String> t : treelist)\n {\n\n try\n {\n RobotRunner.loadDictionaryIntoTree(\"newDutch.dic\", t);\n// RobotRunner.loadDictionaryIntoTree(\"smallDutch.dic\", t);\n// RobotRunner.loadDictionaryIntoTree(\"Dutch.dic\", t); //Won't work with BinaryTree and SplayTree, too many items == StackOverflow\n// RobotRunner.loadDictionaryIntoTree(\"dict.txt\", t); //Won't work with BinaryTree and SplayTree, too many items == StackOverflow\n }\n catch(IOException e)\n {\n System.out.println(e);\n }\n System.out.println(\"\\nStart Testcase\");\n\n SystemAnalyser.start();\n t.delete(\"aanklotsten\");\n SystemAnalyser.stop();\n\n SystemAnalyser.printPerformance();\n\n System.out.println(\"Stop Testcase\\n\");\n }\n System.out.println(\"Values after test.\");\n SystemAnalyser.printSomeTestValues();\n }", "public void deleteMax() {\n root = deleteMax(root);\n }", "public void deleteMax() {\n root = deleteMax(root);\n }", "public boolean delete(int m) {\r\n \r\n System.out.println(\"We are deleting \" + m);\r\n\tbtNode current = root;\r\n btNode parent = root;\r\n boolean LeftChild = true;\r\n\r\n while(current.getData() != m) \r\n {\r\n parent = current;\r\n if(m < current.getData()) \r\n {\r\n LeftChild = true;\r\n current = current.left;\r\n }\r\n else { \r\n LeftChild = false;\r\n current = current.right;\r\n }\r\n if(current == null) \r\n return false; \r\n } // end while\r\n // found node to delete\r\n\r\n // if no children, simply delete it\r\n if(current.left==null && current.right==null)\r\n {\r\n if(current == root) // if root,\r\n root = null; // tree is empty\r\n else if(LeftChild)\r\n parent.left = null; // disconnect\r\n else // from parent\r\n parent.right = null;\r\n }\r\n\r\n // if no right child, replace with left subtree\r\n else if(current.right==null)\r\n if(current == root)\r\n root = current.left;\r\n else if(LeftChild)\r\n parent.left = current.left;\r\n else\r\n parent.right = current.left;\r\n\r\n // if no left child, replace with right subtree\r\n else if(current.left==null)\r\n if(current == root)\r\n root = current.right;\r\n else if(LeftChild)\r\n parent.left = current.right;\r\n else\r\n parent.right = current.right;\r\n\r\n else // two children, so replace with inorder successor\r\n {\r\n // get successor of node to delete (current)\r\n btNode successor = getNext(current);\r\n\r\n // connect parent of current to successor instead\r\n if(current == root)\r\n root = successor;\r\n else if(LeftChild)\r\n parent.left = successor;\r\n else\r\n parent.right = successor;\r\n\r\n // connect successor to current's left child\r\n successor.left = current.left;\r\n } // end else two children\r\n // (successor cannot have a left child)\r\n return true; // success\r\n }", "public void reloadChildren() {\n // clear children list. If later none get created, then there shouldn't be any\n clearChildren();\n // check if budgetAccount has sub budgets\n List<BudgetAccountBE> subBudgets = refAcc.getDirectSubBudgets();\n int childCount = subBudgets.size();\n // only act, if referenceAccount has sub budgets\n if (childCount > 0) {\n int newLevel = hierarchyLevel + 1;\n // differentiate isLast for children\n for (int index = 0; index < childCount; index++) {\n BudgetAccountTableRow newRow = BudgetAccountTableRow.getInstance(parentActivity);\n children.add(newRow);\n newRow.init(budgetListener, subBudgets.get(index), (index == childCount -1), newLevel);\n }\n }\n }", "public void delete(int index) {\n\t\tNode node = getNode(index+1);\n\t\tNode parentOfLast = getNode(size >> 1);\n\t\tnode.data = parentOfLast.right != null ? parentOfLast.right.data : parentOfLast.left.data;\n\t\tif (parentOfLast.right != null) {\n\t\t\tparentOfLast.right = null;\n\t\t}\n\t\telse {\n\t\t\tparentOfLast.left = null;\n\t\t}\n\t}", "public boolean deleteOrphans() {\n\t\t\treturn false;\n\t\t}", "public boolean deleteOrphans() {\n\t\t\treturn false;\n\t\t}", "public boolean deleteOrphans() {\n\t\t\treturn false;\n\t\t}", "public boolean deleteOrphans() {\n\t\t\treturn false;\n\t\t}", "public void delete(E e) {\n\t\tNode node = getNode(root, e);\n\t\tif (node == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tNode parentOfLast = getNode(size >> 1);\n\t\tif (parentOfLast.right != null) {\n\t\t\tnode.data = parentOfLast.right.data;\n\t\t\tparentOfLast.right = null;\n\t\t}\n\t\telse {\n\t\t\tnode.data = parentOfLast.left.data;\n\t\t\tparentOfLast.left = null;\n\t\t}\n\t\tsize--;\n\t}", "private void removeNodeAndChildren(Node node) {\n Pane container = node.getContainerPane();\n\n if (container.getChildren().size() < 2) {\n return;\n }\n\n Iterator<javafx.scene.Node> iterator = container.getChildren().iterator();\n while (iterator.hasNext()) {\n javafx.scene.Node nextNode = iterator.next();\n if (nextNode instanceof Edge) {\n edges.remove(nextNode);\n iterator.remove();\n }\n }\n\n for (javafx.scene.Node genericNode : node.getChildrenVBox().getChildren()) {\n Pane containerPane = (Pane) genericNode;\n Node childNode = (Node) containerPane.getChildren().get(0);\n nodes.remove(childNode);\n removeNodeAndChildren(childNode);\n }\n node.getChildrenVBox().getChildren().clear();\n clearEdgeLinks();\n }", "public abstract void removeChild(Node node);", "@Test\n public void remove_BST_0_CaseRootOneChildren()\n {\n BinarySearchTree bst = new BinarySearchTree();\n No root = new No(20);\n bst.insert(null, root);\n bst.insert(root, new No(10));\n //bst.printTree();\n //System.err.println(); // Print[ERR] Devido a prioridade do buffer de impressao (out, err)\n \n assertEquals(root, bst.remove(root));\n assertEquals(new Integer(1), bst.size());\n //bst.printTree();\n }", "public void dumpChildren ()\r\n {\r\n dumpChildren(0);\r\n }", "public void delRelations();", "public void deleteChildNode(int childId) {\n List<TreeNode> cList = this.getChildList();\n int childNumber = cList.size();\n for (int i = 0; i < childNumber; i++) {\n TreeNode child = cList.get(i);\n if (child.getSelfId() == childId) {\n cList.remove(i);\n return;\n }\n }\n }", "public void makeEmpty(){\n deleteAll(root);\n root = null;\n numItems = 0;\n }", "private void deleteNode(Cat valueToDelete, Node root){\n Node temp = findNode(valueToDelete, root);\n if(temp.getRight()==null){\n Node parent = temp.getParent();\n if(temp.getLeft()==null){\n temp.setParent(null);\n if(temp==parent.getRight()){\n parent.setRight(null);\n fixBalanceValues(parent,-1);\n }\n else{\n parent.setLeft(null);\n fixBalanceValues(parent,1);\n }\n \n }\n else{\n //copy value of leftchild into the node to deletes data and delete it's leftchild\n temp.setData(temp.getLeft().getData());\n temp.setLeft(null);\n fixBalanceValues(temp, 1);\n }\n }\n Node nodeToDelete = temp.getRight();\n if(nodeToDelete.getLeft()==null){\n temp.setData(nodeToDelete.getData());\n temp.setRight(null);\n nodeToDelete.setParent(null);\n fixBalanceValues(temp,-1);\n }\n else{\n while(nodeToDelete.getLeft()!=null){\n nodeToDelete=nodeToDelete.getLeft(); \n } \n temp.setData(nodeToDelete.getData());\n Node parent = nodeToDelete.getParent();\n parent.setLeft(null);\n nodeToDelete.setParent(null);\n fixBalanceValues(parent,1);\n }\n \n \n }", "private void pruneTree(QuadNode node){\n int i;\n while(node.parent != null && node.quads[0] == null && node.quads[1] == null && node.quads[2] == null && node.quads[3] == null){\n i=0;\n if(node.x != node.parent.x){\n i++;\n }\n if(node.z != node.parent.z){\n i+=2;\n }\n node = node.parent;\n node.quads[i] = null;\n }\n }", "public static native void deleteTreesBelow(String dir) throws IOException;", "private void removeOpRecursive(Operator<?> operator) {\n List<Operator<?>> parentOperators = new ArrayList<Operator<?>>();\n for (Operator<?> op : operator.getParentOperators()) {\n parentOperators.add(op);\n }\n for (Operator<?> parentOperator : parentOperators) {\n Preconditions.checkArgument(parentOperator.getChildOperators().contains(operator),\n \"AssertionError: parent of \" + operator.getName() + \" doesn't have it as child.\");\n parentOperator.removeChild(operator);\n if (parentOperator.getNumChild() == 0) {\n removeOpRecursive(parentOperator);\n }\n }\n }", "@Override\n\tpublic void delete(BaseTreeObject treeObject, String appes) {\n\t\tList deleteList=this.queryChildListByParentId(treeObject.getId(), treeObject.getCreateId(), appes);\n\t\tthis.deleteAndSaveAndUpdate(deleteList, null, null);\n\t}", "void forceRemoveNodesAndExit(Collection<Node> nodesToRemove) throws Exception;", "public void decreaseCurrentDepth(){\n currentDepth--;\n if (this.children == null) generateChildren();\n else {\n for (Node child : this.children) child.decreaseCurrentDepth();\n }\n }", "public void clear() {\n tree.clear();\n }", "default void removeContextChildren(\n com.google.cloud.aiplatform.v1.RemoveContextChildrenRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.RemoveContextChildrenResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getRemoveContextChildrenMethod(), responseObserver);\n }", "private void deleteNode(Node<K> p) {\n // If strictly internal, copy successor's element to p and then make p\n // point to successor.\n if (p.left != null && p.right != null) {\n Node<K> s = successor(p); // 节点有 2 个子节点时,找到实际删除的后继节点\n p.key = s.key; // 将后继节点的值复制到原来节点上,原来的节点只是值被删除,节点本身不删除\n p = s; // 将实际要删除的节点位置指向后继节点位置\n } // p has 2 children //\n // //////////////////////////////////////////////////////////////////\n // Start fixup at replacement node, if it exists. //\n Node<K> replacement = (p.left != null ? p.left : p.right); // 实际删除的节点最多只有一个子节点,并且一定是红色子节点\n if (replacement != null) { // 如果有一个红色子节点\n // Link replacement to parent //\n replacement.parent = p.parent; // 将此节点上移\n if (p.parent == null) //\n root = replacement; //\n else if (p == p.parent.left) // 实际被删除的节点 p 为左子\n p.parent.left = replacement; //\n else // 实际被删除的节点 p 为右子\n p.parent.right = replacement; //\n // //\n // Null out links so they are OK to use by fixAfterDeletion. //\n p.left = p.right = p.parent = null; //\n // //\n // Fix replacement //////////////////////////////////////////////////////////////////\n if (p.color == BLACK) // 删除情形 5. 因为 replacement 是红节点,所以这里 p 的颜色一定是黑色的\n fixAfterDeletion(replacement); // 修复只要将此红节点上移并置黑就完成了\n } else if (p.parent == null) { // return if we are the only node. //////////////////////////////////////////////////////////////////\n root = null; // 根节点被删除\n } else { // No children. Use self as phantom replacement and unlink. // 被删除的节点没有子节点时\n if (p.color == BLACK) // 如果是红色的节点,直接删除就完成\n fixAfterDeletion(p); // 如果被删除的是黑色节点,则会破坏红黑树性质 5,需要修复红黑树\n\n if (p.parent != null) {\n if (p == p.parent.left)\n p.parent.left = null;\n else if (p == p.parent.right)\n p.parent.right = null;\n p.parent = null;\n }\n }\n }", "private void deleteNode(TSTNode<E> nodeToDelete) {\n if(nodeToDelete == null) return;\n nodeToDelete.data = null;\n \n while(nodeToDelete != null) {\n nodeToDelete = deleteNodeRecursion(nodeToDelete);\n }\n }", "@Test\n public void normal_recursive_delete_OData_collection() {\n String collectionName = \"deleteOdata\";\n String entityType = \"deleteEntType\";\n String accept = \"application/xml\";\n String complexTypeName = \"deleteComplexType\";\n String complexTypePropertyName = \"deleteComplexTypeProperty\";\n\n try {\n // Create collection.\n DavResourceUtils.createODataCollection(TOKEN, HttpStatus.SC_CREATED, Setup.TEST_CELL1, Setup.TEST_BOX1,\n collectionName);\n // Create entity type.\n Http.request(\"box/entitySet-post.txt\")\n .with(\"cellPath\", Setup.TEST_CELL1)\n .with(\"boxPath\", Setup.TEST_BOX1)\n .with(\"odataSvcPath\", collectionName)\n .with(\"token\", \"Bearer \" + TOKEN)\n .with(\"accept\", accept)\n .with(\"Name\", entityType)\n .returns()\n .statusCode(HttpStatus.SC_CREATED);\n // Create complex type.\n ComplexTypeUtils.create(Setup.TEST_CELL1, Setup.TEST_BOX1,\n collectionName, complexTypeName, HttpStatus.SC_CREATED);\n // Create complex type property.\n ComplexTypePropertyUtils.create(Setup.TEST_CELL1, Setup.TEST_BOX1, collectionName, complexTypePropertyName,\n complexTypeName, \"Edm.String\", HttpStatus.SC_CREATED);\n\n // Recursive delete collection.\n deleteRecursive(collectionName, \"true\", HttpStatus.SC_NO_CONTENT);\n } finally {\n deleteRecursive(collectionName, \"true\", -1);\n }\n }", "@Override\r\n public void clear(){\r\n root = null;\r\n }", "public void deleteNode(BinaryTreeNode node) // Only leaf nodes and nodes with degree 1 can be deleted. If a degree 1 node is deleted, it is replaced by its subtree.\r\n {\n if(!node.hasRightChild() && !node.hasLeftChild()){\r\n if(node.mActualNode.mParent.mRightChild == node.mActualNode) {\r\n\r\n node.mActualNode.mParent.mRightChild = null;\r\n }\r\n else if(node.mActualNode.mParent.mLeftChild == node.mActualNode) {\r\n\r\n node.mActualNode.mParent.mLeftChild = null;\r\n }\r\n //node.mActualNode = null;\r\n\r\n }\r\n //if deleted node has degree 1 and has only left child\r\n else if(node.hasLeftChild() && !node.hasRightChild()){\r\n node.mActualNode.mLeftChild.mParent = node.mActualNode.mParent;\r\n //if deleted node is left child of his father\r\n if(node.mActualNode.mParent.mLeftChild == node.mActualNode)\r\n node.mActualNode.mParent.mLeftChild = node.mActualNode.mLeftChild;\r\n //if deleted node is right child of his father\r\n else {\r\n\r\n node.mActualNode.mParent.mRightChild = node.mActualNode.mLeftChild;\r\n }\r\n }\r\n // if deleted node has degree 1 and has only right child\r\n else if(node.hasRightChild() && !node.hasLeftChild()){\r\n node.mActualNode.mRightChild.mParent = node.mActualNode.mParent;\r\n\r\n //if node is left child of his father\r\n if(node.mActualNode.mParent.mLeftChild == node.mActualNode) {\r\n\r\n\r\n node.mActualNode.mParent.mLeftChild = node.mActualNode.mRightChild;\r\n\r\n }\r\n //if node is right child of his father\r\n else\r\n node.mActualNode.mParent.mRightChild = node.mActualNode.mRightChild;\r\n\r\n\r\n }\r\n else\r\n System.out.println(\"Error : node has two child\");\r\n\r\n }", "void unsetFurtherRelations();", "public void removeChild(int index)\n {\n children.remove(index);\n }", "public void delContextNodes();", "void deleteTreeRef(TreeNode nodeRef) \n { \n \tif(nodeRef == null) return;\n \t\n \t\n \tdeleteTreeRef(nodeRef.left);\n\n \tdeleteTreeRef(nodeRef.right);\n \t\n \t\n \t System.out.println(\"Deleting node:\" + nodeRef.val);\n \t deleteTree(nodeRef); \n \n nodeRef=null; \n }", "@Test(dependsOnMethods = {\"createThingChild\"})\n public void deleteThingChildByDeleteButton() {\n mainPage.newThingChild();\n\n // count childs before delete\n int before = mainPage.countThingChilds();\n\n // delete child\n mainPage.delThingChildByDelete();\n\n // count childs after delete\n int after = mainPage.countThingChilds();\n\n Assert.assertTrue(mainPage.isChildDeleted(before, after));\n }", "private TSTNode<E> deleteNodeRecursion(TSTNode<E> currentNode) {\n \n if(currentNode == null) return null;\n if(currentNode.relatives[TSTNode.EQKID] != null || currentNode.data != null) return null; // can't delete this node if it has a non-null eq kid or data\n\n TSTNode<E> currentParent = currentNode.relatives[TSTNode.PARENT];\n\n // if we've made it this far, then we know the currentNode isn't null, but its data and equal kid are null, so we can delete the current node\n // (before deleting the current node, we'll move any lower nodes higher in the tree)\n boolean lokidNull = currentNode.relatives[TSTNode.LOKID] == null;\n boolean hikidNull = currentNode.relatives[TSTNode.HIKID] == null;\n\n ////////////////////////////////////////////////////////////////////////\n // Add by Cheok. To resolve java.lang.NullPointerException\n // I am not sure this is the correct solution, as I have not gone\n // through this sourc code in detail.\n if (currentParent == null && currentNode == this.rootNode) {\n // if this executes, then current node is root node\n rootNode = null;\n return null;\n }\n // Add by Cheok. To resolve java.lang.NullPointerException\n ////////////////////////////////////////////////////////////////////////\n\n // now find out what kind of child current node is\n int childType;\n if(currentParent.relatives[TSTNode.LOKID] == currentNode) {\n childType = TSTNode.LOKID;\n } else if(currentParent.relatives[TSTNode.EQKID] == currentNode) {\n childType = TSTNode.EQKID;\n } else if(currentParent.relatives[TSTNode.HIKID] == currentNode) {\n childType = TSTNode.HIKID;\n } else {\n // if this executes, then current node is root node\n rootNode = null;\n return null;\n }\n\n if(lokidNull && hikidNull) {\n // if we make it to here, all three kids are null and we can just delete this node\n currentParent.relatives[childType] = null;\n return currentParent;\n }\n\n // if we make it this far, we know that EQKID is null, and either HIKID or LOKID is null, or both HIKID and LOKID are NON-null\n if(lokidNull) {\n currentParent.relatives[childType] = currentNode.relatives[TSTNode.HIKID];\n currentNode.relatives[TSTNode.HIKID].relatives[TSTNode.PARENT] = currentParent;\n return currentParent;\n }\n\n if(hikidNull) {\n currentParent.relatives[childType] = currentNode.relatives[TSTNode.LOKID];\n currentNode.relatives[TSTNode.LOKID].relatives[TSTNode.PARENT] = currentParent;\n return currentParent;\n }\n\n int deltaHi = currentNode.relatives[TSTNode.HIKID].splitchar - currentNode.splitchar;\n int deltaLo = currentNode.splitchar - currentNode.relatives[TSTNode.LOKID].splitchar;\n int movingKid;\n TSTNode<E> targetNode;\n \n // if deltaHi is equal to deltaLo, then choose one of them at random, and make it \"further away\" from the current node's splitchar\n if(deltaHi == deltaLo) {\n if(Math.random() < 0.5) {\n deltaHi++;\n } else {\n deltaLo++;\n }\n }\n\n\tif(deltaHi > deltaLo) {\n movingKid = TSTNode.HIKID;\n targetNode = currentNode.relatives[TSTNode.LOKID];\n } else {\n movingKid = TSTNode.LOKID;\n targetNode = currentNode.relatives[TSTNode.HIKID];\n }\n\n while(targetNode.relatives[movingKid] != null) targetNode = targetNode.relatives[movingKid];\n \n // now targetNode.relatives[movingKid] is null, and we can put the moving kid into it.\n targetNode.relatives[movingKid] = currentNode.relatives[movingKid];\n\n // now we need to put the target node where the current node used to be\n currentParent.relatives[childType] = targetNode;\n targetNode.relatives[TSTNode.PARENT] = currentParent;\n\n if(!lokidNull) currentNode.relatives[TSTNode.LOKID] = null;\n if(!hikidNull) currentNode.relatives[TSTNode.HIKID] = null;\n\n // note that the statements above ensure currentNode is completely dereferenced, and so it will be garbage collected\n return currentParent;\n }", "private static BstDeleteReturn deleteHelper(BinarySearchTreeNode<Integer> root, int x) {\n if (root == null) {\n return new BstDeleteReturn(null, false);\n }\n\n if (root.data < x) {\n BstDeleteReturn outputRight = deleteHelper(root.right, x);\n root.right = outputRight.root;\n outputRight.root = root;\n return outputRight;\n }\n\n if (root.data > x) {\n BstDeleteReturn outputLeft = deleteHelper(root.left, x);\n root.left = outputLeft.root;\n outputLeft.root = root;\n return outputLeft;\n }\n\n // 0 children\n if (root.left == null && root.right == null) {\n return new BstDeleteReturn(null, true);\n }\n\n // only left child\n if (root.left != null && root.right == null) {\n return new BstDeleteReturn(root.left, true);\n }\n\n // only right child\n if (root.right != null && root.left == null) {\n return new BstDeleteReturn(root.right, true);\n }\n\n // both children are present\n int minRight = minimum(root.right);\n root.data = minRight;\n BstDeleteReturn output = deleteHelper(root.right, minRight);\n root.right = output.root;\n return new BstDeleteReturn(root, true);\n }", "void deleteChains() {\n\t\tif (!params.isDebug()) {\n\t\t\tfor (File deleteCandidate : toDelete) {\n\t\t\t\tdeleteCandidate.delete();\n\t\t\t\t\n\t\t\t\ttry (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(deleteCandidate.toPath())) {\n\t\t\t\t\tfor (Path path : directoryStream) {\n\t\t\t\t\t\tif (!path.getFileName().toString().endsWith(\"_SCWRLed.pdb\")) {\n\t\t\t\t\t\t\tpath.toFile().delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private synchronized static void deleteParents(File file) {\n if (file == null) {\n return;\n }\n\n File tmp = file;\n\n for (int i = 0; i < directoryLevels; i++) {\n File directory = tmp.getParentFile();\n File[] files = directory.listFiles();\n\n // Only delete empty directories\n if (files.length != 0) {\n break;\n }\n\n directory.delete();\n tmp = directory;\n }\n }", "public void removeFromParent(){\n\t\tif(getParent() != null){\n\t\t\tif(getParent().childList != null){\n\t\t\t\tgetParent().childList.remove(this);\n\t\t\t}\n\t\t\tbound.setParent(null);\n\t\t\tfor(Scene s:sceneList){\n\t\t\t\ts.rootEntityList.add(this);\n\t\t\t}\n\t\t}\n\t}", "private void clean() {\n // TODO: Your code here.\n for (Long id : vertices()) {\n if (adj.get(id).size() == 1) {\n adj.remove(id);\n }\n }\n }", "public int delete(int k)\r\n\t{\r\n\t\tIAVLNode node = searchFor(this.root, k);\r\n\t\tIAVLNode parent;\r\n\t\tif(node==root)\r\n\t\t\tparent=new AVLNode(null);\r\n\t\telse\r\n\t\t\tparent=node.getParent();\r\n\t\t\r\n\t\tIAVLNode startHieghtUpdate = parent; // this will be the node from which we'll start updating the nodes' hieghts\r\n\t\t\r\n\t\tif (!node.isRealNode())\r\n\t\t\treturn -1;\r\n\t\t\r\n\t\t//updating the maximum and minimum fields\r\n\t\tif (node == this.maximum)\r\n\t\t\tthis.maximum = findPredecessor(node);\r\n\t\telse\r\n\t\t\tif (node == this.minimum)\r\n\t\t\t\tthis.minimum = findSuccessor(node); \r\n\t\t\r\n\t\t//if the node we wish to delete is a leaf\r\n\t\tif (!node.getLeft().isRealNode()&&!node.getRight().isRealNode())\r\n\t\t{\r\n\t\t\tif (node == parent.getLeft())\r\n\t\t\t\tparent.setLeft(node.getRight());\r\n\t\t\telse\r\n\t\t\t\tparent.setRight(node.getRight());\r\n\t\t\tnode.getRight().setParent(parent);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t //if the node we wish to delete is unary:\r\n\t\t\tif (node.getLeft().isRealNode()&&!node.getRight().isRealNode()) //only left child\r\n\t\t\t{\r\n\t\t\t\tif (node == parent.getLeft())\r\n\t\t\t\t\tparent.setLeft(node.getLeft());\r\n\t\t\t\telse\r\n\t\t\t\t\tparent.setRight(node.getLeft());\r\n\t\t\t\tnode.getLeft().setParent(parent);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tif (node.getRight().isRealNode()&&!node.getLeft().isRealNode()) //only right child\r\n\t\t\t\t\t{\r\n\t\t\t\t\tif (node == parent.getLeft())\r\n\t\t\t\t\t\tparent.setLeft(node.getRight());\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tparent.setRight(node.getRight());\r\n\t\t\t\t\tnode.getRight().setParent(parent);\r\n\t\t\t\t\t}\r\n\t\t\t\t//if the node we wish to delete is a father of two\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t\tIAVLNode suc = findSuccessor(node);\r\n\t\t\t\t\t\tIAVLNode sucsParent = suc.getParent();\r\n\t\t\t\t\t\t//deleting the successor of the node we wish to delete\r\n\t\t\t\t\t\tif (suc == sucsParent.getLeft())\r\n\t\t\t\t\t\t\tsucsParent.setLeft(suc.getRight());\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tsucsParent.setRight(suc.getRight());\r\n\t\t\t\t\t\tsuc.getRight().setParent(sucsParent);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//inserting the successor in it's new place (the previous place of the node we deleted)\r\n\t\t\t\t\t\tif (node == parent.getLeft())\r\n\t\t\t\t\t\t\tparent.setLeft(suc);\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tparent.setRight(suc);\r\n\t\t\t\t\t\tsuc.setParent(parent);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// node's children are now his scuccessor's children\r\n\t\t\t\t\t\tsuc.setRight(node.getRight());\r\n\t\t\t\t\t\tsuc.setLeft(node.getLeft());\r\n\t\t\t\t\t\tsuc.getRight().setParent(suc);\r\n\t\t\t\t\t\tsuc.getLeft().setParent(suc);\r\n\t\t\t\t\t\t//now we check if the successor of the node we wanted to delete was his son\r\n\t\t\t\t\t\tif (node != sucsParent) // the successor's parent was the deleted node (which is no longer part of the tree)\r\n\t\t\t\t\t\t\tstartHieghtUpdate = sucsParent;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tstartHieghtUpdate = suc;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//if we wish to delete the tree's root, then we need to update the tree's root to a new node\r\n\t\tif (node == this.root) \r\n\t\t{\r\n\t\t\tthis.root = parent.getRight();\r\n\t\t\tthis.root.setParent(null);\r\n\t\t}\r\n\t\t\r\n\t\tint moneRot = HieghtsUpdating(startHieghtUpdate);\r\n\t\treturn moneRot;\r\n\t}", "@DISPID(1611006076) //= 0x6006007c. The runtime will prefer the VTID if present\n @VTID(151)\n boolean alsoDeleteExclusiveParents();", "private void delete(Node curr, int ID, AtomicReference<Node> rootRef) {\n\t\tif(curr == null || curr.isNull) {\n return;\n }\n if(curr.ID == ID) {\n if(curr.right.isNull || curr.left.isNull) {\n deleteDegreeOneChild(curr, rootRef);\n } else {\n Node n = findSmallest(curr.right);\n \tcurr.ID = n.ID;\n curr.count = n.count;\n delete(curr.right, n.ID, rootRef);\n }\n }\n if(curr.ID < ID) {\n delete(curr.right, ID, rootRef);\n } else {\n delete(curr.left, ID, rootRef);\n }\n\t}", "@Override\r\n\tpublic void redo() \r\n\t\t{\n\t\twasRemoved = parent.removeChild(child);\r\n\t\tif (wasRemoved) \r\n\t\t\t{\r\n\t\t\tremoveArcs(sourceArcs);\r\n\t\t\tremoveArcs(targetArcs);\r\n\t\t\t}\r\n\t\t}", "@DISPID(1611006076) //= 0x6006007c. The runtime will prefer the VTID if present\n @VTID(152)\n void alsoDeleteExclusiveParents(\n boolean oDeleted);" ]
[ "0.76031625", "0.7389558", "0.7387766", "0.7153273", "0.7063644", "0.7026237", "0.6902536", "0.68330675", "0.66514903", "0.6618092", "0.65980166", "0.64736384", "0.64719605", "0.63343155", "0.63079786", "0.6214786", "0.61285007", "0.61242586", "0.6119246", "0.6106178", "0.6096534", "0.60920805", "0.60644287", "0.6053342", "0.6045093", "0.603836", "0.6032724", "0.6019473", "0.601788", "0.60020006", "0.5984546", "0.59631854", "0.59603214", "0.5956607", "0.5955435", "0.5953049", "0.59490347", "0.59424174", "0.5937281", "0.5920512", "0.5911641", "0.59070027", "0.58901995", "0.5880744", "0.5868062", "0.58673716", "0.5845712", "0.5841782", "0.583902", "0.58326507", "0.58230495", "0.58230495", "0.581928", "0.58168054", "0.57928383", "0.57928383", "0.577253", "0.57693225", "0.5766851", "0.5757258", "0.5757258", "0.5757258", "0.5757258", "0.57569027", "0.57541114", "0.5725319", "0.5724675", "0.5689064", "0.56870043", "0.5683534", "0.5682559", "0.5670624", "0.56698036", "0.56680703", "0.5661201", "0.565417", "0.5653332", "0.5648932", "0.56347686", "0.5627408", "0.56105435", "0.56081194", "0.5603857", "0.5597168", "0.5575896", "0.55733055", "0.5572791", "0.5570643", "0.5567889", "0.55630255", "0.55621415", "0.55593574", "0.5558867", "0.5550159", "0.5548544", "0.5535529", "0.551477", "0.55099577", "0.5509018", "0.55004776", "0.54990864" ]
0.0
-1